/* 下班俱乐部 — all values from tokens.css scales. Grayscale hierarchy first. */
* { box-sizing: border-box; }
html, body { margin: 0; }
html { scrollbar-width: thin; scrollbar-color: var(--border-strong) var(--bg); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--r-pill);
  border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
::-webkit-scrollbar-corner { background: var(--bg); }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: var(--text-base); line-height: 1.6;
  -webkit-font-smoothing: antialiased; min-height: 100vh; position: relative;
}
.shell { position: relative; z-index: 1; }
button { font: inherit; cursor: pointer; }
input, select { font-family: inherit; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---- layout ---- */
.shell { max-width: 1180px; margin: 0 auto; padding: 0 var(--sp-4) var(--sp-8); }
.topbar { position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid transparent; transition: border-color .2s ease, box-shadow .2s ease; }
.topbar.stuck { border-bottom-color: var(--border); box-shadow: 0 6px 20px -12px var(--shadow-strong); }
.bar-inner { max-width: 1180px; margin: 0 auto; padding: var(--sp-4);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.brand { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--text-lg); font-weight: 600; letter-spacing: -0.01em; }
.brand-mark { width: 26px; height: 26px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; }
.brand small { display: block; font-size: var(--text-xs); font-weight: 400; color: var(--muted); letter-spacing: 0; }
.who { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--text-sm); }
.who .bal { font-weight: 600; }
.avatar { width: 32px; height: 32px; border-radius: var(--r-pill); object-fit: cover; display: inline-block; vertical-align: middle; background: var(--surface-2); }
.avatar.sm { width: 24px; height: 24px; }
.avatar.xs { width: 18px; height: 18px; }
.avatar-fallback { display: inline-flex; align-items: center; justify-content: center; font-size: var(--text-xs); font-weight: 600; color: var(--accent); background: var(--accent-soft); }
.avatar-btn { all: unset; cursor: pointer; border-radius: var(--r-pill); display: inline-flex; transition: box-shadow .15s ease; }
.avatar-btn:hover { box-shadow: 0 0 0 2px var(--accent); }
/* 顶栏窄屏：收副标题、禁折行 —— CJK 会任意断词，昵称/退出/品牌名曾各自折成两行 */
@media (max-width: 640px) {
  .bar-inner { padding: var(--sp-3); gap: var(--sp-2); }
  .brand { font-size: var(--text-base); }
  .brand small { display: none; }
  .who { gap: var(--sp-2); font-size: var(--text-xs); }
  .who > span, .who .btn { white-space: nowrap; }
  .avatar { width: 28px; height: 28px; }
}
.mname { display: flex; align-items: center; gap: var(--sp-2); }
.rn { display: inline-flex; align-items: center; gap: var(--sp-2); }
.hname { gap: var(--sp-1); }

/* ---- tabs ---- */
.tabbar { position: sticky; top: var(--bar-h, 68px); z-index: 19;
  background: var(--bg);
  border-bottom: 1px solid var(--border); margin-bottom: var(--sp-5); }
.tabs { display: flex; justify-content: flex-start; gap: var(--sp-5); padding-top: 0; padding-bottom: 0; }
.tab { padding: var(--sp-2) 0; font-size: var(--text-sm); font-weight: 500; color: var(--faint);
  background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--fg); border-bottom-color: var(--accent); }

/* ---- cards ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-5); box-shadow: var(--e1); }
/* 暗色下 --border(#625349) 与卡面(#4c3c35)几乎同色，边框隐形 → 用更亮的 border-strong 把卡界画出来 */
@media (prefers-color-scheme: dark) { .card { border-color: var(--border-strong); } }
.card + .card { margin-top: var(--sp-4); }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-4); }
/* 外置分节标题：卡名挪到卡外，靠排版分节（竞猜记录tab 上次结果）。
   插在两卡之间会断掉 .card + .card 的兄弟选择器，间距由这里的上下 margin 负责 */
.card-h.out { margin: var(--sp-4) 0 var(--sp-3); }
.card-h h2 { font-size: var(--text-base); font-weight: 600; margin: 0; }
.card-h .hint { font-size: var(--text-xs); color: var(--muted); }
.section-label { font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 var(--sp-3); }

/* ---- 首行：余额 / 盈亏 / 签到 / 打卡 同排 ---- */
.hero-card { padding: 0; overflow: hidden; }
.hero-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(264px, 1.2fr); }
.hero-row > .stat { padding: var(--sp-5); min-width: 0; }
.hero-row > .stat + .stat { border-left: 1px solid color-mix(in oklab, var(--muted) 55%, var(--border-strong) 45%); }
.stat .label { font-size: var(--text-xs); color: var(--muted); font-weight: 500;
  letter-spacing: .04em; }
.stat .value { font-size: var(--text-2xl); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
/* 四格的数值/控件共用一条基线：签到按钮不再掉到下一行 */
.stat-body { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-3);
  min-height: 38px; flex-wrap: wrap; }
/* 打卡格：整行里唯一可操作的格，用淡底色区分，不再加边缘色条 */
.stat-clock { background: color-mix(in oklab, var(--accent) 4%, var(--surface)); }
.stat-clock.done { background: color-mix(in oklab, var(--pos) 5%, var(--surface)); }
.clock-input { width: 160px; max-width: 100%; flex: 0 0 auto; padding: 7px var(--sp-2); border-radius: var(--r-md);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg);
  font-size: var(--text-lg); font-weight: 600; }
.clock-input::-webkit-calendar-picker-indicator { opacity: .45; cursor: pointer; }
.clock-input::-webkit-calendar-picker-indicator:hover { opacity: .8; }
.clock-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.clock-tag { font-size: var(--text-xs); font-weight: 600; padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--pos-soft); color: var(--pos); }
.clock-off { font-size: var(--text-lg); font-weight: 600; color: var(--muted); }
.clock-alt { display: flex; gap: var(--sp-3); margin-top: var(--sp-2); }
.linkbtn { all: unset; cursor: pointer; font-size: var(--text-xs); color: var(--muted);
  border-bottom: 1px dashed var(--border-strong); padding-bottom: 1px; }
.linkbtn:hover { color: var(--accent); border-bottom-color: var(--accent); }
.linkbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.pos { color: var(--pos); } .neg { color: var(--neg); }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4); border-radius: var(--r-md); font-size: var(--text-sm); font-weight: 500;
  border: 1px solid transparent; transition: box-shadow .15s ease, background .15s ease, transform .1s ease, border-color .15s ease, color .15s ease; }
.btn-primary { background: var(--accent); color: var(--accent-fg); box-shadow: var(--e1); }
.btn-primary:active { box-shadow: none; }
.btn-primary:disabled { background: var(--surface-2); cursor: not-allowed; box-shadow: none;
  border-color: var(--border-strong); color: color-mix(in oklab, var(--fg) 66%, var(--surface-2)); }
.btn-secondary { background: var(--surface); color: var(--fg); border-color: var(--border-strong); }
.btn-tertiary { background: none; color: var(--muted); padding: var(--sp-1) var(--sp-2); }
.btn-tertiary:hover { color: var(--fg); }
.btn-danger { background: none; color: var(--neg); padding: var(--sp-1) var(--sp-2); font-size: var(--text-sm); }
.btn-sm { padding: var(--sp-1) var(--sp-3); font-size: var(--text-sm); }
.btn-block { width: 100%; }

/* ---- forms ---- */
.field { margin-bottom: var(--sp-5); }
.field label { display: block; font-size: var(--text-sm); font-weight: 500; margin-bottom: var(--sp-1); }
.field input, .field select { width: 100%; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg);
  font-size: var(--text-base); box-shadow: inset 0 1px 2px var(--shadow); }
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field .help { font-size: var(--text-sm); color: var(--muted); margin-top: var(--sp-1); }

/* ---- markets ---- */
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sp-4); }
.rank-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
@media (max-width: 720px) { .rank-grid { grid-template-columns: 1fr; } }
.mcard { position: relative; background: var(--surface); border-radius: var(--r-lg); padding: var(--sp-4);
  box-shadow: var(--e1); border: 1px solid var(--border); transition: box-shadow .18s ease, border-color .18s ease;
  display: flex; flex-direction: column; }
/* 头部高度统一：有池/还没人猜的标题行此前一个 26px 一个换行 64px，
   导致同一行里各卡的档位网格上下错位。固定两行头部，bins 用 margin-top:auto
   贴底，保证同一行所有卡的档位网格顶边对齐。只作用于时段竞猜卡（含 .bins），
   排行卡（.rank-card）头部结构不同，不受影响。 */
.mcard:not(.rank-card) .mname { min-height: 26px; }
.mcard:not(.rank-card) .msub { min-height: 27px; display: flex; align-items: center; }
.mcard:not(.rank-card) .bins { margin-top: auto; }
.rank-card { background: var(--surface); }
/* ---- 锁定态：靠「收回强调」表达，不靠报警色 ----
   锁定不是错误，是正常业务状态：去掉品牌描边与「最可能」标记，
   倍数降一级但保持可读（不用 opacity 把数字糊掉——锁死后大家仍关心倍数）。 */
.mcard.locked { border-color: var(--border); box-shadow: var(--e1); background: var(--surface); }
.mcard.locked .mname { font-weight: 500; color: var(--muted); }
.mcard.locked .msub { color: var(--faint); }
.mcard.locked .bo, .mcard.locked .ro { color: var(--muted); }
.mcard.locked .bl { color: var(--faint); }
.rank-card.locked .mname { color: var(--muted); font-weight: 500; }
.rank-card.locked .msub { color: var(--faint); margin: 0 0 var(--sp-2); }
/* 不可竞猜的档位：仍然点得动（点了给原因），只是不响应高亮 */
.bin.off button { cursor: not-allowed; }
.bin.off .bo { color: var(--muted); }
.bin.off .bl { color: var(--faint); }
.rank-row.off .rank-hit { cursor: not-allowed; }
.mcard .mname { font-weight: 600; font-size: var(--text-base); display: flex; align-items: center; gap: var(--sp-2);
  margin-bottom: 2px; }
.mcard .mname > span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcard .msub { font-size: var(--text-xs); color: var(--muted); margin-bottom: var(--sp-3); }
.rank-card .mname { margin-bottom: var(--sp-3); }
.mpool { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.mpool b { font-size: var(--text-xs); font-weight: 600; color: var(--accent); }
.bins { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.bin { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: stretch;
  min-width: 0; padding: 0; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface-2);
  transition: border-color .16s ease, background .16s ease, transform .12s ease; }
.bin button { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center;
  gap: 1px; width: 100%; padding: 7px 2px 8px; box-sizing: border-box; }
.bin button:disabled { cursor: not-allowed; opacity: .45; }
/* 档位名在窄格子里会溢出按钮（「9点半–10点半」比格子宽）：允许收缩并省略，
   完整名在 title 里；热门点不参与收缩。 */
.bin .bl { font-size: var(--text-2xs); color: var(--muted); white-space: nowrap; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 3px; max-width: 100%; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; }
.hotdot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
/* 倍数是主角：大字号、高对比，不被色块压住 */
.bin .bo { font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15;
  color: var(--fg); font-variant-numeric: tabular-nums; }
/* 高亮口径（互斥优先级：不可用 > 我的注 > 最可能）：
   - 最可能档 = 档名前的圆点
   - 我竞猜过   = accent 内描边
   倍数数字永远中性色，不兼职表达状态 */
   - 最可能档 = 档名前的圆点（hotdot）
   - 价差机会 = 左侧绿色竖条 + 浅绿底（绿色只属于「机会」这一个语义）
   - 我竞猜过   = accent 内描边
   倍数数字永远中性色——它不兼职表达任何状态 */
.bin.hot .bo { color: var(--fg); }
.bin.hot .bmodel { color: var(--muted); }
  background: color-mix(in oklab, var(--pos) 6%, var(--surface-2)); }
.bin.mine { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
/* 注定作废：斜纹压掉，明确「这盘没得玩」，而不是单纯变灰让人以为坏了 */
.bin.doomed, .rank-row.doomed { border-color: var(--border);
  background: repeating-linear-gradient(-45deg, var(--surface-2) 0 5px,
    color-mix(in oklab, var(--fg) 5%, var(--surface-2)) 5px 10px); }
.bin.doomed .bo, .rank-row.doomed .ro { color: var(--faint); text-decoration: line-through; }
.bin.doomed::after { display: none; }
.rank-row.doomed .rbar { display: none; }
.bin:not(.off):not(:has(button:disabled)):hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--e2); }
.bin .bamt { position: absolute; top: 3px; right: 3px; font-size: var(--text-2xs); font-weight: 700;
  color: var(--accent); background: var(--surface); padding: 0 4px; border-radius: var(--r-pill);
  box-shadow: var(--e1); line-height: 1.5; pointer-events: none; }
/* 资金占比：底部细条，替代原来的概率色块 */
.bin::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px;
  width: var(--share, 0%); background: var(--accent); opacity: .5;
  transition: width .35s cubic-bezier(.2,.8,.2,1); }
.rank-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.rank-row { position: relative; overflow: hidden; display: grid;
  grid-template-columns: minmax(0, 1fr) 76px 92px; align-items: center;
  gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm);
  background: var(--surface-2); min-height: 46px; }
/* 整行可点：透明按钮铺满整行做命中区，文字层不吃事件 */
.rank-hit { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%;
  border: none; background: none; border-radius: var(--r-sm); cursor: pointer; }
.rank-hit:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.rank-row .rn { font-weight: 500; display: inline-flex; align-items: center; gap: 6px; min-width: 0;
  position: relative; z-index: 1; pointer-events: none; }
.rank-row .rn > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .ro { font-weight: 600; color: var(--accent); }
.rank-row.mine { box-shadow: inset 0 0 0 1px var(--accent); }
/* 资金列与倍数列固定宽度：有人猜/没人猜的行高与列宽完全一致 */
.rflow { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px;
  position: relative; z-index: 1; pointer-events: none; min-height: 20px; }
.rprice { display: inline-flex; align-items: baseline; justify-content: flex-end; gap: 3px;
  position: relative; z-index: 1; pointer-events: none; min-height: 26px;
  padding: 3px var(--sp-2); border-radius: var(--r-sm);
  border: 1px solid var(--border-strong); background: var(--surface);
  transition: border-color .15s ease, transform .1s ease; }
.rank-row.off .rprice { background: var(--surface-2); }
.rank-row.off .ro { color: var(--muted); }
/* 已定局的排行行：显示结果符号（绿✓/灰✕），不渲染死倍数 */
.rank-row.hit .ro { color: var(--pos); }
.rank-row.miss .ro { color: var(--faint); text-decoration: line-through; }
/* 资金占比：底部 2px 数据条，与时段竞猜同一语言。
   原先是整行高的半透明填充 + 2px 右边框，暗色下填充看不见，只剩一根竖线像分隔符。 */
.rbar { position: absolute; left: 0; bottom: 0; height: 2px; pointer-events: none; z-index: 0;
  background: var(--accent); opacity: .5; border-radius: 0 1px 1px 0;
  transition: width .35s cubic-bezier(.2,.8,.2,1); }
/* 竞猜人头像堆叠 */
.bstack { display: inline-flex; align-items: center; }
.bstack .avatar { width: 18px; height: 18px; margin-left: -6px; box-shadow: 0 0 0 1.5px var(--surface); }
.bstack .avatar:first-child { margin-left: 0; }
.bmore { font-size: var(--text-2xs); font-weight: 700; color: var(--muted); margin-left: 3px; }

/* ---- tables ---- */
table { width: 100%; border-collapse: collapse; }
th { font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); text-align: left; padding: var(--sp-2) var(--sp-3); }
td { padding: var(--sp-2) var(--sp-3); font-size: var(--text-sm); border-top: 1px solid var(--border); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:first-child td { border-top: none; }

/* ---- badges / pills ---- */
.pill { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--text-xs); font-weight: 500;
  padding: 2px var(--sp-2); border-radius: var(--r-pill); }
/* pill 语义全站唯一：绿=赢（结果），accent=进行中（可操作），灰=中性，红=作废 */
.pill-open { background: var(--accent-soft); color: var(--accent); }
.pill-won { background: var(--pos-soft); color: var(--pos); }
.pill-settled { background: var(--surface-2); color: var(--muted); }
.pill-void { background: var(--neg-soft); color: var(--neg); }


/* ---- modal ---- */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center;
  padding: var(--sp-4); z-index: 50; }
.modal { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--e3);
  width: 100%; max-width: 420px; padding: var(--sp-5);
  /* 矮屏手机上竞猜弹窗曾高过视口，确认按钮被顶出屏幕又无法滚动。
     限高 + 自身滚动，操作条 sticky 钉底，任何屏高都能点到「确认竞猜」。 */
  max-height: calc(100vh - var(--sp-6)); overflow-y: auto; overscroll-behavior: contain; }
@supports (height: 100dvh) { .modal { max-height: calc(100dvh - var(--sp-6)); } }
.modal h3 { margin: 0 0 var(--sp-4); font-size: var(--text-lg); font-weight: 600; }
.modal-actions { display: flex; justify-content: flex-end; gap: var(--sp-3);
  position: sticky; bottom: calc(var(--sp-5) * -1); z-index: 2;
  margin: var(--sp-4) calc(var(--sp-5) * -1) calc(var(--sp-5) * -1);
  padding: var(--sp-3) var(--sp-5); background: var(--surface);
  border-top: 1px solid var(--border); }

/* ---- toast ---- */
#toast-root { position: fixed; bottom: var(--sp-5); left: 50%; transform: translateX(-50%); z-index: 60;
  display: flex; flex-direction: column; gap: var(--sp-2); align-items: center; }
.toast { background: var(--fg); color: var(--bg); padding: var(--sp-2) var(--sp-4); border-radius: var(--r-pill);
  font-size: var(--text-sm); box-shadow: var(--e2); animation: pop .18s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
/* 可撤销的操作提示：比普通 toast 更宽，带按钮与倒计时进度条 */
.toast-undo { display: inline-flex; align-items: center; gap: var(--sp-3); border-radius: var(--r-md);
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4); position: relative; overflow: hidden;
  animation: pop .18s ease; max-width: min(92vw, 460px); }
.toast-undo::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px;
  background: var(--accent); width: 100%; transform-origin: left;
  animation: tuCount 8s linear forwards; }
@keyframes tuCount { to { transform: scaleX(0); } }
.tu-btn { all: unset; cursor: pointer; flex-shrink: 0; font-size: var(--text-sm); font-weight: 700;
  color: var(--accent); background: var(--bg); padding: 5px var(--sp-3); border-radius: var(--r-sm);
  transition: filter .15s ease; }
.tu-btn:hover { filter: brightness(1.12); }
.tu-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .toast-undo::after { animation: none; opacity: .5; } }

/* ---- auth ---- */
.auth-wrap { max-width: 440px; margin: 6vh auto 0; padding: 0 var(--sp-4) var(--sp-7); position: relative; z-index: 1; }
.auth-card { background: var(--surface); border-radius: var(--r-lg); padding: var(--sp-6);
  box-shadow: var(--e3); border: 1px solid var(--border); position: relative; overflow: hidden;
  animation: rise .32s cubic-bezier(.2,.8,.2,1); }
.auth-brand { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.auth-mark { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: var(--r-md); background: var(--surface-2); color: var(--accent); }
.auth-mark svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; }
.auth-card h1 { font-size: var(--text-xl); font-weight: 600; margin: 0; letter-spacing: -0.02em; }
.auth-sub { color: var(--muted); font-size: var(--text-xs); margin: 2px 0 0; }
.step-label { font-size: var(--text-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 var(--sp-3); }
.name-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); margin-bottom: var(--sp-5); }
.name-opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: var(--sp-3) var(--sp-2); border-radius: var(--r-md); border: 1px solid var(--border-strong);
  background: var(--surface); font-size: var(--text-sm); font-weight: 500; text-align: center; }
.name-opt .no-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name-opt.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--e1); }
.name-opt:disabled { opacity: .42; cursor: not-allowed; }
.name-opt .tag { font-size: var(--text-2xs); font-weight: 400; color: var(--muted); }
.no-check { position: absolute; top: 4px; right: 5px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); color: var(--accent-fg); font-size: var(--text-2xs); line-height: 15px; text-align: center;
  opacity: 0; transform: scale(.5); transition: opacity .16s ease, transform .16s cubic-bezier(.2,1.4,.4,1); }
.name-opt.sel .no-check { opacity: 1; transform: scale(1); }
.auth-alt { text-align: center; font-size: var(--text-sm); color: var(--muted); margin: var(--sp-4) 0 0; }
/* 密码区：未选昵称时禁用但保持可读（不用整体 opacity 压暗文字） */
.pw-block { pointer-events: none; }
.pw-block .field label, .pw-block .pw-hint { color: var(--muted); }
.pw-block input { background: var(--surface-2); border-color: var(--border);
  color: color-mix(in oklab, var(--fg) 66%, var(--surface-2)); }
.pw-block input::placeholder { color: color-mix(in oklab, var(--fg) 58%, var(--surface-2)); }
.pw-block .pw-eye { color: var(--muted); opacity: .55; }
.pw-block.on { pointer-events: auto; }
.pw-block.on input { background: var(--surface); color: var(--fg); border-color: var(--border-strong); }
.pw-block.on .pw-eye { opacity: 1; }
.pw-block input, .pw-block .pw-eye { transition: background .22s ease, color .22s ease, border-color .22s ease, opacity .22s ease; }
.pw-wrap { position: relative; display: flex; align-items: center; }
.pw-wrap input { padding-right: 42px !important; }
.pw-eye { position: absolute; right: 4px; width: 32px; height: 32px; display: grid; place-items: center;
  border: none; background: none; border-radius: var(--r-sm); color: var(--faint); cursor: pointer;
  transition: color .15s ease, background .15s ease; }
.pw-eye:hover { color: var(--accent); background: var(--accent-soft); }
.pw-eye svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; }
.pw-eye .i-eye-off { display: none; }
.pw-eye.on .i-eye { display: none; }
.pw-eye.on .i-eye-off { display: block; }
.pw-eye.on { color: var(--accent); }
/* 强度条 */
.pw-meter { display: flex; align-items: center; gap: 4px; margin: calc(-1 * var(--sp-4)) 0 var(--sp-4); height: 14px; }
.pw-meter i { flex: 1; height: 3px; border-radius: var(--r-pill); background: var(--border);
  transition: background .25s ease; }
.pw-mlabel { font-size: var(--text-2xs); font-weight: 600; color: var(--muted); min-width: 26px; text-align: right; }
.pw-meter.s1 i:nth-child(-n+1) { background: var(--neg); }
.pw-meter.s2 i:nth-child(-n+2) { background: var(--accent); }
.pw-meter.s3 i:nth-child(-n+3) { background: var(--pos); }
.pw-meter.s4 i:nth-child(-n+4) { background: var(--pos); }
.pw-meter.s1 .pw-mlabel { color: var(--neg); }
.pw-meter.s2 .pw-mlabel { color: var(--accent); }
.pw-meter.s3 .pw-mlabel, .pw-meter.s4 .pw-mlabel { color: var(--pos); }
.pw-hint { font-size: var(--text-xs); margin: calc(-1 * var(--sp-4)) 0 var(--sp-4); min-height: 18px;
  color: var(--muted); transition: color .18s ease; }
.pw-hint.ok { color: var(--pos); font-weight: 500; }
.pw-hint.bad { color: var(--neg); font-weight: 500; }
/* 认领确认弹窗 */
.cf-head { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.avatar.lg { width: 52px; height: 52px; }
.cf-k { font-size: var(--text-xs); color: var(--muted); margin: 0; letter-spacing: .04em; }
.cf-name { margin: 1px 0 0 !important; font-size: var(--text-xl) !important; letter-spacing: -0.02em; }
.cf-warn { font-size: var(--text-sm); color: var(--muted); margin: 0 0 var(--sp-4);
  padding: var(--sp-3); border-radius: var(--r-md); background: var(--surface-2);
  border: 1px solid var(--border); }
.cf-warn b { color: var(--fg); }
.cf-facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.cf-facts > div { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-3);
  border-radius: var(--r-md); background: var(--surface-2); }
.cf-facts span { font-size: var(--text-xs); color: var(--muted); }
.cf-facts b { font-size: var(--text-lg); font-weight: 600; }
@media (max-width: 480px) {
  .auth-card { padding: var(--sp-5); }
  .name-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .name-opt { padding: var(--sp-2) 4px; font-size: var(--text-xs); }
}

/* ---- empty state ---- */
.empty { text-align: center; padding: var(--sp-5) var(--sp-4); }
.empty p { margin: 0; color: var(--muted); font-size: var(--text-sm); }
.empty .title { color: var(--fg); font-weight: 600; font-size: var(--text-base); margin-bottom: var(--sp-1); }

/* ---- 竞猜记录日期切换 ---- */
.date-nav { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
  padding-bottom: var(--sp-3); margin-bottom: var(--sp-3); border-bottom: 1px solid var(--border); }
.dn-cur { font-size: var(--text-sm); font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
  padding: 3px var(--sp-2); border-radius: var(--r-sm); background: var(--surface-2); }
.dn-today { font-style: normal; font-size: var(--text-2xs); font-weight: 700; padding: 1px 5px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent); }
.dn-n { margin-left: auto; }
.date-nav .btn:disabled { opacity: .4; cursor: not-allowed; }
@media (max-width: 640px) {
  .date-nav { gap: var(--sp-1); }
  .dn-n { margin-left: 0; flex-basis: 100%; }
}

/* ---- misc ---- */
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.muted { color: var(--muted); } .sm { font-size: var(--text-sm); } .xs { font-size: var(--text-xs); }
.mt-4 { margin-top: var(--sp-4); } .mb-4 { margin-bottom: var(--sp-4); }
.linkbtn { background: none; border: none; color: var(--muted); font-size: var(--text-sm); font-weight: 500; padding: 0; }
.linkbtn:hover { color: var(--accent); }
details.day { border-top: 1px solid var(--border); }
details.day summary { cursor: pointer; padding: var(--sp-3) 0; font-weight: 500; font-size: var(--text-sm); list-style: none; display: flex; justify-content: space-between; }
details.day summary::-webkit-details-marker { display: none; }

/* ---- bet chips ---- */
.chips { display: flex; gap: var(--sp-2); margin: calc(-1 * var(--sp-3)) 0 var(--sp-3); }
.chip { padding: var(--sp-1) var(--sp-3); border-radius: var(--r-pill); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--muted); font-size: var(--text-xs); font-weight: 600;
  transition: border-color .15s ease, color .15s ease, background .15s ease; }
.chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ---- clock confirm ---- */
.clock-confirm { font-size: var(--text-2xl); font-weight: 600; letter-spacing: -0.02em; margin: 0; }

/* ---- leaderboards ---- */
.board-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); margin-bottom: var(--sp-4); }
.board-grid .card + .card { margin-top: 0; }
@media (max-width: 860px) { .board-grid { grid-template-columns: 1fr; } }
.board-list { display: flex; flex-direction: column; gap: var(--sp-1); }
.board-row { display: grid; grid-template-columns: 22px 24px minmax(56px, auto) 1fr auto auto; align-items: center;
  gap: var(--sp-2); padding: var(--sp-2) var(--sp-1); border-radius: var(--r-sm); transition: background .15s ease; }
.board-row:hover { background: var(--surface-2); }
.board-row .bname { font-size: var(--text-sm); font-weight: 500; white-space: nowrap; }
.board-row .bval { font-size: var(--text-sm); font-weight: 600; white-space: nowrap; }
.board-row .bmeta { display: inline-flex; align-items: center; gap: var(--sp-2); justify-content: flex-end; min-width: 64px; }
.medal { width: 20px; height: 20px; border-radius: var(--r-pill); display: grid; place-items: center;
  font-size: var(--text-xs); font-weight: 700; }
.medal.m1 { background: var(--accent); color: var(--accent-fg); }
.medal.m2 { background: var(--muted); color: var(--surface); }
.medal.m3 { background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--border-strong); }
.rank-n { width: 20px; text-align: center; font-size: var(--text-xs); color: var(--faint); font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; min-width: 24px; }
.bar i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--accent); opacity: .85; }
.bar i.time { background: var(--accent); }
.trend { font-size: var(--text-xs); font-weight: 600; padding: 1px 6px; border-radius: var(--r-pill); white-space: nowrap; }
.trend.later { color: var(--neg); background: var(--neg-soft); }
.trend.earlier { color: var(--pos); background: var(--pos-soft); }
.trend.flat { color: var(--muted); background: var(--surface-2); }

/* ---- off-work heatmap ---- */
.heat-wrap { overflow-x: auto; overflow-y: hidden; padding-bottom: var(--sp-2);
  scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.heat-wrap::-webkit-scrollbar { height: 8px; }
.heat-wrap::-webkit-scrollbar-track { background: var(--surface-2); border-radius: var(--r-pill); }
.heat-wrap::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--r-pill); }
.heat-wrap::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.heat { --cw: 22px; display: flex; flex-direction: column; gap: 4px; width: max-content; }
.hrow { display: grid; grid-template-columns: 96px repeat(var(--cols), var(--cw)); gap: 4px; align-items: center; }
.hname { display: flex; align-items: center; gap: 6px; font-size: var(--text-xs); font-weight: 500; color: var(--muted);
  position: sticky; left: 0; background: var(--surface); z-index: 6; padding-right: var(--sp-2); height: var(--cw);
  box-shadow: 8px 0 8px -6px var(--shadow); }
.hname span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heat-wrap.scrolled .hname { box-shadow: 10px 0 12px -6px var(--shadow-strong); }
.hhead { height: 20px; margin-bottom: 2px; }
.hcol { all: unset; cursor: pointer; height: 20px; display: grid; place-items: center; border-radius: 4px; }
.hcol span { font-size: var(--text-2xs); color: var(--faint); font-variant-numeric: tabular-nums; line-height: 1; }
.hcol:hover span { color: var(--fg); }
.hcol.on { background: var(--accent-soft); }
.hcol.on span { color: var(--accent); font-weight: 700; }
.hcol.we span { color: var(--accent); opacity: .8; }
.hcell.we { box-shadow: inset 0 0 0 1.5px var(--accent-line); }
.hcell.none.we { box-shadow: inset 0 0 0 1px var(--accent-line); opacity: .55; }
.hcell { all: unset; cursor: pointer; width: var(--cw); height: var(--cw); border-radius: 5px; box-sizing: border-box;
  background: hsl(calc(150 - var(--t) * 130) calc(52% + var(--t) * 22%) calc(62% - var(--t) * 20%));
  transition: transform .12s ease, box-shadow .12s ease; }
.hcell.none { background: transparent; box-shadow: inset 0 0 0 1px var(--border); opacity: .5; }
.hcell:hover { transform: scale(1.18); box-shadow: var(--e2); position: relative; z-index: 3; }
@media (prefers-color-scheme: dark) {
  .hcell { background: hsl(calc(150 - var(--t) * 130) calc(58% + var(--t) * 20%) calc(52% + var(--t) * 8%)); }
  .hcell.none { background: transparent; opacity: .45; }
}
.heat { position: relative; }
.hrow { position: relative; z-index: 1; }
.hband { position: absolute; top: 0; bottom: 0; border-radius: 6px; pointer-events: none;
  background: transparent; box-shadow: inset 0 0 0 2px var(--accent);
  z-index: 4; transition: left .18s cubic-bezier(.2,.8,.2,1), width .18s ease; }
.heat-tip { position: fixed; transform: translate(-50%, -100%); background: var(--fg); color: var(--bg);
  font-size: var(--text-xs); padding: 4px 10px; border-radius: var(--r-sm); white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .12s ease; z-index: 70; box-shadow: var(--e2); font-variant-numeric: tabular-nums; }
.heat-tip.on { opacity: 1; }
.heat-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-3); flex-wrap: wrap; }
.heat-legend { display: flex; align-items: center; gap: 5px; }
.heat-legend .lg { width: 13px; height: 13px; border-radius: 4px;
  background: hsl(calc(150 - var(--t) * 130) calc(52% + var(--t) * 22%) calc(62% - var(--t) * 20%)); }
@media (prefers-color-scheme: dark) {
  .heat-legend .lg { background: hsl(calc(150 - var(--t) * 130) calc(58% + var(--t) * 20%) calc(52% + var(--t) * 8%)); }
}
.heat-legend .lg.none { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }

/* ---- 全员竞猜记录 ---- */
.me-row { background: var(--accent-soft); border-radius: var(--r-sm); }
.hot-list { display: flex; flex-direction: column; gap: var(--sp-1); }
.hot-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto auto auto; align-items: center;
  gap: var(--sp-2); padding: 7px var(--sp-1); border-radius: var(--r-sm); transition: background .15s ease; }
.hot-row:hover { background: var(--surface-2); }
.hot-name { font-size: var(--text-sm); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-amt { font-size: var(--text-sm); font-weight: 600; color: var(--accent); }
.hot-odds { font-size: var(--text-xs); font-weight: 600; color: var(--muted); }
.bet-head, .bet-row { display: grid;
  grid-template-columns: minmax(88px, 1fr) minmax(110px, 1.2fr) 80px 54px 84px 92px 104px;
  align-items: center; gap: var(--sp-2); }
.bet-head { padding: 0 var(--sp-2) var(--sp-2); border-bottom: 1px solid var(--border); }
.bh { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 3px;
  font-size: var(--text-xs); font-weight: 500; color: var(--faint); padding: 3px 4px; border-radius: 5px;
  transition: color .15s ease, background .15s ease; }
.bh.num { justify-content: flex-end; }
.bh:hover { color: var(--fg); background: var(--surface-2); }
.bh.on { color: var(--accent); font-weight: 600; }
.sarrow { font-style: normal; font-size: var(--text-2xs); opacity: .45; transition: opacity .15s ease; }
.bh:hover .sarrow, .bh.on .sarrow { opacity: 1; }
.bet-feed { display: flex; flex-direction: column; }
.bet-row { padding: var(--sp-2); border-bottom: 1px solid var(--border); transition: background .15s ease; }
.bet-row:last-child { border-bottom: none; }
.bet-row:hover { background: var(--surface-2); }
.bet-row.me-row { background: var(--accent-soft); }
.bet-row.me-row:hover { background: color-mix(in oklab, var(--accent) 20%, transparent); }
.bet-who { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: 500; min-width: 0; }
.bet-who > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bet-target { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); min-width: 0; }
.bet-target > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bet-stake, .bet-odds, .bet-ret, .bet-pnl { text-align: right; font-size: var(--text-sm); }
.bet-stake { font-weight: 600; }
.bet-odds { color: var(--accent); font-weight: 600; }
.bet-pnl { font-weight: 700; display: inline-flex; align-items: baseline; justify-content: flex-end; gap: 3px; }
.bet-st { text-align: right; }
.act-cell { white-space: nowrap; }
.act-cell .btn + .btn { margin-left: var(--sp-1); }

/* ---- 我的竞猜记录：与全员竞猜记录同一栅格语言 ---- */
.mb-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--sp-4);
  padding-bottom: var(--sp-4); margin-bottom: var(--sp-3); border-bottom: 1px solid var(--border); }
.mb-sum > div { display: flex; flex-direction: column; gap: 2px; }
.mb-head, .mb-row { display: grid;
  grid-template-columns: minmax(130px, 1.5fr) 88px 66px 104px minmax(126px, auto);
  align-items: center; gap: var(--sp-3); }
.mb-head { padding: 0 var(--sp-2) var(--sp-2); border-bottom: 1px solid var(--border);
  font-size: var(--text-xs); font-weight: 500; color: var(--faint); }
.mb-head span:nth-child(2), .mb-head span:nth-child(3), .mb-head span:nth-child(4) { text-align: right; }
.mb-feed { display: flex; flex-direction: column; }
.mb-row { padding: var(--sp-3) var(--sp-2); border-bottom: 1px solid var(--border); transition: background .15s ease; }
.mb-row:last-child { border-bottom: none; }
.mb-row:hover { background: var(--surface-2); }
.mb-row.done { opacity: .82; }
.mb-target { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--text-sm);
  font-weight: 500; min-width: 0; }
.mb-target > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-stake, .mb-odds, .mb-pnl { text-align: right; font-size: var(--text-sm); }
.mb-stake { font-weight: 600; }
.mb-odds { color: var(--accent); font-weight: 700; }
.mb-pnl { font-weight: 700; display: inline-flex; align-items: baseline; justify-content: flex-end; gap: 3px; }
.mb-row.decided { background: color-mix(in oklab, var(--accent) 4%, transparent); }
.mb-act { display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-1); flex-wrap: nowrap; }
@media (max-width: 860px) {
  .mb-head { display: none; }
  .mb-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: var(--sp-2); }
  .mb-target { grid-column: 1; grid-row: 1; }
  .mb-pnl { grid-column: 2; grid-row: 1; font-size: var(--text-sm); }
  .mb-odds { grid-column: 1; grid-row: 2; text-align: left; padding-left: 34px; font-size: var(--text-xs); }
  .mb-stake { grid-column: 2; grid-row: 2; font-size: var(--text-xs); color: var(--muted); }
  .mb-act { grid-column: 1 / -1; grid-row: 3; justify-content: flex-start; padding-left: 34px; }
  .mb-row [data-l]::before { content: attr(data-l) " "; color: var(--faint); font-weight: 500; }
  .mb-sum { gap: var(--sp-3); }
  .mb-sum .ps-v { font-size: var(--text-lg); }
}

/* 预计标记 */
.pv { font-style: normal; font-size: var(--text-2xs); font-weight: 700; padding: 0 3px; border-radius: 3px;
  background: var(--accent-soft); color: var(--accent); vertical-align: 1px; }
/* 退回标记：与「预」区分，表示本金原额返还而非结果 */
.pv.back { background: var(--surface-2); color: var(--muted); }
.bet-row.decided { background: color-mix(in oklab, var(--accent) 4%, transparent); }
.bet-row.decided.me-row { background: var(--accent-soft); }
/* 上次结果卡：摘要做成内嵌色块，与下方逐笔列表明确分开 */
.prev-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); }
.prev-sum > div { display: flex; flex-direction: column; gap: 2px; }
.prev-sum .ps-v small { font-size: var(--text-sm); font-weight: 500; color: var(--muted); }
/* 中屏：先收掉「可得」列，但用 bet-ret-m 补一行，别让人看不到能赢多少 */
@media (max-width: 980px) {
  .bet-head, .bet-row { grid-template-columns: minmax(76px, 1fr) minmax(96px, 1.1fr) 72px 48px 84px 96px; }
  .bet-ret { display: none; }
  .bh[data-sort="ret"] { display: none; }
  .bet-ret-m { grid-column: 1 / -1; font-size: var(--text-xs); color: var(--muted);
    padding-left: 30px; }
  .bet-ret-m::before { content: attr(data-l) " "; color: var(--faint); font-weight: 500; }
}
/* 中屏：打卡独占第二行，三个数字仍同排 */
@media (max-width: 1080px) and (min-width: 641px) {
  .hero-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-clock { grid-column: 1 / -1; border-left: none !important;
    border-top: 1px solid var(--border); }
  .stat-clock .stat-body { margin-top: var(--sp-2); }
}
/* 窄屏：列折叠成两行，用 data-l 补回列名，避免数字失去含义 */
@media (max-width: 860px) {
  .bet-head { display: flex; flex-wrap: wrap; gap: 2px; padding-bottom: var(--sp-2); }
  .bh { font-size: var(--text-xs); padding: 3px 8px; background: var(--surface-2); border-radius: var(--r-pill); }
  .bh.on { background: var(--accent-soft); }
  .bet-row { grid-template-columns: minmax(0, 1fr) auto auto; row-gap: 4px; }
  .bet-who { grid-column: 1; grid-row: 1; }
  .bet-stake { grid-column: 2; grid-row: 1; }
  .bet-odds { grid-column: 3; grid-row: 1; }
  .bet-target { grid-column: 1; grid-row: 2; font-size: var(--text-xs); color: var(--muted); padding-left: 30px; }
  .bet-pnl { grid-column: 2; grid-row: 2; font-size: var(--text-xs); }
  .bet-st { grid-column: 3; grid-row: 2; }
  .bet-ret { display: none; }
  .bet-ret-m { grid-column: 1 / -1; grid-row: 3; font-size: var(--text-xs); color: var(--muted);
    padding-left: 30px; }
  .bet-row [data-l]::before { content: attr(data-l) " "; color: var(--faint); font-weight: 500; }
  .prev-sum { grid-template-columns: 1fr; gap: var(--sp-2); }
  .prev-sum > div { flex-direction: row; align-items: baseline; justify-content: space-between; }
  .prev-sum .ps-v { font-size: var(--text-base); }
}
@media (min-width: 981px) { .bet-ret-m { display: none; } }

/* ---- records strip ---- */
.rec-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); margin-bottom: var(--sp-4); }
@media (max-width: 700px) { .rec-strip { grid-template-columns: 1fr; } }
.rec { background: var(--surface); border-radius: var(--r-lg); padding: var(--sp-4); box-shadow: var(--e1);
  display: flex; flex-direction: column; gap: 2px; }
.rec-k { font-size: var(--text-xs); color: var(--muted); font-weight: 500; }
.rec-v { font-size: var(--text-2xl); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.rec-v small { font-size: var(--text-sm); font-weight: 500; color: var(--muted); margin-left: 2px; }
.rec-w { display: flex; align-items: center; gap: 6px; font-size: var(--text-sm); margin-top: var(--sp-1); }

/* ---- daily pnl chart ---- */
.pnl-chart { display: flex; align-items: flex-end; gap: 4px; height: 88px; margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-1); border-bottom: 1px solid var(--border); }
.pnl-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.pnl-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.pnl-track i { width: 70%; max-width: 18px; border-radius: 3px 3px 0 0; display: block; }
.pnl-track i.up { background: var(--pos); opacity: .85; }
.pnl-track i.down { background: var(--neg); opacity: .85; }
.pnl-col span { font-size: var(--text-2xs); color: var(--faint); font-variant-numeric: tabular-nums; }
.pnl-col:hover .pnl-track i { opacity: 1; }

/* ---- profit board ---- */
.pnl-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4);
  padding-bottom: var(--sp-4); margin-bottom: var(--sp-3); border-bottom: 1px solid var(--border); }
.pnl-summary > div { display: flex; flex-direction: column; gap: 2px; }
.ps-k { font-size: var(--text-xs); color: var(--muted); }
.ps-v { font-size: var(--text-xl); font-weight: 600; letter-spacing: -0.02em; }
.pnl-head, .pnl-row { display: grid; grid-template-columns: 22px 24px minmax(64px, 1fr) minmax(60px, 1.4fr) 92px 84px 84px;
  align-items: center; gap: var(--sp-2); }
.pnl-head { padding: 0 var(--sp-1) var(--sp-2); font-size: var(--text-xs); color: var(--faint); }
.pnl-head span:nth-child(1) { grid-column: 1 / 4; }
.pnl-head span:nth-child(2) { grid-column: 4 / 6; text-align: right; }
.pnl-head span:nth-child(3), .pnl-head span:nth-child(4) { text-align: right; }
.pnl-row .bval { text-align: right; }
.pnl-bar { position: relative; height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.pnl-bar b { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--border-strong); }
.pnl-bar i { position: absolute; top: 0; bottom: 0; border-radius: var(--r-pill); }
.pnl-bar i.up { background: var(--pos); }
.pnl-bar i.down { background: var(--neg); }
.rate-cell, .exp-cell { justify-content: flex-end; }
.rate { font-size: var(--text-xs); font-weight: 600; padding: 1px 7px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--muted); }
.rate.pos { background: var(--pos-soft); color: var(--pos); }
.exp { font-size: var(--text-xs); font-weight: 600; padding: 1px 8px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent); }
@media (max-width: 720px) {
  .pnl-head, .pnl-row { grid-template-columns: 20px 22px 1fr 78px 62px; }
  .pnl-bar, .pnl-head span:nth-child(2) { display: none; }
  .pnl-head span:nth-child(1) { grid-column: 1 / 4; }
  .pnl-head span:nth-child(3) { grid-column: 4; }
  .pnl-head span:nth-child(4) { grid-column: 5; }
  .exp-cell { display: none; }
  .pnl-summary { grid-template-columns: 1fr; gap: var(--sp-2); }
  .pnl-summary > div { flex-direction: row; align-items: baseline; justify-content: space-between; }
  .ps-v { font-size: var(--text-base); }
}

/* ---- segmented control ---- */
.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--r-pill); padding: 2px; gap: 2px; }
.seg-b { all: unset; cursor: pointer; padding: 3px 12px; border-radius: var(--r-pill); font-size: var(--text-xs);
  font-weight: 500; color: var(--muted); transition: background .15s ease, color .15s ease; white-space: nowrap; }
.seg-b:hover { color: var(--fg); }
.seg-b.on { background: var(--surface); color: var(--accent); font-weight: 600; box-shadow: var(--e1); }
.day-row .bval small { font-size: var(--text-2xs); color: var(--muted); margin-left: 3px; font-weight: 500; }
.day-panel { margin-top: var(--sp-4); border-top: 1px solid var(--border); padding-top: var(--sp-4); animation: rise .2s ease; }
.day-head { display: flex; align-items: baseline; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.day-head b { font-size: var(--text-base); }
.day-row { display: grid; grid-template-columns: 22px 24px 1fr auto auto; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-1); border-radius: var(--r-sm); }
.day-row:hover { background: var(--surface-2); }
.day-row .bname { font-size: var(--text-sm); font-weight: 500; }
.day-row .bval { font-size: var(--text-sm); font-weight: 600; }
.day-row .bmeta { min-width: 72px; text-align: right; font-size: var(--text-sm); }

/* ---- interaction (refactoring-ui §15 + §6.2.2) ---- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.07); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-secondary:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.bin button { transition: background .15s ease; border-radius: var(--r-sm); }
.bin:not(.hot):not(.off):has(button:not(:disabled)):hover { background: var(--accent-soft); border-color: var(--accent-line); }
.bin button:not(:disabled):active { transform: scale(.96); }
.rank-row { transition: background .15s ease, box-shadow .15s ease; }
/* 整行可点：hover 要让整行有反应，并让倍数块显出「可按」 */
.rank-row:not(.off):hover { background: var(--accent-soft); }
.rank-row:not(.off):hover .rprice { border-color: var(--accent); }
.rank-row:not(.off):active .rprice { transform: translateY(1px); }
.rank-row.off:hover { background: var(--surface-2); }
.name-opt { transition: border-color .15s ease, background .15s ease, color .15s ease; }
.name-opt:not(:disabled):hover { border-color: var(--accent); }
.tab { transition: color .15s ease, border-color .15s ease; }
.tab:not(.active):hover { color: var(--muted); }
details.day summary { transition: color .15s ease; }
details.day summary:hover { color: var(--accent); }
.modal-back { animation: fade .2s ease; }
.modal { animation: rise .22s cubic-bezier(.2,.8,.2,1); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.98); } }
/* 普通 toast 2.3s 淡出；可撤销的那条要留满 8s，不能被提前淡掉 */
.toast:not(.toast-undo) { animation: pop .2s ease, fadeout .3s ease 2.3s forwards; }
.toast-undo { animation: pop .2s ease, fadeout .3s ease 7.7s forwards; }
@keyframes fadeout { to { opacity: 0; transform: translateY(6px); } }
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid var(--accent-fg);
  border-top-color: transparent; border-radius: 50%; animation: spin .6s linear infinite; }
.btn-secondary.loading::after, .btn-tertiary.loading::after { border-color: var(--muted); border-top-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 640px) {
  .shell { padding: var(--sp-4) var(--sp-3) var(--sp-7); }
  .card { padding: var(--sp-4); }
  .hero-card { padding: 0; }
  .hero-row { grid-template-columns: 1fr 1fr; }
  .hero-row > .stat { padding: var(--sp-4); }
  .hero-row > .stat:nth-child(3) { border-left: none; border-top: 1px solid var(--border); }
  .hero-row > .stat:nth-child(4) { border-top: 1px solid var(--border); }
  .stat-clock { grid-column: 1 / -1; }
  .stat .value { font-size: var(--text-xl); }
  /* 榜单：窄屏隐藏进度条，保留名次/头像/昵称/数值 */
  .board-row { grid-template-columns: 20px 22px minmax(0, 1fr) auto; gap: var(--sp-2); padding: 7px 2px; }
  .board-row .bar { display: none; }
  .board-row .bmeta { grid-column: 1 / -1; justify-content: flex-start; padding-left: 46px; margin-top: -2px; min-width: 0; }
  .board-row .bval { font-size: var(--text-sm); }
  .market-grid { grid-template-columns: 1fr; }
  .rank-row { grid-template-columns: minmax(0, 1fr) 64px 84px; gap: var(--sp-2);
    padding: 7px var(--sp-2); min-height: 44px; }
  .rank-row .rflow { justify-content: flex-end; }
  .rprice { padding: 3px 6px; }
  .heat { --cw: 20px; }
  .hrow { grid-template-columns: 84px repeat(var(--cols), var(--cw)); }
}

/* ================= 竞猜池分成 ================= */
/* 竞猜上的池倍数与模型参考 */
.bin .bo { font-size: var(--text-base); font-weight: 700; letter-spacing: -0.01em; }
.bmodel { font-size: var(--text-2xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.bin.hot .bmodel { color: var(--muted); }
/* 还没人猜小字：独立类名，避免撞上通用 .empty 空状态的大内边距（曾把标题行撑到 64px） */
.mpool-empty { font-size: var(--text-2xs); color: var(--faint); padding: 0; }
/* 竞猜弹窗 */
.bet-head-id { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.pool-stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); margin-bottom: var(--sp-4); }
.pool-stat > div { display: flex; flex-direction: column; gap: 1px; padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm); background: var(--surface-2); }
.pool-stat span { font-size: var(--text-2xs); color: var(--muted); }
.pool-stat b { font-size: var(--text-sm); font-weight: 600; }
/* 收益拆解盒 */
.payout-box { border-radius: var(--r-md); border: 1px solid var(--border); overflow: hidden;
  background: var(--surface-2); transition: border-color .2s ease, box-shadow .2s ease; }
.payout-box.live { border-color: var(--accent-line); box-shadow: var(--e1); }
.pb-main { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); background: var(--surface);
  border-bottom: 1px solid var(--border); }
.pb-main span { font-size: var(--text-xs); color: var(--muted); }
.pb-main b { font-size: var(--text-2xl); font-weight: 600; letter-spacing: -0.02em; }
.payout-box.live .pb-main b { color: var(--accent); }
.pb-rows { padding: var(--sp-2) var(--sp-4); display: flex; flex-direction: column; gap: 3px; }
.pb-rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3);
  font-size: var(--text-xs); }
.pb-rows span { color: var(--muted); }
.pb-rows b { font-weight: 600; }
.pb-net { margin-top: 3px; padding-top: var(--sp-2); border-top: 1px dashed var(--border-strong); }
.pb-net span { color: var(--fg); font-weight: 500; font-size: var(--text-sm); }
.pb-net b { font-size: var(--text-base); font-weight: 700; }
.pb-note { margin: 0; padding: var(--sp-2) var(--sp-4) var(--sp-3); font-size: var(--text-xs);
  color: var(--muted); line-height: 1.5; }
/* 竞猜池结算表 */
.pr-head, .pr-row { display: grid;
  grid-template-columns: minmax(110px, 1.3fr) minmax(40px, 1fr) 88px 78px 90px 78px;
  align-items: center; gap: var(--sp-2); }
.pr-head { padding: 0 var(--sp-2) var(--sp-2); border-bottom: 1px solid var(--border);
  font-size: var(--text-xs); color: var(--faint); }
.pr-head span:nth-child(n+3) { text-align: right; }
.pr-feed { display: flex; flex-direction: column; }
.pr-row { padding: var(--sp-2); border-bottom: 1px solid var(--border); transition: background .15s ease; }
.pr-row:last-child { border-bottom: none; }
.pr-row:hover { background: var(--surface-2); }
.pr-who { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--text-sm);
  font-weight: 500; min-width: 0; }
.pr-who > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-bar { height: 6px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.pr-bar i { display: block; height: 100%; border-radius: var(--r-pill);
  background: var(--accent); }
.pr-pool, .pr-mult, .pr-rake, .pr-burn { text-align: right; font-size: var(--text-sm); }
.pr-pool { font-weight: 600; }
.pr-mult { font-weight: 700; }
.pr-rake { color: var(--pos); font-weight: 600; }
.pr-burn { color: var(--muted); }
/* 被竞猜收入 */
.bar i.rake { background: var(--pos); }
@media (max-width: 860px) {
  .pool-stat { grid-template-columns: 1fr; gap: 4px; }
  .pool-stat > div { flex-direction: row; align-items: baseline; justify-content: space-between; }
  .pb-main b { font-size: var(--text-xl); }
  .pr-head { display: none; }
  /* 三列挤不下六个字段：改成「对象 + 猜中」一行，金额三项各占一行带标签 */
  .pr-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .pr-who { grid-column: 1; grid-row: 1; }
  .pr-mult { grid-column: 2; grid-row: 1; font-size: var(--text-xs); }
  .pr-bar { display: none; }
  .pr-pool, .pr-rake, .pr-burn { grid-column: 1 / -1; text-align: left; font-size: var(--text-xs);
    padding-left: 32px; display: flex; justify-content: space-between; }
  .pr-pool { grid-row: 2; }
  .pr-rake { grid-row: 3; }
  .pr-burn { grid-row: 4; }
  .pr-row [data-l]::before { content: attr(data-l); color: var(--faint); font-weight: 500; }
}

/* ================= 今日下班榜 ================= */
.tb-card { border: 1px solid var(--border); }
.tb-axis, .tb-row { display: grid;
  grid-template-columns: 24px 26px minmax(92px, 1.05fr) minmax(110px, 2.2fr) 78px 82px 96px 62px;
  gap: var(--sp-3); align-items: center; }
/* 左右内边距必须与 .tb-row 一致，否则刻度与它标注的点位横向错开约 4px */
.tb-axis { margin-bottom: var(--sp-2); padding: 0 var(--sp-1) var(--sp-2);
  border-bottom: 1px solid var(--border); }
.tb-ax-pad { grid-column: 1 / 4; }
.tb-ax-h { font-size: var(--text-2xs); font-weight: 600; letter-spacing: .06em; color: var(--faint); text-align: right; }
/* 两行刻度：上行「现在」、下行整点。用固定行高 + 行内垂直居中，
   保证两行之间有真实间距（此前 28px 容器里两行几乎贴在一起）。 */
.tb-ticks { grid-column: 4; position: relative; height: 34px; }
.tb-ticks span { position: absolute; bottom: 0; height: 14px; line-height: 14px;
  transform: translateX(-50%); font-size: var(--text-2xs);
  color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tb-ticks .tb-now-t { top: 0; bottom: auto; color: var(--accent); font-weight: 700; }
.tb-feed { display: flex; flex-direction: column; position: relative; }
.tb-row { padding: var(--sp-2) var(--sp-1); border-radius: var(--r-sm); cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease; }
.tb-row:hover { background: var(--surface-2); }
.tb-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tb-row.me { background: var(--accent-soft); }
/* 是否猜过由第三行 .tb-pos 文字（猜了多少/未竞猜）承载，左侧色条是重复信号——已删 */
.tb-pos { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; min-width: 0; }
.tb-mine-stake { font-size: var(--text-sm); font-weight: 600; color: var(--fg); }
.tb-mine-pnl { font-size: var(--text-2xs); font-weight: 700; color: var(--muted); }
.tb-go { display: flex; justify-content: flex-end; }
.tb-act { white-space: nowrap; padding: 4px var(--sp-2); font-size: var(--text-xs); }
.tb-row:hover .tb-act.btn-secondary { border-color: var(--accent); color: var(--accent); }
.tb-mysum { margin-right: var(--sp-3); color: var(--muted); }
.tb-mysum b { color: var(--fg); font-weight: 700; }
.tb-mysum b.pos { color: var(--pos); } .tb-mysum b.neg { color: var(--neg); }
/* 从榜单跳到竞猜卡时高亮一下，让人知道跳到哪了 */
.mcard.flash { animation: mkFlash 1.5s ease-out; }
@keyframes mkFlash {
  0% { box-shadow: 0 0 0 2px var(--accent), var(--e2); }
  100% { box-shadow: 0 0 0 0 transparent, var(--e1); }
}
.tb-rank { font-size: var(--text-xs); color: var(--faint); text-align: center; font-variant-numeric: tabular-nums; }
.tb-who { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tb-name { font-size: var(--text-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-sub { font-size: var(--text-2xs); color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-row.done .tb-sub { color: var(--muted); font-weight: 600; }
/* 轨道：中性基线，先后由点位与首末标记表达，不用彩虹渐变 */
.tb-track { position: relative; height: 22px; }
.tb-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px;
  transform: translateY(-50%); border-radius: var(--r-pill);
  background: var(--border-strong); }
.tb-dot { position: absolute; top: 50%; width: 11px; height: 11px; border-radius: 50%;
  transform: translate(-50%, -50%); background: var(--accent); z-index: 2;
  box-shadow: 0 0 0 2.5px var(--surface), var(--e1); transition: left .4s cubic-bezier(.2,.8,.2,1); }
.tb-dot.first { background: var(--pos); width: 14px; height: 14px; }
.tb-dot.last { background: var(--neg); width: 14px; height: 14px; }
/* 目前最迟：还没全员打卡，用中性色，不宣称「末」 */
.tb-dot.last-so-far { background: var(--muted); width: 12px; height: 12px; }
.tb-dot.ghost { background: var(--surface); border: 1.5px solid var(--accent); width: 11px; height: 11px;
  box-shadow: none; opacity: .8; }
/* 预测分布：每个未过去的档一段，浓度与高度都随概率走。
   高度差让「集中在一档」与「摊在三档」在余光里就能分辨，不只靠颜色深浅。 */
.tb-band { position: absolute; top: 50%; transform: translateY(-50%);
  height: calc(5px + 9px * var(--conf, .6));
  border-radius: 2px; opacity: calc(.35 + .65 * var(--conf, .6));
  background: color-mix(in oklab, var(--accent) calc(14% + 30% * var(--conf, .6)), transparent);
  border: 1px solid color-mix(in oklab, var(--accent) calc(20% + 40% * var(--conf, .6)), transparent);
  transition: height .3s ease, opacity .3s ease; }
.tb-band.top { border-radius: var(--r-pill); }
.tb-band.open { border-right: none; border-top-right-radius: 0; border-bottom-right-radius: 0;
  background: linear-gradient(90deg,
    color-mix(in oklab, var(--accent) calc(14% + 30% * var(--conf, .6)), transparent), transparent); }
.tb-row:hover .tb-band { opacity: calc(.5 + .5 * var(--conf, .6)); }
/* 「现在」参考线：安静的网格线，不是指针——注释信息靠轴上的「现在 HH:MM」
   标签承载，线本身不抢数据的戏（不再有实心粗线和脉冲圆点） */
.tb-nowline { position: absolute; top: 0; bottom: 0; width: 0;
  border-left: 1px dashed color-mix(in oklab, var(--accent) 42%, transparent);
  pointer-events: none; z-index: 1; }
/* 比平时晚：这是信号，用暖色强调，绝不淡掉 */
.tb-late { color: var(--neg); font-weight: 700; }
.tb-row.late .tb-dot.ghost { border-color: var(--neg); border-style: solid; opacity: 1; }
.tb-row.late .tb-time { color: var(--fg); }
.tb-row.pred .tb-name { color: var(--muted); font-weight: 500; }
.tb-row.pred > .avatar { opacity: .68; }
.tb-time { text-align: right; font-size: var(--text-base); font-weight: 700; }
.tb-time small { font-size: var(--text-2xs); color: var(--accent); margin-left: 2px; font-weight: 700; }
.tb-row.pred .tb-time { color: var(--muted); font-weight: 600; }
.tb-pool { text-align: right; font-size: var(--text-sm); color: var(--fg); font-weight: 600;
  display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.tb-pool small { font-size: var(--text-2xs); font-weight: 700; color: var(--muted); }
.tb-pool small.hit { color: var(--pos); }
.tb-pool small.miss { color: var(--faint); }
.tb-none { font-style: normal; font-size: var(--text-xs); color: var(--faint); font-weight: 500; }
.tb-oth { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3);
  padding-top: var(--sp-3); border-top: 1px solid var(--border); }
.tb-chip { display: inline-flex; align-items: center; gap: 5px; font-size: var(--text-xs);
  padding: 3px 10px 3px 4px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); }
.tb-chip b { font-weight: 600; color: var(--faint); }
/* 图例：只留需要解码的标记（预测带/现在线），点与时段本身自明 */
.tb-legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4);
  margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--border);
  font-size: var(--text-2xs); color: var(--faint); }
.tb-legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg-band { width: 18px; height: 8px; border-radius: var(--r-pill);
  background: color-mix(in oklab, var(--accent) 26%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 50%, transparent); }
.lg-now { width: 2px; height: 11px; background: var(--accent); border-radius: 1px; }
.lg-note { margin-left: auto; color: var(--muted); }
@media (max-width: 700px) {
  .tb-axis { display: none; }
  .tb-row { grid-template-columns: 22px 24px minmax(0, 1fr) auto; row-gap: 4px; }
  .tb-rank { grid-column: 1; grid-row: 1; }
  .tb-row > .avatar { grid-column: 2; grid-row: 1; }
  .tb-who { grid-column: 3; grid-row: 1; }
  .tb-time { grid-column: 4; grid-row: 1; font-size: var(--text-sm); }
  .tb-track { grid-column: 3 / 5; grid-row: 2; height: 16px; }
  .tb-pool { display: none; }
  /* 我的竞猜与操作并排放第三行：手机上「猜了多少、赚亏多少、能不能追加」最要紧 */
  .tb-pos { grid-column: 3; grid-row: 3; flex-direction: row; align-items: baseline;
    justify-content: flex-start; gap: 6px; }
  .tb-mine-stake { font-size: var(--text-xs); }
  .tb-go { grid-column: 4; grid-row: 3; }
  .tb-mysum { flex-basis: 100%; margin: 0 0 2px; }
  .lg-note { margin-left: 0; flex-basis: 100%; }
}

/* 还没人猜：显示模型倍数作为参考，弱化以区分实时倍数 */

/* 无对手状态：明确提示「只能退回本金」，避免误以为倍数坏了 */
.payout-box.solo { border-color: var(--warning, var(--accent-line)); }
.payout-box.solo .pb-main { background: var(--accent-soft); }
.payout-box.solo .pb-main b { color: var(--muted); }
.payout-box.solo .pb-main span { color: var(--accent); font-weight: 600; }
.pb-note b { color: var(--fg); font-weight: 600; }
.payout-box.solo .pb-note { background: var(--surface); border-top: 1px dashed var(--border-strong);
  padding-top: var(--sp-3); }

/* ---- 倍数涨跌与逆势价值 ---- */
.pool-stat b.accent { color: var(--accent); }
.bdelta { font-size: var(--text-2xs); line-height: 1.3; font-variant-numeric: tabular-nums; }
.bdelta .d0 { font-style: normal; color: var(--muted); }
.bdelta .dn { font-style: normal; color: var(--neg); font-weight: 700; }
.bdelta .up { font-style: normal; color: var(--pos); font-weight: 700; }
.rdelta { font-style: normal; font-size: var(--text-2xs); font-weight: 700; margin-left: 3px; }
.rdelta.dn { color: var(--neg); }
.rdelta.up { color: var(--pos); }
/* 实时涨跌闪烁：确认状态变化，不喧宾夺主 */
@keyframes tickDown { 0% { background: var(--neg-soft); } 100% { background: transparent; } }
@keyframes tickUp { 0% { background: var(--pos-soft); } 100% { background: transparent; } }
.bo.down, .ro.down { animation: tickDown .9s ease-out; border-radius: 4px; }
.bo.up, .ro.up { animation: tickUp .9s ease-out; border-radius: 4px; }
/* 池压力条：资金相对模型先验的权重 */
.press { display: block; height: 3px; border-radius: var(--r-pill); background: var(--surface-2);
  overflow: hidden; margin-top: 5px; }
.press b { display: block; height: 100%; border-radius: var(--r-pill);
  background: var(--accent); transition: width .4s cubic-bezier(.2,.8,.2,1); }
.msub { display: block; }
/* 已过档：该时段早于阈值，概率归零——显示「—」，不再是可猜的档位 */
.bin.expired .bo { color: var(--faint); }
.bin.expired::after { display: none; }
.bin.expired button { cursor: not-allowed; }
.bl .exp { font-style: normal; font-size: var(--text-2xs); font-weight: 600; color: var(--muted);
  padding: 0 3px; border-radius: 3px; background: var(--surface-2); margin-left: 2px; }
/* 头像堆 = 竞猜明细入口 */
.mpool.detail { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  flex-shrink: 0; border-radius: var(--r-sm); padding: 2px 4px; margin: -2px -4px;
  transition: background .15s ease; }
.mpool.detail:hover { background: var(--surface-2); }
.mpool.detail:hover b { text-decoration: underline; text-underline-offset: 2px; }
.mpool.detail:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* 竞猜明细弹窗列表：按档位分组，组头=档名+该档小计，组内按金额降序 */
.pd-list { display: flex; flex-direction: column; gap: var(--sp-3); max-height: 320px; overflow-y: auto;
  margin: var(--sp-3) 0; }
.pd-group { display: flex; flex-direction: column; gap: 2px; }
.pd-ghead { display: flex; justify-content: space-between; align-items: baseline;
  padding: 2px var(--sp-2) 4px; border-bottom: 1px solid var(--border);
  font-size: var(--text-xs); font-weight: 600; color: var(--muted); }
.pd-ghead b { color: var(--fg); }
.pd-row { display: grid; grid-template-columns: 24px minmax(72px, 1fr) auto 48px;
  align-items: center; gap: var(--sp-2); padding: 6px var(--sp-2); border-radius: var(--r-sm); }
.pd-row:hover { background: var(--surface-2); }
.pd-name { font-size: var(--text-sm); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-amt { font-size: var(--text-sm); font-weight: 600; text-align: right; }
.pd-odds { font-size: var(--text-xs); color: var(--muted); text-align: right; }

/* ---- 排名竞猜矩阵：行 = 成员，列 = 名次 1..N ----
   视觉语言与时段竞猜一致（surface-2 底、r-sm 圆角、倍数主角），
   但格子更小（只放倍数数字），列头是名次，行头是成员。 */
.rank-mx { display: grid; grid-template-columns: minmax(104px, auto) repeat(var(--n, 8), minmax(44px, 1fr));
  gap: 4px; overflow-x: auto; padding-bottom: 2px; }
.rmx-row { display: contents; }
.rmx-head .rmx-col { font-size: var(--text-2xs); color: var(--muted); text-align: center;
  align-self: end; padding-bottom: 2px; white-space: nowrap; }
.rmx-name { display: flex; align-items: center; gap: 6px; font-size: var(--text-xs); font-weight: 500;
  min-width: 0; padding-right: var(--sp-2); }
.rmx-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rmx-name .mpool { margin-left: auto; }
.rmx-cell { position: relative; overflow: hidden; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface-2);
  transition: border-color .16s ease, background .16s ease, transform .12s ease; }
.rmx-cell > button { all: unset; cursor: pointer; display: block; width: 100%; box-sizing: border-box;
  padding: 6px 2px; text-align: center; font-size: var(--text-sm); font-weight: 700;
  letter-spacing: -0.02em; color: var(--fg); font-variant-numeric: tabular-nums; }
.rmx-cell:not(.off):hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.rmx-cell:not(.off):active > button { transform: scale(.95); }
.rmx-cell.mine { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.rmx-cell.off > button { cursor: not-allowed; color: var(--muted); }
.rmx-cell.doomed { border-color: var(--border);
  background: repeating-linear-gradient(-45deg, var(--surface-2) 0 5px,
    color-mix(in oklab, var(--fg) 5%, var(--surface-2)) 5px 10px); }
.rmx-cell.doomed > button { color: var(--faint); text-decoration: line-through; }
.rmx-cell .bamt { position: absolute; top: 1px; right: 2px; font-size: 9px; font-weight: 700;
  color: var(--accent); background: var(--surface); padding: 0 3px; border-radius: var(--r-pill);
  box-shadow: var(--e1); line-height: 1.4; pointer-events: none; }
.mcard.locked .rmx-cell > button { color: var(--muted); }
/* 不可竞猜格要一眼可辨：锁定格虚线框+压平底色，别让「点不动」只靠文字变灰传达 */
.rmx-cell.off:not(.hit):not(.miss):not(.doomed) { background: var(--surface); border-style: dashed; }
.rmx-cell.off:not(.hit):not(.miss):not(.doomed) > button { color: var(--faint); }
/* 已定局格（该行本人已打卡）：命中=浅绿定格，落空=划掉降级 —— 一眼读出「他第几个下班」 */
.rmx-cell.hit { border-color: color-mix(in oklab, var(--pos) 45%, var(--border));
  background: color-mix(in oklab, var(--pos) 8%, var(--surface-2)); }
.rmx-cell.hit > button { color: var(--pos); }
.rmx-cell.miss { background: var(--surface); border-style: dashed; }
.rmx-cell.miss > button { color: var(--faint); text-decoration: line-through; }

/* ---- 竞猜区 tab：三类盘切换，页面不再一根长到底。视觉语言同顶部导航 tab ---- */
.mk-tabs { display: flex; gap: var(--sp-4); border-bottom: 1px solid var(--border);
  margin: 0 0 var(--sp-4); }
.mk-tab { all: unset; cursor: pointer; padding: var(--sp-2) 2px; font-size: var(--text-sm);
  font-weight: 600; color: var(--faint); border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: color .15s ease, border-color .15s ease; }
.mk-tab:not(.active):hover { color: var(--muted); }
.mk-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.mk-pane[hidden] { display: none; }

/* ================= 切 tab 的即时反馈 ================= */
/* 骨架：结构与真实卡片一致，切过去立刻有东西看，不是空白 */
.sk-wrap { display: flex; flex-direction: column; gap: var(--sp-4); }
.sk-card { display: flex; flex-direction: column; gap: var(--sp-3); }
.sk-hero { min-height: 108px; }
.sk-line { height: 14px; border-radius: var(--r-sm); background: var(--surface-2);
  position: relative; overflow: hidden; }
.sk-title { height: 18px; width: 34%; }
.sk-line:nth-child(3) { width: 88%; }
.sk-line:nth-child(4) { width: 72%; }
.sk-line:nth-child(5) { width: 80%; }
.sk-line::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent,
    color-mix(in oklab, var(--fg) 7%, transparent), transparent);
  transform: translateX(-100%); animation: skSweep 1.15s ease-in-out infinite; }
@keyframes skSweep { to { transform: translateX(100%); } }
/* 后台刷新中：顶部一条细进度线，内容仍可交互，不遮挡 */
.shell.refreshing::before { content: ""; position: fixed; top: var(--bar-h, 96px); left: 0;
  height: 2px; width: 100%; z-index: 40; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: translateX(-100%); animation: skSweep 1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .sk-line::after, .shell.refreshing::before { animation: none; }
  .sk-line::after { background: color-mix(in oklab, var(--fg) 5%, transparent); transform: none; }
  .shell.refreshing::before { transform: none; opacity: .5;
    background: var(--accent); }
}
