/* Claude 存活榜 —— 报纸体育版 / 计分板的样子：
   纸色底、黑色粗细分隔线、等宽数字、直角；颜色只留“还活着蓝 / 已封号橙”两种 */

:root {
  color-scheme: light;
  --paper: #f1eee6;
  --paper-2: #f8f6f0;
  --paper-3: #e6e1d5;
  --ink: #141414;
  --ink-2: #46433d;
  --muted: #857f73;
  --rule: #d5cfc1;
  --rule-2: #bfb8a8;
  /* 还活着 / 已封号：图表和标记都用这一对（色弱也分得清） */
  --alive: #2a78d6;
  --banned: #eb6834;
  --alive-text: #1d5fae;
  --banned-text: #b0461a;
  --ok-text: #006300;
  --err-text: #b3261e;
  --grid: #ddd7c9;
  --axis: #b9b2a2;
  --pro: #2a78d6;
  --max: #6250d6;
  --ultra: #a86f00;
  --shadow-hard: 8px 8px 0 rgba(20, 20, 20, .14);
  --sans: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Cascadia Code", Consolas, "Roboto Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --paper: #121211;
    --paper-2: #1b1b19;
    --paper-3: #272724;
    --ink: #ece8de;
    --ink-2: #bcb7ab;
    --muted: #85807a;
    --rule: #2f2e2a;
    --rule-2: #45433e;
    --alive: #3987e5;
    --banned: #d95926;
    --alive-text: #86b6ef;
    --banned-text: #f08a5d;
    --ok-text: #3fbf3f;
    --err-text: #ff8a80;
    --grid: #2c2c2a;
    --axis: #45433e;
    --pro: #3987e5;
    --max: #9085e9;
    --ultra: #e0a420;
    --shadow-hard: 8px 8px 0 rgba(0, 0, 0, .55);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #121211;
  --paper-2: #1b1b19;
  --paper-3: #272724;
  --ink: #ece8de;
  --ink-2: #bcb7ab;
  --muted: #85807a;
  --rule: #2f2e2a;
  --rule-2: #45433e;
  --alive: #3987e5;
  --banned: #d95926;
  --alive-text: #86b6ef;
  --banned-text: #f08a5d;
  --ok-text: #3fbf3f;
  --err-text: #ff8a80;
  --grid: #2c2c2a;
  --axis: #45433e;
  --pro: #3987e5;
  --max: #9085e9;
  --ultra: #e0a420;
  --shadow-hard: 8px 8px 0 rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--alive); outline-offset: 2px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}
.topbar-in { height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; min-width: 0; }
.brand-mark { width: 22px; height: 22px; flex: none; }
.brand-mark rect { fill: var(--ink); }
.brand-mark path { fill: none; stroke: var(--paper); stroke-width: 2.8; }
.brand-name { font-weight: 800; font-size: 15px; letter-spacing: .01em; }
.today { font-size: 12px; color: var(--muted); border-left: 1px solid var(--rule-2); padding-left: 10px; margin-left: 2px; }
.top-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }

.text-btn {
  height: 32px; padding: 0 10px; border: 1px solid var(--rule-2); border-radius: 2px;
  background: transparent; color: var(--ink-2); font-size: 12.5px; letter-spacing: .04em;
}
.text-btn:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- 按钮、表单 ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border-radius: 2px;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font-size: 14px; font-weight: 650; white-space: nowrap; text-decoration: none;
  transition: background .12s, color .12s, opacity .12s;
}
.btn:hover { background: var(--paper-3); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { opacity: .86; background: var(--ink); }
.btn.danger { color: var(--err-text); border-color: var(--err-text); }
.btn.small { height: 30px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: default; }
#btn-hub { max-width: 44vw; overflow: hidden; text-overflow: ellipsis; display: inline-block; line-height: 34px; }
#btn-hub.signed { background: transparent; color: var(--ink); }

.linkish { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; font-size: 13.5px; }
.linkish:hover { color: var(--ink); }

.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > span { font-size: 13px; font-weight: 650; color: var(--ink); }
.field > span em, .field em { font-style: normal; font-weight: 400; color: var(--muted); font-size: 12px; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="search"], input:not([type]), select, textarea {
  width: 100%; min-width: 0;
  height: 38px; padding: 0 11px;
  border: 1px solid var(--rule-2); border-radius: 2px;
  background: var(--paper-2); color: var(--ink);
  outline: none; transition: border-color .12s;
}
textarea { height: auto; padding: 8px 11px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--muted); }
select { appearance: none; -webkit-appearance: none; padding-right: 28px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: right 14px top 50%, right 9px top 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.counter { justify-self: end; font-size: 12px; color: var(--muted); font-style: normal; margin-top: -2px; font-family: var(--mono); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint { font-size: 13px; color: var(--muted); }
.hint a { color: var(--ink); }
.form-error {
  font-size: 13.5px; color: var(--err-text);
  border-left: 3px solid var(--err-text); padding: 6px 10px;
  background: color-mix(in srgb, var(--err-text) 8%, transparent);
}

/* 小方点：还活着 / 已封号 */
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; vertical-align: 1px; font-style: normal; }
.dot.alive { background: var(--alive); }
.dot.banned { background: var(--banned); }

/* ---------- 报头 ---------- */

.mast { padding-top: 40px; padding-bottom: 24px; }
.kicker { font-size: 11.5px; letter-spacing: .16em; color: var(--muted); }
.mast h1 {
  font-size: clamp(40px, 7.4vw, 80px); line-height: 1.02; font-weight: 900;
  letter-spacing: -.035em; margin: 8px 0 12px;
}
.lede { font-size: 17px; color: var(--ink-2); }

/* ---------- 记分板 ---------- */

.scoreboard {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink);
}
.score {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
  padding: 14px 18px 16px; text-align: left;
  border: 0; border-left: 1px solid var(--rule); background: transparent; color: inherit; font: inherit;
}
.score:first-child { border-left: 0; padding-left: 0; }
.score-label { font-size: 12.5px; color: var(--ink-2); }
.score-value { font-size: 40px; line-height: 1.12; font-weight: 700; letter-spacing: -.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-value small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: 0; font-family: var(--sans); }
.score-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-link:not(:disabled) { cursor: pointer; }
.score-link:not(:disabled):hover { background: var(--paper-2); }
.score-link:not(:disabled):hover .score-sub { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.score-link:disabled { cursor: default; }

/* ---------- 最新动态（滚动条） ---------- */

.ticker {
  margin-top: 22px; display: flex; align-items: stretch; height: 40px;
  background: var(--ink); color: var(--paper); overflow: hidden;
}
.ticker-tag {
  flex: none; display: flex; align-items: center; padding: 0 14px;
  background: var(--banned); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .12em;
}
.ticker-view {
  flex: 1; overflow: hidden; display: flex; align-items: center;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 40px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 40px), transparent);
}
.ticker-track { display: inline-flex; white-space: nowrap; animation: tick 60s linear infinite; will-change: transform; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tk {
  display: inline-flex; align-items: center; gap: 6px; padding: 0 22px;
  background: none; border: 0; color: inherit; font-size: 13.5px; white-space: nowrap;
  border-right: 1px solid color-mix(in srgb, var(--paper) 22%, transparent);
}
.tk:hover b { text-decoration: underline; text-underline-offset: 3px; }
.tk-time { font-size: 12px; opacity: .6; margin-right: 2px; }
.tk .dot { margin-right: 2px; }

/* ---------- 分节 ---------- */

.sec { margin-top: 44px; }
.sec-head {
  display: flex; align-items: flex-end; gap: 14px;
  border-top: 3px solid var(--ink); padding-top: 12px;
}
.sec-no {
  flex: none; font-size: 12px; font-weight: 700; line-height: 1;
  padding: 4px 5px; border: 1px solid var(--ink); margin-bottom: 7px;
}
.sec-head.small { align-items: flex-start; }
.sec-head.small .sec-no { margin: 4px 0 0; }
.sec-head h2 { font-size: 21px; font-weight: 850; letter-spacing: -.01em; line-height: 1.3; }
.sub { font-size: 13px; color: var(--muted); margin-top: 1px; }

/* 榜单标签 */
.tabs { display: flex; gap: 24px; flex-wrap: wrap; }
.tabs > button {
  background: none; border: 0; padding: 0 0 4px; border-bottom: 3px solid transparent;
  font-size: 24px; font-weight: 850; letter-spacing: -.01em; color: var(--muted); line-height: 1.25;
}
.tabs > button:hover { color: var(--ink-2); }
.tabs > button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }

.tools {
  display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap;
  margin-top: 14px; padding-bottom: 12px;
}
.tool-right { display: flex; gap: 8px; flex-wrap: wrap; }
.toggles { display: flex; gap: 2px 18px; flex-wrap: wrap; }
.toggles > button {
  display: inline-flex; align-items: center; background: none; border: 0;
  padding: 3px 0; border-bottom: 2px solid transparent; font-size: 14px; color: var(--muted);
}
.toggles > button:hover { color: var(--ink); }
.toggles > button[aria-checked="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }
.select select { height: 32px; font-size: 13.5px; width: auto; background-color: var(--paper); }
.search { position: relative; display: block; }
.search svg { position: absolute; left: 10px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; pointer-events: none; }
.search input { height: 32px; padding-left: 30px; width: 160px; font-size: 13.5px; background: var(--paper); }

.filter-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2); }
.filter-note .tag-x { display: inline-flex; align-items: center; gap: 4px; padding: 1px 4px 1px 9px; border: 1px solid var(--ink); background: var(--paper-2); }
.filter-note .tag-x button { border: 0; background: none; padding: 0 5px; color: var(--muted); font-size: 16px; line-height: 1; }
.filter-note .tag-x button:hover { color: var(--ink); }

/* 一行一个号：名次 | 昵称 | 套餐 | 防封方式 | 注册日期 | 存活天数 */
.list-head, .row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1.5fr) 96px minmax(0, .9fr) 112px 196px;
  align-items: center; column-gap: 12px;
}
.list-head {
  padding: 8px 10px; font-size: 11.5px; color: var(--muted); letter-spacing: .04em;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
}
.list-head .c-days { text-align: right; }
.rows { list-style: none; margin: 0; padding: 0; }
.row {
  position: relative; width: 100%; text-align: left; color: var(--ink);
  min-height: 60px; padding: 12px 10px;
  background: transparent; border: 0; border-bottom: 1px solid var(--rule);
  transition: background .12s;
}
button.row:hover { background: var(--paper-2); }
button.row:hover .name { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.row.banned:hover .name { text-decoration: line-through; }

.pos { font-family: var(--mono); font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rk {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 15px; font-weight: 800;
}
.rk.r1 { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--ink); }

.c-name { display: flex; flex-direction: column; min-width: 0; }
.name-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.name { font-weight: 750; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.banned .name { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--banned); text-decoration-thickness: 2px; }
.pill {
  flex: none; font-family: var(--mono); font-size: 11px; font-weight: 700; line-height: 1;
  padding: 3px 5px; border: 1px solid currentColor; letter-spacing: .04em;
}
.pill.banned { color: var(--banned-text); }
.pill.alive { color: var(--alive-text); }
.src { flex: none; width: 14px; height: 14px; }
.m-meta { display: none; }

.tag {
  display: inline-block; font-family: var(--mono); font-size: 11.5px; font-weight: 700; line-height: 1;
  padding: 4px 6px; border: 1px solid currentColor; white-space: nowrap;
  color: color-mix(in srgb, var(--c) 82%, var(--ink));
}
.tag.t-pro { --c: var(--pro); }
.tag.t-max-5x { --c: var(--max); }
.tag.t-ultra { --c: var(--ultra); }
.c-guard { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-guard.none { color: var(--muted); }
.c-date { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); line-height: 1.4; font-variant-numeric: tabular-nums; }
.c-date small { display: block; font-size: 11.5px; color: var(--banned-text); }
.c-days { display: flex; align-items: center; justify-content: flex-end; gap: 12px; white-space: nowrap; }
.c-days b { font-family: var(--mono); font-size: 22px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.c-days small { font-size: 12px; color: var(--muted); margin-left: -8px; }
.row.banned .c-days b { color: var(--ink-2); }
/* 存活天数占榜首的多少 */
.lifebar { flex: none; width: 76px; height: 6px; background: var(--paper-3); }
.lifebar i { display: block; height: 100%; background: var(--alive); }
.row.banned .lifebar i, .e-big.banned .lifebar i { background: var(--banned); }

.empty { padding: 48px 16px; text-align: center; color: var(--muted); font-size: 14px; border-bottom: 1px solid var(--rule); }
.empty .btn { margin-top: 14px; }
.more { display: flex; justify-content: center; padding-top: 16px; }

/* 套餐榜 / 防封榜 */
.board-note { margin: 14px 0 10px; font-size: 13px; color: var(--muted); max-width: 780px; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { display: inline-block; width: 10px; height: 10px; }
.key.alive { background: var(--alive); }
.key.banned { background: var(--banned); }

.stat-table { display: grid; }
.st-head, .st-row {
  display: grid;
  grid-template-columns: minmax(96px, 1.1fr) 64px minmax(160px, 2fr) 110px 110px 110px;
  align-items: center; column-gap: 14px;
}
@media (min-width: 901px) {
  .stat-table.five .st-head, .stat-table.five .st-row { grid-template-columns: minmax(96px, 1.1fr) 64px minmax(160px, 2fr) 120px 120px; }
}
.st-head { padding: 8px 10px; font-size: 11.5px; color: var(--muted); font-family: var(--mono); letter-spacing: .03em; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.st-head .st-d, .st-row .st-d { text-align: right; }
.st-row {
  width: 100%; text-align: left; color: var(--ink); padding: 14px 10px;
  background: transparent; border: 0; border-bottom: 1px solid var(--rule);
  transition: background .12s;
}
button.st-row:hover { background: var(--paper-2); }
.st-row.ref { color: var(--ink-2); background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--rule) 45%, transparent) 6px 7px); }
.st-name { font-weight: 750; display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 15px; }
.st-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-rank { font-size: 12px; color: var(--muted); font-weight: 500; font-family: var(--mono); }
.st-num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 15px; }
.st-num small { color: var(--muted); font-size: 12px; margin-left: 2px; font-family: var(--sans); }
.st-num.dim { color: var(--muted); }
.split-cell { display: grid; gap: 5px; }
.split { display: flex; gap: 2px; height: 8px; }
.split i { display: block; height: 100%; min-width: 3px; }
.split i:first-child { border-radius: 999px 0 0 999px; }
.split i:last-child { border-radius: 0 999px 999px 0; }
.split i:only-child { border-radius: 999px; }
.split .a { background: var(--alive); }
.split .b { background: var(--banned); }
.split-text { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.split-text b { font-weight: 700; color: var(--ink); font-family: var(--mono); }
.st-label-m { display: none; }

/* ---------- 图表 ---------- */

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.chart-card { min-width: 0; }
.chart { position: relative; height: 230px; margin-top: 16px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart text { font-size: 11px; fill: var(--muted); font-family: var(--mono); }
.chart .val { fill: var(--ink); font-weight: 700; font-size: 12px; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .base { stroke: var(--ink); stroke-width: 1; }
.chart .bar { fill: var(--banned); transition: opacity .12s; }
.chart .hit { fill: transparent; outline: none; }
.chart .hit:focus-visible { stroke: var(--alive); stroke-width: 2; }
.chart.hovering .bar { opacity: .4; }
.chart.hovering .bar.on { opacity: 1; }
.chart-empty { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 13.5px; border: 1px dashed var(--rule-2); }

.data-view { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.data-view summary { cursor: pointer; width: max-content; }
.data-view table { margin-top: 8px; border-collapse: collapse; width: 100%; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.data-view th, .data-view td { text-align: left; padding: 3px 8px 3px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); font-weight: 400; }
.data-view td:last-child, .data-view th:last-child { text-align: right; }

.barlist { display: grid; gap: 14px; margin-top: 20px; }
.bl-row { display: grid; grid-template-columns: 104px minmax(0, 1fr) 96px; align-items: center; gap: 12px; font-size: 13px; }
.bl-label { color: var(--ink-2); white-space: nowrap; }
.bl-track { height: 16px; position: relative; border-left: 1px solid var(--ink); }
.bl-bar { height: 100%; background: var(--banned); border-radius: 0 4px 4px 0; min-width: 2px; }
.bl-row.zero .bl-bar { background: var(--rule-2); }
.bl-val { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; font-size: 12.5px; }
.bl-val b { color: var(--ink); font-weight: 700; font-size: 14px; }

.tip {
  position: fixed; z-index: 60; pointer-events: none;
  background: var(--ink); color: var(--paper);
  font-size: 12.5px; line-height: 1.45; padding: 6px 10px; white-space: nowrap;
}
.tip b { font-size: 14px; font-weight: 700; font-family: var(--mono); }
.tip span { opacity: .75; }

/* ---------- 我的号能排第几 ---------- */

.my-body { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 1.5fr); gap: 32px; align-items: start; margin-top: 18px; }
.my-form { display: flex; align-items: flex-end; gap: 10px; }
.my-form .field { flex: 1; max-width: 220px; }
.my-out { border-left: 1px solid var(--ink); padding-left: 28px; display: grid; gap: 6px; }
.my-big { font-size: 15px; color: var(--ink-2); }
.my-big b { font-family: var(--mono); font-size: 46px; font-weight: 700; color: var(--ink); letter-spacing: -.03em; margin: 0 4px; line-height: 1.1; }
.my-line { font-size: 14.5px; color: var(--ink-2); }
.my-line b { color: var(--ink); font-family: var(--mono); }
.my-out .btn { justify-self: start; margin-top: 8px; }

.foot { margin-top: 56px; padding-top: 14px; padding-bottom: 40px; border-top: 1px solid var(--ink); font-size: 12.5px; color: var(--muted); display: grid; gap: 4px; }

/* ---------- 弹窗 ---------- */

.dlg {
  width: min(540px, calc(100% - 24px)); max-height: calc(100dvh - 32px);
  padding: 26px; border: 1px solid var(--ink); border-radius: 2px;
  background: var(--paper); color: var(--ink);
  box-shadow: var(--shadow-hard);
  overflow: auto;
}
.dlg.wide { width: min(620px, calc(100% - 24px)); }
.dlg::backdrop { background: rgba(18, 18, 17, .45); }
.dlg h2 { font-size: 22px; font-weight: 850; letter-spacing: -.01em; padding-right: 40px; }
.dlg-close { position: absolute; top: 14px; right: 14px; margin: 0; }
.dlg-close button {
  width: 30px; height: 30px; border: 1px solid var(--rule-2); border-radius: 2px;
  background: transparent; color: var(--ink-2); font-size: 18px; line-height: 1;
}
.dlg-close button:hover { border-color: var(--ink); color: var(--ink); }

/* 详情 */
.e-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-right: 40px; }
.e-head h2 { padding-right: 0; font-size: 28px; font-weight: 900; overflow-wrap: anywhere; }
.e-head.banned h2 { text-decoration: line-through; text-decoration-color: var(--banned); text-decoration-thickness: 3px; color: var(--ink-2); }
.e-no { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 2px; }
.e-big { margin-top: 16px; padding: 12px 0 14px; border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); }
.e-big .num { font-family: var(--mono); font-size: 52px; line-height: 1.05; font-weight: 700; letter-spacing: -.04em; }
.e-big .num small { font-family: var(--sans); font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.e-big .span { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.e-big .lifebar { width: 100%; margin-top: 10px; }
.e-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; margin: 4px 0 0; }
.e-facts div { min-width: 0; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.e-facts dt { font-size: 12px; color: var(--muted); }
.e-facts dd { margin: 1px 0 0; font-size: 14.5px; overflow-wrap: anywhere; }
.e-note { margin-top: 14px; padding: 2px 0 2px 12px; border-left: 3px solid var(--ink); color: var(--ink-2); font-size: 14.5px; }
.e-owned { margin-top: 12px; }
.e-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.unlock { margin-top: 12px; display: grid; gap: 8px; }
.inline-row { display: flex; gap: 8px; }

/* 登记表单 */
.reg-form { display: grid; gap: 16px; margin-top: 18px; }
.name-status { font-size: 12.5px; color: var(--muted); }
.name-status:empty { display: none; }
.name-status.ok { color: var(--ok-text); }
.name-status.bad { color: var(--err-text); }

.seg { display: inline-flex; border: 1px solid var(--ink); border-radius: 2px; overflow: hidden; }
.seg > label { display: contents; }
.seg > label > input { position: absolute; opacity: 0; pointer-events: none; }
.seg > label > span {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 14px; font-size: 14px; color: var(--ink-2); cursor: pointer; white-space: nowrap;
  border-left: 1px solid var(--ink);
}
.seg > label:first-child > span { border-left: 0; }
.seg > label > span:hover { background: var(--paper-3); color: var(--ink); }
.seg > label > input:checked + span { background: var(--ink); color: var(--paper); font-weight: 700; }
.seg > label > input:focus-visible + span { outline: 2px solid var(--alive); outline-offset: -3px; }
.seg-full { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips > label > input { position: absolute; opacity: 0; pointer-events: none; }
.chips > label > span {
  display: inline-flex; align-items: center; height: 30px; padding: 0 10px;
  border: 1px solid var(--rule-2); border-radius: 2px; font-size: 13px; color: var(--ink-2); cursor: pointer;
}
.chips > label > span:hover { border-color: var(--ink); color: var(--ink); }
.chips > label > input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 650; }
.chips > label > input:focus-visible + span { outline: 2px solid var(--alive); outline-offset: 2px; }

.guest-box { display: grid; gap: 10px; padding: 12px 14px; border: 1px dashed var(--rule-2); }
.owner-tip { padding: 8px 12px; border-left: 3px solid var(--ink); background: var(--paper-2); color: var(--ink-2); }
.preview { display: grid; gap: 4px; padding: 8px 10px 0; border: 1px dashed var(--rule-2); }
.preview-label { font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.preview .row { border-bottom: 0; padding-left: 0; padding-right: 0; }
.ts-box:empty { display: none; }
.form-actions { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

.code-box { display: flex; align-items: baseline; gap: 12px; margin: 14px 0 8px; padding: 10px 14px; border: 1px solid var(--ink); }
.code-box span { font-size: 13px; color: var(--muted); }
.code-box code { font-size: 28px; font-weight: 700; }
#dlg-done p { margin-top: 10px; color: var(--ink-2); font-size: 14.5px; }
#dlg-done form { margin-top: 16px; }

/* 登录 */
.hub-step { margin-top: 16px; display: grid; gap: 12px; }
.hub-opts { display: grid; border-top: 1px solid var(--ink); }
.hub-opt {
  display: flex; align-items: center; gap: 14px; text-align: left; text-decoration: none; color: var(--ink);
  padding: 13px 4px; border: 0; border-bottom: 1px solid var(--rule); background: transparent; width: 100%;
}
.hub-opt:hover { background: var(--paper-2); }
.hub-opt:hover .hub-arrow { transform: translateX(3px); color: var(--ink); }
.hub-opt.off { opacity: .45; cursor: not-allowed; }
.hub-ico { width: 36px; height: 36px; display: grid; place-items: center; background: var(--paper-3); flex: none; color: var(--ink-2); }
.hub-ico svg { width: 22px; height: 22px; }
.hub-txt { display: grid; flex: 1; }
.hub-txt b { font-size: 15px; font-weight: 750; }
.hub-txt small { font-size: 12.5px; color: var(--muted); }
.hub-arrow { font-family: var(--mono); color: var(--muted); transition: transform .12s; padding-right: 4px; }
.hub-foot { display: grid; gap: 10px; padding-top: 4px; justify-items: start; }
.hub-foot > * { width: 100%; }
.hub-foot > .linkish { width: auto; }
.find-form { display: grid; gap: 10px; }
.find-form .btn { justify-self: start; }
.login-form { display: grid; gap: 10px; }
.login-form .btn { justify-self: start; }
.hub-back { justify-self: start; }
.me-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.me-bar b { color: var(--ink); }
.hub-new { justify-self: start; }
.mine-title { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .06em; margin-top: 6px; }
.mine-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.mine-item > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 80;
  background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 2px;
  font-size: 14px; max-width: calc(100% - 32px);
}
.toast.err { background: var(--err-text); color: #fff; }

/* ---------- 窄屏 ---------- */

@media (min-width: 641px) and (max-width: 900px) {
  .scoreboard { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .scoreboard > .score { grid-column: span 2; }
  .scoreboard > .score:nth-child(n+4) { grid-column: span 3; border-top: 1px solid var(--rule); }
  .scoreboard > .score:nth-child(4) { border-left: 0; padding-left: 0; }
}

@media (max-width: 900px) {
  .st-head, .st-row { grid-template-columns: minmax(90px, 1.1fr) 56px minmax(130px, 2fr) 96px 96px; }
  .st-max { display: none; }
}

/* 榜单的行按“自己所在的地方有多宽”变样子，而不是按屏幕：
   榜单本身、登记弹窗里的预览都一样，窄了就把套餐、防封方式、日期挪到昵称下面 */
.board-body, .preview { container: rows / inline-size; }
@container rows (max-width: 860px) {
  .list-head, .row { grid-template-columns: 52px minmax(0, 1.4fr) 88px minmax(0, .9fr) 150px; }
  .list-head .c-date, .row .c-date { display: none; }
  .lifebar { width: 48px; }
}
@container rows (max-width: 600px) {
  .list-head { display: none; }
  .row { grid-template-columns: 40px minmax(0, 1fr) auto; padding: 12px 2px; }
  .row .c-tier, .row .c-guard, .row .c-date { display: none; }
  .m-meta { display: flex; align-items: center; gap: 7px; margin-top: 4px; font-size: 12.5px; color: var(--ink-2); min-width: 0; overflow: hidden; white-space: nowrap; }
  .m-meta .tag { font-size: 10.5px; padding: 3px 5px; flex: none; }
  .m-meta .g { color: var(--ink); font-weight: 600; flex: none; }
  .m-meta .d { font-family: var(--mono); font-size: 11.5px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .m-meta .d.b { color: var(--banned-text); }
  .lifebar { display: none; }
  .c-days b { font-size: 20px; }
  .c-days small { margin-left: -9px; }
  .rk { width: 26px; height: 26px; font-size: 13px; }
}

@media (max-width: 760px) {
  .grid2 { grid-template-columns: 1fr; gap: 44px; }
  .my-body { grid-template-columns: 1fr; gap: 18px; }
  .my-out { border-left: 0; padding-left: 0; border-top: 1px solid var(--ink); padding-top: 14px; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .today { display: none; }
  .brand-name { font-size: 14.5px; }
  #btn-hub { max-width: 38vw; padding: 0 12px; }
  .mast { padding-top: 28px; padding-bottom: 18px; }
  .lede { font-size: 15.5px; }
  .scoreboard { grid-template-columns: 1fr 1fr; }
  .score { padding: 12px 0 12px 14px; }
  .score:nth-child(odd) { border-left: 0; padding-left: 0; }
  .score:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .score-link { grid-column: span 2; }
  .score-value { font-size: 30px; }
  .ticker { height: 36px; }
  .tk { font-size: 13px; padding: 0 16px; }
  .sec { margin-top: 36px; }
  .tabs { gap: 16px; }
  .tabs > button { font-size: 19px; }
  .tool-right { width: 100%; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .st-head { display: none; }
  .st-row { grid-template-columns: 1fr auto; row-gap: 8px; padding: 12px 2px; }
  .st-row .split-cell { grid-column: 1 / -1; grid-row: 2; }
  .st-row > span:nth-child(2) { text-align: right; }
  .st-row .st-d { display: none; }
  .st-label-m { display: block; grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-2); }
  .bl-row { grid-template-columns: 84px minmax(0, 1fr) 82px; gap: 8px; }
  .my-form .field { max-width: none; }
  .e-facts { grid-template-columns: 1fr; }
  .e-big .num { font-size: 42px; }
  .row2 { grid-template-columns: 1fr; }
  .dlg { padding: 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .ticker-track { animation: none; }
  .ticker-view { overflow-x: auto; }
}
