/* 基差看板：深色交易风（每个模型一张卡片，红涨绿跌） */

:root {
  /* 数值涨跌色：红涨绿跌 */
  --up: #f6465d;
  --down: #12b886;
  /* 界面中性色 */
  --bg: #0a0c10;          /* 页面底：比纯黑稍抬，卡片才有"浮起来"的层次 */
  --card: #12151a;        /* 卡片 */
  --card-hover: #161a20;
  --line: #232830;
  --text: #eef1f5;
  --text-2: #9aa4b2;
  --text-3: #69707c;
  /* 看板交互色（选中/焦点） */
  --term-accent: #5b8cff;
  /* 「我的」页面用的浅色主题变量，保持不变 */
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #eff6ff;
  /* 兼容旧变量名 */
  --green: #12b886;
  --red: #f6465d;

  /* 半透明层次：深色下是"提亮"，浅色主题里换成"压暗" */
  --hairline-soft: rgba(255, 255, 255, .025);
  --hairline: rgba(255, 255, 255, .05);
  --fill-1: rgba(255, 255, 255, .04);
  --fill-2: rgba(255, 255, 255, .07);
  --fill-3: rgba(255, 255, 255, .09);
  --fill-4: rgba(255, 255, 255, .12);
  --bar-bg: rgba(10, 12, 16, .96);
  --mask: rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }

/* 数字统一等宽，扫读时位数能对齐 */
.cell .v, .top .status, .data .t { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ==================== 顶部状态条 ==================== */

.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: var(--bar-bg);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--hairline);
  z-index: 99;
  color: var(--text-2);
  font-size: 12px;
}

.top .btns { display: flex; align-items: center; gap: 2px; }

/* 工具开关：默认只露一个齿轮，点开才展开，再点收回 */
.top .tools { display: none; }
.top .tools.open {
  display: flex;
  align-items: center;
  gap: 2px;
  animation: tools-in .16s ease-out;
}
@keyframes tools-in {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: none; }
}
/* 窄屏上工具展开后，一行放不下工具 + 时间 + 数据源指示，
   先让状态那一块让位（工具是用户主动点开的，此刻更需要它） */
@media (max-width: 620px) {
  .top.tools-open .status { display: none; }
}

.top .gear { color: var(--text-3); }
.top .gear:hover { color: var(--text); }
.top .gear.on { color: var(--text); background: var(--fill-3); }

.bx, .btn-xs {
  height: 26px;
  min-width: 28px;
  padding: 0 7px;
  font-size: 12px;
  line-height: 24px;
  color: var(--text-2);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s, background-color .15s;
}
.bx:hover, .btn-xs:hover { color: var(--text); background: var(--fill-3); }
.bx.on { color: var(--term-accent); background: rgba(91, 140, 255, .14); }
.bx.fav.on { color: #f0b90b; background: rgba(240, 185, 11, .14); }
.bx.static { cursor: default; }

.top .status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.top .status .time { color: var(--text-2); }
.top .status .tag {
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--text-3);
  background: var(--hairline);
}
.top .status .tag.open { color: #ff8b9a; background: rgba(246, 70, 93, .13); }
.top .status .feed { color: var(--text-3); font-size: 11px; }
.top .status .feed::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--down);
  margin-right: 5px;
  vertical-align: middle;
}
.top .status .feed.off::before { background: #464c55; }

/* ==================== 行情卡片 ====================
   网格尺寸照参考页来：≥768px 每行三个（width:33.333%），
   单卡 360~500px（min-width:360px; max-width:500px），
   窄屏一列、撑满宽度，整块从左边开始排，左右只留几像素（参考页是 0）。 */

.board {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 44px 0 34px;
}

.model {
  width: 100%;
  max-width: 500px;
  padding: 0 3px 6px;   /* 卡片之间 6px，左右各贴边 3px */
}

/* ---------------------------------------------------------------
   一张卡片 = 一个模型，内部照参考图来：

     ┌─────────────────────────────────────────────┐
     │ [算][数][警]      公斤条 VS RMB美黄金      [+] │  ← 标题居中
     ├──────┬──────┬──────┬──────┤
     │卖vs卖      卖vs卖      卖vs卖      卖vs卖  │  ← 左上角小角标
     │ -4.37│ -4.71│ -4.96│ -4.12│  ← 数值右对齐
     │    ↗ │      │      │      │  ← 右下角涨跌箭头
     ├──────┼──────┼──────┼──────┤
     │≤[ ]≥[ ]│…                        │  ← 两个阈值小格子，对齐在各自数值下面
     └──────┴──────┴──────┴──────┘

   跟上一版最大的区别：数值不再居中、列名不再单独占一行，而是塞进格子的左上角，
   卡片因此矮了三分之一（一屏能多看几行）。
   --------------------------------------------------------------- */
.panel {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 3px 4px 4px;
  transition: background-color .15s, border-color .15s;
}
.panel:hover { background: var(--card-hover); }

/* 报警：整张卡片描边泛红 + 名称变红。
   名称前面不放红点——那会在标题里插进 12px 的行内内容，报警一触发
   卡片标题就被顶得往右挪、跟没报警时对不齐。 */
.panel.alarm { border-color: rgba(246, 70, 93, .6); }
.panel.alarm .title { color: var(--up); }

/* ---------- 第一行：左边三个开关，标题居中，右边走势图与自选 ---------- */

.head {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 0 3px;
}
.head .l, .head .r { display: flex; gap: 1px; flex: none; }

.head .l { order: 1; }
.head .r { order: 2; }

/* 标题左对齐、按钮右对齐：标题 flex:1 顶到左边，两个按钮组靠右 */
.head .title {
  order: 0;
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  font-size: 18px;
  font-weight: bold;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.head .l .bx, .head .r .bx {
  width: 22px;
  height: 21px;
  min-width: 22px;
  padding: 0;
  font-size: 11px;
  line-height: 21px;
  color: var(--text-3);
  background: var(--fill-1);
  border-radius: 3px;
  opacity: .7;
}
.panel:hover .head .l .bx, .panel:hover .head .r .bx { opacity: 1; }
.head .l .bx:hover, .head .r .bx:hover { color: var(--text-2); background: var(--fill-3); }
/* 展开态：压深的底色（默认三个开关都是开的，用高亮色会满屏亮点） */
.head .l .bx.on, .head .r .bx.on { opacity: 1; color: var(--text-2); background: var(--fill-4); }
.head .r .bx.fav.on { opacity: 1; color: #f0b90b; background: rgba(240, 185, 11, .14); }

/* ---------- 第二行：四个数值格子 ---------- */

.cells {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
}

.cell {
  position: relative;
  min-height: 30px;
  background: var(--fill-1);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  overflow: hidden;
  transition: background-color .2s;
}
/* 数值：右对齐、贴格子右边，跟参考图一样 */
.cell .v {
  display: block;
  text-align: right;
  font-size: 25px;
  font-weight: 700;
  line-height: 27px;
  letter-spacing: -.3px;
  padding: 2px 5px 0;
  color: var(--text);
}
.cell.small .v { font-size: 17px; }
.cell.tiny .v { font-size: 14px; }

/* 列名：格子左上角的小角标 */
.cell .lbl {
  position: absolute;
  top: 1px;
  left: 3px;
  font-size: 8px;
  line-height: 1;
  letter-spacing: .2px;
  color: var(--text-3);
  pointer-events: none;
}
.cell .lbl .s { color: var(--down); font-weight: 600; }
.cell .lbl .b { color: var(--up); font-weight: 600; }

/* 涨跌箭头：贴在列名（卖vs卖）下面，靠格子左边；数值仍然右对齐，互不打架 */
.cell .zd {
  position: absolute;
  left: 3px;
  bottom: 2px;
  width: 11px;
  height: 11px;
  font-size: 11px;
  line-height: 11px;
  text-align: center;
  display: none;
}
.cell .zd.up { display: block; color: var(--up); }
.cell .zd.down { display: block; color: var(--down); }

.cell.up .v { color: var(--up); }
.cell.down .v { color: var(--down); }

/* 变动提示：淡底闪一下（只有个性模型用） */
.cell.flash-up { background: rgba(246, 70, 93, .16); }
.cell.flash-down { background: rgba(18, 184, 134, .16); }

/* 个性模型只有一个值：整行一个格子 */
.cells.single { display: flex; flex-direction: column; }
.cells.single .cell { order: 1; }


/* ==================== 预警阈值 ====================
   每个价差两个小格子：左边 ≦、右边 ≧。
   四组格子对齐在四个数值格子的正下方，一眼看出哪个数对应哪个阈值。 */

.warn, .cells.single .warn1 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  padding-top: 3px;
}
.warn .g { display: flex; gap: 3px; min-width: 0; }

/* 个性模型只有一个值：两个格子居中，别拉满整行 */
.cells.single .warn1 {
  order: 2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 200px;
  margin: 0 auto;
}

.warn input, .cells.single .warn1 input {
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  height: 20px;
  padding: 0 3px;
  background: var(--fill-1);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  color: var(--text-2);
  font-size: 10px;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  text-align: center;
  transition: background-color .15s, border-color .15s, color .15s;
}
.warn input::placeholder, .cells.single .warn1 input::placeholder { color: var(--text-3); }
.warn input:hover, .cells.single .warn1 input:hover { background: var(--fill-2); }
.warn input:focus, .cells.single .warn1 input:focus {
  outline: none;
  color: var(--text);
  background: var(--fill-2);
  border-color: var(--term-accent);
}
/* 填过阈值的：字亮一档、底色深一档，一眼能看出哪些模型设过预警 */
.warn input:not(:placeholder-shown), .cells.single .warn1 input:not(:placeholder-shown) {
  color: var(--text);
  background: var(--fill-3);
}

/* ==================== 算法文字与数据页脚 ==================== */

.body { grid-column: 1 / -1; grid-row: 4; }

.formula, .data { display: none; }
.formula { padding: 10px 0 4px; }
.formula div {
  font-size: 12px;
  line-height: 1.75;
  color: var(--text-2);
  word-break: break-all;
}
.formula i { color: var(--text-3); margin-right: 5px; }

.data {
  margin-top: 8px;
  padding: 10px 0 4px;
  border-top: 1px solid var(--hairline);
  font-size: 12px;
  line-height: 1.9;
  color: var(--text-2);
  word-break: break-all;
}
.data div { color: var(--text-2); }
.data .t { color: var(--text-3); }
.data .derived { color: var(--text-3); }

/* ==================== 底部标签 ==================== */

.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32px;
  background: var(--bar-bg);
  backdrop-filter: saturate(140%) blur(10px);
  border-top: 1px solid var(--hairline);
  z-index: 8888;
  display: flex;
}

.footer .item {
  flex: 1 1 0;
  min-width: 44px;
  height: 31px;
  line-height: 31px;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  border-top: 2px solid transparent;
  transition: color .15s;
}
.footer .item.active { color: var(--text); border-top-color: var(--term-accent); }
.footer .item .dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 3px;
  border-radius: 50%;
  background: var(--up);
  vertical-align: middle;
}

/* 空状态独占一行 */
.empty-tab { display: none; width: 100%; padding: 60px 20px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ==================== 窄屏微调 ==================== */

/* ≥768px 每行三个卡片，尺寸与参考页一致 */
@media (min-width: 768px) {
  .model { width: 33.333%; min-width: 360px; }
}

@media (max-width: 400px) {
  .cell .v { font-size: 18px; }
  .cell.small .v { font-size: 15px; }
  .cell.tiny .v { font-size: 13px; }
  .head .title { font-size: 14px; }
}

/* 很窄的机器（320 这种）再收一点，保证四个数不挤 */
@media (max-width: 360px) {
  .cell .v { font-size: 17px; }
  .cell.small .v { font-size: 14px; }
  .cell.tiny .v { font-size: 12.5px; }
  .head .title { font-size: 13px; }
  .head .l .bx, .head .r .bx { width: 20px; min-width: 20px; }
}

/* ==================== 浅色主题 ====================
   深色是默认。切换只改下面这一组变量，样式本身一个都不动——
   所以以后新增样式只要用变量，两个主题都会跟着变。 */
body.theme-light {
  --bg: #eef1f6;
  --card: #ffffff;
  --card-hover: #f7f9fc;
  --line: #dde3ec;
  --text: #1e293b;
  --text-2: #5a6577;
  --text-3: #8b95a5;
  --term-accent: #2563eb;
  --up: #d64257;
  --down: #0e9c74;
  --green: #0e9c74;
  --red: #d64257;
  --hairline-soft: rgba(15, 23, 42, .03);
  --hairline: rgba(15, 23, 42, .09);
  --fill-1: rgba(15, 23, 42, .035);
  --fill-2: rgba(15, 23, 42, .06);
  --fill-3: rgba(15, 23, 42, .085);
  --fill-4: rgba(15, 23, 42, .12);
  --bar-bg: rgba(255, 255, 255, .96);
  --mask: rgba(15, 23, 42, .38);
}

/* === 走势图 ==================== */

.chart-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .62);
  z-index: 3000;
}

.chart-modal {
  position: fixed;
  z-index: 3001;
  left: 50%;
  top: 4vh;
  transform: translateX(-50%);
  width: 960px;
  max-width: 96vw;
  max-height: 92vh;
  overflow: auto;
  background: #1a1a19;
  border-radius: 6px;
  color: #f0efec;
  padding: 10px 12px 14px;
}

.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.chart-head b { font-size: 16px; }
.chart-head-right { display: flex; gap: 6px; }

.chart-btn {
  font: inherit;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(240, 239, 236, .28);
  background: transparent;
  color: #f0efec;
  cursor: pointer;
}
.chart-btn.on { background: #3987e5; border-color: #3987e5; color: #fff; }

.chart-filter { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.chart-status { color: #c3c2b7; font-size: 12px; margin-left: 4px; }

.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.chart-legend-item { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #c3c2b7; }
.chart-legend-name { color: #c3c2b7; }
.chart-legend-value { color: #f0efec; font-variant-numeric: tabular-nums; }
.chart-legend-key { width: 14px; height: 0; border-top: 2px solid #fff; border-radius: 1px; display: inline-block; }

.chart-canvas-wrap { position: relative; background: #1a1a19; border-radius: 4px; }
.chart-canvas-wrap canvas { display: block; width: 100%; touch-action: none; }

.chart-tip {
  position: absolute;
  background: rgba(12, 12, 12, .92);
  border: 1px solid rgba(240, 239, 236, .18);
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 12px;
  pointer-events: none;
  min-width: 120px;
}
.chart-tip-time { color: #c3c2b7; margin-bottom: 3px; }
.chart-tip-row { display: flex; align-items: center; gap: 6px; }
.chart-tip-row b { color: #f0efec; font-variant-numeric: tabular-nums; }
.chart-tip-row span { color: #c3c2b7; }

.chart-table { max-height: 220px; overflow: auto; margin-top: 8px; }
.chart-table table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.chart-table th, .chart-table td { text-align: right; padding: 3px 6px; border-bottom: 1px solid rgba(240, 239, 236, .08); }
.chart-table th:first-child, .chart-table td:first-child { text-align: left; }
.chart-table th { color: #c3c2b7; font-weight: 600; }
.chart-note { color: #c3c2b7; font-size: 12px; margin: 6px 0 0; }

/* ==================== 提示与弹层 ==================== */

.toast {
  position: fixed;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 14px;
  padding: 12px 25px;
  border-radius: 2px;
  z-index: 10000;
  max-width: 80%;
  text-align: center;
}

.mask {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: .5;
  z-index: 2000;
  /* 只做视觉压暗，不挡住看板的点击 */
  pointer-events: none;
}

/* 登录门槛：商业版没登录就什么都看不到。
   和普通提示用的 .mask 不同，这一层要真的挡住点击，而且没有关闭入口。 */
.gate-mask {
  pointer-events: auto;      /* 和普通提示的区别：这一层真的挡点击 */
  background: var(--mask);   /* 只压暗，背后的行情照样看得见 */
  z-index: 2100;
}
/* 用 .me-modal.gate-modal 这种双类名：.me-modal 是在文件后面定义的，
   单类名同权重会按先后顺序被它盖掉（z-index / top 都会失效）。 */
.me-modal.gate-modal {
  z-index: 2101;
  top: 12vh;
  max-height: 78vh;
  overflow: auto;
}
.me-modal.gate-modal .me-card-title { font-size: 19px; }
.gate-intro { text-align: center; margin: 0 0 6px; }
/* 门槛立着的时候，底下的看板跟着停住滚动，免得以为还能操作 */
body.gated { overflow: hidden; }

.modal {
  position: fixed;
  top: 150px;
  left: 50%;
  transform: translateX(-50%);
  width: 350px;
  max-width: 94%;
  background: #fff;
  border-radius: 4px;
  z-index: 2001;
  padding: 20px 15px;
  text-align: center;
}

.modal h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; color: #333; }
.modal .close-x { position: absolute; top: 6px; right: 10px; font-size: 20px; color: #999; cursor: pointer; line-height: 1; }
.modal .form { background: #eef7fd; padding: 12px 10px; }
.modal input {
  height: 34px;
  border: 1px solid #ccc;
  border-radius: 0;
  padding: 0 6px;
  font-size: 14px;
  margin-bottom: 8px;
}
.modal .phone { width: 180px; }
.modal .code { width: 80px; margin-right: 4px; }
.modal .send { width: 90px; height: 35px; background: var(--green); border: 1px solid var(--green); color: #fff; border-radius: 0; cursor: pointer; }
.modal .send:disabled { opacity: .65; cursor: default; }
.modal .submit {
  width: 180px;
  height: 34px;
  margin-top: 6px;
  background: #1c84c6;
  border: 1px solid #1c84c6;
  color: #fff;
  border-radius: 0;
  cursor: pointer;
}
.modal .submit:disabled { opacity: .65; cursor: default; }
.modal .desc { font-size: 15px; color: #333; line-height: 1.6; text-align: left; margin: 12px 0 0; }
.modal .tabs { display: flex; justify-content: center; gap: 16px; margin-bottom: 10px; }
.modal .tabs span { cursor: pointer; padding-bottom: 3px; border-bottom: 2px solid transparent; color: #666; }
.modal .tabs span.on { color: #333; border-color: var(--green); }

/* 我的 */
/* ==================== 我的 ====================
   和看板同一套深色配色（原来是浅色，#f4f6fa 底 + 白卡片，跟看板放一起像两个站）。
   底部标签栏不再单独覆写尺寸：以前「我的」把 footer 撑到 54px、item 撑到 52px，
   一点过去整条标签栏就"变大"——现在两个视图完全一致。 */

body.view-mine { background: var(--bg); color: var(--text); }
.view-mine .top { display: none; }

.mine {
  padding: 32px 24px calc(56px + env(safe-area-inset-bottom));
  min-height: 100dvh;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.me-shell { max-width: 960px; margin: auto; }
.me-shell:has(.me-login-card) { max-width: 440px; }
.me-heading { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.me-heading h1 { margin: 0; font-size: 24px; font-weight: 650; line-height: 1.4; }
.me-account-region { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.me-account-region > * { min-width: 0; }
.me-account-region > .me-card:not(.me-link), .me-account-region > .me-inline-error { grid-column: 1/-1; }
.me-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 24px;
  margin: 0;
  color: var(--text);
}
.me-card-title { font-size: 16px; font-weight: 600; color: var(--text); margin: 0 0 6px; }
.me-hint { color: var(--text-2); font-size: 13px; line-height: 1.7; margin: 6px 0 0; }
.me-loading { font-size: 14px; color: var(--text-2); min-height: 100px; display: flex; align-items: center; }
.me-demo {
  padding: 10px 14px;
  background: rgba(91, 140, 255, .12);
  border: 1px solid rgba(91, 140, 255, .28);
  color: #a9c1ff;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 12px;
}
/* 账户头部 */
.me-account-card { padding: 22px 24px; }
.me-profile { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.me-profile-info { flex: 1; min-width: 160px; }
.me-name { font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.me-sub { font-size: 13px; color: var(--text-2); margin-top: 4px; font-variant-numeric: tabular-nums; }
.me-pill {
  background: var(--hairline);
  color: var(--text-2);
  border: 1px solid var(--fill-3);
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 12px;
  white-space: nowrap;
}
.me-shortcuts {
  display: grid;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 0 20px;
}
.me-shortcuts .me-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 18px; gap: 2px 12px; align-content: center; padding: 18px 0; border-radius: 0; }
.me-shortcuts .me-row > i { color: var(--text-3); font-size: 18px; grid-row: 1/3; }
.me-shortcuts .me-row > span:not(.me-chevron) { font-weight: 600; }
.me-shortcuts .me-row small { color: var(--text-2); font-size: 12px; grid-column: 2; grid-row: 2; }
.me-shortcuts .me-chevron { grid-column: 3; grid-row: 1/3; }
/* 看板地址 */
.me-link-field { display: flex; gap: 10px; margin-top: 20px; align-items: center; }
.me-link-field input {
  height: 46px;
  min-width: 0;
  flex: 1;
  border: 1px solid var(--fill-3);
  border-radius: 8px;
  background: var(--fill-1);
  color: var(--text-2);
  padding: 0 14px;
  font: 13px ui-monospace, Consolas, monospace;
}
/* 操作列表 */
.me-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 13px 8px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  font: inherit;
  font-size: 14px;
  color: var(--text-2);
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
}
.me-row:last-child { border-bottom: 0; }
.me-row:hover { background: var(--fill-1); }
.me-row i { color: var(--text-3); width: 18px; text-align: center; }
.me-row.danger, .me-row.danger i { color: var(--up); }
.me-chevron { margin-left: auto; color: var(--text-3); font-size: 20px; line-height: 1; }
.me-admin { display: grid; grid-template-columns: 140px 1fr 1fr; align-items: center; gap: 20px; padding: 16px 24px; }
.me-admin .me-card-title { color: var(--text-3); font-size: 13px; font-weight: 500; margin: 0; }
.me-admin .me-row { border-bottom: 0; }
.me-signout { grid-column: 1/-1; }
.me-signout .me-row { width: auto; padding: 10px 0; font-size: 13px; }
.me-signout .me-chevron { display: none; }
/* 表单 */
.me-login-card { padding: 28px; }
.me-login-card .me-card-title { font-size: 20px; }
/* 放在弹层里时，弹层自己已经是卡片了，不要再套一层边框 */
.me-login-card.is-flat { background: none; border: 0; border-radius: 0; padding: 0; }
/* 登录方式切换 */
.me-tabs { display: flex; gap: 20px; margin: 16px 0 4px; border-bottom: 1px solid var(--fill-2); }
.me-tab {
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--text-3);
  padding: 0 0 10px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.me-tab:hover { color: var(--text-2); }
.me-tab.active { color: var(--text); border-bottom-color: var(--term-accent); font-weight: 600; }
/* 验证码：输入框 + 获取验证码 */
.me-code-row { display: flex; gap: 10px; }
.me-code-row input { flex: 1; min-width: 0; }
.me-code-btn { min-width: 104px; min-height: 46px; }
/* 底部的 注册 / 忘记密码 */
.me-links { text-align: center; margin: 14px 0 0; font-size: 13px; }
.me-links-sep { color: var(--text-3); margin: 0 8px; }
.me-link {
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--term-accent);
  cursor: pointer;
  padding: 6px 2px;
}
.me-link:hover { text-decoration: underline; }
.me-login-fields { display: grid; grid-template-columns: 1fr; margin-top: 8px; }
.me-field { display: block; margin-top: 16px; min-width: 0; }
.me-field > span { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.me-field input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 13px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--fill-1);
  border: 1px solid var(--fill-3);
  border-radius: 8px;
}
.me-field input::placeholder { color: var(--text-3); font-size: 13px; }
.me-field input:focus { outline: none; border-color: var(--term-accent); box-shadow: 0 0 0 3px rgba(91, 140, 255, .16); }
.me-field input:disabled { background: var(--hairline-soft); }
.me-optional { margin: 8px 0; }
.me-optional summary { color: var(--text-3); font-size: 12px; cursor: pointer; min-height: 44px; padding: 12px 0; }
.me-optional .me-field { margin-top: 0; }
.me-login-note { text-align: center; color: var(--text-3); font-size: 11px; margin: 12px 0 0; }
.me-inline-error { font-size: 12px; color: var(--up); margin: 10px 0; }
.me-inline-error:empty { display: none; }
.me-btn {
  min-height: 44px;
  padding: 10px 17px;
  font: inherit;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid var(--fill-4);
  background: var(--hairline);
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
}
.me-btn:hover { background: var(--fill-4); color: var(--text); }
.me-btn.small { min-height: 44px; padding: 9px 12px; font-size: 12px; }
.me-btn.primary { background: var(--term-accent); border-color: var(--term-accent); color: #0a0c10; font-weight: 600; }
.me-btn.primary:hover { background: #7ba4ff; }
.me-btn.block { display: block; width: 100%; min-height: 48px; margin-top: 12px; font-size: 14px; }
.me-btn:disabled { opacity: .6; cursor: default; }
.me-card > .me-btn { margin-top: 16px; }
.mine button:focus-visible, .mine summary:focus-visible, .mine input:focus-visible { outline: 3px solid rgba(91, 140, 255, .5); outline-offset: 3px; }
.me-local-note { color: var(--text-3); font-size: 12px; margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .me-account-region { grid-template-columns: 1fr; gap: 16px; }
  .me-admin { grid-template-columns: 1fr; gap: 4px; }
  .me-admin .me-card-title { margin-bottom: 6px; }
  .me-admin .me-row { border-bottom: 1px solid var(--hairline); }
  .me-admin .me-row:last-child { border-bottom: 0; }
}
@media (max-width: 640px) {
  .mine { padding: 24px 16px calc(52px + env(safe-area-inset-bottom)); }
  .me-heading { margin-bottom: 16px; }
  .me-heading h1 { font-size: 22px; }
  .me-card { padding: 20px; }
  .me-profile { gap: 12px; }
  .me-name { font-size: 18px; }
  .me-sub { font-size: 13px; }
  .me-pill { font-size: 11px; }
  .me-shortcuts { padding: 0 20px; }
  .me-shortcuts .me-row { padding: 16px 0; }
  .me-link-field { gap: 8px; flex-wrap: wrap; }
  .me-link-field input { flex-basis: 100%; padding: 0 10px; font-size: 12px; }
  .me-link-field .me-btn { width: 100%; }
  .me-login-card .me-card-title { font-size: 19px; }
  .me-local-note { line-height: 1.8; }
}

/* 弹窗 */
.me-modal {
  position: fixed;
  z-index: 2001;
  left: 50%;
  top: 12vh;
  transform: translateX(-50%);
  width: 380px;
  max-width: 92vw;
  background: var(--card);
  border: 1px solid var(--fill-2);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
  padding: 22px 20px 18px;
  font-size: 15px;
  color: var(--text);
}
.me-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--fill-2);
  color: var(--text-3);
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
}
.me-modal-close:hover { background: var(--fill-4); color: var(--text); }

.hint {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, .72);
  color: #fff;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 3px;
  z-index: 9000;
  display: none;
}

.empty-tab { color: var(--text-3); text-align: center; padding: 60px 20px; font-size: 14px; display: none; }
