:root {
  --ink: #161817;
  --paper: #f2ead9;
  --paper-light: #fffaf0;
  --paper-dark: #ded3bd;
  --red: #d94b38;
  --red-dark: #a92d21;
  --sage: #66786a;
  --gold: #b49558;
  --line: rgba(22, 24, 23, .22);
  --muted: #6f6c64;
  --shadow: 12px 14px 0 var(--ink);
  --sans: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  --mono: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 999;
  top: 8px;
  left: 8px;
  padding: 10px 15px;
  color: white;
  background: var(--red);
  transform: translateY(-150%);
}
.skip-link:focus-visible { transform: none; }

.grain {
  position: fixed;
  z-index: 30;
  inset: 0;
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.topbar {
  min-height: 82px;
  padding: 13px clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(242, 234, 217, .97);
  position: relative;
  z-index: 20;
}

.identity {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.identity-mark {
  width: 50px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--paper-light);
  background: var(--red);
  border: 1px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font: 700 25px/1 var(--serif);
}

.identity > span:last-child { display: grid; gap: 3px; }
.identity b { font: 700 18px/1.1 var(--serif); letter-spacing: .12em; }
.identity small { font: 600 9px/1 var(--mono); letter-spacing: .12em; }

.topbar-actions { display: flex; align-items: center; gap: 12px; }
.network-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--sage);
}
.network-state i { width: 8px; height: 8px; border-radius: 50%; background: #368057; box-shadow: 0 0 0 3px rgba(54, 128, 87, .12); }
.network-state.offline i { background: var(--gold); }
.quiet-button, .quiet-link {
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid var(--ink);
  background: transparent;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.quiet-button:hover, .quiet-link:hover { background: var(--ink); color: white; }

main { position: relative; z-index: 1; }

.hero {
  min-height: 690px;
  padding: clamp(72px, 9vw, 135px) clamp(20px, 7vw, 110px) 90px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  align-items: center;
  gap: clamp(45px, 8vw, 140px);
  position: relative;
  overflow: hidden;
}
.hero:before {
  content: "001";
  position: absolute;
  right: -1vw;
  top: 30px;
  color: rgba(22, 24, 23, .035);
  font: 900 clamp(180px, 27vw, 420px)/1 var(--sans);
  letter-spacing: -.09em;
  pointer-events: none;
}

.edition {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0 0 30px;
  font: 700 11px/1 var(--mono);
  letter-spacing: .1em;
}
.edition span { padding: 9px 11px; color: white; background: var(--ink); }
.edition b { color: var(--red-dark); }

.hero h1 {
  max-width: 820px;
  margin: 0;
  font: 800 clamp(54px, 7.5vw, 112px)/.98 var(--serif);
  letter-spacing: -.055em;
}
.hero h1 em { color: var(--red); font-style: normal; position: relative; }
.hero h1 em:after {
  content: "";
  position: absolute;
  left: 2%;
  right: -3%;
  bottom: -2px;
  height: 8px;
  background: var(--red);
  transform: rotate(-1deg);
}
.hero-lead {
  max-width: 650px;
  margin: 36px 0 32px;
  font: 19px/1.85 var(--serif);
  color: #454843;
}
.promise-grid {
  max-width: 600px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.promise-grid span { padding: 14px 8px 14px 0; display: grid; gap: 4px; }
.promise-grid span + span { border-left: 1px solid var(--line); padding-left: 16px; }
.promise-grid b { font: 700 11px/1 var(--mono); color: var(--red); }
.promise-grid small { font-size: 13px; font-weight: 700; }

.hero-note {
  width: min(100%, 390px);
  min-height: 430px;
  justify-self: end;
  padding: 64px 46px 42px;
  background: var(--paper-light);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
  position: relative;
  display: flex;
  flex-direction: column;
}
.hero-note:before, .hero-note:after { content: ""; position: absolute; pointer-events: none; }
.hero-note:before { inset: 13px; border: 1px solid var(--paper-dark); }
.hero-note:after { width: 44px; height: 13px; right: 27px; top: 25px; background: var(--red); transform: rotate(5deg); }
.pin { position: absolute; width: 15px; height: 15px; top: 20px; left: 24px; border-radius: 50%; background: var(--ink); box-shadow: 2px 3px 0 var(--paper-dark); }
.hero-note p, .hero-note strong, .hero-note small, .hero-note a { position: relative; z-index: 1; }
.hero-note p { margin: 0 0 25px; font-size: 13px; font-weight: 700; color: var(--red-dark); }
.hero-note strong { font: 800 37px/1.35 var(--serif); letter-spacing: .03em; }
.hero-note small { margin-top: 27px; color: var(--muted); }
.hero-note a { margin-top: auto; padding-top: 23px; border-top: 1px solid var(--ink); color: var(--red-dark); font-size: 15px; font-weight: 800; text-decoration: none; }

.path-strip {
  min-height: 106px;
  padding: 20px clamp(20px, 7vw, 110px);
  color: var(--paper-light);
  background: var(--ink);
  display: grid;
  grid-template-columns: 1fr minmax(40px, .55fr) 1fr minmax(40px, .55fr) 1fr;
  align-items: center;
  gap: 20px;
}
.path-strip p { margin: 0; display: grid; grid-template-columns: 34px auto; align-items: center; column-gap: 12px; }
.path-strip p span { grid-row: 1/3; color: var(--red); font: 700 27px/1 var(--mono); }
.path-strip p b { font: 700 14px/1.2 var(--sans); }
.path-strip p small { color: #a7aca7; font-size: 11px; }
.path-strip i { height: 1px; background: #525652; position: relative; }
.path-strip i:after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid #777; border-right: 1px solid #777; transform: rotate(45deg); }

.recorder-section, .result-section, .archive-section, .boundary-section {
  padding: clamp(80px, 9vw, 140px) clamp(20px, 7vw, 110px);
}
.section-heading { max-width: 850px; margin-bottom: 54px; }
.section-heading > p, .archive-heading > div > p, .boundary-section > div > p {
  margin: 0 0 15px;
  color: var(--red-dark);
  font: 700 11px/1 var(--mono);
  letter-spacing: .13em;
}
.section-heading h2, .archive-heading h2, .boundary-section h2 {
  margin: 0 0 20px;
  font: 800 clamp(44px, 5.4vw, 78px)/1.08 var(--serif);
  letter-spacing: -.04em;
}
.section-heading > span { display: block; max-width: 690px; color: #555951; font: 16px/1.8 var(--serif); }

.studio {
  max-width: 1340px;
  margin: 0 auto;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(330px, .85fr) minmax(440px, 1.15fr);
  background: var(--paper-light);
}
.prompt-panel, .record-panel { padding: clamp(28px, 4.5vw, 60px); }
.record-panel { color: var(--paper-light); background: var(--ink); position: relative; overflow: hidden; }
.record-panel:before { content: "VOICE"; position: absolute; right: -18px; bottom: -24px; color: rgba(255,255,255,.035); font: 900 100px/1 var(--sans); letter-spacing: -.06em; }
.panel-index { margin-bottom: 35px; display: flex; align-items: baseline; gap: 12px; }
.panel-index span { color: var(--red); font: 800 28px/1 var(--mono); }
.panel-index b { font-size: 13px; letter-spacing: .12em; }
.panel-index.light b { color: #babdb9; }

.prompt-choices { margin: 0; padding: 0; border: 0; display: grid; gap: 9px; }
.prompt-choices legend { margin-bottom: 16px; font: 700 16px/1.3 var(--serif); }
.prompt-card { cursor: pointer; }
.prompt-card input { position: absolute; opacity: 0; pointer-events: none; }
.prompt-card > span {
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(110px, .7fr) 1.3fr;
  align-items: center;
  gap: 14px;
  transition: background .16s ease, border .16s ease, transform .16s ease;
}
.prompt-card b { font: 700 15px/1.3 var(--serif); }
.prompt-card small { font-size: 12px; line-height: 1.55; color: var(--muted); }
.prompt-card:hover > span { transform: translateX(3px); border-color: var(--ink); }
.prompt-card.selected > span, .prompt-card input:checked + span { background: var(--paper); border-color: var(--ink); box-shadow: inset 5px 0 0 var(--red); }
.prompt-card input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

.name-field { display: grid; gap: 9px; margin-top: 30px; }
.name-field > span { font-weight: 700; font-size: 13px; }
.name-field > span small { font-weight: 400; color: var(--muted); }
.name-field input, .edit-fields input, .edit-fields textarea {
  width: 100%;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: white;
  color: var(--ink);
  padding: 13px 14px;
  font-size: 16px;
  outline: none;
}
.name-field input:focus, .edit-fields input:focus, .edit-fields textarea:focus { box-shadow: 0 0 0 3px var(--gold); }
.field-hint { margin: 7px 0 0; color: var(--muted); font-size: 11px; }

.consent-check, .transcript-choice label, .confirm-check {
  margin-top: 25px;
  display: grid;
  grid-template-columns: 21px 1fr;
  align-items: start;
  gap: 11px;
  cursor: pointer;
}
.consent-check input, .transcript-choice input, .confirm-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--red); }
.consent-check span, .transcript-choice label span, .confirm-check span { display: grid; gap: 4px; }
.consent-check b, .transcript-choice b, .confirm-check b { font-size: 12px; line-height: 1.5; }
.consent-check small, .transcript-choice small, .confirm-check small { color: var(--muted); font-size: 10px; line-height: 1.6; }
.transcript-choice { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.transcript-choice summary { cursor: pointer; font-size: 12px; font-weight: 700; }
.transcript-choice summary span { margin-left: 6px; padding: 3px 5px; color: var(--red-dark); border: 1px solid currentColor; font-size: 9px; }
.transcript-choice label { margin-top: 15px; }

.question-ticket { max-width: 610px; margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.question-ticket small { color: var(--red); font: 700 10px/1 var(--mono); letter-spacing: .15em; }
.question-ticket p { margin: 14px 0 0; font: 700 clamp(25px, 3vw, 39px)/1.4 var(--serif); }

.recorder-stage { min-height: 410px; display: grid; place-items: center; align-content: center; position: relative; z-index: 1; }
#waveCanvas { position: absolute; width: 100%; height: 140px; top: 34px; left: 0; opacity: .34; }
.record-button {
  width: 190px;
  min-height: 220px;
  padding: 12px;
  border: 0;
  background: transparent;
  color: var(--paper-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  z-index: 2;
}
.record-core {
  width: 116px;
  height: 116px;
  margin-bottom: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--red);
  border: 4px solid var(--paper-light);
  box-shadow: 0 0 0 8px var(--red), 0 0 0 9px rgba(255,255,255,.32);
  transition: transform .18s ease, border-radius .18s ease;
}
.record-core i { width: 28px; height: 28px; border-radius: 50%; background: var(--paper-light); transition: border-radius .18s ease; }
.record-button:hover .record-core { transform: scale(1.04); }
.record-button:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.record-button[aria-pressed="true"] .record-core { animation: recordingPulse 1.55s ease-in-out infinite; }
.record-button[aria-pressed="true"] .record-core i { border-radius: 4px; }
.record-button b { font-size: 17px; }
.record-button small { margin-top: 5px; color: #9ca09b; font-size: 10px; }
@keyframes recordingPulse { 0%,100% { box-shadow: 0 0 0 8px var(--red), 0 0 0 9px rgba(255,255,255,.32); } 50% { box-shadow: 0 0 0 14px var(--red), 0 0 0 22px rgba(217,75,56,.12); } }

#recordTimer { margin-top: -33px; color: var(--paper-light); font: 700 28px/1 var(--mono); letter-spacing: .04em; position: relative; z-index: 2; }
.record-status { min-height: 44px; max-width: 480px; margin: 17px auto 0; color: #afb2ae; font-size: 12px; line-height: 1.65; text-align: center; position: relative; z-index: 2; }
.studio[data-mode="recording"] .record-status { color: #f1a99f; }
.studio[data-mode="recording"] .question-ticket small:after { content: " · 正在记录"; }

.recovery-actions { margin: -18px auto 22px; display: flex; justify-content: center; gap: 9px; position: relative; z-index: 2; }
.recovery-actions button { padding: 10px 13px; color: white; border: 1px solid #757975; background: transparent; cursor: pointer; font-size: 12px; }
.recovery-actions button:hover { border-color: white; }
.live-transcript { margin: -10px 0 28px; padding: 15px; border: 1px solid #555a55; background: #222523; position: relative; z-index: 2; }
.live-transcript span { color: var(--red); font: 700 9px/1 var(--mono); letter-spacing: .1em; }
.live-transcript p { margin: 8px 0 0; color: #d6d5d0; font: 13px/1.65 var(--serif); }
.privacy-line { padding-top: 18px; border-top: 1px solid #4a4e4a; display: grid; grid-template-columns: 24px 1fr; gap: 9px; color: #989c97; position: relative; z-index: 2; }
.privacy-line > span { color: var(--red); font-size: 24px; line-height: 1; }
.privacy-line p { margin: 0; font-size: 10px; line-height: 1.65; }
.privacy-line b { color: #c8cac6; }

.result-section { background: var(--paper-dark); border-top: 2px solid var(--ink); }
.result-heading span { color: #454942; }
.result-grid { max-width: 1340px; margin: 0 auto; display: grid; grid-template-columns: minmax(420px, 1.12fr) minmax(350px, .88fr); align-items: start; gap: clamp(35px, 6vw, 85px); }

.book-page {
  min-height: 790px;
  padding: clamp(44px, 6vw, 82px) clamp(32px, 6vw, 78px) 52px;
  background: var(--paper-light);
  border: 2px solid var(--ink);
  box-shadow: 14px 16px 0 var(--ink), 20px 23px 0 var(--red);
  position: relative;
  display: flex;
  flex-direction: column;
}
.book-page:before { content: ""; position: absolute; inset: 16px; border: 1px solid var(--paper-dark); pointer-events: none; }
.book-page:after { content: "原声"; position: absolute; right: 33px; top: 30px; width: 62px; height: 62px; display: grid; place-items: center; color: var(--red); border: 2px solid currentColor; border-radius: 50%; font: 700 15px/1 var(--serif); transform: rotate(8deg); opacity: .8; }
.book-topline, .book-page > footer { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; letter-spacing: .08em; position: relative; z-index: 1; }
.book-topline b { color: var(--ink); }
.book-topline i { font-style: normal; }
.book-kicker { margin: 108px 0 11px; color: var(--red-dark); text-align: center; font: 700 10px/1 var(--mono); letter-spacing: .15em; position: relative; z-index: 1; }
.book-page h3 { margin: 0; text-align: center; font: 800 clamp(33px, 4vw, 52px)/1.25 var(--serif); letter-spacing: .02em; position: relative; z-index: 1; }
.book-page blockquote { margin: 35px auto 28px; padding: 0 20px; max-width: 520px; color: #4a4e47; text-align: center; font: 16px/1.75 var(--serif); position: relative; z-index: 1; }
.book-page blockquote:before { content: "“"; color: var(--red); font-size: 32px; vertical-align: -.2em; margin-right: 3px; }
.book-page blockquote:after { content: "”"; color: var(--red); font-size: 32px; vertical-align: -.25em; margin-left: 3px; }
.embedded-audio { margin: 5px 0 25px; padding: 18px; background: var(--ink); border-left: 8px solid var(--red); position: relative; z-index: 1; }
.embedded-audio audio { width: 100%; min-height: 42px; display: block; }
.embedded-audio > div { margin-top: 9px; display: flex; justify-content: space-between; color: #b9bcb8; font: 10px/1 var(--mono); }
.book-text { padding: 8px 4px 22px; color: #30332f; font: 17px/2 var(--serif); position: relative; z-index: 1; }
.book-text p { margin: 0 0 1em; }
.book-text .reflection { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--paper-dark); color: var(--red-dark); }
.book-text .reflection:before { content: "回望 / "; font: 700 9px/1 var(--mono); letter-spacing: .12em; }
.book-text.empty { color: #89877f; font-size: 13px; }
.book-page > footer { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--paper-dark); }
.book-page > footer b { color: var(--red-dark); }
.book-page[data-confirmed="true"]:after { content: "已确认"; color: #316647; }

.finish-panel { padding-top: 5px; }
.finish-status { padding: 20px 0 25px; border-bottom: 1px solid var(--ink); display: grid; grid-template-columns: 50px 1fr; align-items: center; gap: 13px; }
.success-mark { width: 48px; height: 48px; display: grid; place-items: center; color: white; background: #326849; border-radius: 50%; font-size: 22px; }
.finish-status > div { display: grid; gap: 6px; }
.finish-status b { font: 700 18px/1.2 var(--serif); }
.finish-status small { color: var(--muted); font-size: 11px; }

.edit-drawer { border-bottom: 1px solid var(--ink); }
.edit-drawer summary { padding: 23px 0; cursor: pointer; font-weight: 800; font-size: 14px; list-style: none; }
.edit-drawer summary::-webkit-details-marker { display: none; }
.edit-drawer summary:after { content: "+"; float: right; font-size: 21px; font-weight: 400; }
.edit-drawer[open] summary:after { content: "−"; }
.edit-drawer summary span { margin-left: 7px; color: var(--red-dark); font-size: 10px; }
.edit-fields { padding-bottom: 25px; display: grid; gap: 16px; }
.edit-fields label { display: grid; gap: 7px; }
.edit-fields label > span { font-size: 12px; font-weight: 700; }
.edit-fields label small { color: var(--muted); font-weight: 400; }
.edit-fields textarea { min-height: 120px; resize: vertical; line-height: 1.7; }
.edit-fields label:nth-child(3) textarea { min-height: 82px; }
.ink-button, .accent-button, .outline-button {
  min-height: 52px;
  padding: 13px 18px;
  border: 2px solid var(--ink);
  font-weight: 800;
  cursor: pointer;
}
.ink-button { color: white; background: var(--ink); }
.ink-button:hover { color: var(--ink); background: var(--paper-light); }
.edit-fields > p { margin: -6px 0 0; color: var(--muted); font-size: 10px; }
.confirm-check { margin: 24px 0; }
.confirm-check small { color: #5e625b; }

.primary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.accent-button { color: white; background: var(--red); border-color: var(--red-dark); }
.accent-button:hover { background: var(--red-dark); }
.outline-button { background: transparent; }
.outline-button:hover { color: white; background: var(--ink); }
.secondary-actions { margin-top: 10px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--ink); }
.secondary-actions button { min-height: 42px; padding: 8px; border: 0; background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; }
.secondary-actions button + button { border-left: 1px solid var(--ink); }
.secondary-actions button:hover { background: rgba(255,255,255,.35); }
.share-hint { margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }

.continue-card { margin-top: 32px; padding: 22px; color: var(--paper-light); background: var(--ink); border-left: 7px solid var(--red); }
.continue-card > span { color: var(--red); font: 700 9px/1 var(--mono); letter-spacing: .12em; }
.continue-card p { margin: 13px 0 18px; font: 18px/1.55 var(--serif); }
.continue-card button { width: 100%; min-height: 44px; color: white; background: transparent; border: 1px solid #787c78; cursor: pointer; font-weight: 700; }
.continue-card button:hover { border-color: white; }
.danger-zone { margin-top: 15px; display: flex; justify-content: flex-end; gap: 15px; }
.danger-zone button { padding: 8px 0; border: 0; border-bottom: 1px solid currentColor; background: none; cursor: pointer; font-size: 11px; }
.danger-zone button:last-child { color: var(--red-dark); }

.archive-section { background: var(--paper-light); border-top: 1px solid var(--ink); }
.archive-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 40px; }
.archive-heading h2 { margin: 0; font-size: clamp(37px, 4.5vw, 60px); }
.archive-heading button { padding: 9px 0; border: 0; border-bottom: 1px solid var(--red-dark); color: var(--red-dark); background: transparent; cursor: pointer; font-size: 11px; }
.archive-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.archive-card { min-height: 240px; padding: 24px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); display: flex; flex-direction: column; position: relative; }
.archive-card > span { color: var(--red-dark); font: 700 10px/1 var(--mono); }
.archive-card h3 { margin: 36px 0 10px; font: 700 23px/1.35 var(--serif); }
.archive-card p { margin: 0; color: var(--muted); font-size: 11px; }
.archive-card div { margin-top: auto; display: flex; gap: 15px; }
.archive-card button { padding: 8px 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; }
.archive-card button:last-child { margin-left: auto; color: var(--red-dark); }
.archive-note { max-width: 760px; margin: 22px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }

.boundary-section { color: var(--paper-light); background: var(--ink); display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; }
.boundary-section > div > p { color: var(--red); }
.boundary-section h2 { margin: 0; font-size: clamp(44px, 5vw, 72px); }
.boundary-section ul { margin: 0; padding: 0; border-top: 1px solid #555a55; list-style: none; }
.boundary-section li { padding: 22px 0; border-bottom: 1px solid #555a55; display: grid; grid-template-columns: 42px 1fr; gap: 12px; }
.boundary-section li > span { color: var(--red); font: 700 16px/1 var(--mono); }
.boundary-section li p { margin: 0; display: grid; gap: 6px; }
.boundary-section li b { font: 700 16px/1.3 var(--serif); }
.boundary-section li small { color: #9fa29e; font-size: 11px; line-height: 1.6; }

.footer { padding: 45px clamp(20px, 7vw, 110px); color: #b3b6b2; background: #0b0c0c; display: grid; grid-template-columns: 1fr 1.3fr .8fr; align-items: center; gap: 40px; }
.footer > div:first-child { display: flex; gap: 12px; align-items: center; }
.identity-mark.small { width: 40px; font-size: 20px; box-shadow: 3px 3px 0 #5b5e5b; }
.footer p { margin: 0; font-size: 11px; line-height: 1.7; }
.footer > div:first-child p { display: grid; }
.footer b { color: white; font: 700 15px/1.4 var(--serif); }
.footer small { font-size: 9px; }
.footer-links { display: flex; justify-content: flex-end; gap: 17px; }
.footer-links a { font-size: 11px; text-underline-offset: 4px; }

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: min(90vw, 520px);
  padding: 13px 18px;
  color: white;
  background: var(--ink);
  border: 1px solid #666;
  box-shadow: 6px 7px 0 rgba(217,75,56,.8);
  font-size: 12px;
  text-align: center;
}
.confirm-dialog { width: min(92vw, 480px); padding: 0; border: 2px solid var(--ink); border-radius: 0; background: var(--paper-light); box-shadow: 12px 14px 0 var(--red); }
.confirm-dialog::backdrop { background: rgba(10,10,10,.72); }
.confirm-dialog form { padding: 32px; }
.confirm-dialog form > p:first-child { margin: 0 0 10px; color: var(--red-dark); font: 700 10px/1 var(--mono); letter-spacing: .12em; }
.confirm-dialog h2 { margin: 0; font: 800 31px/1.3 var(--serif); }
.confirm-dialog form > p:nth-child(3) { color: var(--muted); font-size: 13px; line-height: 1.7; }
.confirm-dialog form > div { margin-top: 25px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.confirm-dialog button { min-height: 46px; border: 1px solid var(--ink); background: transparent; cursor: pointer; font-weight: 700; }
.confirm-dialog button.destructive { color: white; background: var(--red); border-color: var(--red-dark); }

[hidden] { display: none !important; }

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr .65fr; gap: 50px; }
  .hero h1 { font-size: clamp(52px, 8vw, 82px); }
  .hero-note { min-height: 360px; padding: 52px 32px 35px; }
  .hero-note strong { font-size: 30px; }
  .studio { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .book-page { max-width: 760px; width: 100%; margin: 0 auto; }
  .finish-panel { max-width: 760px; width: 100%; margin: 0 auto; }
  .archive-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boundary-section { grid-template-columns: 1fr; gap: 45px; }
  .footer { grid-template-columns: 1fr 1fr; }
  .footer > p { grid-column: 1/-1; grid-row: 2; }
}

@media (max-width: 720px) {
  :root { --shadow: 7px 8px 0 var(--ink); }
  .topbar { min-height: 68px; padding: 10px 16px; }
  .identity-mark { width: 43px; font-size: 22px; box-shadow: 3px 3px 0 var(--ink); }
  .identity b { font-size: 15px; }
  .identity small { font-size: 7px; }
  .network-state span, .quiet-link { display: none; }
  .quiet-button { min-height: 34px; padding: 7px 9px; }

  .hero { min-height: 0; padding: 68px 20px 74px; grid-template-columns: 1fr; gap: 52px; }
  .hero:before { top: 220px; font-size: 180px; }
  .edition { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 24px; }
  .hero h1 { font-size: clamp(49px, 15.2vw, 70px); line-height: 1.02; }
  .hero h1 em:after { height: 5px; }
  .hero-lead { margin: 27px 0 24px; font-size: 17px; line-height: 1.75; }
  .promise-grid small { font-size: 10px; }
  .promise-grid span + span { padding-left: 10px; }
  .hero-note { width: calc(100% - 12px); justify-self: start; min-height: 330px; padding: 48px 31px 32px; transform: rotate(1deg); }
  .hero-note strong { font-size: 31px; }

  .path-strip { padding: 16px 20px; grid-template-columns: 1fr; gap: 0; }
  .path-strip p { min-height: 55px; }
  .path-strip i { display: none; }

  .recorder-section, .result-section, .archive-section, .boundary-section { padding: 76px 20px; }
  .section-heading { margin-bottom: 38px; }
  .section-heading h2, .archive-heading h2, .boundary-section h2 { font-size: 42px; }
  .section-heading > span { font-size: 14px; }
  .studio { box-shadow: 7px 8px 0 var(--ink); }
  .prompt-panel, .record-panel { padding: 30px 20px; }
  .prompt-card > span { grid-template-columns: 1fr; gap: 5px; min-height: 72px; }
  .prompt-card small { line-height: 1.4; }
  .question-ticket p { font-size: 26px; }
  .recorder-stage { min-height: 390px; }
  .record-button { min-height: 210px; }
  .record-core { width: 104px; height: 104px; }
  #recordTimer { font-size: 26px; }
  .recovery-actions { flex-direction: column; }
  .recovery-actions button { min-height: 44px; }

  .result-section { padding-bottom: 90px; }
  .book-page { min-height: 680px; padding: 44px 30px 35px; box-shadow: 8px 9px 0 var(--ink), 13px 15px 0 var(--red); }
  .book-page:before { inset: 10px; }
  .book-page:after { width: 50px; height: 50px; top: 21px; right: 20px; font-size: 12px; }
  .book-kicker { margin-top: 85px; }
  .book-page h3 { font-size: 34px; }
  .book-page blockquote { margin: 26px 0 22px; padding: 0; font-size: 14px; }
  .embedded-audio { margin-left: -8px; margin-right: -8px; padding: 13px; border-left-width: 6px; }
  .book-text { font-size: 16px; }
  .finish-panel { padding-top: 40px; }
  .primary-actions { grid-template-columns: 1fr; }
  .primary-actions button { min-height: 54px; }
  .secondary-actions { grid-template-columns: 1fr; }
  .secondary-actions button + button { border-left: 0; border-top: 1px solid var(--ink); }
  .continue-card { padding: 20px 17px; }
  .danger-zone { justify-content: space-between; }

  .archive-heading { align-items: start; flex-direction: column; }
  .archive-list { grid-template-columns: 1fr; }
  .archive-card { min-height: 210px; }
  .boundary-section { gap: 35px; }
  .footer { padding: 42px 20px; grid-template-columns: 1fr; gap: 25px; }
  .footer > p { grid-column: auto; grid-row: auto; }
  .footer-links { justify-content: flex-start; }

  .confirm-dialog form { padding: 25px 20px; }
  .confirm-dialog form > div { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 46px; }
  .hero-note strong { font-size: 27px; }
  .promise-grid { grid-template-columns: 1fr; }
  .promise-grid span { grid-template-columns: 28px 1fr; align-items: center; }
  .promise-grid span + span { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .topbar-actions { gap: 7px; }
  .network-state { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *:before, *:after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: white; }
  .topbar, .hero, .path-strip, .recorder-section, .result-heading, .finish-panel, .archive-section, .boundary-section, .footer, .grain, .toast { display: none !important; }
  .result-section { display: block !important; padding: 0; border: 0; background: white; }
  .result-grid { display: block; }
  .book-page { width: 100%; min-height: 270mm; margin: 0; padding: 25mm 20mm; border: 1px solid var(--ink); box-shadow: none; break-inside: avoid; }
  .embedded-audio:after { content: "原声保存在离线 HTML 文件中；PDF 不包含声音。"; color: white; font-size: 9pt; }
  .embedded-audio audio { display: none; }
}
