:root {
  color-scheme: light;
  --paper: #f5f0e6;
  --ink: #354a50;
  --muted: #92948b;
  --line: #dfdacf;
  --teal: #527b7c;
  --cream: #fffdf7;
  --rose: #d39c8d;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; line-height: 1.6; }
button, select, textarea { font: inherit; }
button, a, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .48; }
button:focus-visible, a:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #3c6d72; outline-offset: 4px; }
a { color: inherit; }
.page-shell { max-width: 1264px; margin: auto; padding: 0 36px; }
.site-header { min-height: 87px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.home-link { min-height: 44px; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 12px; font-weight: 650; }
.home-link > span { font-size: 23px; }
.wordmark { display: flex; align-items: center; gap: 9px; font-weight: 750; font-size: 15px; letter-spacing: .04em; }
.fold-mark { width: 19px; height: 23px; border: 1.8px solid #78999a; background: #dae5dd; border-radius: 3px; transform: rotate(-8deg); position: relative; }
.fold-mark::after { content: ''; position: absolute; right: -1px; top: -1px; width: 7px; height: 7px; background: var(--paper); border-left: 1px solid #78999a; border-bottom: 1px solid #78999a; }
.header-note { color: #9ba095; font-size: 11px; letter-spacing: .14em; }
main { max-width: 1104px; margin: auto; }
.hero { padding: 35px 0 30px; display: flex; justify-content: space-between; align-items: center; gap: 25px; }
.eyebrow { color: #82938a; letter-spacing: .1em; font-size: 10px; font-weight: 600; margin: 0 0 12px; }
.eyebrow > span { color: var(--rose); font-size: 17px; margin-right: 7px; }
h1 { margin: 0; font-size: clamp(30px, 3.7vw, 45px); letter-spacing: -.055em; line-height: 1.4; font-weight: 800; }
h1 > span { color: #638284; }
.intro { font-size: 12px; color: #92968b; line-height: 1.9; margin: 13px 0 0; }
.mobile-break { display: none; }
.hero-stamp { transform: rotate(6deg); width: 143px; height: 90px; border: 1px solid #d3d3c5; border-radius: 9px; padding: 14px 18px; display: flex; align-items: center; gap: 12px; color: #96a18e; }
.hero-stamp span { font-size: 9px; letter-spacing: .12em; line-height: 1.8; }
.hero-stamp i { font-size: 34px; font-style: normal; color: #b1bba2; }
.notice { background: #fff1d6; border: 1px solid #e6cf9f; border-radius: 12px; color: #7b6237; font-size: 12px; padding: 12px 16px; margin-bottom: 13px; }
.story-layout { display: grid; grid-template-columns: minmax(0, 1fr) 284px; gap: 27px; align-items: start; }
.paper-card { min-width: 0; background: var(--cream); border: 1px solid #dedbd1; border-radius: 6px 25px 25px 25px; padding: 24px 30px 18px; position: relative; box-shadow: 0 13px 25px #7e7d6b08, -5px 5px 0 #e5e2d7; }
.paper-card::before { content: ''; position: absolute; right: 0; top: 0; width: 24px; height: 24px; border-radius: 0 24px 0 5px; background: linear-gradient(225deg, var(--paper) 50%, #e9e5d9 51%); }
.paper-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-bottom: 1px solid #ebe7dd; padding-bottom: 18px; }
.phase-label { background: #e9efe7; border-radius: 18px; padding: 5px 11px; color: #7e9785; font-size: 10px; font-weight: 600; }
.paper-number { color: #a3a58f; font-size: 10px; }
.stage { min-height: 390px; padding: 28px 0 12px; }
.loading { margin: 70px 0; text-align: center; color: #a1a88f; font-size: 13px; }
.view-title { margin: 0 0 9px; font-size: 27px; line-height: 1.5; letter-spacing: -.035em; }
.view-intro { margin: 0 0 23px; font-size: 12px; color: #929889; line-height: 1.9; }
.section-kicker { font-size: 9px; letter-spacing: .12em; color: #a5a48e; margin: 0 0 8px; }
.opening-card { background: #f3e9dc; border: 1px solid #e8d7c2; border-radius: 13px; padding: 19px 22px; position: relative; }
.opening-card::before { content: '“'; position: absolute; color: #ddc9b3; font: 55px Georgia, serif; top: -6px; left: 11px; }
.opening-caption { color: #b09b82; font-size: 9px; margin: 0 0 10px; letter-spacing: .08em; }
.opening-text { margin: 0; font-size: 17px; color: #776550; line-height: 1.9; overflow-wrap: anywhere; position: relative; }
.setup-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 23px 0 18px; }
.field label { display: block; color: #89927f; font-size: 11px; margin-bottom: 7px; }
.field select { display: block; width: 100%; min-height: 46px; padding: 9px 12px; background: #faf9f1; border: 1px solid #dfdfd2; border-radius: 9px; color: #66766a; font-size: 13px; }
.primary-button { display: block; min-height: 48px; width: 100%; border: 1px solid #527b7c; background: #527b7c; color: #fffef4; border-radius: 11px; font-size: 13px; font-weight: 650; padding: 10px 15px; box-shadow: 0 3px 0 #3e6264; }
.secondary-button { min-height: 44px; border: 1px solid #d8ded0; background: #eff2e8; color: #72816b; border-radius: 10px; font-size: 12px; padding: 10px 15px; }
.small-note { margin: 11px 0 0; color: #a5a78f; font-size: 10px; line-height: 1.8; }
.handoff-view, .ready-view { text-align: center; padding: 9px 0 10px; }
.envelope { width: 157px; height: 115px; background: #dde8df; border: 1px solid #a8bdb1; border-radius: 9px; margin: 14px auto 26px; position: relative; box-shadow: 0 8px 0 #d6ded01f; overflow: hidden; }
.envelope::before, .envelope::after { content: ''; position: absolute; height: 108px; width: 108px; border: 1px solid #b4c7b9; background: #e5ede0; transform: rotate(45deg); left: 23px; top: -66px; }
.envelope::after { top: 59px; background: #d6e2d5; }
.envelope-seal { position: absolute; z-index: 1; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; top: 39px; left: 60px; border: 1px solid #c7a796; background: #ead0bc; border-radius: 50%; color: #a9826e; font: 600 16px Georgia, serif; }
.handoff-view .view-intro, .ready-view .view-intro { max-width: 340px; margin-left: auto; margin-right: auto; }
.handoff-view .primary-button, .ready-view .primary-button { max-width: 330px; margin: auto; }
.handoff-view .small-note, .ready-view .small-note { max-width: 350px; margin: 15px auto 0; }
.turn-tag { display: inline-block; color: #809684; background: #eef1e7; border-radius: 20px; padding: 5px 11px; font-size: 10px; margin-bottom: 14px; }
.previous-card { padding: 16px 18px; border-left: 3px solid #b4c8b5; background: #f0f3e8; border-radius: 0 10px 10px 0; margin-bottom: 22px; }
.previous-label { font-size: 9px; color: #9aa58b; margin: 0 0 6px; }
.previous-text { margin: 0; color: #71806a; line-height: 1.9; font-size: 13px; overflow-wrap: anywhere; white-space: pre-wrap; }
.editor-label { display: block; font-weight: 650; font-size: 12px; margin-bottom: 9px; }
.entry-input { display: block; width: 100%; min-height: 148px; resize: vertical; border: 1px solid #deddd0; border-radius: 11px; padding: 13px 15px; background-color: #fffef8; background-image: repeating-linear-gradient(transparent 0 31px, #ece9de 31px 32px); background-position: 0 12px; line-height: 32px; font-size: 14px; color: #5b6f67; }
.entry-input[aria-invalid="true"] { border-color: #c5937d; }
.editor-meta { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin: 8px 0 16px; font-size: 10px; color: #a0a38d; }
#entry-count { white-space: nowrap; }
.entry-error { color: #af785f; font-size: 11px; line-height: 1.8; margin: 0 0 14px; }
#draft-feedback { margin: 0; }
.ready-stack { width: 150px; height: 118px; border-radius: 7px; background: #f3e7d6; border: 1px solid #d4c5ac; margin: 14px auto 25px; transform: rotate(-4deg); box-shadow: 5px 6px 0 #e9ddca, 10px 12px 0 #e0d4c0; display: flex; align-items: center; justify-content: center; color: #b59d7e; font: 28px Georgia, serif; }
.reveal-intro { color: #929b86; margin: 0 0 20px; font-size: 12px; line-height: 1.8; }
.story-opening { background: #f5eada; border-radius: 12px; padding: 18px 20px; margin-bottom: 20px; }
.story-opening .opening-caption { margin-bottom: 7px; }
.story-opening p:last-child { margin: 0; color: #82715b; font-size: 15px; line-height: 1.9; overflow-wrap: anywhere; }
.story-list { border-left: 1px solid #dfe2d4; margin-left: 8px; padding-left: 22px; }
.story-entry { position: relative; padding-bottom: 22px; }
.story-entry::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #b8c9b2; position: absolute; left: -26px; top: 8px; border: 2px solid #fffdf7; box-sizing: content-box; }
.entry-author { font-size: 9px; color: #a2a88d; margin: 0 0 7px; letter-spacing: .04em; }
.entry-text { font-size: 14px; line-height: 1.95; color: #5f746b; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.story-footer { border-top: 1px solid #e7e8dc; padding-top: 17px; margin-top: 1px; }
.story-total { font-size: 10px; color: #9ea58a; margin: 0 0 17px; }
.reveal-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
.status { color: #9a9f89; font-size: 10px; line-height: 1.8; min-height: 29px; padding-top: 13px; margin: 8px 0 0; border-top: 1px solid #efede4; }
.progress-card { padding: 22px 23px; border: 1px solid #d7dfd2; border-radius: 22px; background: #e7eddf; }
.progress-card h2 { margin: 0; font-size: 19px; letter-spacing: -.03em; }
.progress-stat { margin-top: 22px; display: flex; align-items: flex-end; gap: 14px; }
.progress-stat strong { font-size: 35px; line-height: 1; color: #678268; letter-spacing: -.04em; }
.progress-stat small { font-size: 14px; font-weight: 400; color: #a2b296; }
.progress-stat > span { font-size: 10px; color: #99a98b; padding-bottom: 3px; }
.progress-track { height: 5px; background: #d7e0cc; border-radius: 8px; margin-top: 17px; overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 0; background: #a7bba0; border-radius: 8px; }
.progress-card > p:last-child { font-size: 9px; color: #9ca88c; margin: 10px 0 0; }
.divider { margin: 0 5px; }
.guide-card { margin-top: 21px; padding: 0 3px; }
.guide-card > div { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 18px; }
.step-dot { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 25px; height: 25px; border-radius: 50%; background: #e8e8d9; color: #a0a68c; font-size: 9px; }
.guide-card p { margin: 0; }
.guide-card strong { display: block; font-size: 11px; font-weight: 650; color: #819179; }
.guide-card small { display: block; font-size: 9px; color: #a6a68f; margin-top: 4px; }
.global-actions { margin-top: 21px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.global-actions button { min-height: 44px; border: 1px solid #d9dbcc; border-radius: 9px; background: transparent; font-size: 11px; color: #829079; font-weight: 600; padding: 8px; }
.global-actions button span { font-size: 16px; margin-right: 4px; }
.global-actions .config-copy { grid-column: 1/-1; background: #eceee2; }
.share-note, .copy-status { text-align: center; color: #a6a792; font-size: 9px; line-height: 1.8; margin: 10px 0 0; }
.copy-status { color: #939e86; }
.manual-copy { padding: 11px; margin-top: 11px; border: 1px solid #dbdecf; border-radius: 10px; background: #fffdf5; }
.manual-copy label { display: block; font-size: 11px; color: #87947b; margin-bottom: 7px; }
.manual-copy textarea { display: block; width: 100%; min-width: 0; min-height: 100px; resize: vertical; padding: 9px; background: white; border: 1px solid #dfdfd2; border-radius: 6px; font-size: 11px; color: var(--ink); line-height: 1.7; }
.page-footer { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin: 29px 0 31px; color: #a5a88e; font-size: 10px; }
.page-footer p { margin: 0; }
.page-footer p:last-child { font-size: 9px; text-align: right; }
dialog { width: min(465px, calc(100% - 36px)); max-height: calc(100% - 36px); padding: 27px; border: 1px solid #d8ddcd; border-radius: 20px; background: #fffdf5; color: var(--ink); box-shadow: 0 24px 80px #3b49312b; }
dialog::backdrop { background: #394b3b66; backdrop-filter: blur(4px); }
dialog h2 { font-size: 22px; margin: 0 0 10px; }
dialog > p:not(.section-kicker) { color: #929a83; font-size: 12px; line-height: 1.9; }
.confirm-preview { padding: 12px 14px; border-radius: 9px; background: #f0f1e5; overflow-wrap: anywhere; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.dialog-actions button { min-height: 46px; border: 1px solid #d8dfca; border-radius: 9px; padding: 9px; font-size: 12px; background: #f0f2e7; }
#confirm-change { background: var(--teal); color: #fffef3; border-color: var(--teal); }
@media (hover: hover) { button:hover { filter: brightness(.98); } a:hover { color: var(--teal); } }
@media (max-width: 1100px) {
  .page-shell { padding: 0 25px; }
  .story-layout { grid-template-columns: minmax(0, 1fr) 254px; gap: 21px; }
  .paper-card { padding: 22px 24px 17px; }
  .progress-card { padding: 20px; }
}
@media (min-width: 651px) and (max-width: 920px) {
  .story-layout { grid-template-columns: minmax(0, 1fr) 225px; gap: 18px; }
  .paper-card { padding: 20px; }
  .paper-number { font-size: 9px; }
  .progress-card { padding: 18px; }
  .progress-card h2 { font-size: 17px; }
  .view-title { font-size: 24px; }
  .opening-text { font-size: 15px; }
  .stage { min-height: 380px; }
}
@media (max-width: 650px) {
  .page-shell { padding: 0 18px; }
  .site-header { min-height: 72px; gap: 10px; }
  .home-link { font-size: 11px; gap: 6px; }
  .wordmark { font-size: 13px; }
  .header-note, .hero-stamp { display: none; }
  .hero { padding: 25px 0 23px; }
  .eyebrow { font-size: 9px; letter-spacing: .04em; }
  h1 { font-size: 31px; }
  h1 span { display: block; }
  .intro { font-size: 11px; }
  .mobile-break { display: block; }
  .story-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .paper-card { padding: 19px 20px 16px; border-radius: 5px 22px 22px 22px; }
  .paper-heading { gap: 6px; padding-bottom: 15px; }
  .paper-number { font-size: 9px; }
  .phase-label { font-size: 9px; }
  .stage { min-height: 360px; padding-top: 24px; }
  .view-title { font-size: 24px; }
  .view-intro { font-size: 11px; margin-bottom: 20px; }
  .opening-card { padding: 18px; }
  .opening-text { font-size: 15px; }
  .setup-fields { gap: 12px; margin-top: 20px; }
  .field select { min-height: 47px; font-size: 12px; }
  .primary-button { min-height: 48px; font-size: 12px; }
  .small-note { font-size: 9px; }
  .status { font-size: 10px; }
  .side-panel { display: grid; grid-template-columns: 1fr; }
  .progress-card { padding: 21px; border-radius: 19px; }
  .progress-card h2 { font-size: 20px; }
  .progress-stat { margin-top: 18px; }
  .progress-stat strong { font-size: 36px; }
  .progress-card > p:last-child { font-size: 10px; }
  .guide-card { margin: 20px 1px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .guide-card > div { display: block; margin-bottom: 0; }
  .guide-card strong { font-size: 10px; margin-top: 8px; }
  .guide-card small { font-size: 9px; line-height: 1.8; }
  .global-actions { margin-top: 22px; }
  .global-actions button { min-height: 46px; font-size: 12px; }
  .share-note, .copy-status { font-size: 10px; }
  .entry-input { min-height: 160px; font-size: 14px; }
  .editor-meta { gap: 10px; }
  .previous-card { padding: 14px 15px; }
  .previous-text { font-size: 12px; }
  .story-opening { padding: 16px; }
  .story-opening p:last-child { font-size: 14px; }
  .entry-text { font-size: 13px; }
  .page-footer { display: block; font-size: 10px; margin-top: 26px; }
  .page-footer p:last-child { text-align: left; margin-top: 9px; }
  dialog { padding: 24px; }
  dialog h2 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
