  :root {
    --paper:  #f3ede1;
    --card:   #fbf7ee;
    --ink:    #1c1813;
    --soft:   #6f655733;
    --muted:  #7a7063;
    --line:   #d8cdb9;
    --red:    #a72b22;
    --green:  #2f6b4f;
    --gold:   #9c7320;
    --shadow: 0 30px 70px -30px rgba(40,30,15,.45);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { height: 100%; }
  body {
    background:
      radial-gradient(120% 80% at 50% -20%, #f7f1e6 0%, var(--paper) 55%),
      var(--paper);
    color: var(--ink);
    font-family: "Inter", system-ui, -apple-system, "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    display: flex; align-items: flex-start; justify-content: center;
    min-height: 100vh; min-height: 100dvh;   /* dvh: survive mobile address-bar resize */
    padding:
      calc(20px + env(safe-area-inset-top))
      calc(16px + env(safe-area-inset-right))
      calc(20px + env(safe-area-inset-bottom))
      calc(16px + env(safe-area-inset-left));
  }
  .serif { font-family: "Fraunces", Georgia, "Songti SC", serif; }

  .app {
    width: 100%; max-width: 700px;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    position: relative;
  }
  .app::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image: radial-gradient(rgba(120,100,70,.05) 1px, transparent 1px);
    background-size: 4px 4px; mix-blend-mode: multiply;
  }
  .app > * { position: relative; z-index: 1; }

  /* ---------- Masthead ---------- */
  .masthead { padding: 18px 30px 14px; }
  .rule { border: 0; border-top: 1px solid var(--ink); }
  .rule.thin { border-top: 1px solid var(--line); }
  .rule.double { border-top: 3px double var(--ink); }
  .mast-top {
    display: flex; align-items: baseline; justify-content: space-between;
    font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
    padding-bottom: 10px;
  }
  .wordmark {
    text-align: center; font-weight: 900; font-size: 34px; line-height: 1;
    letter-spacing: -.01em; margin: 12px 0 10px; font-optical-sizing: auto;
  }
  .wordmark em { font-style: italic; font-weight: 500; color: var(--red); }
  .mast-meta {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
    padding-top: 9px;
  }
  .mast-right { display: inline-flex; align-items: center; gap: 14px; }
  .homebtn {
    background: none; border: 0; cursor: pointer; font: inherit;
    letter-spacing: .15em; color: var(--muted); padding: 0; text-transform: uppercase;
  }
  @media (hover: hover) { .homebtn:hover { color: var(--red); } }
  .homebtn:active { color: var(--red); }
  .lang { display: inline-flex; gap: 7px; align-items: center; }
  .lang button {
    background: none; border: 0; cursor: pointer; font: inherit;
    letter-spacing: .15em; color: var(--muted); padding: 0; text-transform: uppercase;
  }
  .lang button.on { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
  .lang i { width: 1px; height: 11px; background: var(--line); display: inline-block; }

  /* ---------- Ledger strip ---------- */
  .ledger { display: flex; padding: 0 30px; }
  .ledger .cell { flex: 1; text-align: center; padding: 9px 4px; border-right: 1px solid var(--line); }
  .ledger .cell:last-child { border-right: 0; }
  .ledger .k { font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
  .ledger .v { font-size: 20px; font-weight: 600; margin-top: 1px; font-feature-settings: "tnum"; }
  .ledger .v.saved { color: var(--green); }
  .ledger .v.lost  { color: var(--red); }
  .ledger .v.trust { color: var(--gold, #9c7320); }
  .ledger .v.trust.low { color: var(--red); }

  /* ---------- Editorial bits ---------- */
  .kicker { font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
  .kicker b { color: var(--red); font-weight: 700; }
  main, .screen { padding: 24px 30px 30px; }

  /* ---------- Case ---------- */
  .case-head { display: flex; align-items: center; gap: 12px; }
  .case-head .ticks { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 50%; }
  .case-head .ticks i { width: 14px; height: 3px; background: var(--line); }
  .case-head .ticks i.done { background: var(--ink); }
  .case-title { font-weight: 900; font-size: 29px; line-height: 1.1; letter-spacing: -.015em; margin: 12px 0 14px; font-optical-sizing: auto; }
  .exhibit-tab {
    display: inline-block; font-family: ui-monospace, "Consolas", monospace;
    font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
    border: 1px solid var(--line); border-bottom: 0; padding: 4px 10px; background: var(--paper);
  }
  .exhibit {
    border: 1px solid var(--line); background: var(--paper);
    padding: 18px 20px; font-size: 15.5px; line-height: 1.8;
    white-space: pre-wrap; word-break: break-word;
  }
  .sender { font-size: 12px; color: var(--muted); margin-top: 10px; font-style: italic; }
  .sender b { color: var(--ink); font-style: normal; }

  .atrisk { display: flex; align-items: baseline; gap: 10px; margin: 16px 0 4px; }
  .atrisk .lbl { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
  .atrisk .fig { font-weight: 600; font-size: 22px; color: var(--ink); font-feature-settings: "tnum"; }

  /* ---------- Decision timer ---------- */
  .timer { display: flex; align-items: center; gap: 12px; margin: 20px 0 4px; }
  .timer .tlabel { flex: none; }
  .timer .track { flex: 1; height: 4px; background: var(--line); position: relative; overflow: hidden; }
  .timer .fill { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; background: var(--ink); }
  .timer .secs { font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); letter-spacing: .05em; min-width: 36px; text-align: right; }
  .timer.low .fill { background: var(--red); }
  .timer.low .secs { color: var(--red); font-weight: 700; }

  .ruling-prompt { margin: 18px 0 10px; }
  .actions { display: flex; gap: 14px; }
  .act {
    flex: 1; cursor: pointer; background: transparent; padding: 15px 12px;
    border: 1.5px solid var(--ink); color: var(--ink);
    font-family: inherit; font-size: 12px; font-weight: 700;
    letter-spacing: .16em; text-transform: uppercase;
    transition: background .15s ease, color .15s ease;
  }
  .act .big { display: block; font-family: "Fraunces", serif; font-weight: 900; font-size: 19px; letter-spacing: 0; text-transform: none; margin-top: 3px; }
  @media (hover: hover) {
    .act:hover { background: var(--ink); color: var(--card); }
    .act.genuine:hover { background: var(--green); border-color: var(--green); }
    .act.fraud:hover   { background: var(--red);   border-color: var(--red); }
  }
  .act:active { background: var(--ink); color: var(--card); }
  .act.genuine:active { background: var(--green); border-color: var(--green); }
  .act.fraud:active   { background: var(--red);   border-color: var(--red); }
  .hint { font-size: 11.5px; color: var(--muted); font-style: italic; margin-top: 12px; text-align: center; }

  /* ---------- Verdict ---------- */
  .verdict { margin-top: 18px; border-top: 3px double var(--ink); padding-top: 18px; position: relative; }
  .stamp {
    display: inline-block; transform: rotate(-6deg);
    border: 3px solid var(--red); color: var(--red);
    font-family: "Fraunces", serif; font-weight: 900; font-size: 22px;
    letter-spacing: .06em; text-transform: uppercase; padding: 4px 14px;
    box-shadow: inset 0 0 0 2px rgba(167,43,34,.15); opacity: .9;
  }
  .stamp.ok { border-color: var(--green); color: var(--green); box-shadow: inset 0 0 0 2px rgba(47,107,79,.15); }
  .cost {
    display: inline-block; vertical-align: middle; margin-left: 12px;
    font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
  }
  .cost b { font-family: "Fraunces", serif; font-size: 17px; font-weight: 900; letter-spacing: 0; }
  .cost.money { color: var(--red); }
  .cost.trust { color: var(--gold, #9c7320); }
  .tells-kicker { margin: 18px 0 8px; }
  .tells { list-style: none; counter-reset: tell; }
  .tells li {
    counter-increment: tell; position: relative; padding: 9px 0 9px 34px;
    font-size: 14px; line-height: 1.72; border-bottom: 1px solid var(--soft);
  }
  .tells li::before {
    content: counter(tell, decimal-leading-zero);
    position: absolute; left: 0; top: 7px;
    font-family: ui-monospace, monospace; font-size: 11px; color: var(--red); font-weight: 700;
  }
  .pull {
    font-family: "Fraunces", serif; font-style: italic; font-weight: 500;
    font-size: 19px; line-height: 1.55; margin: 20px 0 8px; padding-left: 16px;
    border-left: 3px solid var(--gold); color: var(--ink);
  }
  .next-wrap { margin-top: 20px; }
  .linkbtn {
    background: none; border: 0; cursor: pointer; font-family: inherit;
    font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
    color: var(--ink); border-bottom: 2px solid var(--red); padding: 4px 0 5px;
  }
  @media (hover: hover) { .linkbtn:hover { color: var(--red); } }
  .linkbtn:active { color: var(--red); }

  /* ---------- Screens ---------- */
  .dek { font-family: "Fraunces", serif; font-style: italic; font-weight: 400; font-size: 19px; line-height: 1.6; color: var(--muted); margin: 16px 0 20px; }
  .lede { font-size: 15px; line-height: 1.85; color: var(--ink); }
  .lede::first-letter { font-family: "Fraunces", serif; font-weight: 900; float: left; font-size: 62px; line-height: .82; padding: 4px 10px 0 0; color: var(--red); }
  .cover-title { font-weight: 900; font-size: 46px; line-height: .98; letter-spacing: -.02em; margin: 6px 0 2px; font-optical-sizing: auto; }
  .cover-title em { font-style: italic; font-weight: 500; color: var(--red); }
  .begin-wrap { margin: 24px 0 6px; text-align: center; }
  /* Primary call-to-action: the moment you start a shift. Made deliberately
     prominent — solid ink slab, serif, paper text, red on hover. */
  .cta {
    display: inline-block; cursor: pointer;
    background: var(--ink); color: var(--card);
    font-family: "Fraunces", serif; font-weight: 900; font-size: 21px; line-height: 1;
    letter-spacing: .01em; text-transform: none;
    border: 1.5px solid var(--ink); border-radius: 2px; padding: 15px 40px;
    box-shadow: 0 14px 30px -14px rgba(40,30,15,.55);
    transition: background .15s ease, border-color .15s ease, transform .08s ease;
  }
  @media (hover: hover) { .cta:hover { background: var(--red); border-color: var(--red); } }
  .cta:active { transform: translateY(1px); }

  .contents { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 14px; }
  .contents .ct { font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
  .contents ul { list-style: none; margin-top: 10px; }
  .contents li { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--soft); font-size: 14px; line-height: 1.62; }
  .contents li .no { font-family: ui-monospace, monospace; font-size: 11px; color: var(--gold); flex: none; }

  .grade-row { display: flex; align-items: center; gap: 18px; margin: 6px 0 14px; }
  .grade { font-family: "Fraunces", serif; font-weight: 900; font-size: 78px; line-height: .9; }
  .grade-line { font-family: "Fraunces", serif; font-style: italic; font-size: 18px; color: var(--muted); line-height: 1.4; }
  .figs { display: flex; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
  .figs .cell { flex: 1; text-align: center; padding: 12px 4px; border-right: 1px solid var(--line); }
  .figs .cell:last-child { border-right: 0; }
  .figs .k { font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
  .figs .v { font-family: "Fraunces", serif; font-weight: 900; font-size: 26px; margin-top: 3px; font-feature-settings: "tnum"; }
  .figs .v.saved { color: var(--green); } .figs .v.lost { color: var(--red); }
  .figs .v.trust { color: var(--gold, #9c7320); } .figs .v.trust.low { color: var(--red); }
  .mission { font-family: "Fraunces", serif; font-style: italic; font-size: 16px; color: var(--ink); margin: 18px 0 6px; line-height: 1.5; text-align: center; }

  .colophon { padding: 16px 30px 22px; border-top: 1px solid var(--line); font-size: 10.5px; line-height: 1.7; color: var(--muted); text-align: center; letter-spacing: .02em; }
  .colophon b { color: var(--ink); letter-spacing: .12em; text-transform: uppercase; font-size: 10px; }

  .hidden { display: none !important; }

  /* ---------- Multi-platform (Bilibili toy responsive guide) ---------- */
  /* Phone: single full-height column, content-priority, bottom operation area.
     The whole app fits one screen; only the long message scrolls inside itself. */
  @media (max-width: 600px) {
    body {
      align-items: stretch;
      padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    }
    .app { min-height: 100dvh; display: flex; flex-direction: column; border: 0; box-shadow: none; }
    .app::before { display: none; }

    .masthead { padding: 8px 16px 6px; }
    .mast-top { font-size: 9px; padding-bottom: 5px; }
    .wordmark { font-size: 21px; margin: 5px 0 4px; }
    .mast-meta { padding-top: 5px; font-size: 9px; }
    .ledger { padding: 0 16px; }
    .ledger .v { font-size: 16px; }
    main, .screen { padding: 12px 16px 14px; }

    /* case screen = full-height column: case sits up top, the ruling area is
       anchored to the bottom (thumb zone). The slack between them is shared so
       nothing clusters in the upper half. */
    #caseScreen { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
    .case-head .ticks i { width: 12px; }
    .case-title { font-size: 20px; margin: 8px 0 10px; }
    /* the evidence box is the focus: let it grow to fill the slack (capped so a
       long message still scrolls inside), message vertically centered. */
    /* `safe center`: center short messages, but when a long message overflows
       fall back to top-aligned + scrollable so the top stays reachable
       (plain `center` makes overflow clip the top — unreachable even by scroll). */
    .exhibit { font-size: 15px; line-height: 1.75; padding: 16px 18px; flex: 1 1 auto; max-height: 56dvh; overflow-y: auto; display: flex; flex-direction: column; justify-content: safe center; }
    #caseScreen.decided .exhibit { flex: 0 0 auto; max-height: 16dvh; justify-content: flex-start; }
    .sender { margin-top: 8px; }
    .atrisk { margin: 14px 0 2px; } .atrisk .fig { font-size: 20px; }
    /* push the timer + ruling + buttons block to the bottom of the screen */
    .timer { margin: auto 0 6px; }
    #caseScreen.decided .verdict { margin-top: 14px; }   /* verdict flows top-aligned, no auto-gap */
    .ruling-prompt { margin: 0 0 10px; }
    .actions { gap: 12px; }
    .act { padding: 16px 10px; } .act .big { font-size: 18px; }
    .hint { margin-top: 10px; font-size: 11px; }
    .verdict { margin-top: 12px; padding-top: 12px; }
    .stamp { font-size: 20px; }
    .tells li { padding: 7px 0 7px 32px; font-size: 13px; line-height: 1.6; }
    .pull { font-size: 16px; margin: 12px 0 4px; }
    /* decided: verdict fills the column, the next button pins to the bottom */
    #caseScreen.decided #verdictBox { flex: 1 1 auto; min-height: 0; display: flex; }
    #caseScreen.decided .verdict { display: flex; flex-direction: column; flex: 1 1 auto; }
    .next-wrap { margin-top: auto; padding-top: 16px; }

    /* intro / report compaction */
    .cover-title { font-size: 30px; }
    .dek { font-size: 16px; margin: 10px 0 12px; }
    .lede { line-height: 1.6; } .lede::first-letter { font-size: 48px; }
    .contents { margin-top: 16px; padding-top: 10px; }
    .grade { font-size: 52px; } .grade-row { gap: 12px; margin: 4px 0 10px; }

    .colophon { display: none; }   /* demo notice still shown by the masthead badge */
  }
  /* Touch devices: larger tap targets (>=44px), no hover reliance */
  @media (pointer: coarse) {
    .lang button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
    .homebtn { display: inline-flex; align-items: center; min-height: 44px; }
    .cta { width: 100%; padding: 17px 0; font-size: 20px; }
    .act { padding: 18px 12px; }
    .linkbtn { padding: 12px 0 13px; }
  }
  /* Desktop / wide: keep a comfortable, capped content column */
  @media (min-width: 1025px) {
    .app { max-width: 720px; }
  }

  /* ---------- 中文排版修正 / CJK typography ---------- */
  /* CJK fonts have no true italic — the browser fakes an ugly slant.
     Keep Fraunces/Inter italics for Latin; render 中文 upright. */
  html[lang="zh"] .dek,
  html[lang="zh"] .pull,
  html[lang="zh"] .grade-line,
  html[lang="zh"] .mission,
  html[lang="zh"] .hint,
  html[lang="zh"] .sender { font-style: normal; }
  /* the cover headline emphasis: upright + bold + red instead of slanted */
  html[lang="zh"] .cover-title em { font-style: normal; font-weight: 900; }

  /* Wide .2em tracking gaps Chinese glyphs (案　件); ease it for 中文 small-caps labels. */
  html[lang="zh"] .mast-top,
  html[lang="zh"] .mast-meta,
  html[lang="zh"] .kicker,
  html[lang="zh"] .ledger .k,
  html[lang="zh"] .figs .k,
  html[lang="zh"] .contents .ct,
  html[lang="zh"] .atrisk .lbl,
  html[lang="zh"] .act { letter-spacing: .08em; }

  /* A touch more line-height for denser 中文 body text. */
  html[lang="zh"] .lede { line-height: 1.9; }
  html[lang="zh"] .exhibit { line-height: 1.85; }
