:root { color-scheme: light; --accent: #FF8A3D; --ink: #382c25; --muted: #857365; --paper: #fffaf1; }
* { box-sizing: border-box; }
html { min-height: 100%; background: #f4eadb; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:focus-visible { outline: 3px solid #a84c16; outline-offset: 4px; }
.game { width: 100%; max-width: 560px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; background: var(--paper); }
.story-sheet { padding: max(26px, env(safe-area-inset-top)) 22px max(30px, env(safe-area-inset-bottom)); }
.eyebrow { margin: 0 0 15px; font-size: 12px; font-weight: 600; color: #a65a29; letter-spacing: .18em; }
h1 { margin: 0 0 15px; font-size: 32px; line-height: 1.4; letter-spacing: .09em; font-family: "Songti SC", "Noto Serif CJK SC", SimSun, serif; }
.intro { color: var(--muted); font-size: 14px; line-height: 1.9; margin: 0 0 25px; }
.selection { min-width: 0; border: 0; margin: 0 0 22px; padding: 0; }
legend { padding: 0; margin-bottom: 11px; font-size: 16px; font-weight: 650; }
.select-card { display: block; width: 100%; text-align: left; padding: 15px 17px; margin: 0 0 10px; border: 1px solid #e5d7c5; border-radius: 13px; background: #fffdf8; color: var(--ink); }
.select-card strong { display: block; font-size: 16px; line-height: 1.5; }
.select-card span { display: block; margin-top: 5px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.select-card.selected { border: 2px solid var(--accent); padding: 14px 16px; background: #fff0df; }
.select-card.selected strong { color: #a34d16; }
.primary { min-height: 54px; width: 100%; border: 0; border-radius: 13px; background: var(--accent); color: #3d230f; font-size: 16px; font-weight: 700; padding: 15px 18px; }
.primary:disabled { background: #e9dfd1; color: #998d80; cursor: default; }
.footnote { text-align: center; font-size: 12px; line-height: 1.8; color: var(--muted); margin: 13px 0 0; }
.identity { display: inline-block; margin: 0 0 22px; padding: 7px 12px; border-radius: 8px; color: #8a5b3a; background: #f7ead8; font-size: 12px; }
.prose { border-top: 1px solid #eadfcf; padding-top: 10px; }
.prose p { font-size: 17px; line-height: 2.05; margin: 16px 0 22px; text-align: justify; overflow-wrap: anywhere; }
.choices { margin-top: 30px; }
.choice-label { margin: 0 0 13px; color: var(--muted); font-size: 13px; }
.choice { display: block; width: 100%; min-height: 58px; margin-bottom: 12px; padding: 15px 17px; text-align: left; line-height: 1.7; border: 1px solid #e6c6a6; border-left: 4px solid var(--accent); border-radius: 11px; color: #694323; background: #fff1df; font-size: 15px; }
.choice:active, .select-card:active { background: #ffe3c5; }
.ending-note { margin: 32px 0 22px; padding-top: 22px; border-top: 1px solid #eadfcf; font-size: 13px; line-height: 1.9; color: var(--muted); }
@media (min-width: 560px) { .story-sheet { padding: 38px 34px; } }
@media (max-width: 350px) { .story-sheet { padding-left: 16px; padding-right: 16px; } h1 { font-size: 28px; } }

/* 补全入口脚本渲染节点的布局与选择反馈。 */
#main-screen #game { min-height: 0; padding: 22px 22px max(30px, env(safe-area-inset-bottom)); }
#game h2 { margin: 0 0 16px; font-size: 20px; line-height: 1.5; }
#game p { font-size: 16px; line-height: 1.95; overflow-wrap: anywhere; }
.selection-group { margin-bottom: 24px; }
.option strong, .option small { display: block; }
.option small { margin-top: 6px; font-size: 13px; font-weight: 400; color: var(--muted); }
.option.selected { border-color: var(--accent); background: #ffe3c5; box-shadow: inset 0 0 0 1px var(--accent); }
.muted { color: var(--muted); }
.choices > .primary { margin-bottom: 12px; }
.choices > small { display: block; margin: 0 0 16px; line-height: 1.7; }
