:root{font-family:"Noto Sans TC","PingFang TC","Microsoft JhengHei",system-ui,sans-serif;color:#262825;background:#f4f2ed;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button{font:inherit;cursor:pointer}button:focus-visible{outline:3px solid #67957c;outline-offset:2px}button:disabled{cursor:not-allowed;opacity:.48}#app{min-height:100vh}.bar{height:63px;background:#faf9f5;border-bottom:1px solid #deded7;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(18px,4vw,50px);gap:20px}.mark{display:flex;gap:13px;align-items:baseline;white-space:nowrap}.mark strong{font-size:18px;letter-spacing:1px}.mark span{color:#82817b;font-size:12px}.bar-actions{display:flex;gap:5px}.bar-actions button,.control-buttons button,.sheet-head button,.end-actions button:not(.primary){border:0;background:transparent;border-radius:7px;padding:9px 12px;color:#40433f}.bar-actions button:hover,.control-buttons button:hover,.sheet-head button:hover,.end-actions button:hover{background:#edede7}.layout{max-width:1370px;margin:auto;display:grid;grid-template-columns:275px minmax(0,780px);align-items:start;gap:clamp(18px,4vw,60px);padding:32px clamp(15px,4vw,50px)}.side{position:sticky;top:28px;display:flex;flex-direction:column;gap:24px;padding-right:28px;border-right:1px solid #dadbd2;min-height:70vh}.minor{color:#7e827d;font-weight:600;letter-spacing:1.6px;font-size:11px;text-transform:uppercase;margin:0}.side-head h2{margin:7px 0 4px;font-size:24px;font-weight:600}.side-head p:last-child{color:#666c67;font-size:13px;margin:4px 0}.stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.stat{border:1px solid #e1e2db;background:#faf9f5;border-radius:9px;padding:12px;display:flex;flex-direction:column;gap:7px}.stat span,.side-meta span,.actor span{font-size:12px;color:#7d807b}.stat strong{font-size:21px;font-weight:550;font-variant-numeric:tabular-nums}.side-meta{display:grid;gap:12px}.side-meta p{margin:0;display:flex;justify-content:space-between;gap:10px;font-size:13px}.side-meta b{font-weight:500}.actor{border-top:1px solid #dfe0d9;padding-top:14px;display:grid;gap:5px}.actor b{font-size:15px;font-weight:600}.actor small{font-size:12px;line-height:1.7;color:#767b75}.reader{background:#fff;border:1px solid #e0e2db;min-height:calc(100vh - 132px);border-radius:11px;box-shadow:0 2px 10px #292d2510;display:flex;flex-direction:column;overflow:hidden}.reader-header{display:flex;align-items:center;justify-content:space-between;gap:15px;border-bottom:1px solid #edf0ea;padding:24px clamp(20px,3vw,35px) 21px}.reader-header h1{font-size:25px;line-height:1.2;letter-spacing:.3px;margin:7px 0 0;font-weight:600}.controls{display:flex;align-items:center;gap:16px}.control-buttons{display:flex;align-items:center;border:1px solid #dde3da;border-radius:8px;overflow:hidden}.control-buttons button{min-width:53px;border-radius:0;padding:10px 10px;font-size:12px}.control-buttons button+button{border-left:1px solid #dde3da}.live-state{font-size:12px;color:#686e67;white-space:nowrap;display:flex;align-items:center;gap:7px}.live-dot{height:7px;width:7px;border-radius:50%;background:#569f71;display:inline-block}.live-dot.stopped{background:#c8a365}.chronicle{height:min(68vh,780px);min-height:365px;overflow-y:auto;overscroll-behavior:contain;padding:12px clamp(16px,3vw,35px) 24px;scrollbar-color:#d0d5cb transparent}.entry{display:grid;grid-template-columns:84px minmax(0,1fr);gap:17px;padding:17px 0;border-bottom:1px solid #eef0eb}.entry-side{font-size:11px;color:#a0a49d;padding-top:4px;white-space:nowrap}.entry-main{min-width:0}.entry h3{margin:0 0 7px;font-size:15px;font-weight:600}.entry p{margin:0;line-height:1.85;font-size:14px;white-space:pre-wrap;color:#414640;overflow-wrap:anywhere}.entry.decision .entry-main{padding-left:11px;border-left:2px solid #bccabf}.entry.decision p{color:#687269;font-size:13px}.entry.result .entry-main{padding-left:11px;border-left:2px solid #e3e9de}.entry.result h3,.entry.transaction h3,.entry.system h3{color:#697b67;font-size:12px}.entry.system .entry-main p,.entry.campfire .entry-main p{color:#798078;font-size:13px}.entry.ending h3{font-size:17px}.deltas{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}.delta{font-size:12px;border-radius:5px;padding:4px 8px;background:#eef3ed;color:#3e7351;font-variant-numeric:tabular-nums}.delta.minus{background:#f6efeb;color:#9a5d42}.decision{background:#f8f9f6;border-top:1px solid #dce2d9;padding:19px clamp(16px,3vw,35px) 21px}.decision-heading{display:flex;align-items:center;justify-content:space-between;font-size:13px;font-weight:650;margin-bottom:10px}.decision-heading span{font-size:11px;color:#8d947f;font-weight:400}.options{display:grid;gap:8px}.options button{width:100%;text-align:left;background:#fff;border:1px solid #d8dfd5;border-radius:7px;padding:12px 14px;display:flex;align-items:center;justify-content:space-between;gap:15px;font-size:14px;transition:border-color .15s,background .15s}.options button:hover:not(:disabled){background:#f1f6f0;border-color:#8ca794}.options button small{color:#767e76;text-align:right;font-size:11px}.reader-footer{height:31px;color:#a1a59e;text-align:right;font-size:11px;padding:7px 25px}.landing{max-width:540px;min-height:90vh;margin:auto;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:30px 25px}.landing-brand{font-size:16px;font-weight:700;margin-bottom:32px}.landing-brand span{font-weight:400;font-size:12px;color:#878d86;margin-left:9px}.landing h1{font-size:40px;font-weight:600;margin:0 0 12px}.landing p{line-height:1.8;color:#697067;margin:0 0 26px}.primary{background:#345b49;color:white;border:1px solid #345b49;border-radius:7px;padding:12px 20px}.primary:hover:not(:disabled){background:#264735}.landing small{display:block;color:#91988e;margin-top:20px;line-height:1.8;font-size:12px}.end{max-width:650px;margin:75px auto;padding:22px}.end h1{font-size:40px;margin:7px 0}.end p{color:#59625b;line-height:1.8}.end-notes{border-top:1px solid #dcdfda;border-bottom:1px solid #dcdfda;padding:20px 0;margin:27px 0}.end-notes p{margin:10px 0}.end-actions{display:flex;gap:13px;align-items:center}.overlay{position:fixed;inset:0;background:#20261f66;display:flex;align-items:center;justify-content:flex-end;z-index:30}.sheet{height:100%;width:min(450px,95vw);background:#fdfcf9;box-shadow:-10px 0 30px #0002;padding:25px;overflow:auto}.sheet-head{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e3e4dd;padding-bottom:20px}.sheet h2{font-size:21px;margin:0}.detail{display:grid;gap:12px;padding-top:25px}.detail p{margin:0;line-height:1.8;color:#59645d}.journal{display:grid;gap:22px;padding:20px 0}.journal>div{border-bottom:1px solid #e7ebe4;padding-bottom:16px}.journal small{color:#868e85}.journal p{line-height:1.8;font-size:13px}.toast,.error{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);z-index:40;background:#2f5940;color:white;padding:13px 19px;border-radius:8px;max-width:95vw;box-shadow:0 5px 20px #0003;font-size:13px}.error{background:#8c3c3c}
@media(max-width:940px){.layout{gap:18px;grid-template-columns:200px minmax(0,1fr)}.side{padding-right:16px}.controls{gap:7px}.reader-header{flex-wrap:wrap}}@media(max-width:700px){.bar{height:auto;min-height:58px;padding:12px 17px;flex-wrap:wrap}.bar-actions{width:100%;justify-content:space-between}.bar-actions button{padding:8px 12px}.layout{padding:13px;display:flex;flex-direction:column;gap:12px}.side{position:static;width:100%;min-height:auto;border-right:0;padding:0;gap:12px}.side-head{display:flex;gap:12px;align-items:baseline}.side-head h2{font-size:18px;margin:0}.side-head p:last-child{display:none}.stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.stat{padding:8px;gap:3px}.stat span{font-size:10px}.stat strong{font-size:17px}.side-meta,.actor{display:none}.reader{width:100%;min-height:calc(100vh - 242px)}.reader-header{padding:15px 16px;gap:10px}.reader-header h1{font-size:20px}.chronicle{height:calc(100vh - 418px);min-height:290px;padding:9px 14px}.entry{grid-template-columns:57px minmax(0,1fr);gap:12px;padding:14px 0}.entry-side{font-size:10px;white-space:normal}.entry p{font-size:14px;line-height:1.7}.decision{padding:14px}.reader-footer{display:none}.live-state{font-size:11px}.landing h1{font-size:32px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important}}

.camp-interaction{padding:12px 22px;border-top:1px solid #e2e5dd;background:#f9faf6}.camp-interaction button{border:1px solid #a9b9a6;border-radius:6px;padding:9px 16px;background:#fff;color:#304d3f;font-size:13px}.camp-interaction button:hover:not(:disabled){background:#eff5eb}

/* Alpha 0.3 interaction polish: centered reading dialogs and low-cost entry motion. */
.mark span,.landing-brand span{display:none}
.overlay{justify-content:center;align-items:center;padding:24px;background:#1f2925a1;backdrop-filter:none}
.sheet{height:auto;max-height:min(84dvh,820px);width:min(630px,calc(100vw - 36px));border-radius:14px;padding:0;background:#fdfcf9;box-shadow:0 22px 75px #0b181c42;overscroll-behavior:contain}
.sheet:focus{outline:0}
.sheet-head{padding:23px clamp(22px,4vw,42px) 19px;position:sticky;top:0;background:#fdfcf9;z-index:2}
.sheet h2{font-size:23px;letter-spacing:.03em}
.sheet-body{padding:2px clamp(22px,4vw,42px) 32px;margin:0 auto;max-width:68ch;font-size:15px;line-height:1.95}
.detail{gap:18px;padding-top:22px}.detail p{font-size:15px;line-height:1.95}.detail-person{padding-bottom:14px;border-bottom:1px solid #e5e9e2}.detail-person strong{font-size:17px}.detail-person p{margin:8px 0 0}.detail-empty{padding:24px 0;color:#5c655c}
.journal{gap:0;padding:8px 0}.journal>div{padding:18px 0}.journal p{font-size:15px;line-height:1.95;color:#414840;margin:8px 0 0}.journal small{font-size:12px}
.modal-open{overflow:hidden}
.entry-appearing{animation:entry-arrive .55s cubic-bezier(.2,.7,.3,1) both}
.entry-appearing .entry-main>p{animation:text-arrive .85s ease-out both}
@keyframes entry-arrive{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@keyframes text-arrive{0%{opacity:0}50%{opacity:.6}100%{opacity:1}}
.live-dot:not(.stopped){animation:playing-pulse 1.7s ease-in-out infinite}
@keyframes playing-pulse{50%{opacity:.4;transform:scale(.84)}}
@media(max-width:700px){.overlay{padding:12px}.sheet{width:100%;max-height:88dvh;border-radius:12px}.sheet-head{padding:18px 20px 14px}.sheet-body{padding:2px 20px 24px}.journal p{font-size:14px}}
@media(prefers-reduced-motion:reduce){.entry-appearing,.entry-appearing .entry-main>p,.live-dot:not(.stopped){animation:none!important}.overlay{backdrop-filter:none}}

/* Alpha 0.3.2: interaction-first viewport, shorter status and visible choices. */
#app{height:100dvh;min-height:0;display:flex;flex-direction:column}
.bar{flex:0 0 auto}
.layout{flex:1;min-height:0;height:auto;width:100%;max-width:1280px;grid-template-columns:215px minmax(0,1fr);gap:26px;padding:18px 24px 20px}
.side{position:static;min-height:0;overflow-y:auto;gap:14px;padding-right:18px}
.side-head h2{font-size:22px}.side-head h2 span{font-size:12px;font-weight:400;color:#7a8179;margin-left:8px}
.stats{gap:7px}.stat{padding:10px 12px;gap:4px}.stat strong{font-size:20px}
.secondary-stats{font-size:12px;color:#788076;white-space:nowrap}
.secondary-stats span{padding:0 5px;color:#bdc1b9}
.side-meta{gap:8px}.actor{padding-top:11px;gap:3px}
.reader{height:100%;min-height:0;max-height:100%;border-radius:14px;overflow:hidden}
.reader-header{flex:0 0 auto;padding:14px clamp(16px,2vw,26px);min-height:62px}
.reader-header h1{font-size:20px;margin:0;white-space:nowrap}
.chronicle{flex:1;min-height:0;height:auto;overflow-y:auto;scrollbar-gutter:stable;padding:5px clamp(14px,2vw,26px) 12px}
.entry{gap:13px;padding:12px 0;grid-template-columns:71px minmax(0,1fr)}
.entry p{line-height:1.7}
#decision-slot,#camp-slot{flex:0 0 auto;min-height:0}
.decision{max-height:min(38dvh,315px);overflow-y:auto;padding:12px clamp(14px,2vw,26px) 14px;border-top:1px solid #cddacb;box-shadow:0 -5px 16px #e0e6dd55}
.decision-heading{margin-bottom:7px}.options{gap:6px}
.options button{padding:10px 12px;min-height:39px}
.camp-interaction{padding:10px 20px}
.sheet{overflow:hidden;display:flex;flex-direction:column;max-height:min(84dvh,820px);border-radius:14px}
.sheet-head{flex:0 0 auto;position:relative}
.sheet-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;width:100%;max-width:none;padding-left:clamp(22px,4vw,42px);padding-right:clamp(22px,4vw,42px)}
.sheet-body>*{max-width:66ch;margin-left:auto;margin-right:auto}
.restart-detail{gap:11px}.restart-detail button{text-align:left;border:1px solid #d5dbd3;border-radius:9px;padding:12px 16px;background:white;color:#303c32;display:grid;gap:4px}
.restart-detail button.primary{background:#345b49;color:white;border-color:#345b49}
.restart-detail button span{font-size:12px;opacity:.75}
.end{flex:1;min-height:0;overflow-y:auto;width:min(100%,760px);margin:18px auto;padding:28px}
.end-actions{flex-wrap:wrap}.end-actions button{white-space:nowrap}
@media(max-width:940px){.layout{grid-template-columns:175px minmax(0,1fr);gap:15px;padding:13px}.side{padding-right:11px}}
@media(max-width:700px){
 .bar{min-height:56px;padding:9px 12px;flex-wrap:nowrap;gap:5px}
 .mark strong{font-size:14px}.bar-actions{width:auto;flex:1;gap:0;justify-content:flex-end}
 .bar-actions button{font-size:12px;padding:8px 6px;white-space:nowrap}
 .layout{padding:8px;display:flex;flex-direction:column;gap:7px}
 .side{overflow:visible;display:flex;flex-direction:row;align-items:center;gap:9px;flex:0 0 auto;padding:0;width:100%}
 .side-head{flex:0 0 auto;display:block}.side-head .minor{display:none}
 .side-head h2{font-size:16px;margin:0}.side-head h2 span{margin-left:3px;font-size:11px}
 .side .stats{flex:1;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
 .stat{padding:6px 8px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:5px}
 .stat strong{font-size:16px}.stat span{font-size:10px}
 .side .secondary-stats,.side-meta,.actor{display:none}
 .reader{flex:1;min-height:0;height:auto;width:100%;max-height:none}
 .reader-header{min-height:49px;gap:7px;padding:9px 12px;flex-wrap:nowrap}
 .reader-header h1{font-size:17px}
 .live-state{font-size:10px}.controls{gap:7px}.control-buttons button{min-width:38px;padding:7px;font-size:11px}
 .chronicle{height:auto;min-height:0;flex:1;padding:5px 11px 10px}
 .entry{padding:9px 0;gap:8px;grid-template-columns:49px minmax(0,1fr)}
 .entry p{line-height:1.6;font-size:13px}.entry h3{font-size:14px}
 .decision{padding:10px 11px;max-height:38dvh}.decision-heading{margin-bottom:7px}
 .options button{padding:10px;min-height:40px}
 .sheet{border-radius:13px;max-height:82dvh}
 .sheet-body{padding:2px 20px 20px}
 .end{margin:0 auto;padding:20px}
}
/* During decisions, keep the narrative and choices together instead of separated by a large empty pane. */
.reader:has(.decision){height:auto;min-height:0;max-height:calc(100dvh - 110px);align-self:start}
.reader:has(.decision) .chronicle{flex:0 1 auto;height:clamp(210px,34dvh,310px);min-height:0;overflow-y:auto}
@media(max-width:700px){
 .reader:has(.decision){flex:0 1 auto;max-height:calc(100dvh - 125px);align-self:stretch}
 .reader:has(.decision) .chronicle{flex:0 1 auto;height:clamp(170px,33dvh,280px);min-height:0}
}