:root{font-family:"Noto Sans TC","Microsoft JhengHei",sans-serif;color:#302e27;background:#e8dec9;font-size:17px;--paper:#fff8e9;--ink:#302e27;--green:#356c61;--line:#c8baa0;--card-surface:#fff8e9;--card-ink:#302e27;--card-border:#bca778;--card-raised:#f0e8d7;--card-action:#356c61;--card-muted:#746c5d;--card-shadow:0 15px 50px #30282144}
*{box-sizing:border-box}body{margin:0;height:100dvh;overflow:hidden}button,select{font:inherit;color:inherit;border:1px solid var(--line);border-radius:7px;background:#fffbf2;padding:8px 12px;cursor:pointer}button:disabled{opacity:.45;cursor:default}button:hover:not(:disabled){background:#ece4d1}button:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid #368a80;outline-offset:2px}.primary{background:var(--green);color:white;font-weight:700;border-color:var(--green)}button.primary:hover:not(:disabled){background:#234e46}a{color:var(--green)}[hidden]{display:none!important}p{line-height:1.6}h1,h2,p{margin-top:0}.muted,small{color:#746c5d}.eyebrow{color:#91622b;font-weight:700;font-size:14px;letter-spacing:.08em}
.intro{height:100%;display:grid;place-items:center;padding:20px}.intro-card{background:var(--paper);border:1px solid var(--line);border-radius:18px;max-width:760px;width:100%;padding:30px;text-align:center}.intro h1{font-size:38px;margin:12px 0 4px}.intro h2{font-size:24px;margin-bottom:16px}.intro p{margin-bottom:14px}.intro-people{display:flex;justify-content:center;gap:22px;margin:14px 0}.intro-people .person{flex-direction:column}.intro-actions{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:18px}.setup{display:flex;gap:20px;justify-content:center}.setup label{display:grid;gap:7px}.check{display:block;margin-top:16px}.check input{width:18px;height:18px}#loadError{color:#a13530}
#app{height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr) auto}header{padding:8px 12px;background:var(--paper);border-bottom:1px solid var(--line)}.topline{display:flex;align-items:center;justify-content:space-between;gap:12px}.topline b small{font-weight:400;font-size:13px}.toolbar{display:flex;gap:6px}.toolbar button{font-size:14px;padding:6px 10px}.spotlight{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0}#destination{color:#a03330;font-weight:700;background:#fce9d7;border-color:#d69977}#halo{font-size:15px}.scoreboard{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.score{display:flex;align-items:center;justify-content:space-between;gap:8px;border-left:5px solid var(--pc);background:#f0e8d7;border-radius:7px;padding:6px 9px;min-width:0}.score.active{box-shadow:inset 0 0 0 2px var(--pc)}.score .person{min-width:0;font-size:15px}.score .portrait{width:38px;height:38px}.score strong{font-size:23px}.score small{display:block;font-size:12px}.person{display:flex;gap:8px;align-items:center}.portrait{display:inline-block;flex-shrink:0;width:50px;height:50px;overflow:hidden;border:2px solid var(--pc,#bba982);border-radius:50%;background:#fff9e9}.portrait img{width:100%;height:100%;object-fit:contain}.person-text{min-width:0}.person-text b{display:block;white-space:nowrap}.person-text small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
main{display:grid;grid-template-columns:minmax(0,1fr) 300px;min-height:0}.map-stage{position:relative;min-height:0;overflow:hidden}canvas{display:block;width:100%;height:100%;touch-action:none}.map-tools{position:absolute;top:8px;left:10px;right:10px;display:flex;gap:5px;pointer-events:none}.map-tools>*{pointer-events:auto;font-size:14px;padding:5px 8px}.map-tools select{max-width:170px;min-width:0}.map-legend{position:absolute;bottom:5px;left:8px;right:8px;text-align:center;font-size:12px;pointer-events:none;background:#f6eedcd9}aside{display:flex;flex-direction:column;min-height:0;padding:10px;background:var(--paper);border-left:1px solid var(--line)}nav{display:flex;gap:5px}nav button{flex:1;padding:7px;font-size:16px}nav button[aria-pressed=true]{background:var(--green);color:white}#backMap{display:none}#infoBody{flex:1;min-height:0;padding:14px 3px;overflow:hidden}#infoBody h2{font-size:23px;margin-bottom:10px}#infoBody p{font-size:16px;margin-bottom:8px}#infoBody .tag{display:inline-block;background:#e6ecdf;border-radius:4px;padding:3px 6px;margin:0 4px 6px 0;font-size:14px}.data-row{display:flex;justify-content:space-between;gap:8px;padding:7px 0;border-bottom:1px solid #e5dac4}.data-row b{white-space:nowrap}.pager{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto}.pager button{font-size:14px;padding:6px 8px}.log-entry{border-left:3px solid var(--pc,#bba982);padding:4px 8px;margin-bottom:13px;font-size:15px;line-height:1.55}.log-entry small{display:block}.shop-entry{margin-bottom:12px;padding:10px;background:#f0e8d7;border-radius:6px}.shop-entry button{width:100%;text-align:left}.shop-entry p{margin:6px 0 0}
footer{background:var(--paper);border-top:1px solid var(--line);padding:8px 16px}#status{font-weight:700;color:var(--green);font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:7px}.action-dock{display:flex;align-items:center;gap:20px}#actor{min-width:150px}.wallet{display:grid;grid-template-columns:auto auto;gap:0 10px;align-items:center}.wallet strong{font-size:26px}.wallet #effects{grid-column:1/-1;font-size:13px;color:#994132}.actions{display:flex;gap:8px;margin-left:auto}.actions button{min-height:44px;font-weight:700}.decision-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}#timer{font-size:14px;color:#9c4033;white-space:nowrap}#decisionDetail{margin:3px 0 6px;font-size:15px}.choices{display:flex;flex-wrap:wrap;gap:7px}.choices button{flex:1;min-width:100px;text-align:left;font-size:16px}.choices small{display:block;font-size:12px}.step-preview{font-size:13px;color:#356c61;min-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:4px 0}#decision{border-bottom:1px solid var(--line);padding-bottom:5px;margin-bottom:7px}
#eventLayer{position:fixed;inset:0;z-index:50;background:#342a2066;display:grid;place-items:center;padding:20px}.event-card{background:var(--paper);border:2px solid #c6a763;border-radius:18px;padding:22px;max-width:650px;width:100%;max-height:90dvh;text-align:center}.event-card h2{font-size:25px;line-height:1.5;margin:10px 0 16px}.event-people{display:flex;justify-content:center;gap:15px;margin-bottom:10px}.event-people .person{flex-direction:column}.event-card button{margin-top:16px}.event-card .data-row{align-items:center}.event-card .data-row span{font-size:16px}#eventBody{line-height:1.5}dialog{color:var(--ink);background:var(--paper);border:2px solid #bca778;border-radius:16px;padding:22px;width:min(700px,94vw);max-height:94dvh;overflow:hidden}dialog::backdrop{background:#30282188}.dialog-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}.dialog-head h2{margin:0;font-size:23px}dialog p{font-size:16px}.hand-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.hand-list button{min-height:66px;text-align:left;font-size:17px}.hand-list button[aria-pressed=true]{border:2px solid var(--green);background:#e3ecdc}.hand-list small{display:block;font-size:12px}#cardDetail{min-height:74px;padding:10px 0;font-size:16px;line-height:1.6}#cardTargets button{text-align:center}#helpBody{min-height:200px;line-height:1.7}#helpBody h3{font-size:22px}#results .data-row{align-items:center}#results strong{font-size:26px}#resultStats{margin:14px 0;font-size:15px}#diceFloat{position:fixed;inset:0;z-index:60}.dice-panel{color:#fff}#app.busy #roll,#app.busy #next{opacity:.45}
@media(max-width:1000px){main{grid-template-columns:minmax(0,1fr) 250px}.topline b small{display:none}.score .portrait{width:30px;height:30px}.score .person{font-size:13px}.score strong{font-size:20px}.actions{gap:5px}.actions button{padding:8px}.action-dock{gap:12px}#actor{min-width:110px}.wallet{gap:0 5px}}
@media(max-width:700px){:root{font-size:16px}header{padding:6px 8px}.topline{gap:6px;flex-wrap:wrap}.topline>b{font-size:16px}#season{font-size:13px}.toolbar button{padding:4px 7px}.toolbar{margin-left:auto}.spotlight{margin:6px 0;align-items:flex-start;flex-direction:column;gap:3px}#destination{font-size:16px;padding:5px 8px}#halo{font-size:12px}.scoreboard{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}.score{padding:4px 6px;gap:5px}.score .person{gap:4px}.score strong{font-size:19px}.score small{font-size:10px}.score .portrait{width:27px;height:27px}main{display:block;position:relative}.map-stage{height:100%}.map-tools{left:6px;right:6px;gap:3px}.map-tools button{padding:5px 7px;font-size:12px}.map-tools select{flex:1;font-size:12px;max-width:130px}.map-legend{font-size:10px}aside{position:absolute;inset:0;display:none;border-left:0;z-index:5;padding:10px}main.info-open aside{display:flex}#backMap{display:block}#infoBody{padding:8px 2px}#infoBody h2{font-size:21px}#infoBody p{font-size:14px}.data-row{padding:5px 0}footer{padding:6px 8px}#status{font-size:14px;margin-bottom:4px}.action-dock{display:grid;grid-template-columns:1fr 1fr;gap:4px 8px}#actor .portrait{width:34px;height:34px}#actor .person{font-size:14px}.wallet{justify-content:end}.wallet strong{font-size:23px}.wallet small{font-size:12px}.wallet #effects{font-size:11px}.actions{grid-column:1/-1;display:flex;width:100%;gap:5px}.actions button{flex:1;font-size:16px;min-height:38px;padding:6px}.decision-heading strong{font-size:16px}#decisionDetail{font-size:13px;line-height:1.4}.choices{gap:4px}.choices button{font-size:13px;min-width:calc(50% - 4px);padding:5px 7px}.choices small{font-size:11px}.step-preview{font-size:11px;margin:2px 0;min-height:14px}.intro{padding:10px}.intro-card{padding:18px 14px}.intro h1{font-size:29px;margin:7px 0}.intro h2{font-size:20px;margin-bottom:10px}.intro p{font-size:14px;margin-bottom:10px}.intro-people{gap:12px;margin:10px 0}.intro-people .person{font-size:12px;gap:3px}.intro-people .portrait{width:43px;height:43px}.setup{gap:10px}.setup label{font-size:14px}.setup select{font-size:14px;padding:7px}.check{font-size:13px;margin-top:10px}.intro-actions{flex-wrap:wrap;gap:8px;margin-top:12px}.intro-actions a{font-size:13px}.event-card{padding:15px}.event-card h2{font-size:20px;margin:8px 0 12px}.event-card .person{font-size:14px}.event-card .data-row{font-size:14px}.event-people{gap:8px}.event-people .portrait{width:38px;height:38px}.event-people .person-text b{font-size:12px}dialog{padding:15px}.dialog-head h2{font-size:20px}.dialog-head button{font-size:14px}.hand-list button{font-size:15px;padding:7px;min-height:59px}#cardDetail{font-size:15px;min-height:78px}#handNotice{font-size:13px;margin-bottom:10px}#helpBody{min-height:210px;font-size:15px}#resultDialog h2{font-size:21px}#results strong{font-size:22px}#results .portrait{width:34px;height:34px}#results .person{font-size:14px}}
