:root {
  --ink: #202a31;
  --slate: #536470;
  --paper: #f4efe6;
  --cream: #fffdf8;
  --clay: #b96752;
  --gold: #d5a66f;
  --line: rgba(35, 43, 48, .14);
  font-family: "Noto Sans SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: radial-gradient(circle at 86% 5%, #f9e5c9 0, transparent 22rem), var(--paper); }
button { font: inherit; }
.hidden { display: none !important; }
.app-shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 18px 0 56px; }

.topbar { position: relative; z-index: 2; min-height: 46px; display: flex; align-items: center; justify-content: space-between; }
.brand { color: var(--ink); text-decoration: none; display: grid; gap: 1px; font-family: "Noto Serif SC", serif; font-size: 16px; font-weight: 700; letter-spacing: .03em; }
.brand i { color: var(--slate); font-family: "Noto Sans SC", sans-serif; font-size: 10px; font-style: normal; letter-spacing: .12em; }
.text-button, .skip-button { border: 0; background: transparent; color: var(--slate); cursor: pointer; font-size: 13px; }
.text-button:hover, .skip-button:hover { color: var(--clay); }

.cover { position: relative; min-height: min(760px, calc(100vh - 82px)); overflow: hidden; border-radius: 22px; background: #26323a; box-shadow: 0 24px 60px rgba(49, 49, 43, .18); }
.cover-art, .cover-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover-art img { object-fit: cover; object-position: center; transform: scale(1.018); animation: slow-zoom 15s ease-out both; }
.cover-veil { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,29,34,.83) 0%, rgba(23,30,34,.55) 40%, rgba(23,30,34,.07) 79%), linear-gradient(0deg, rgba(18,25,29,.43), transparent 48%); }
.cover-copy { position: relative; z-index: 1; max-width: 590px; padding: clamp(110px, 21vh, 210px) clamp(30px, 7vw, 84px) 52px; color: #fff; animation: appear .7s .14s both; }
.kicker { margin: 0 0 13px; color: #b8c4c9; font-size: 12px; font-weight: 700; letter-spacing: .16em; }
.cover h1, .ending h2 { margin: 0; font-family: "Noto Serif SC", serif; font-size: clamp(55px, 9vw, 90px); line-height: 1.12; letter-spacing: .11em; }
.logline { max-width: 400px; margin: 25px 0 32px; color: rgba(255,255,255,.86); font-size: clamp(15px, 2vw, 18px); line-height: 1.9; }
.quiet-note { margin: 16px 4px 0; color: rgba(255,255,255,.58); font-size: 12px; }
.primary-button { min-height: 48px; padding: 12px 20px 12px 23px; border: 0; border-radius: 4px; background: #fff8ea; color: #26333b; cursor: pointer; font-weight: 700; letter-spacing: .03em; box-shadow: 0 8px 20px rgba(0,0,0,.16); transition: transform .18s ease, background .18s ease; }
.primary-button span { display: inline-block; margin-left: 16px; font-size: 19px; line-height: 10px; vertical-align: -1px; transition: transform .18s ease; }
.primary-button:hover { transform: translateY(-2px); background: #fff; }.primary-button:hover span { transform: translateX(3px); }

.story { max-width: 1000px; margin: 26px auto 0; animation: appear .35s both; }
.progress-row { display: grid; grid-template-columns: 55px 1fr auto; align-items: center; gap: 12px; margin: 0 4px 14px; color: var(--slate); font-size: 12px; }.route-actions { display: flex; gap: 12px; }.skip-button:disabled { opacity: .35; cursor: default; }
.progress-row p { margin: 0; font-family: "Noto Serif SC", serif; letter-spacing: .06em; }.progress-track { height: 2px; overflow: hidden; background: #d8d2c6; }.progress-track i { display: block; width: 16%; height: 100%; background: var(--clay); transition: width .5s ease; }
.comic-frame { position: relative; min-height: min(62vw, 626px); overflow: hidden; border-radius: 16px; background: #d9d4c9; box-shadow: 0 18px 40px rgba(53, 51, 44, .15); }
.frame-art { width: 100%; height: 100%; min-height: inherit; display: block; object-fit: cover; opacity: 0; transform: scale(1.025); transition: opacity .45s ease, transform 1.2s ease; }.frame-art.ready { opacity: 1; transform: scale(1); }
.frame-grade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(19,28,33,.5), transparent 43%); pointer-events: none; transition: background .4s ease; }.comic-frame[data-tone="night"] .frame-grade { background: linear-gradient(0deg, rgba(9,18,31,.76), rgba(10,22,38,.09) 68%); }.comic-frame[data-tone="light"] .frame-grade { background: linear-gradient(0deg, rgba(35,40,43,.43), transparent 55%); }
.scene-time { position: absolute; top: 20px; left: 22px; margin: 0; color: rgba(255,255,255,.84); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-shadow: 0 1px 4px rgba(0,0,0,.35); }
.frame-caption { position: absolute; right: 24px; bottom: 23px; left: 24px; color: #fff; font-family: "Noto Serif SC", serif; font-size: clamp(20px, 3vw, 29px); font-weight: 600; line-height: 1.55; text-shadow: 0 2px 9px rgba(0,0,0,.32); }
.action-overlay { position: absolute; z-index: 2; top: clamp(40px, 8vw, 88px); right: clamp(18px, 5vw, 64px); width: min(42%, 420px); max-height: 68%; overflow: auto; padding: 16px; border: 1px solid rgba(255,255,255,.54); border-radius: 14px; background: rgba(247,250,249,.93); box-shadow: 0 18px 42px rgba(16,27,32,.23); color: var(--ink); animation: appear .32s both; }
.chat-head { display: flex; align-items: center; gap: 9px; padding-bottom: 11px; border-bottom: 1px solid #dce2df; color: #44545c; font-size: 13px; font-weight: 700; }.chat-avatar { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: #c97761; color: #fff; font-size: 11px; }.chat-date { margin: 11px 0 8px; color: #99a4a4; font-size: 10px; text-align: center; }.chat-bubble { width: fit-content; max-width: 90%; margin: 8px 0; padding: 9px 11px; border-radius: 9px; background: #fff; font-size: 12px; line-height: 1.62; }.chat-bubble.mine { margin-left: auto; background: #d8ebe2; }.chat-status { margin: 9px 2px 0; color: #9aa4a3; font-size: 10px; text-align: right; }

.script-panel { position: relative; margin: -1px 18px 0; padding: 24px 30px 28px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; background: var(--cream); box-shadow: 0 9px 22px rgba(53, 51, 44, .07); }
.speaker-line { display: flex; align-items: center; gap: 8px; color: var(--clay); font-size: 13px; font-weight: 700; }.speaker-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.story-line { max-width: 770px; margin: 10px 0 0; font-size: clamp(16px, 2.1vw, 18px); line-height: 1.95; white-space: pre-line; }
.advance-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 21px; }.advance-row .primary-button { background: var(--ink); color: #fff; box-shadow: none; }.advance-row .primary-button:hover { background: #3a4a54; }.back-choice { border: 0; background: transparent; color: var(--slate); cursor: pointer; font-size: 13px; }.back-choice:hover { color: var(--clay); }
.decision { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }.decision::before { content: "如果是你，会怎么做？"; grid-column: 1 / -1; color: var(--slate); font-size: 13px; }
.choice { min-height: 140px; padding: 18px 16px; border: 1px solid #d9d0c3; border-radius: 8px; background: #fffdf8; color: var(--ink); text-align: left; cursor: pointer; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }.choice:hover { border-color: var(--clay); transform: translateY(-3px); box-shadow: 0 10px 18px rgba(115,70,54,.13); }.choice b { display: block; margin-bottom: 9px; color: var(--clay); font-size: 14px; }.choice span { display: block; color: var(--slate); font-size: 12px; line-height: 1.65; }
.reflection { max-width: 760px; margin: 18px auto 0; padding: 17px 22px; border-left: 3px solid var(--gold); background: rgba(255,250,241,.75); color: var(--slate); animation: appear .4s both; }.reflection .kicker { margin-bottom: 5px; color: #9a7249; font-size: 10px; }.reflection p:last-child { margin: 0; font-size: 14px; line-height: 1.75; }

.ending { position: relative; min-height: min(740px, calc(100vh - 82px)); overflow: hidden; margin-top: 22px; border-radius: 19px; background: #29383b; color: #fff; box-shadow: 0 24px 60px rgba(49, 49, 43, .18); animation: appear .5s both; }.ending-art, .ending-art img { position: absolute; inset: 0; width: 100%; height: 100%; }.ending-art img { object-fit: cover; }.ending::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(19,29,33,.83), rgba(19,29,33,.57) 43%, rgba(19,29,33,.08)); }.ending-copy { position: relative; z-index: 1; max-width: 620px; padding: clamp(100px, 19vh, 190px) clamp(30px, 7vw, 82px) 44px; }.ending h2 { font-size: clamp(38px, 6vw, 63px); }.ending-copy > p:not(.kicker) { max-width: 490px; margin: 23px 0; color: rgba(255,255,255,.88); line-height: 1.95; }.experience-card { width: min(100%, 420px); margin: 25px 0 28px; padding: 14px 17px; border: 1px solid rgba(255,255,255,.29); border-radius: 6px; background: rgba(255,255,255,.1); }.experience-card span { display: block; color: #c6d0d1; font-size: 11px; letter-spacing: .12em; }.experience-card strong { display: block; margin-top: 5px; color: #fff3dd; font-family: "Noto Serif SC", serif; font-size: 18px; font-weight: 600; }

@keyframes appear { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slow-zoom { from { transform: scale(1.06); } to { transform: scale(1.018); } }
@media (max-width: 700px) { .app-shell { width: min(100% - 20px, 650px); padding-top: 9px; }.cover { min-height: calc(100vh - 65px); border-radius: 14px; }.cover-veil { background: linear-gradient(0deg, rgba(19,28,34,.82), rgba(19,28,34,.04) 85%); }.cover-copy { padding: 0 24px 48px; position: absolute; bottom: 0; }.cover h1 { font-size: 58px; }.story { margin-top: 18px; }.comic-frame { min-height: 500px; border-radius: 12px; }.frame-art { object-position: center; }.frame-caption { right: 18px; bottom: 18px; left: 18px; font-size: 20px; }.scene-time { top: 15px; left: 16px; }.action-overlay { top: 49px; right: 12px; width: min(77%, 350px); max-height: 57%; padding: 12px; }.script-panel { margin: -1px 8px 0; padding: 20px 18px 22px; }.story-line { font-size: 16px; }.decision { grid-template-columns: 1fr; }.choice { min-height: 0; padding: 15px; }.ending { min-height: calc(100vh - 65px); border-radius: 14px; }.ending::after { background: linear-gradient(0deg, rgba(19,29,33,.9), rgba(19,29,33,.13) 95%); }.ending-copy { position: absolute; bottom: 0; padding: 0 26px 44px; }.ending h2 { font-size: 43px; }.ending-copy > p:not(.kicker) { margin: 16px 0; }.experience-card { margin: 18px 0 20px; }.progress-row { grid-template-columns: 42px 1fr auto; gap: 7px; }.route-actions { gap: 7px; }.route-actions .skip-button { font-size: 11px; } }
