/* 编辑页以纸白、墨黑和暖金为主，公共色值也用于读稿页按钮。 */
:root {
  --paper: #f6f4ed; --ink: #282b26; --muted: #65685e; --line: #d5d4c9; --gold: #f3c767;
  color-scheme: light; font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink); background: var(--paper); -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
[hidden], .symbols { display: none !important; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button { border: 0; cursor: pointer; color: inherit; touch-action: manipulation; }
button:disabled { opacity: .48; cursor: default; }
:focus-visible { outline: 3px solid #a96d17; outline-offset: 3px; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.shell { max-width: 1024px; padding: 0 42px 36px; margin: auto; }
.mast, .brand, .local, .eyebrow, .paper-top, .paper-top label, .paper-bottom, .primary, .privacy, .read-head, .exit, .read-status, .secondary, .transport { display: flex; align-items: center; }
.mast { min-height: 78px; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { gap: 10px; font-weight: 720; font-size: 18px; letter-spacing: .025em; }
.local { gap: 8px; font-size: 12px; color: #545c50; }
.local i { width: 7px; height: 7px; border-radius: 50%; background: #658363; }
.intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: clamp(30px, 5.2vh, 58px) 0 28px; }
.eyebrow { gap: 9px; font: 600 11px/1.5 ui-monospace, Consolas, "Microsoft YaHei", monospace; letter-spacing: .12em; color: var(--muted); }
.eyebrow b { width: 22px; height: 3px; background: #bd872a; }
.eyebrow span { color: #999b90; }
h1 { margin: 13px 0 12px; font-size: clamp(36px, 4.4vw, 56px); letter-spacing: -.055em; line-height: 1.12; }
.underline { position: relative; z-index: 0; }
.underline::after { content: ""; position: absolute; bottom: .04em; left: .04em; width: 1.9em; height: .12em; background: var(--gold); transform: rotate(-3deg); z-index: -1; }
.intro p, .privacy { color: var(--muted); line-height: 1.7; }
.intro p { margin: 0; font-size: 15px; }
.diagram { width: min(29%, 258px); height: auto; margin-right: 3%; }

/* 一张稿纸容纳输入、字数与主按钮，输入区本身可原生滚动。 */
.paper { background: #fffefa; border: 1px solid #cecec0; border-top: 3px solid #373a31; border-radius: 6px; box-shadow: 0 4px 0 #e8e6dc; overflow: hidden; }
.paper-top, .paper-bottom { justify-content: space-between; gap: 12px; padding: 9px 22px; }
.paper-top { border-bottom: 1px solid #eae9df; }
.paper-top label { gap: 9px; font-weight: 680; }
.paper-top .icon { color: #666958; }
.quiet { min-height: 44px; padding: 0 6px; background: transparent; color: #6c5529; text-decoration: underline; text-underline-offset: 4px; font-size: 13px; }
textarea { display: block; width: 100%; height: clamp(160px, 23vh, 270px); min-height: 96px; border: 0; padding: 18px 22px; background: transparent; color: var(--ink); font-size: 17px; line-height: 1.7; resize: vertical; }
textarea:focus-visible { outline-offset: -3px; }
textarea::placeholder { color: #727469; }
.paper-bottom { border-top: 1px solid #eae9df; padding-block: 13px; }
.counter { font-size: 13px; color: var(--muted); }
.counter strong { font: 600 15px ui-monospace, Consolas, monospace; color: var(--ink); }
.primary, .secondary, .exit { justify-content: center; gap: 8px; min-height: 46px; border-radius: 6px; padding: 0 20px; font-weight: 650; }
.primary { background: var(--gold); color: #2c281e; }
@media (hover: hover) { .primary:not(:disabled):hover { background: #ffda88; } .quiet:hover { color: #302819; } }
.privacy { justify-content: center; gap: 6px; margin: 18px 0 0; font-size: 12px; }
.privacy .icon { width: 14px; height: 14px; }

/* 读稿区的行距和指示带共用一个度量，让首末两行都能停在金线处。 */
.reader { --type-size: 40px; --line-size: 1.65em; --cue: 32%; color-scheme: dark; position: fixed; inset: 0; height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto minmax(0,1fr) auto; background: #1b1e1b; color: #f5eddd; }
.read-head { justify-content: space-between; gap: 12px; min-height: 62px; padding: max(6px,env(safe-area-inset-top)) max(22px,env(safe-area-inset-right)) 6px max(22px,env(safe-area-inset-left)); border-bottom: 1px solid #373c34; }
.exit, .secondary { color: #eceadd; background: #30352e; border: 1px solid #51574c; }
.exit { min-height: 44px; padding-inline: 12px; font-size: 14px; }
.reader-name { font-size: 13px; letter-spacing: .08em; color: #c5c6b7; }
.reader-name i { font-style: normal; color: #b19862; margin: 0 5px; }
.read-status { font-size: 12px; gap: 10px; color: #e3d4ac; }
#progress { color: #b9bcae; font-variant-numeric: tabular-nums; min-width: 4ch; text-align: right; }
.stage { min-height: 0; position: relative; font-size: var(--type-size); }
.port { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; scrollbar-width: none; cursor: pointer; user-select: none; -webkit-user-select: none; overflow-anchor: none; }
.port:focus-visible { outline-offset: -4px; }
.port::-webkit-scrollbar { display: none; }
.port::before, .port::after { content: ""; display: block; }
.port::before { height: var(--cue); }
.port::after { height: max(0px, calc(100% - var(--cue) - var(--line-size))); }
.copy { margin: 0 auto; width: min(82%, 920px); line-height: var(--line-size); font-weight: 550; white-space: pre-wrap; overflow-wrap: anywhere; }
.track { position: absolute; top: var(--cue); left: 0; right: 0; height: var(--line-size); pointer-events: none; background: #f3c76709; border-bottom: 1px solid #bca06480; }
.track::before { content: ""; position: absolute; top: 50%; left: max(2.2%, calc((100% - 990px) / 2)); transform: translateY(-50%); border-block: 6px solid transparent; border-left: 8px solid var(--gold); }
.deck { background: #222620; border-top: 1px solid #3c4237; padding: 14px max(18px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left)); }
.deck-inner { max-width: 880px; margin: auto; display: flex; justify-content: space-between; align-items: center; gap: 30px; }
.transport, .dials { gap: 10px; }
.transport .primary { min-width: 108px; }
.dials { display: flex; flex: 1; gap: 24px; max-width: 480px; }
.dial { flex: 1; min-width: 0; }
.dial label { display: flex; justify-content: space-between; align-items: baseline; gap: 5px; font-size: 14px; font-weight: 640; }
.dial output { color: #bdbfb0; font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; }
.dial input { accent-color: var(--gold); width: 100%; height: 32px; margin: 0; display: block; cursor: pointer; }
.tip { margin: 4px 0 0; font-size: 12px; color: #b7b9aa; text-align: center; }
@media (max-width: 620px) {
  .shell { padding: 0 16px 24px; } .mast { min-height: 60px; } .brand { font-size: 16px; }
  .intro { margin: 25px 0 20px; gap: 0; } .intro p { font-size: 14px; } .diagram { display: none; }
  .paper-top, .paper-bottom { padding-inline: 14px; } textarea { padding: 14px; height: clamp(145px, 25vh, 240px); }
  .counter-extra { display: none; } .paper-bottom .primary { min-width: 54%; }
  .read-head { min-height: 52px; padding-inline: 12px; } .reader-name { display: none; }
  .deck-inner { flex-direction: column-reverse; gap: 5px; align-items: stretch; } .dials { width: 100%; max-width: none; gap: 16px; }
  .dial input { height: 44px; } .transport > * { flex: 1; } .transport .primary { flex: 1.5; }
  .tip { margin-top: 8px; } .tip span { display: none; } .deck { padding-top: 10px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .read-head { min-height: 44px; padding-block: 0; } .deck { padding-block: 4px; } .deck-inner { flex-direction: row; align-items: center; gap: 12px; } .dials { gap: 12px; } .tip { display: none; }
  .dial input { height: 26px; } .transport .primary { min-width: auto; } .transport > button { white-space: nowrap; padding-inline: 10px; }
}

/* 中文：保留现有标题栏标签，把活动数字放在同一右侧区域。 */
.site-header-status {
  display: grid;
  justify-items: end;
  flex: 0 0 auto;
  gap: 2px;
}

#site-activity {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
