:root{--bg: #1c2a1a;--ink: #1b1712;--paper: #f4ead6;--paper-2: #efe2c6;--line: rgba(40, 28, 14, .14);--green: #2e4a28;--green-2: #3d6a36;--gold: #c9891a;--danger: #8a3b2a;--safe-top: env(safe-area-inset-top, 0px);--safe-bottom: env(safe-area-inset-bottom, 0px);--hud: 16px;--radius: 16px;font-family:PingFang SC,Hiragino Sans GB,Noto Sans SC,Source Han Sans SC,Microsoft YaHei,system-ui,sans-serif}*{box-sizing:border-box}html,body{margin:0;height:100%;background:var(--bg);color:var(--ink)}button,input{font:inherit}button{appearance:none;border:0;border-radius:12px;background:var(--paper-2);color:var(--ink);padding:.7rem .9rem;min-height:44px;cursor:pointer;-webkit-tap-highlight-color:transparent}button.primary{background:var(--green);color:#f6f1e4;font-weight:650}button.ghost{background:transparent}button:disabled{opacity:.45;cursor:default}button:not(:disabled):active{transform:scale(.98)}#app,#view{position:fixed;inset:0;width:100%;height:100%;display:block;touch-action:none}#view{background:#1c2a1a}.hidden{display:none!important}.topbar{position:fixed;top:0;left:0;right:0;z-index:5;padding:calc(var(--safe-top) + 8px) 12px 8px;background:linear-gradient(to bottom,#141c129e,#141c1200);color:#f6f1e4;pointer-events:none}.topbar-row,.meters,.goals,.icon-btn,.topbar button{pointer-events:auto}.topbar-row{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}.when strong{display:block;font-size:16px;letter-spacing:.02em}.when span{font-size:13px;opacity:.86}.icon-btn{background:#f4ead629;color:#f6f1e4;width:40px;min-height:40px;padding:0;border-radius:12px}.meters{display:flex;align-items:center;gap:12px;margin-top:8px;font-size:13px}.gold{font-weight:700;color:#ffd978}.stamina{display:flex;align-items:center;gap:6px;flex:1}.bar{flex:1;height:8px;border-radius:99px;background:#fff3;overflow:hidden}.bar i{display:block;height:100%;width:100%;background:linear-gradient(90deg,#8fd18a,#d7e27a);border-radius:inherit;transform-origin:left center}.goals{display:flex;gap:8px;margin-top:8px;font-size:11px}.pip{background:#f4ead624;border-radius:999px;padding:3px 8px;color:#f6f1e4}.pip.done{background:#5aa050d9}.log{position:fixed;left:10px;right:30%;top:calc(var(--safe-top) + 112px);z-index:4;max-height:24vh;overflow:auto;pointer-events:none;display:flex;flex-direction:column;gap:6px}.log p{margin:0;align-self:flex-start;max-width:92%;background:#1c1812b8;color:#f6f1e4;padding:8px 10px;border-radius:12px;font-size:13px;line-height:1.45;pointer-events:auto}.people-strip{position:fixed;left:8px;right:8px;bottom:calc(var(--safe-bottom) + 86px);z-index:5;display:flex;gap:8px;overflow-x:auto;padding:0 4px;-webkit-overflow-scrolling:touch}.people-strip button{flex:0 0 auto;background:var(--paper);box-shadow:0 4px 16px #0000002e;font-size:13px;padding:.45rem .8rem}.dock{position:fixed;left:0;right:0;bottom:0;z-index:6;display:grid;grid-template-columns:1fr 1fr 1.35fr 1fr;gap:8px;padding:10px 10px calc(var(--safe-bottom) + 10px);background:linear-gradient(to top,rgba(20,24,16,.88),rgba(20,24,16,.55) 70%,transparent)}.dock button{box-shadow:0 4px 14px #0000002e;font-size:14px}.dock .primary{font-size:16px}.sheet{position:fixed;inset:0;z-index:8}.sheet-backdrop{position:absolute;inset:0;background:#0a0c0873}.sheet-card{position:absolute;left:0;right:0;bottom:0;max-height:min(78vh,640px);background:var(--paper);border-radius:20px 20px 0 0;padding:8px 16px calc(var(--safe-bottom) + 16px);display:flex;flex-direction:column;box-shadow:0 -8px 32px #00000040}.sheet-handle{width:42px;height:4px;border-radius:99px;background:var(--line);margin:6px auto 10px}.sheet-card h2{margin:0 0 10px;font-size:18px}.sheet-body{overflow:auto;-webkit-overflow-scrolling:touch}.sheet-body p{margin:0 0 10px;line-height:1.55;font-size:14px}.list{display:flex;flex-direction:column;gap:8px}.list button,.row-btn{display:flex;justify-content:space-between;align-items:center;width:100%;text-align:left;background:#fffaf0;border:1px solid var(--line)}.muted{color:#6b5e4d;font-size:13px}.qty{display:flex;align-items:center;gap:8px}.qty button{min-height:40px;width:40px;padding:0;background:#e8dcc0}.item-row{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid var(--line);font-size:14px}.plot-note{font-size:13px;color:#5c5143;margin:0 0 8px}.speech{position:fixed;left:8px;right:8px;bottom:calc(var(--safe-bottom) + 8px);max-height:62vh;overflow:auto;z-index:9;background:var(--paper);border-radius:18px;border:2px solid #c9b48a;padding:14px 14px 12px;box-shadow:0 10px 30px #00000040}.speech p{margin:0 0 10px;font-size:15px;line-height:1.55}.title-screen{position:fixed;inset:0;z-index:10;display:flex;align-items:flex-end;justify-content:center;padding:24px 18px calc(var(--safe-bottom) + 28px);background:linear-gradient(to top,#10160ee0,#10160e40 45%,#10160e26);color:#f6f1e4}.title-card{width:min(420px,100%)}.title-card .eyebrow{margin:0 0 6px;letter-spacing:.16em;font-size:12px;opacity:.8}.title-card h1{margin:0 0 10px;font-size:42px;letter-spacing:.08em;font-weight:700}.title-card .lede{margin:0 0 20px;font-size:15px;line-height:1.6;opacity:.92}.title-actions{display:flex;flex-direction:column;gap:10px}.title-actions button{width:100%}.title-actions button:not(.primary){background:#f4ead624;color:#f6f1e4}.labels{position:fixed;inset:0;pointer-events:none;z-index:3;overflow:hidden}.label{position:absolute;transform:translate(-50%,-120%);background:#16120eb3;color:#f6f1e4;font-size:11px;padding:2px 6px;border-radius:8px;white-space:nowrap}.label.exit{background:#2e4a28d1}.error{color:var(--danger);font-size:13px;margin-top:8px}.log p{font-size:12px;padding:6px 9px}.joy{position:fixed;left:18px;bottom:calc(var(--safe-bottom) + 84px);width:124px;height:124px;border-radius:50%;background:#f4ead62e;border:2px solid rgba(244,234,214,.35);z-index:6;touch-action:none}.joy-knob{position:absolute;left:50%;top:50%;width:54px;height:54px;border-radius:50%;background:#f4ead6d9;transform:translate(-50%,-50%);box-shadow:0 4px 12px #00000040;pointer-events:none}.ctx-btn{position:fixed;right:16px;bottom:calc(var(--safe-bottom) + 104px);z-index:6;min-width:112px;min-height:64px;border-radius:20px;background:#f4ead6;font-size:16px;font-weight:700;box-shadow:0 6px 18px #00000047}.zone-toast{position:fixed;left:50%;top:38%;transform:translate(-50%);z-index:5;background:#16120eb8;color:#f6f1e4;padding:8px 16px;border-radius:999px;font-size:15px;pointer-events:none}.log p{transition:opacity .9s}.log p.fade{opacity:0}.dlg-head{display:flex;align-items:center;gap:8px;margin-bottom:8px}.dlg-head strong{font-size:18px;color:var(--green)}.dlg-rel{font-size:12px;color:#6b5e4d;flex:1}.dlg-close{width:44px;min-height:44px;padding:0;background:#e8dcc0;font-size:18px}.speech #speech-text{font-size:16px;line-height:1.6;margin:0 0 6px}.dlg-note{font-size:13px;color:#5c5143;margin:0 0 10px}.dlg-note:empty{display:none}.dlg-choices{display:grid;grid-template-columns:1fr 1fr;gap:8px}.dlg-choices button{background:#fffaf0;border:1px solid var(--line);font-size:14px;text-align:left}.dlg-choices button.primary{background:var(--green);color:#f6f1e4}.dlg-choices button.wide{grid-column:1 / -1}
