/* 逆转裁判 · 样式
   信笺：暖纸底、墨色衬线字、朱砂印章；四种判断各一个色相。零外部字体。 */

:root {
  --paper: #f4eee2;
  --sheet: #fbf8f1;
  --sheet-2: #f0e9db;
  --ink: #2a251e;
  --ink-2: #5b5246;
  --muted: #8a7f70;
  --line: #e2d8c6;
  --line-2: #d3c6ae;
  --seal: #a8322a;
  --seal-soft: #f3dfd8;
  --c-a: #b0453a;
  --c-b: #3d5a80;
  --c-both: #a77a2c;
  --c-none: #5f8768;
  --gold: #b8892e;
  --shadow: 0 1px 0 rgba(60, 40, 10, .04), 0 8px 24px -14px rgba(60, 40, 10, .25);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "Noto Serif SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --radius: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16130e;
    --sheet: #1f1b15;
    --sheet-2: #28231b;
    --ink: #ece4d4;
    --ink-2: #c4b9a5;
    --muted: #8f8573;
    --line: #342d23;
    --line-2: #463c2f;
    --seal: #d0574a;
    --seal-soft: #3a211c;
    --c-a: #d36a5d;
    --c-b: #7b9cc6;
    --c-both: #cfa154;
    --c-none: #86b08f;
    --gold: #d6a84c;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 28px -16px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 15px/1.75 var(--sans);
  background-image: radial-gradient(rgba(120, 90, 40, .045) 1px, transparent 1px);
  background-size: 4px 4px;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.35; margin: 0; }
p { margin: 0; }
.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 18px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.serif { font-family: var(--serif); }
[hidden] { display: none !important; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 18px; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; }
.seal {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 4px;
  background: var(--seal); color: var(--sheet); font: 700 18px/1 var(--serif);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--sheet) 25%, transparent);
}
.brand-text { font: 700 19px/1 var(--serif); letter-spacing: .12em; }
.topnav { display: flex; gap: 4px; }
.topnav a { padding: 6px 12px; border-radius: 4px; color: var(--ink-2); font-family: var(--serif); white-space: nowrap; }
.topnav a.on, .topnav a:hover { color: var(--ink); background: var(--sheet-2); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ghost {
  padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent;
  font-size: 14px; white-space: nowrap;
}
.ghost:hover { background: var(--sheet-2); }
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 18px; border-radius: 999px; border: 0; background: var(--seal); color: #fbf6ec;
  font: 600 14px/1.2 var(--sans); white-space: nowrap;
}
.cta:hover { filter: brightness(1.06); }
.cta[disabled] { opacity: .5; cursor: not-allowed; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--sheet); font-size: 14px;
}
.btn:hover { border-color: var(--ink-2); }
.btn.on { background: var(--seal-soft); border-color: var(--seal); color: var(--seal); }
.linkish { background: none; border: 0; padding: 0; color: var(--seal); font-size: 14px; }
.linkish:hover { text-decoration: underline; }

/* ---------- 首页 ---------- */
.hero { padding-block: 56px 28px; text-align: center; }
.hero h1 { font-size: clamp(40px, 8vw, 72px); letter-spacing: .18em; }
.hero h1 .seal { width: .9em; height: .9em; font-size: .62em; vertical-align: .08em; margin-right: .18em; }
.hero-sub { text-wrap: balance; margin-top: 14px; font: 18px/1.9 var(--serif); color: var(--ink-2); }
.hero-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 36px; margin-top: 26px; }
.hero-stats div { text-align: center; }
.hero-stats b { display: block; font: 700 26px/1.2 var(--serif); font-variant-numeric: tabular-nums; }
.hero-stats span { font-size: 13px; color: var(--muted); }

.section { margin-top: 44px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.section-head h2 { font-size: 22px; letter-spacing: .06em; }
.section-head h2::before { content: "〔"; color: var(--seal); }
.section-head h2::after { content: "〕"; color: var(--seal); }
.section-head .muted { font-size: 13px; }
.section-head .more { margin-left: auto; font-size: 14px; color: var(--seal); }

.sheet {
  background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.featured { padding: 28px clamp(18px, 4vw, 40px); position: relative; overflow: hidden; }
.featured::after {
  content: "今日卷宗"; position: absolute; top: 18px; right: -34px; transform: rotate(35deg);
  background: var(--seal); color: #fbf6ec; font: 600 12px/1 var(--sans); padding: 6px 40px; letter-spacing: .2em;
}
.featured h3 { font-size: clamp(22px, 3.4vw, 30px); margin: 10px 0 12px; }
.featured .excerpt { font: 16px/1.95 var(--serif); color: var(--ink-2); max-width: 46em; }
.featured .row { margin-top: 18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 8px; transition: transform .15s, border-color .15s; }
.card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.card h3 { font-size: 17px; }
.card .excerpt { font: 14px/1.8 var(--serif); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .foot-row { margin-top: auto; display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tag { font-size: 12px; padding: 1px 8px; border-radius: 3px; border: 1px solid var(--line-2); color: var(--ink-2); }
.tag.mode-judge { border-color: var(--c-a); color: var(--c-a); }
.tag.mode-choose { border-color: var(--c-b); color: var(--c-b); }
.tag.mode-heard { border-color: var(--c-none); color: var(--c-none); }
.tag.acts { border-style: dashed; }
.tag.done { background: var(--sheet-2); }

.minibar { display: inline-flex; width: 80px; height: 5px; border-radius: 3px; overflow: hidden; background: var(--line); }
.minibar i { display: block; height: 100%; }
.bg-a { background: var(--c-a); } .bg-b { background: var(--c-b); } .bg-both { background: var(--c-both); } .bg-none { background: var(--c-none); }
.fg-a { color: var(--c-a); } .fg-b { color: var(--c-b); } .fg-both { color: var(--c-both); } .fg-none { color: var(--c-none); }

/* 金句墙 */
.wall { columns: 3 260px; column-gap: 14px; }
.quote-card {
  break-inside: avoid; margin-bottom: 14px; padding: 18px 20px; position: relative;
  font: 16px/1.9 var(--serif);
}
.quote-card::before { content: "“"; position: absolute; top: -6px; left: 10px; font: 700 42px/1 var(--serif); color: var(--seal); opacity: .25; }
.quote-card .who { display: block; margin-top: 10px; font: 12.5px/1.5 var(--sans); color: var(--muted); }
.quote-card.pinned { border-color: var(--gold); }
.quote-card.pinned::after { content: "终审推荐"; position: absolute; top: 10px; right: 12px; font: 11px/1 var(--sans); color: var(--gold); }

/* 后来 */
.later-list { display: grid; gap: 12px; }
.later-item { padding: 16px 20px; display: grid; gap: 6px; border-left: 3px solid var(--seal); }
.later-item .later { font: 15px/1.85 var(--serif); color: var(--ink-2); }

.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.side-list { padding: 8px 0; }
.side-list li { list-style: none; display: flex; align-items: center; gap: 10px; padding: 9px 18px; border-bottom: 1px dashed var(--line); }
.side-list li:last-child { border-bottom: 0; }
.side-list ol, .side-list ul { margin: 0; padding: 0; }
.side-list .no { width: 22px; font: 700 15px var(--serif); color: var(--seal); }

/* 筛选条 */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.filters .search { margin-left: auto; }
.filters input[type=search] { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--sheet); width: 200px; }
.chip { padding: 5px 12px; border-radius: 999px; border: 1px solid transparent; background: transparent; font-size: 14px; color: var(--ink-2); }
.chip.on { border-color: var(--ink); color: var(--ink); background: var(--sheet); }
.chip:hover { color: var(--ink); }
.cats { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.cats .chip { font-size: 13px; padding: 3px 10px; }

/* ---------- 案子页 ---------- */
.case-page { max-width: 760px; margin: 0 auto; padding-block: 34px 60px; }
.back { font-size: 14px; color: var(--muted); }
.case-head h1 { font-size: clamp(24px, 4.4vw, 34px); margin: 14px 0 10px; }
.case-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.question { margin-top: 18px; padding: 12px 18px; border-left: 3px solid var(--seal); background: var(--seal-soft); font: 17px/1.8 var(--serif); border-radius: 0 var(--radius) var(--radius) 0; }

.act { margin-top: 26px; padding: 26px clamp(18px, 4vw, 34px); position: relative; animation: unfold .5s ease both; }
@keyframes unfold { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.act-title { font: 700 14px/1 var(--serif); letter-spacing: .14em; color: var(--seal); display: flex; align-items: center; gap: 10px; }
.act-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.act-body { margin-top: 16px; font: 17px/2.05 var(--serif); white-space: pre-wrap; }
.act-locked { margin-top: 18px; padding: 18px; border: 1px dashed var(--line-2); border-radius: var(--radius); text-align: center; color: var(--muted); font-family: var(--serif); }

.vote-panel { margin-top: 22px; padding: 22px clamp(18px, 4vw, 30px); }
.vote-panel h3 { font-size: 18px; }
.vote-panel .hint { margin-top: 4px; font-size: 13px; color: var(--muted); }
.picks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
@media (min-width: 640px) { .picks { grid-template-columns: repeat(4, 1fr); } }
.pick {
  padding: 14px 10px; border-radius: var(--radius); border: 1.5px solid var(--line-2); background: var(--sheet);
  text-align: center; display: grid; gap: 2px; transition: all .12s;
}
.pick b { font: 700 16px/1.4 var(--serif); }
.pick span { font-size: 12px; color: var(--muted); }
.pick:hover { border-color: var(--ink-2); }
.pick.sel-a { border-color: var(--c-a); background: color-mix(in srgb, var(--c-a) 10%, var(--sheet)); }
.pick.sel-b { border-color: var(--c-b); background: color-mix(in srgb, var(--c-b) 10%, var(--sheet)); }
.pick.sel-both { border-color: var(--c-both); background: color-mix(in srgb, var(--c-both) 10%, var(--sheet)); }
.pick.sel-none { border-color: var(--c-none); background: color-mix(in srgb, var(--c-none) 10%, var(--sheet)); }
.field { display: grid; gap: 6px; margin-top: 14px; }
.field > span { font-size: 13px; color: var(--ink-2); }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--paper);
}
.field textarea { min-height: 96px; resize: vertical; font: 15px/1.8 var(--serif); }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid color-mix(in srgb, var(--seal) 40%, transparent); outline-offset: 1px; }
.form-row { display: flex; gap: 12px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.err { color: var(--seal); font-size: 13px; min-height: 1em; margin-top: 8px; }

/* 结果 */
.result { margin-top: 26px; padding: 24px clamp(18px, 4vw, 30px); }
.dist { display: grid; gap: 10px; margin-top: 16px; }
.dist-row { display: grid; grid-template-columns: 92px 1fr 52px; align-items: center; gap: 10px; font-size: 14px; }
.dist-row .bar { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.dist-row .bar i { display: block; height: 100%; border-radius: 5px; transition: width .6s ease; }
.dist-row .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.dist-row.mine b::after { content: " · 你"; color: var(--seal); font-size: 12px; }
.curve-wrap { margin-top: 22px; overflow-x: auto; }
.curve-wrap svg { display: block; width: 100%; min-width: 420px; height: auto; }
.curve-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.curve-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.turn-fact { margin-top: 14px; font: 17px/1.8 var(--serif); }
.turn-fact b { color: var(--seal); font-size: 22px; }
.path { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: 14px; }
.path .step { padding: 2px 10px; border-radius: 3px; border: 1px solid currentColor; }
.path .arrow { color: var(--muted); }

/* 理外 */
.beyond { margin-top: 26px; padding: 22px clamp(18px, 4vw, 30px); background: var(--sheet-2); border: 1px solid var(--line); border-radius: var(--radius); }
.beyond h4 { font-size: 14px; letter-spacing: .2em; color: var(--seal); }
.beyond .note { margin-top: 10px; font: 18px/1.9 var(--serif); }
.beyond blockquote { margin: 12px 0 0; padding-left: 14px; border-left: 2px solid var(--line-2); font: 15px/1.8 var(--serif); color: var(--ink-2); }
.beyond blockquote cite { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); }
.reader-notes { margin-top: 14px; display: grid; gap: 8px; }
.reader-notes div { font: 14.5px/1.8 var(--serif); color: var(--ink-2); }

/* 同路人 */
.echo-box { margin-top: 26px; padding: 22px clamp(18px, 4vw, 30px); }
.echo-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.echo-head h3 { font-size: 18px; }
.echo-list { margin-top: 16px; display: grid; gap: 12px; }
.echo { padding: 14px 16px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.echo p { font: 15px/1.9 var(--serif); white-space: pre-wrap; }
.echo .meta { margin-top: 8px; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.hug { border: 1px solid var(--line-2); background: transparent; border-radius: 999px; padding: 2px 10px; font-size: 12.5px; color: var(--ink-2); }
.hug.on { border-color: var(--c-none); color: var(--c-none); background: color-mix(in srgb, var(--c-none) 10%, transparent); }
.big-hug { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px; text-align: center; }
.big-hug .hug { font-size: 17px; padding: 10px 28px; font-family: var(--serif); }

/* 判决列表 */
.verdicts { margin-top: 26px; }
.verdicts h3 { font-size: 18px; margin-bottom: 12px; }
.reason { padding: 16px 18px; margin-bottom: 12px; }
.reason-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.reason-head .name { font-weight: 600; }
.reason-head .pick-tag { padding: 0 8px; border-radius: 3px; border: 1px solid currentColor; font-size: 12px; }
.reason-body { margin-top: 8px; font: 15.5px/1.9 var(--serif); white-space: pre-wrap; }
.reason-advice { margin-top: 8px; padding: 8px 12px; background: var(--paper); border-radius: var(--radius); font: 14px/1.8 var(--serif); color: var(--ink-2); }
.reason-advice::before { content: "如果是我："; color: var(--muted); }
.reason-actions { margin-top: 10px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); align-items: center; }
.reason-actions button { background: none; border: 0; padding: 0; color: var(--muted); font-size: 13px; }
.reason-actions button:hover, .reason-actions button.on { color: var(--seal); }
.replies { margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--line); display: grid; gap: 6px; font-size: 14px; }
.replies .party { color: var(--seal); font-size: 12px; margin-left: 4px; }
.adopted-tag, .changed-tag, .pinned-tag { font-size: 12px; padding: 0 6px; border-radius: 3px; }
.adopted-tag { background: var(--seal); color: #fbf6ec; }
.changed-tag { border: 1px dashed var(--c-both); color: var(--c-both); }
.pinned-tag { border: 1px solid var(--gold); color: var(--gold); }

/* 头衔徽记 */
.title-tag { font: 600 12px/1 var(--serif); padding: 3px 6px; border-radius: 3px; background: var(--sheet-2); color: var(--ink-2); }
.title-tag.t-复审 { background: color-mix(in srgb, var(--c-b) 14%, var(--sheet)); color: var(--c-b); }
.title-tag.t-终审 { background: var(--seal); color: #fbf6ec; }
.badge-tag { font-size: 11.5px; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); }
.badge-tag.r-稀有 { border-color: var(--c-b); color: var(--c-b); }
.badge-tag.r-史诗 { border-color: var(--c-both); color: var(--c-both); }
.badge-tag.r-传说 { border-color: var(--seal); color: var(--seal); }

/* 后来（案子页） */
.updates { margin-top: 26px; }
.update { padding: 16px 20px; margin-bottom: 10px; border-left: 3px solid var(--seal); }
.update .when { font-size: 12.5px; color: var(--muted); }
.update p { margin-top: 6px; font: 16px/1.95 var(--serif); white-space: pre-wrap; }

/* ---------- 我的 ---------- */
.me-page { padding-block: 34px 60px; display: grid; gap: 22px; }
.id-card { padding: 26px clamp(18px, 4vw, 34px); display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; }
@media (max-width: 560px) { .id-card { grid-template-columns: 1fr; } }
.tier-seal {
  width: 92px; height: 92px; border-radius: 8px; display: grid; place-items: center; text-align: center;
  background: var(--seal); color: #fbf6ec; font: 700 22px/1.15 var(--serif); letter-spacing: .1em;
  box-shadow: inset 0 0 0 3px color-mix(in srgb, #fbf6ec 30%, transparent);
}
.tier-seal.初审 { background: var(--ink-2); }
.tier-seal.复审 { background: var(--c-b); }
.id-card h2 { font-size: 26px; }
.id-card .motto { margin-top: 4px; font: 15px/1.8 var(--serif); color: var(--ink-2); }
.xpbar { margin-top: 12px; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.xpbar i { display: block; height: 100%; background: var(--seal); border-radius: 4px; }
.gate { margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--seal); border-radius: var(--radius); font-size: 14px; }
.gate li { margin-left: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.stat { padding: 14px; text-align: center; }
.stat b { display: block; font: 700 22px/1.3 var(--serif); font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--muted); }
.panel { padding: 22px clamp(18px, 4vw, 30px); }
.panel h3 { font-size: 18px; margin-bottom: 12px; }
.axis { margin-top: 14px; }
.axis-labels { display: flex; justify-content: space-between; font: 600 14px var(--serif); }
.axis-track { position: relative; height: 10px; margin-top: 6px; border-radius: 5px; background: linear-gradient(90deg, var(--c-b), var(--line) 50%, var(--c-a)); opacity: .85; }
.axis-dot { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--sheet); border: 3px solid var(--ink); }
.axis-note { margin-top: 4px; font-size: 13px; color: var(--muted); text-align: center; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge-card { padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); text-align: center; display: grid; gap: 4px; }
.badge-card b { font: 700 16px var(--serif); }
.badge-card .r { font-size: 11.5px; line-height: 1.6; white-space: nowrap; width: max-content; padding: 0 8px; }
.badge-card .how { font-size: 12px; color: var(--muted); }
.badge-card.locked { opacity: .55; filter: grayscale(1); }
.badge-card.locked b { letter-spacing: .3em; }
.badge-card.worn { border-color: var(--seal); box-shadow: inset 0 0 0 1px var(--seal); }
.badge-card button { margin-top: 4px; justify-self: center; }
.list-plain { display: grid; gap: 0; }
.list-plain a, .list-plain div.li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.list-plain a:hover .t { color: var(--seal); }
.list-plain .t { flex: 1; font-family: var(--serif); }

/* 榜单 / 规矩 */
.page { padding-block: 34px 60px; max-width: 860px; margin: 0 auto; }
.page h1 { font-size: 30px; letter-spacing: .1em; }
.page .lead { margin-top: 8px; font: 16px/1.9 var(--serif); color: var(--ink-2); }
.table-wrap { overflow-x: auto; margin-top: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--serif); color: var(--ink-2); font-weight: 600; white-space: nowrap; }
td .title-tag { white-space: nowrap; }
.tier-row td { background: var(--sheet-2); font: 600 13px var(--serif); color: var(--seal); letter-spacing: .1em; }

/* ---------- 弹层 / 升级 / 提示 ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20, 14, 6, .45); }
.modal-card { position: relative; width: min(520px, 100%); max-height: 90vh; overflow: auto; background: var(--sheet); border-radius: 10px; box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .5); }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 18px; }
.icon-btn { margin-left: auto; background: none; border: 0; font-size: 24px; line-height: 1; color: var(--muted); }
.modal-body { padding: 4px 20px 20px; }
.levelup { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--paper) 92%, transparent); animation: fadein .6s ease both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.levelup-card { text-align: center; max-width: 420px; animation: unfold .8s .1s ease both; }
.levelup-seal { display: inline-grid; place-items: center; width: 110px; height: 110px; border-radius: 10px; background: var(--seal); color: #fbf6ec; font: 700 30px/1.1 var(--serif); letter-spacing: .08em; box-shadow: inset 0 0 0 4px color-mix(in srgb, #fbf6ec 30%, transparent); transform: rotate(-4deg); }
.levelup-tier { margin-top: 22px; font: 14px var(--serif); letter-spacing: .4em; color: var(--muted); }
.levelup-title { margin-top: 6px; font: 700 36px/1.3 var(--serif); letter-spacing: .2em; }
.levelup-motto { margin: 16px 0 26px; font: 18px/1.9 var(--serif); color: var(--ink-2); }
.toast { position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 14px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); font-family: var(--serif); }
.loading { padding: 60px 0; text-align: center; color: var(--muted); font-family: var(--serif); letter-spacing: .3em; }

/* ---------- 页脚 ---------- */
.foot { margin-top: 60px; border-top: 1px solid var(--line); padding-block: 24px calc(24px + env(safe-area-inset-bottom, 0px)); }
.foot-inner { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.foot-brand { font-family: var(--serif); color: var(--ink-2); letter-spacing: .1em; }

@media (max-width: 640px) {
  .hide-sm { display: none; }
  .topbar-inner { gap: 10px; }
  .topnav { gap: 0; }
  .topnav a { padding: 6px 7px; font-size: 14px; }
  .topbar-right .ghost { max-width: 9em; overflow: hidden; text-overflow: ellipsis; }
  .brand-text { display: none; }
  .cta { padding: 7px 14px; }
  .filters .search { margin-left: 0; width: 100%; }
  .filters input[type=search] { width: 100%; }
  .dist-row { grid-template-columns: 76px 1fr 44px; }
}
