:root{color-scheme:light;--paper:#f7f2e7;--ink:#293b35;--muted:#617168;--green:#315e51;--line:#d7daca;--terra:#9e533b;--serif:Georgia,'Noto Serif SC','Songti SC',SimSun,serif;font-family:'Microsoft YaHei',system-ui,sans-serif;color:var(--ink);background:var(--paper);font-size:14px}*{box-sizing:border-box}body{margin:0;height:100dvh;overflow:hidden}button,input{font:inherit}button,.file-button{min-height:44px;border:1px solid var(--line);border-radius:8px;padding:10px 13px;background:#fffcf6;color:var(--ink);cursor:pointer;transition:background .15s}button:hover,.file-button:hover{background:#e6ebdc}button:disabled{opacity:.56;cursor:not-allowed}button:focus-visible,input:focus-visible,a:focus-visible{outline:3px solid #aa6437;outline-offset:3px}.primary{background:var(--green);color:white;border-color:var(--green)}.primary:hover{background:#244c40}[hidden]{display:none!important}.topbar{height:76px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 28px;background:var(--paper);gap:16px}.brand{display:flex;gap:12px;align-items:center;color:inherit;text-decoration:none;font-family:var(--serif);font-size:22px;font-weight:700;white-space:nowrap}.brand-symbol{display:grid;place-items:center;font-size:20px;width:39px;height:39px;border:1px solid #8d9a78;transform:rotate(-4deg);border-radius:5px}.brand-year{font-size:28px;margin:0 3px}.brand small{font:10px 'Microsoft YaHei',sans-serif;display:block;letter-spacing:2px;color:var(--muted);margin-top:3px}.edition{font-size:11px;letter-spacing:3px;color:var(--muted)}.topbar button{background:transparent;border:none}.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 354px;height:calc(100dvh - 76px)}.world{position:relative;overflow:hidden;background:#dce6ce}.world:after{content:'';position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 100px #586e4a16}#scene-host{position:absolute;inset:0}#scene-host canvas{width:100%;height:100%;display:block;touch-action:pan-y}.world-heading{position:absolute;top:28px;left:30px;pointer-events:none;text-shadow:0 1px 6px #f8f7ed}.eyebrow{font-size:10px;font-weight:600;letter-spacing:2px;color:var(--muted)}h1{font:600 36px var(--serif);letter-spacing:5px;margin:7px 0}p{line-height:1.8}.world-heading p{font-size:12px;margin:0;color:#4c634a}#world-status{position:absolute;bottom:115px;left:24px;font-size:12px;max-width:calc(100% - 48px);background:#fbf8eadc;padding:7px 12px;border-radius:20px;pointer-events:none}.world-bottom{position:absolute;bottom:87px;left:26px;right:26px;display:flex;justify-content:space-between;gap:8px;font-size:10px;color:#41543d}.world-bottom span:first-child{font-weight:700;font-size:13px}#place-directory{position:absolute;left:22px;right:22px;bottom:20px;display:flex;gap:7px;justify-content:center}#place-directory button{background:#faf7e9ec;box-shadow:0 3px 12px #38482c12;flex:1;max-width:140px;font-size:12px;padding:9px 5px;border-color:#e6eadb}#place-directory button[aria-current=true]{border-color:var(--green);background:var(--green);color:white}.journal{display:flex;flex-direction:column;min-height:0;background:var(--paper);border-left:1px solid #d4dbc7;padding:23px 21px 0;z-index:2}.journal-top{display:flex;justify-content:space-between;align-items:center;font-size:11px}.date-row{display:flex;gap:8px;justify-content:space-between;align-items:center;margin:19px 0 17px;font-size:12px}.date-row strong{font-size:13px}.date-row span{color:var(--terra)}.resources{display:grid;grid-template-columns:1.65fr 1fr 1fr;gap:12px}.resources small{display:block;font-size:10px;color:var(--muted);margin-bottom:5px}.resources strong{font:600 22px var(--serif)}.resources>div+div{border-left:1px solid var(--line);padding-left:14px}#day-slots{display:flex;gap:4px;margin-top:17px}#day-slots span{flex:1;border-top:4px solid #d5dcc8;padding-top:6px;font-size:9px;color:#667660;text-align:center}#day-slots .past{border-color:#aab8a0;color:#7b8976}#day-slots .current{border-color:var(--terra);color:var(--terra);font-weight:700}.goal{font-size:11px;margin:15px 0;min-height:36px;border-left:2px solid #b78653;padding-left:10px;color:#58694f}.tabs{display:flex;border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin:0 -2px 15px;gap:0}.tabs button{flex:1;min-width:0;border:0;border-radius:0;background:transparent;padding:9px 3px;font-size:12px;color:var(--muted)}.tabs button[aria-current=page]{color:var(--green);font-weight:700;border-bottom:2px solid var(--green)}.panel-scroll{flex:1;overflow:auto;overscroll-behavior:contain;min-height:0;scrollbar-width:thin;padding-bottom:14px}.panel-scroll h2{font:600 23px var(--serif);margin:2px 0 6px}.panel-scroll h3{font-size:13px;margin:19px 0 8px}.panel-scroll p{font-size:12px;color:var(--muted);margin:6px 0 13px}.action-card{width:100%;display:flex;justify-content:space-between;align-items:center;gap:8px;text-align:left;margin:7px 0;padding:11px 12px;background:#fffcf6}.action-card span{display:block}.action-card small{display:block;font-size:10px;color:var(--muted);font-weight:400;margin-top:5px}.action-card b{font-size:12px}.action-card .arrow{font-size:17px;color:var(--green)}.npc-card,.note-card,.review-card{padding:14px 0;border-bottom:1px solid var(--line)}.npc-card strong{font-size:14px}.npc-card small{float:right;color:var(--muted);font-size:11px}.ledger-row{display:grid;grid-template-columns:1fr auto;gap:8px;border-bottom:1px solid #e0e1d4;padding:10px 0;font-size:12px}.ledger-row small{color:var(--muted);font-size:10px;display:block;margin-top:3px}.income{color:#286146;font-weight:700}.expense{color:#935237}.summary-box{padding:13px;border:1px solid var(--line);border-radius:8px;background:#ecefdf;line-height:1.9;font-size:12px}#receipt{border-top:1px solid var(--line);font-size:11px;line-height:1.6;padding:12px 0;min-height:53px;flex-shrink:0;color:#496343}#receipt.error,#system-status.error{color:#a13727}#sheet-toggle{display:none}dialog{border:1px solid #d4d6c3;background:var(--paper);color:var(--ink);border-radius:16px;width:min(500px,calc(100vw - 28px));max-height:calc(100dvh - 32px);overflow:auto;padding:28px;box-shadow:0 22px 90px #1427203d}dialog::backdrop{background:#24382e79;backdrop-filter:blur(4px)}dialog h2{font:600 25px var(--serif);margin:10px 0 15px}dialog p{font-size:13px}dialog button{margin:4px 0}.dialog-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:21px}.dialog-actions>*{flex:1}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.dialog-heading button{font-size:24px;background:transparent;border:0}#event-choices button{display:block;width:100%;text-align:left;margin:9px 0;white-space:normal}#event-choices small{display:block;font-size:11px;margin-top:5px}.cost-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.cost-grid div{background:#e9eddf;padding:12px;border-radius:6px;font-size:11px}.cost-grid strong{display:block;font-size:19px;margin:5px 0}.setting{display:flex;align-items:center;min-height:44px;gap:8px}input[type=checkbox]{width:20px;height:20px}.file-button{display:flex;align-items:center;justify-content:center;text-align:center}.file-button input{position:absolute;width:1px;height:1px;opacity:0}.file-button:focus-within{outline:3px solid #aa6437}.slot-row{display:flex;gap:8px;align-items:center;border-bottom:1px solid var(--line);padding:8px 0}.slot-row span{flex:1;font-size:12px}.welcome{position:fixed;inset:76px 0 0;z-index:5;display:grid;place-items:center;background:linear-gradient(105deg,#dce6ccd9,#fbf6e69c);backdrop-filter:blur(5px)}.welcome-card{max-width:490px;width:calc(100% - 36px);text-align:center;padding:38px 42px;background:#fbf7ebf2;border:1px solid #ffffff90;border-radius:5px;box-shadow:0 15px 70px #63735730}.welcome h2{font:600 36px var(--serif);letter-spacing:3px;margin:22px 0}.welcome h2 span{font-size:57px;display:block;font-style:italic;letter-spacing:2px;color:var(--green);margin:2px 0}.welcome p{font-size:13px;color:#5b6e56;line-height:2}.welcome label{display:block;font-size:12px;margin:28px 0 9px}.welcome input{width:100%;min-height:45px;text-align:center;border:1px solid #cdd3bc;border-radius:5px;background:#fffdf7;color:var(--ink);font-size:17px}.welcome .primary{display:block;width:100%;margin:14px 0 16px;letter-spacing:1px}.welcome small{color:var(--muted);font-size:10px}body.large-font{font-size:17px}.large-font .panel-scroll p,.large-font .action-card b,.large-font .tabs button,.large-font .ledger-row{font-size:15px}.large-font .goal,.large-font #receipt{font-size:13px}.reduced-motion *{transition:none!important;scroll-behavior:auto!important}@media(max-width:800px){.topbar{height:62px;padding:0 14px}.brand{font-size:17px;gap:9px}.brand-year{font-size:23px}.brand-symbol{width:32px;height:32px;font-size:16px}.brand small{font-size:8px;letter-spacing:1px}.edition{display:none}.topbar button{font-size:11px;padding:5px}.game-layout{height:calc(100dvh - 62px);grid-template-columns:1fr;grid-template-rows:57% 43%}.world-heading{left:18px;top:15px}.world-heading h1{font-size:26px;margin:5px 0}.world-heading p{font-size:10px}.world-heading .eyebrow{font-size:8px}#world-status{left:14px;bottom:106px;font-size:10px;padding:5px 8px}.world-bottom{left:17px;right:17px;bottom:83px}.world-bottom span:last-child{font-size:8px;max-width:150px;text-align:right}#place-directory{left:10px;right:10px;bottom:22px;gap:5px}#place-directory button{font-size:10px;min-height:44px;line-height:1.6;padding:4px 1px}.journal{padding:6px 18px 0;border-left:0;border-top:1px solid #c4cdb6;border-radius:20px 20px 0 0;margin-top:-15px;box-shadow:0 -6px 30px #31492f16}.journal-top,.goal,#day-slots{display:none}.date-row{margin:5px 0 7px;font-size:10px}.date-row strong{font-size:11px}.resources{gap:10px;margin-bottom:8px}.resources small{font-size:9px;margin-bottom:2px}.resources strong{font-size:19px}.tabs{margin-bottom:9px}.tabs button{min-height:40px;padding:5px 3px}.panel-scroll h2{font-size:20px}.panel-scroll p{font-size:11px}.action-card{padding:8px 10px}.action-card small{font-size:10px}.panel-scroll{min-height:60px}#receipt{min-height:38px;padding:7px 0;font-size:10px;max-height:52px;overflow:auto}#sheet-toggle{display:flex;align-items:center;justify-content:center;width:100%;height:15px;min-height:15px;border:0;background:transparent;padding:0}#sheet-toggle span{width:38px;height:4px;border-radius:4px;background:#bec6b0}.sheet-expanded .game-layout{grid-template-rows:20% 80%}.sheet-expanded .world-heading,.sheet-expanded #world-status,.sheet-expanded .world-bottom{display:none}.sheet-expanded #place-directory{bottom:19px}.sheet-expanded .journal-top,.sheet-expanded #day-slots{display:flex}.sheet-expanded .goal{display:block;min-height:0;margin:10px 0}.welcome{inset:62px 0 0}.welcome-card{padding:24px;max-width:390px}.welcome h2{font-size:28px;margin:12px 0}.welcome h2 span{font-size:47px}.welcome p{font-size:12px}.welcome label{margin-top:16px}dialog{padding:21px}dialog h2{font-size:23px}}@media(max-height:650px) and (max-width:800px){.game-layout{grid-template-rows:52% 48%}.world-heading p{display:none}.resources small{display:none}.resources strong{font-size:16px}.date-row{margin:2px 0 5px}.tabs button{min-height:36px}.welcome-card{padding:16px 24px}.welcome h2 span{font-size:38px}.welcome h2{margin:8px 0}.welcome p{line-height:1.65}.welcome label{margin:12px 0 6px}.welcome .primary{margin-bottom:8px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* The city directory keeps all five nearby places and two bus routes reachable. */
#place-directory button{min-width:0;overflow-wrap:anywhere}#world-status{max-width:calc(100% - 48px)}.summary-box{overflow-wrap:anywhere}.npc-card small{float:none;display:block;margin-top:5px}
@media(max-width:800px){#place-directory{flex-wrap:wrap;gap:4px}#place-directory button{flex:1 0 18%;max-width:none}#place-directory button[data-action=travel]{flex-basis:45%;min-height:44px}#world-status{bottom:156px}.world-bottom{bottom:133px}.tabs button{min-height:44px}.sheet-expanded #place-directory{display:none}.sheet-expanded .game-layout{grid-template-rows:16% 84%}#sheet-toggle{min-height:24px;height:24px}.sheet-expanded #sheet-toggle{min-height:32px;height:32px}}

/* Readable controls, stable keyboard focus, and independent sound preferences. */
.annual-history summary{min-height:44px;padding:12px 0;cursor:pointer;font-weight:700}.annual-history summary:focus-visible{outline:3px solid #aa6437;outline-offset:2px}.annual-history details{margin:12px 0}.annual-history article strong{line-height:1.6}
.audio-settings{border:1px solid var(--line);border-radius:9px;margin:18px 0;padding:12px 15px}.audio-settings legend{font-weight:700;padding:0 6px}.audio-settings label{display:flex;justify-content:space-between;gap:16px;line-height:1.6}.audio-settings output{font-variant-numeric:tabular-nums;color:var(--muted)}.audio-settings input[type=range]{width:100%;min-height:44px;margin:0 0 8px;accent-color:var(--green)}.audio-settings p{font-size:12px;color:var(--muted)}.setting{cursor:pointer}.dialog-heading button{min-width:44px}.world.fallback #scene-host{opacity:.35}.world.fallback #world-status{color:var(--ink);background:var(--paper);border:1px solid var(--line)}.welcome{overflow:auto}.welcome-card{flex-shrink:0}
#day-slots .past{color:#58634f}.world-heading .eyebrow,.world-heading p{color:#3f5640}.large-font .action-card small,.large-font .panel-scroll small,.large-font .resources small,.large-font #day-slots span,.large-font .date-row,.large-font .date-row strong,.large-font .summary-box,.large-font dialog p,.large-font dialog label,.large-font #event-choices small,.large-font #receipt{font-size:15px}.large-font .panel-scroll h3,.large-font .action-card b{font-size:17px}.large-font #place-directory button{font-size:13px}.large-font .cost-grid{grid-template-columns:1fr}.large-font .cost-grid strong{display:inline;margin-left:8px}.large-font .goal{line-height:1.7}
@media(max-width:800px){#sheet-toggle,.sheet-expanded #sheet-toggle{min-height:44px;height:44px;flex-shrink:0}#sheet-toggle:focus-visible{outline-offset:-3px}.journal{padding-left:14px;padding-right:14px}.tabs button{min-height:44px}.date-row{flex-shrink:0}.resources{flex-shrink:0}.tabs{flex-shrink:0}.large-font .resources small{font-size:12px}.large-font .date-row,.large-font .date-row strong{font-size:12px}.large-font .panel-scroll{min-height:0}.large-font .sheet-expanded .goal{display:none}.world-heading p{max-width:260px}.slot-row{flex-wrap:wrap}.slot-row span{flex-basis:100%}.dialog-actions>*{min-width:110px}.brand small{letter-spacing:0}.topbar{gap:8px}}
@media(max-width:800px) and (max-height:700px){.game-layout{grid-template-rows:47% 53%}.world-heading{top:10px}.world-heading .eyebrow{display:none}.world-heading h1{font-size:23px}.world-heading p,.world-bottom span:last-child{display:none}.resources{margin-bottom:3px}.tabs{margin-bottom:3px}.panel-scroll{min-height:0}.sheet-expanded .goal{display:none}.welcome-card{margin:12px 0}.welcome small{font-size:11px}}
