/* 写稿台 v4「纸墨」—— 黑字红批。loaded after app.css / pages.css: re-themes their variables and adds the new shell,
   热点 and 选题 pages. 朱砂 only marks the seal, the current step / selection, review marks and the best chart bar;
   problems are amber so red keeps one meaning. Titles are serif, controls sans. */

@import url("fonts/noto-serif-sc/font.css");

:root {
  --paper: #f6f4ef; --paper-deep: #ece9e2; --card: #fffefb;
  --surface: #fffefb; --surface-strong: #fffefb;
  --ink: #1b1a17; --ink-soft: #4b4943; --muted: #6b6860;
  --line: #e2ded4; --line-soft: #ebe7de;
  --zhu: #c23a2b; --zhu-wash: rgba(194, 58, 43, 0.08); --zhu-line: rgba(194, 58, 43, 0.4);
  --sage: #15803d;  --sage-wash: rgba(21, 128, 61, 0.09);
  --clay: #a16207;  --clay-wash: rgba(161, 98, 7, 0.09);
  --ochre: #a16207; --ochre-wash: rgba(161, 98, 7, 0.09);
  --mist: #3d5a80;  --mist-wash: rgba(61, 90, 128, 0.09);
  --mauve: #6d28d9; --mauve-wash: rgba(109, 40, 217, 0.08);
  --series: #3d3a34; --series-wash: rgba(61, 58, 52, 0.07);
  --emboss: none; --emboss-sm: none; --inset: none; --highlight: none;
  --display: "Desk Serif", "Noto Serif SC", "Source Han Serif SC", "STSong", serif;   /* titles only (one weight, 600) */
  --title: var(--display);
  --serif: var(--sans);       /* the older pages set body copy in --serif; the brand keeps body text sans */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --radius: 14px;
  --rail: 200px;
}
[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0f0e0d; --paper-deep: #24221f; --card: #171614; --surface: #171614; --surface-strong: #1c1b19;
  --ink: #ededed; --ink-soft: #b3b3b0; --muted: #9a9a97; --line: #2f2d29; --line-soft: #252320;
  --zhu: #e5604f; --zhu-wash: rgba(229, 96, 79, 0.14); --zhu-line: rgba(229, 96, 79, 0.45);
  --sage: #4ade80; --sage-wash: rgba(74, 222, 128, 0.12);
  --clay: #e5b454; --clay-wash: rgba(229, 180, 84, 0.13); --ochre: #e5b454; --ochre-wash: rgba(229, 180, 84, 0.13);
  --mist: #93b4e0; --mist-wash: rgba(147, 180, 224, 0.12); --mauve: #b39cf6; --mauve-wash: rgba(179, 156, 246, 0.14);
  --series: #cfcac0; --series-wash: rgba(207, 202, 192, 0.1);
}

body { background: var(--paper); background-image: none; font: 400 14px/1.7 var(--sans); }
a { color: var(--zhu); text-decoration: none; }
a:hover { color: var(--zhu); text-decoration: underline; }
.ic { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; flex: none; }
button .ic + span, button .ic { pointer-events: none; }

/* ── shell ─────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 12px 14px;
  border-right: 1px solid var(--line-soft); background: var(--paper); box-shadow: none; }
.rail__brand { display: flex; align-items: center; gap: 10px; margin: 0 6px 18px; padding: 0; color: var(--ink); font: 700 17px/1 var(--display); letter-spacing: 0.04em; }
.brand-seal { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; background: var(--zhu); color: #fff;
  font: 700 16px/1 var(--display); transform: rotate(-4deg); box-shadow: inset 0 0 0 2px var(--zhu), inset 0 0 0 3px rgba(255, 255, 255, 0.85); }
.menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.menu__group { font-size: 12px; color: var(--muted); padding: 12px 10px 2px; }
.menu__group:first-child { padding-top: 0; }
.menu__item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 7px 10px; border-radius: 9px;
  font: 400 14px/1.4 var(--sans); letter-spacing: 0; color: var(--ink-soft); cursor: pointer; text-align: left; box-shadow: none; }
.menu__item:hover { background: var(--paper-deep); color: var(--ink); }
.menu__item.is-active { background: var(--paper-deep); color: var(--ink); font-weight: 550; box-shadow: none; }
.menu__item .ic { width: 17px; height: 17px; }
.menu__item.is-active .ic { color: var(--zhu); }
.menu__item .count { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rail__foot { margin-top: auto; display: grid; gap: 8px; }
.svc { padding: 10px 11px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--card); font-size: 12px; display: grid; gap: 7px; }
.svc .live { color: var(--sage); font-weight: 500; } .svc .live.off { color: var(--clay); }
.svc .q { display: grid; grid-template-columns: 1fr auto; gap: 3px 6px; align-items: center; color: var(--ink-soft); }
.svc .q i { grid-column: 1 / -1; }
.bar-track { display: block; height: 4px; border-radius: 99px; background: var(--paper-deep); overflow: hidden; }
.bar-track b { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--series); }
.rail__links { display: flex; gap: 4px; align-items: center; }
.rail__links .menu__item { flex: 1; }
.icon-only { border: 0; background: none; color: var(--muted); padding: 6px; border-radius: 8px; cursor: pointer; display: inline-grid; place-items: center; }
.icon-only:hover { background: var(--paper-deep); color: var(--ink); }

/* ── pages ─────────────────────────────────────────────── */
.page { min-width: 0; padding: 24px clamp(16px, 2.6vw, 40px) 40px; }
.ph { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.ph h1 { margin: 0; font: 700 32px/1.2 var(--display); letter-spacing: 0.01em; }
.ph .grow { flex: 1; }
.ph .meta { font-size: 12.5px; color: var(--muted); cursor: default; }
.card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: none; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 9px; padding: 5px 13px; font: 500 13px/1.5 var(--sans); cursor: pointer; white-space: nowrap; box-shadow: none; }
.btn:hover { background: var(--paper-deep); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn--ink, .btn.ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--ink:hover, .btn.ink:hover { background: var(--ink); opacity: 0.86; }
.btn--small, .btn.sm { padding: 3px 10px; border-radius: 8px; font-size: 12.5px; }
.btn.sm .ic { width: 13px; height: 13px; vertical-align: -2px; }
.btn--line { background: var(--card); }
.bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
select.btn { padding-right: 8px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--paper-deep); flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 4px 12px; border-radius: 7px; font: 500 13.5px/1.5 var(--sans); color: var(--muted); cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--line-soft); }
.seg button small { margin-left: 3px; color: var(--muted); font-size: 12px; }
.chip { display: inline-flex; align-items: center; gap: 5px; border: 0; background: var(--paper-deep); color: var(--ink-soft); padding: 3px 12px;
  border-radius: 999px; font: 500 13px/1.5 var(--sans); cursor: pointer; }
.chip:hover { color: var(--ink); }
.chip.on { background: var(--ink); color: var(--paper); }
.chip .ic { width: 13px; height: 13px; vertical-align: -2px; }
.muted { color: var(--muted); }
.note-line { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.note-line.warn { color: var(--clay); }

/* ── 热点 ──────────────────────────────────────────────── */
.hot-layout { display: grid; gap: 16px; align-items: start; }
.board { overflow: hidden; }
.board-head, .board-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 110px 76px 190px; gap: 14px; align-items: center; padding: 0 18px; }
.board-head { padding-top: 10px; padding-bottom: 8px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line-soft); }
.board-head span:nth-child(3), .board-head span:nth-child(4) { text-align: right; }
.board-row { padding-top: 12px; padding-bottom: 12px; border-top: 1px solid var(--line-soft); cursor: pointer; }
.board-head + .board-row { border-top: 0; }
.board-row:hover { background: var(--paper); }
.board-row.sel { background: var(--zhu-wash); box-shadow: inset 3px 0 0 var(--zhu); }
.board-row.is-gone { opacity: 0.35; }
.rank { font: 650 22px/1 var(--sans); color: var(--muted); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; opacity: 0.6; }
.board-row.top .rank { color: var(--ink); opacity: 1; }
.board-row .t { font-size: 14.5px; line-height: 1.5; }
.board-row .m { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.src { padding: 0 6px; border-radius: 6px; background: var(--paper-deep); color: var(--ink-soft); font-size: 12px; }
.heat { font-size: 13px; color: var(--ink-soft); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sc { display: grid; gap: 5px; justify-items: end; font: 650 17px/1 var(--sans); font-variant-numeric: tabular-nums; }
.sc .bar-track { width: 52px; }
.board-row .acts { display: flex; gap: 6px; justify-content: flex-end; }
.verdict { display: inline-flex; align-items: center; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.7; }
.verdict.v-写 { background: var(--sage-wash); color: var(--sage); }
.verdict.v-观望 { background: var(--ochre-wash); color: var(--ochre); }
.verdict.v-跳过 { background: var(--paper-deep); color: var(--muted); }
.verdict.v-由头 { background: var(--paper-deep); color: var(--ink-soft); }
.hot-detail { display: none; padding: 18px 20px 16px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.hot-detail .close { display: none; }
.hot-scrim { display: none; }
@media (min-width: 1500px) { .hot-layout { grid-template-columns: minmax(0, 1fr) minmax(380px, 0.62fr); } .hot-detail { display: block; } }
/* nothing selected (an empty list): no detail column, the list takes the full width so the empty state sits centred */
.hot-layout:has(.hot-detail:empty) { grid-template-columns: 1fr; }
.hot-detail:empty { display: none !important; }
@media (max-width: 1499px) {
  .hot-detail.open { display: block; position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 92vw); max-height: none; z-index: 50;
    border-radius: 0; box-shadow: -16px 0 40px rgba(0, 0, 0, 0.16); padding-top: 22px; }
  .hot-detail.open .close { display: inline-flex; position: absolute; top: 14px; right: 14px; }
  .hot-detail.open .meta { padding-right: 44px; }
  .hot-scrim.open { display: block; position: fixed; inset: 0; z-index: 49; background: rgba(0, 0, 0, 0.2); }
}
.hot-detail .meta { font-size: 12.5px; color: var(--muted); }
.hot-detail h3 { font: 700 19px/1.45 var(--display); letter-spacing: 0.01em; margin: 6px 0 8px; }
.hot-detail .hot-sum { margin: 0; color: var(--ink-soft); font-size: 14px; }
.hot-detail h4 { margin: 18px 0 8px; font-size: 12.5px; color: var(--muted); font-weight: 500; display: flex; gap: 8px; align-items: baseline; }
.hot-detail h4 b { color: var(--ink); font-size: 16px; }
.conclusion { display: flex; gap: 10px; align-items: baseline; margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line-soft); font-size: 13.5px; }
.conclusion .verdict { font-size: 13px; padding: 1px 10px; }
.conclusion small { flex: none; white-space: nowrap; font-size: 12px; }
/* 热点详情: one block per section, 素材 first and set apart */
.hd-sec { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.hot-detail .hd-sec > h4 { margin: 0 0 10px; font-size: 13.5px; color: var(--ink); font-weight: 600; }
.hot-detail .hd-sec > h4 small { font-weight: 400; }
.hot-detail .kv > div { grid-template-columns: 5.6em minmax(0, 1fr); }
.hot-detail .hd-sec .bar { margin: 10px 0 0; }
.hd-sec.hd-key { padding: 12px 14px 14px; border: 1px solid var(--zhu-line); border-radius: 12px; background: var(--zhu-wash); }
.hd-key + .hd-sec { border-top: 0; }
.hd-key .chip { padding: 0 8px; margin-right: 6px; font-size: 12px; background: var(--card); color: var(--zhu); }
.hd-views { display: grid; gap: 6px; margin-top: 10px; }
.hd-views small { color: var(--muted); font-size: 12.5px; }
.hd-views p { margin: 0; padding: 8px 10px; background: var(--card); border-left: 3px solid var(--zhu); border-radius: 0 8px 8px 0; font-size: 13.5px; line-height: 1.65; }
.hd-score { margin-left: auto; flex: none; white-space: nowrap; font-size: 12px; color: var(--muted); }
.hd-score b { color: var(--ink); font-size: 15px; margin-left: 2px; }
.hd-more > summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink); list-style-position: inside; }
.hd-more[open] > summary { margin-bottom: 10px; }
.kv { display: grid; gap: 7px; }
.kv > div { display: grid; grid-template-columns: 4.6em minmax(0, 1fr); gap: 10px; font-size: 13px; line-height: 1.65; }
.kv > div > span:first-child { color: var(--muted); }
.kv .warn { color: var(--clay); }
.src-link { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line-soft);
  border-radius: 10px; margin-bottom: 6px; font-size: 13px; background: var(--paper); color: inherit; }
.src-row { display: flex; gap: 6px; align-items: flex-start; }
.src-row .src-link { flex: 1; min-width: 0; }
.src-row > .btn { flex: none; margin-top: 4px; }
.src-link:hover { text-decoration: none; border-color: var(--line); }
.src-link { align-items: flex-start; max-width: 100%; min-width: 0; }
.src-link span { min-width: 0; overflow: hidden; overflow-wrap: anywhere; line-height: 1.55; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
.src-link small { padding-top: 2px; }
.src-link small { color: var(--muted); white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
.hot-detail .acts { display: flex; gap: 8px; margin-top: 18px; }

/* ── 选题 ──────────────────────────────────────────────── */
.topics { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr)); grid-auto-rows: 1fr; }
.tc { position: relative; display: grid; grid-template-columns: 58px minmax(0, 1fr); grid-template-rows: auto auto auto 1fr auto; gap: 0 16px;
  padding: 18px 20px 0; border-radius: 16px; transition: border-color 0.15s; }
.tc:hover { border-color: var(--line); }
.vote { grid-row: 1 / span 3; align-self: start; display: grid; justify-items: center; gap: 6px; padding: 9px 0 8px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--card); cursor: help; }
.vote b { font: 700 22px/1 var(--sans); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.vote small { font-size: 12px; color: var(--muted); line-height: 1; margin-top: -2px; }
.vote .b5 { display: flex; gap: 3px; align-items: flex-end; height: 16px; }
.vote .b5 i { width: 5px; border-radius: 2px 2px 1px 1px; background: var(--series); }
.tc h3 { margin: 0; padding-right: 92px; font: 600 16.5px/1.45 var(--display); letter-spacing: 0.01em; }
.tc .why { margin: 4px 0 0; color: var(--ink-soft); font-size: 13.5px; }
.tc .why .view { display: block; margin-top: 6px; color: var(--ink); }
.tc .why .view b { margin-right: 6px; font-size: 12px; font-weight: 600; color: var(--clay); }
.tc .chipset { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 0; }
.tc .chipset span { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--paper-deep); color: var(--ink-soft); }
.tc .chipset .x-type { background: var(--ink); color: var(--paper); font-weight: 600; }
.tc .why .pic { margin-top: 3px; color: var(--ink-soft); }
.tc .why .pic b { color: var(--muted); }
.tc .chipset .o-热点 { background: var(--clay-wash); color: var(--clay); }
.tc .chipset .o-素材 { background: var(--sage-wash); color: var(--sage); }
.tc .chipset .o-计划 { background: var(--mist-wash); color: var(--mist); }
.tc .chipset .o-翻新 { background: var(--mauve-wash); color: var(--mauve); }
.tc blockquote { grid-column: 2; margin: 14px 0 0; padding: 2px 0 2px 12px; border-left: 3px solid var(--line); font-size: 13.5px; align-self: start; }
.tc blockquote q { quotes: "「" "」"; color: var(--ink); }
.tc blockquote small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.tc .foot { grid-column: 1 / -1; grid-row: 5; display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 10px 0 12px; border-top: 1px solid var(--line-soft); }
.tc .foot .grow { flex: 1; }
.tc .icon-btn, .quiet { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; color: var(--muted); font-size: 12.5px;
  padding: 4px 8px; border-radius: 8px; cursor: pointer; }
.tc .icon-btn:hover, .quiet:hover { background: var(--paper-deep); color: var(--ink); }
.tc .icon-btn.on { color: var(--zhu); }
.tc .icon-btn.on .ic { fill: currentColor; }
.tc .quiet { position: absolute; top: 14px; right: 14px; }
.tc .go { border-radius: 999px; padding: 5px 14px; }
.tc .jev-line { grid-column: 2; margin-top: 8px; font-size: 12px; color: var(--muted); }
.tc { cursor: pointer; }
.tc.is-new { border-color: var(--zhu); box-shadow: 0 0 0 1px var(--zhu); }
.new-dot { display: inline-block; width: 6px; height: 6px; margin-left: 5px; border-radius: 50%; background: var(--zhu); vertical-align: middle; }
.topic-drawer { display: none; }
.topic-drawer.open { display: block; position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 92vw); max-height: none; overflow: auto; z-index: 50;
  border-radius: 0; box-shadow: -16px 0 40px rgba(0, 0, 0, 0.16); padding-top: 22px; }
.topic-drawer.open .close { display: inline-flex; position: absolute; top: 14px; right: 14px; }
#topic-scrim.open { display: block; position: fixed; inset: 0; z-index: 49; background: rgba(0, 0, 0, 0.2); }
.dims { display: grid; gap: 6px; }
.dims > div { display: grid; grid-template-columns: 2.6em 56px 6.5em minmax(0, 1fr); gap: 8px; align-items: center; font-size: 13px; }
.dims .bar-track { height: 6px; }
.flow { list-style: none; margin: 0 0 14px; padding: 0; counter-reset: f; display: grid; }
.flow li { counter-increment: f; position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: center; padding: 4px 0; font-size: 13.5px; }
.flow li::before { content: counter(f); position: relative; z-index: 1; width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--zhu);
  border-radius: 50%; background: var(--card); color: var(--zhu); font-size: 12px; font-weight: 600; }
.flow li:not(:last-child)::after { content: ""; position: absolute; left: 11px; top: 26px; bottom: -4px; width: 1px; background: var(--line); }
.topic-drawer .kv > div { grid-template-columns: 5.6em minmax(0, 1fr); }
.topic-drawer .acts { position: sticky; bottom: -16px; margin: 18px -20px -16px; padding: 12px 20px; background: var(--card); border-top: 1px solid var(--line); }
.topic-drawer blockquote { margin: 8px 0; padding: 2px 0 2px 12px; border-left: 3px solid var(--line); font-size: 13.5px; }
.topic-drawer blockquote q { quotes: "「" "」"; }
.topic-drawer blockquote small { display: block; color: var(--muted); font-size: 12px; }
.topic-drawer blockquote.out { opacity: 0.5; }
.topic-drawer blockquote.out q { text-decoration: line-through; }
.gone { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; padding: 10px 14px; font-size: 13px; }
.gone .gt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.gone .chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── 账号 ──────────────────────────────────────────────── */
.ph #account-handle { font-size: 13px; }
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.bento .span2 { grid-column: span 2; }
.panel { padding: 16px 18px; }
.panel h2 { margin: 0 0 10px; font: 600 15px/1.3 var(--display); }
.bento .panel { display: flex; flex-direction: column; }
.bento .panel .chart { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; }
.hero-tile { grid-column: span 2; padding: 18px 20px 10px; display: flex; flex-direction: column; min-height: 260px;
  background: radial-gradient(90% 120% at 100% 0%, var(--zhu-wash), transparent 60%), var(--card); }
.hero-tile .lbl { font-size: 12.5px; color: var(--ink-soft); }
.big-num { font: 700 64px/1 var(--sans); letter-spacing: -0.04em; margin: 8px 0; font-variant-numeric: tabular-nums; }
.delta { align-self: flex-start; margin-bottom: 14px; font-size: 12px; font-weight: 500; color: var(--sage); background: var(--sage-wash); padding: 0 8px; border-radius: 999px; }
.delta.down { color: var(--clay); background: var(--clay-wash); }
.hero-tile .chart { margin-top: auto; }
.kpi-grid { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; justify-content: space-between; min-height: 110px; }
.kpi span { font-size: 12.5px; color: var(--ink-soft); }
.kpi b { font: 700 34px/1.1 var(--sans); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: 140px; overflow: visible; }
.chart svg.bars { height: auto; }
.chart .tip { position: absolute; pointer-events: none; padding: 4px 9px; border-radius: 8px; font-size: 12px; background: var(--ink); color: var(--paper);
  white-space: nowrap; transform: translate(-50%, -120%); display: none; z-index: 2; }
.effect { display: grid; gap: 10px; align-content: space-evenly; flex: 1; }
.effect div { display: grid; grid-template-columns: 3.4em 1fr 2.6em 3em; gap: 8px; align-items: center; font-size: 13px; }
.effect .bar-track { height: 8px; }
.effect output { text-align: right; font-variant-numeric: tabular-nums; }
.effect small { color: var(--muted); font-size: 12px; text-align: right; }
.table-wrap { overflow-x: auto; }
table.posts { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.posts th, .posts td { padding: 9px 8px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.posts th { font-weight: 500; color: var(--muted); font-size: 12.5px; cursor: pointer; user-select: none; white-space: nowrap; }
.posts .num { text-align: right; font-variant-numeric: tabular-nums; }
.posts .nowrap { white-space: nowrap; }
.posts .posttext { max-width: 0; width: 50%; }
.posts .posttext a { color: var(--ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kind { font-size: 12px; padding: 0 7px; border-radius: 5px; background: var(--paper-deep); color: var(--ink-soft); white-space: nowrap; }
.kind.k-article { background: var(--ochre-wash); color: var(--ochre); } .kind.k-quote { background: var(--mauve-wash); color: var(--mauve); }
.kind.k-post { background: var(--mist-wash); color: var(--mist); }
@media (min-width: 2000px) {
  .bento { grid-template-columns: repeat(8, minmax(0, 1fr)); grid-auto-rows: minmax(130px, auto); }
  .bento .hero-tile, .bento .kpi-grid, .bento .panel.span2 { grid-column: span 2; grid-row: span 2; }
  .bento .kpi-grid { grid-template-rows: 1fr 1fr; }
}
@media (max-width: 1000px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── 写作 ──────────────────────────────────────────────── */
.page--write { padding-bottom: 20px; }
.menu-wrap { position: relative; display: inline-block; }
.pop-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; padding: 6px; border-radius: 12px; background: var(--card);
  border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12); display: grid; gap: 2px; }
.pop-menu[hidden] { display: none; }
.pop-menu button { display: grid; grid-template-columns: 22px 1fr; gap: 6px; align-items: start; text-align: left; border: 0; background: none; padding: 8px 10px;
  border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--ink); }
.pop-menu button:hover { background: var(--paper-deep); }
.pop-menu .ic { margin-top: 3px; }
.pop-menu small { display: block; color: var(--muted); font-size: 12px; }
.wd { display: grid; grid-template-columns: 216px minmax(0, 1fr) 288px; gap: 12px; height: max(560px, calc(100vh - 110px)); }
@media (min-width: 1600px) { .wd { grid-template-columns: 240px minmax(0, 1fr) 320px; gap: 16px; } }
@media (min-width: 2200px) { .wd { grid-template-columns: 260px minmax(0, 1fr) 360px; } }
.wd > .card { min-height: 0; overflow: hidden; }
.wd-list-card { padding: 12px; display: flex; flex-direction: column; }
.wd-list-card strong { font-size: 13.5px; }
.wd-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; align-content: start; flex: 1; min-height: 0; overflow: auto; }
.wd-list li { padding: 8px 10px; border-radius: 10px; cursor: pointer; font-size: 13.5px; }
.wd-list li:hover { background: var(--paper); }
.wd-list li.on { background: var(--paper-deep); }
.wd-list li.none { cursor: default; color: var(--muted); }
.wd-list .t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; line-height: 1.5; }
.wd-list .fmt { font-size: 12px; color: var(--muted); border: 1px solid var(--line-soft); border-radius: 4px; padding: 0 4px; margin-left: 6px; white-space: nowrap; }
.wd-list small { display: block; color: var(--muted); font-size: 12px; }
.wd-list small.paused { color: var(--clay); }
.wd-list .bar-track { margin-top: 7px; height: 3px; }
.wd-list .bar-track.paused b { background: var(--clay); }
.wd-work { padding: 16px 20px; display: flex; flex-direction: column; min-width: 0; container-type: inline-size; }
.wd-steps { display: grid; margin: 4px 0 16px; flex-shrink: 0; }
.wd-steps button { display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 12.5px; position: relative; cursor: pointer; }
.wd-steps button::before { content: ""; position: absolute; top: 13px; left: calc(-50% + 18px); right: calc(50% + 18px); height: 2px; border-radius: 2px; background: var(--line); }
.wd-steps button:first-child::before { display: none; }
.wd-steps button.linked::before { background: var(--ink); }
.wd-steps b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line); background: var(--card); font-size: 12.5px; font-weight: 600; }
.wd-steps b .ic { width: 14px; height: 14px; vertical-align: 0; }
.wd-steps button.done { color: var(--ink-soft); }
.wd-steps button.done b { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.wd-steps button.on { color: var(--zhu); font-weight: 600; }
.wd-steps button.on b { border-color: var(--zhu); color: var(--zhu); box-shadow: 0 0 0 4px var(--zhu-wash); }
.wd-body { flex: 1; min-height: 0; overflow: auto; margin-right: -12px; padding-right: 12px; }
.wd-nav { flex-shrink: 0; display: flex; gap: 8px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.wd-nav #wd-nav { display: flex; gap: 8px; }
.wd-nav .grow { flex: 1; }
.save-state { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.save-state.failed { color: var(--clay); }
.wd-banner { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 12px; border-radius: 10px; margin-bottom: 12px; font-size: 13px; }
.wd-banner.busy .wd-stop { margin-left: auto; }
.wd-banner.busy { background: var(--paper); border: 1px solid var(--line-soft); color: var(--ink-soft); justify-content: flex-start; }
.wd-banner.error { background: var(--clay-wash); color: var(--clay); }
.wd-banner.stale { background: var(--ochre-wash); color: var(--ochre); }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--zhu); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
.wd-split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
@container (max-width: 760px) { .wd-split { grid-template-columns: minmax(0, 1fr); } }
.wd-side, .wd-main-col > * { min-width: 0; }
.wd-main-col { display: grid; gap: 10px; align-content: start; min-width: 0; }
.wd-side { display: grid; gap: 10px; align-content: start; position: sticky; top: 0; }
.side-card { padding: 12px 14px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line-soft); font-size: 13px; line-height: 1.7; }
.side-card h4 { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.field { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: var(--card); color: var(--ink); font: inherit; resize: vertical; }
.field:focus, .wd-editor:focus, .wd-mats textarea:focus, .wd-outline textarea:focus, .ver textarea:focus { outline: 2px solid var(--zhu-line); outline-offset: 1px; }
input.field { font-size: 16px; font-weight: 600; }
.title-picks { display: grid; gap: 4px; font-size: 13.5px; }
.title-picks .pick { display: flex; gap: 8px; align-items: baseline; padding: 6px 10px; border-radius: 9px; border: 1px solid var(--line-soft); background: var(--paper); cursor: pointer; }
.wd-mats, .wd-outline, .cover-list, .outline-ref { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wd-mats li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-soft); background: var(--paper); }
.wd-mats li.on { background: var(--card); box-shadow: inset 2px 0 0 var(--zhu); }
.wd-mats li.out { opacity: 0.55; }
.wd-mats li.out .quote { text-decoration: line-through; }
.mats-out { margin-top: 10px; }
.mats-out > summary { cursor: pointer; color: var(--muted); font-size: 12.5px; padding: 4px 2px; list-style-position: inside; }
.mats-out > .wd-mats { margin-top: 6px; }
.wd-mats .quote { width: 100%; border: 0; background: none; resize: vertical; font: inherit; font-size: 13.5px; color: var(--ink); padding: 0; }
.wd-mats small { display: block; color: var(--muted); font-size: 12px; }
.wd-mats .note { width: 100%; margin-top: 4px; border: 0; border-bottom: 1px dashed var(--line); background: none; font-size: 12.5px; color: var(--ink-soft); }
.tools { display: inline-flex; gap: 2px; align-items: center; }
.tools .icon-only { padding: 3px; }
.tools .ic { width: 14px; height: 14px; }
.wd-add { display: grid; gap: 6px; }
.wd-add .bar { margin: 0; }
.wd-add-zone.folded { display: none; }
.wd-outline li { display: grid; grid-template-columns: 1.4em minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-soft); background: var(--paper); }
.wd-outline li.locked { box-shadow: inset 2px 0 0 var(--ink); }
.wd-outline .n { color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.wd-outline textarea { width: 100%; border: 0; background: none; resize: vertical; font: inherit; font-size: 13.5px; color: var(--ink); padding: 0; min-height: 40px; }
.lock { display: inline-flex; gap: 3px; align-items: center; border: 1px solid var(--line); background: none; border-radius: 999px; padding: 0 9px; cursor: pointer; font-size: 12px; color: var(--muted); }
.wd-outline li.locked .lock { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.lock .ic { width: 11px; height: 11px; }
.cover-list li, .outline-ref li { display: grid; grid-template-columns: 1.4em minmax(0, 1fr) auto; gap: 6px; font-size: 13px; }
.cover-list .warn { color: var(--clay); }
.outline-ref .ic { width: 12px; height: 12px; }
.wd-editor { width: 100%; min-height: 420px; border: 1px solid var(--line-soft); border-radius: 12px; padding: 16px 18px; background: var(--card); color: var(--ink);
  font: 400 15px/1.85 var(--sans); resize: vertical; }
.live-count { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.live-count .ok { color: var(--sage); } .live-count .warn { color: var(--clay); }
.wd-mine { margin: 0; padding-left: 16px; font-size: 13px; }
.wd-mode { align-self: start; }
.vers { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.ver { display: grid; gap: 8px; align-content: start; border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px; background: var(--paper); cursor: pointer; }
.ver.on { border-color: var(--zhu); box-shadow: 0 0 0 1px var(--zhu); background: var(--card); }
.ver h5 { margin: 0; font-size: 12.5px; color: var(--muted); font-weight: 500; display: flex; gap: 8px; align-items: center; }
.ver textarea { width: 100%; border: 0; background: none; resize: none; font: 400 14.5px/1.75 var(--sans); color: var(--ink); padding: 0; }
/* short texts in lists show in full: the box grows with its text instead of scrolling */
.ver textarea, .wd-mats .quote, .wd-outline textarea, .wd-editor { field-sizing: content; overflow: hidden; resize: none; }
.review-doc.editing { padding-bottom: 0; }
#wd-body.is-busy > :not(.wd-banner) { opacity: 0.45; pointer-events: none; transition: opacity 0.2s; }
.doc-save-bar { position: sticky; bottom: 0; z-index: 2; justify-content: flex-end; gap: 8px; margin: 10px -4px 0; padding: 10px 4px; background: var(--card); border-top: 1px solid var(--line-soft); }
.ver textarea { min-height: 3lh; }
.ver small { color: var(--muted); font-size: 12px; }
.pill-on { font-size: 12px; color: var(--zhu); }
.origin { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--card); }
.origin .who { font-weight: 600; } .origin .who span { color: var(--muted); font-weight: 400; }
.origin .txt { margin: 6px 0; font-size: 15px; white-space: pre-wrap; }
.origin .media { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; margin: 8px 0; }
.origin .media img { width: 100%; border-radius: 8px; border: 1px solid var(--line-soft); display: block; }
.origin small { color: var(--muted); }
.wd-url { flex-wrap: nowrap; margin: 0; }
.wd-url .field { font-size: 14px; font-weight: 400; }
.stephead { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; font-size: 12.5px; color: var(--muted); }
.stephead .grow { flex: 1; }
.pill { display: inline-flex; align-items: center; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--paper-deep); color: var(--ink-soft); }
.pill-ok { background: var(--sage-wash); color: var(--sage); } .pill-warn { background: var(--ochre-wash); color: var(--ochre); }
.xpost { border: 1px solid var(--line-soft); border-radius: 14px; padding: 16px 18px; background: var(--card); font-size: 15px; line-height: 1.85; }
.xpost .who { font-weight: 600; margin-bottom: 6px; }
.xpost .plain { white-space: pre-wrap; }
/* 追问 */
.asks { display: grid; gap: 8px; padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--paper); }
.asks-head { display: flex; align-items: center; gap: 8px; }
.asks-head .muted { font-size: 12px; }
.asks .ask { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; }
.asks .ask.focus { border-color: var(--ochre); background: var(--ochre-wash); }
.ask-q { display: flex; gap: 8px; align-items: baseline; }
.ask-q b { font-weight: 600; line-height: 1.55; }
.ask-q .pill { flex: none; }
.asks .ask textarea { field-sizing: content; min-height: 2.8em; resize: none; cursor: text; }
.asks .ask.used { opacity: 0.65; }
.ask-a { margin: 0; color: var(--muted); white-space: pre-wrap; }
.review-doc mark.ask { background: none; border-bottom: 2px dotted var(--ochre); cursor: pointer; }
.review-doc mark.ask.focus { background: var(--ochre-wash); }
.review-doc mark.ask sup { color: var(--ochre); font-size: 10px; margin-left: 1px; }
.review-split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
/* side by side, the draft and the comments scroll on their own: finding a sentence doesn't drag the comments away */
.wd-body:has(> .review-split) { display: flex; flex-direction: column; overflow: hidden; }
.wd-body > .review-split { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
.review-split > .review-doc, .review-split > .review { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.review-doc { position: relative; }
.review-doc .doc-text { white-space: pre-wrap; }
.review-doc mark.iss { background: linear-gradient(var(--zhu), var(--zhu)) left bottom / 0% 2px no-repeat,
    linear-gradient(var(--zhu-line), var(--zhu-line)) left bottom / 100% 1px no-repeat, var(--zhu-wash);
  padding-bottom: 2px; color: inherit; cursor: pointer; transition: background-size 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }
.review-doc mark.iss:hover, .review-doc mark.iss.focus { background-size: 100% 2px, 100% 1px, auto; }
.review-doc mark.iss.focus { background-color: rgba(194, 58, 43, 0.15); }
.review-doc mark.iss.mine { background: linear-gradient(var(--sage), var(--sage)) left bottom / 0% 2px no-repeat,
    linear-gradient(var(--sage), var(--sage)) left bottom / 100% 1px no-repeat, var(--sage-wash); }
.review-doc mark sup { font-size: 10px; color: var(--zhu); margin-left: 2px; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .review-doc mark.iss { transition: none; } }
.wd-edit-doc { position: absolute; top: 10px; right: 10px; }
.review { display: grid; gap: 8px; align-content: start; }
.issue { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 12px; background: var(--paper);
  border: 1px solid var(--line-soft); font-size: 13.5px; }
.issue b { font-weight: 500; }
.issue[data-focus] { cursor: pointer; }
.issue.on-mine { border-color: var(--sage); }
.issue.must { box-shadow: inset 2px 0 0 var(--zhu); }
.issue.focus { border-color: var(--zhu); box-shadow: 0 0 0 3px var(--zhu-wash); }
.issue .n { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--zhu-wash); color: var(--zhu); font-size: 11px; font-weight: 700; margin-right: 6px; vertical-align: 1px; }
.issue.done { opacity: 0.6; }
.issue .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.diff { grid-column: 1 / -1; display: grid; gap: 4px; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--card); border: 1px dashed var(--line); font-size: 13px; }
.diff del { color: var(--zhu); } .diff ins { text-decoration: none; color: var(--sage); }
.diff .acts { justify-content: flex-start; }
.wd-chat { padding: 12px; display: flex; flex-direction: column; }
.wd-chat-head { display: flex; align-items: center; gap: 8px; min-height: 28px; font-size: 13.5px; }
.wd-chat-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.wd-chat-review { flex: 1; min-height: 0; overflow: auto; margin-top: 10px; }
.wd-chat-review .issue { grid-template-columns: 1fr; }
.wd-chat-review .issue .acts { justify-content: flex-start; }
.wd-chat [hidden] { display: none !important; }
.wd-chat .msgs { flex: 1; min-height: 0; overflow: auto; display: grid; align-content: start; gap: 8px; margin: 10px 0; font-size: 13.5px; }
.msg { padding: 8px 12px; border-radius: 12px; background: var(--paper-deep); max-width: 92%; white-space: pre-wrap; }
.msg.me { justify-self: end; background: var(--ink); color: var(--paper); }
.wd-hint { font-size: 12.5px; }
.wd-chat textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--card); color: var(--ink); font: inherit; resize: none; }
.wd-send-row { text-align: right; margin-top: 6px; }
.art-bar { margin: 10px 0; }
.covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 12px; }
.cover { margin: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: var(--paper); }
.cover.on { border-color: var(--zhu); }
.cover img { display: block; width: 100%; aspect-ratio: 5 / 2; object-fit: cover; }
.cover figcaption { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 6px 8px; font-size: 12.5px; }
.spot { border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px 12px; background: var(--paper); margin-bottom: 10px; }
.spot.off { opacity: 0.55; }
.spot-head { display: flex; gap: 8px; align-items: center; font-size: 13px; flex-wrap: wrap; }
.spot-head .grow { flex: 1; }
.spot-head .muted { font-size: 12.5px; }
.spot-plan { display: grid; gap: 2px; margin-top: 6px; font-size: 12.5px; color: var(--ink-soft); }
.spot .illo { display: block; width: 100%; border-radius: 8px; margin-top: 8px; }
.wd-preview .preview-cover { display: block; width: calc(100% + 36px); margin: -16px -18px 12px; border-radius: 14px 14px 0 0; aspect-ratio: 5 / 2; object-fit: cover; }
.wd-preview .preview-illo { display: block; width: 100%; border-radius: 10px; margin: 12px 0; }
.wd-preview .preview-slot { margin: 12px 0; padding: 14px; border: 2px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 13px; text-align: center; }
.wd-preview .md h4 { font: 700 17px/1.5 var(--display); margin: 14px 0 6px; }
.plat { margin-left: 4px; }
.shots-block h4 { margin: 4px 0 8px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.shot { margin: 0; border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; background: var(--paper); font-size: 12px; }
.shot img, .shot video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #111; }
.shot .cap { flex: 1; min-width: 0; border: 0; background: none; font: inherit; color: var(--ink-soft); padding: 2px 0; }
.shots-block h4 .pill { margin-left: 6px; }
.pub { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.pub .field { flex: 1; min-width: 160px; }
.pub.done .track { display: inline-flex; gap: 10px; align-items: center; font-size: 13px; }
.wd-list small.pubd { color: var(--ok, #2f7d4a); }
.preview-media { display: block; width: 100%; margin-top: 10px; border-radius: 12px; border: 1px solid var(--line-soft); }
.shot figcaption { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; color: var(--ink-soft); }
.shot.missing { display: grid; place-items: center; min-height: 112px; border: 2px dashed var(--clay); color: var(--clay); background: var(--clay-wash); padding: 8px; text-align: center; }
label.shot.missing { cursor: pointer; transition: border-color 0.15s, color 0.15s; }
label.shot.missing:hover { border-color: var(--zhu); color: var(--zhu); }
.shot.add { display: grid; place-items: center; gap: 4px; min-height: 112px; border-style: dashed; cursor: pointer; color: var(--muted); }
.wx-hits { margin: 0; padding-left: 16px; color: var(--clay); }
.crops { display: grid; grid-template-columns: 2.35fr 1fr; gap: 8px; align-items: start; }
.crops img { display: block; width: 100%; border-radius: 8px; object-fit: cover; }
.crops .crop-wide { aspect-ratio: 2.35 / 1; }
.crops .crop-square { aspect-ratio: 1 / 1; }
.old-list pre { white-space: pre-wrap; font: 13px/1.7 var(--sans); background: var(--paper); padding: 10px; border-radius: 8px; }
.old-list button { display: inline-flex; gap: 6px; align-items: center; border: 0; background: none; cursor: pointer; color: var(--ink); padding: 6px 0; font: inherit; }
@media (max-width: 1000px) {
  .wd { grid-template-columns: 1fr; height: auto; }
  .wd > .card { overflow: visible; }
  .wd-body { overflow: visible; }
  .wd-list { display: flex; overflow-x: auto; }
}

/* ── 设置 ──────────────────────────────────────────────── */
.set-layout { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 16px; align-items: start; }
.set-tabs { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 16px; }
.set-tabs button { text-align: left; padding: 7px 12px; border-radius: 9px; font: 400 14px/1.4 var(--sans); border: 0; background: none; color: var(--ink-soft); cursor: pointer; }
.set-tabs button:hover { background: var(--paper-deep); }
.set-tabs button.is-active { background: var(--paper-deep); color: var(--ink); font-weight: 550; box-shadow: inset 2px 0 0 var(--zhu); }
.set-panes { display: grid; gap: 14px; max-width: 1280px; }
.set-pane { padding: 18px 20px; }
.set-pane h3, .bottom-line h3 { margin: 0 0 12px; font: 600 15px/1.3 var(--display); }
.persona { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px 14px; align-items: start; font-size: 13.5px; margin-bottom: 12px; }
.persona > label { color: var(--muted); padding-top: 7px; }
.persona input.field { font-size: 14px; font-weight: 500; }
.persona textarea { line-height: 1.7; }
.weights { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.weights label { display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; }
.weights input { width: 64px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; background: var(--card); color: var(--ink); font: inherit; }
.legend { display: flex; gap: 6px; margin-bottom: 10px; }
/* 封面风格: pick from the sample pictures */
.style-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 14px; }
.style-card { display: grid; gap: 4px; padding: 4px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--paper); color: var(--ink-soft);
  font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.style-card:hover { border-color: var(--ink-soft); }
.style-card.on { border-color: var(--zhu); box-shadow: 0 0 0 1px var(--zhu); }
.style-card img, .style-card-blank { display: grid; place-items: center; width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: 5px; background: var(--paper-deep); color: var(--muted); }
.style-card-name { display: flex; gap: 6px; align-items: center; line-height: 1.4; }
/* no scroll box of its own: inside a grid column a scroll box gets squeezed to nothing; the column scrolls instead */
.style-pop { margin: 8px 0 12px; padding: 10px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--paper); }
.style-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.style-chip.prefer { background: var(--zhu-wash); color: var(--zhu); box-shadow: inset 0 0 0 1px var(--zhu-line); }
.style-chip.avoid { background: var(--paper-deep); color: var(--muted); text-decoration: line-through; }
.models { display: grid; grid-template-columns: 120px minmax(0, 320px); gap: 10px 14px; align-items: center; margin: 12px 0; font-size: 13.5px; }
.models label { color: var(--muted); }
.src-groups { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.src-lists { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 16px; font-size: 13px; }
.src-lists li { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line-soft); padding: 4px 0; }
.bottom-line p { margin: 0 0 6px; font-size: 13.5px; }
@media (max-width: 960px) { .set-layout { grid-template-columns: 1fr; } .set-tabs { flex-direction: row; flex-wrap: wrap; position: static; } }

/* ── empty states and toast ────────────────────────────── */
.empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 12px; padding: 48px 0; color: var(--muted); font-size: 14px; }
.empty .kiro { width: 160px; height: 120px; object-fit: cover; border-radius: 14px; mix-blend-mode: multiply; }   /* the cream paper melts into the card */
[data-theme="dark"] .empty .kiro { mix-blend-mode: normal; }
.board .empty { padding: 72px 0; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 8px); z-index: 60; padding: 8px 16px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 2px; background: var(--zhu); margin-right: 8px; vertical-align: 1px; }

/* ── the older pages, flattened to the same look ───────── */
.msg--assistant .msg__body, .topic, .structure, .lib, .playbook, .tracker__list > li, .sum > div, .engine { box-shadow: none; }
.wide { max-width: none; }
.ph h1, h2, .lib__head h3, .topbar__title { font-family: var(--display); }
.login-card, .invite { box-shadow: none; }
.send { background: var(--ink); color: var(--paper); }
.drafts__head .label { border-left-color: var(--zhu); }
.resizer:hover::before, .resizer:focus-visible::before, .is-resizing .resizer::before, .resizer:hover::after { background: var(--ink); }
.monogram { border-radius: 8px; background: var(--zhu); color: #fff; border: 0; box-shadow: none; transform: rotate(-4deg); }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; padding: 6px; border-right: 0;
    border-top: 1px solid var(--line); z-index: 20; }
  .rail__brand, .menu__group, .rail__foot .svc { display: none; }
  .menu { display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; }
  .menu__item { flex-direction: column; gap: 0; padding: 6px 2px; font-size: 12px; align-items: center; }
  .menu__item .count { display: none; }
  .rail__foot { display: none; }
  .page { padding-bottom: 90px; }
  .board-head, .board-row .heat { display: none; }
  .board-row { grid-template-columns: 40px minmax(0, 1fr) 64px; }
  .board-row .acts { grid-column: 2 / -1; justify-content: flex-start; }
  .topics { grid-template-columns: 1fr; grid-auto-rows: auto; }
}

/* 试一下: the hands-on checklist on a hot item, a topic and the piece made from it */
.try-what { margin: 0 0 6px; font-weight: 600; font-size: 13.5px; }
.try-steps { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 4px; font-size: 13px; color: var(--ink-soft); }
