:root{--pg-paper:#efe3c8;--pg-paper-light:#f7eed8;--pg-paper-edge:#dccaa2;--pg-ink:#2a1e12;--pg-ink-soft:#5d4a34;--pg-rule:#4a30143d;--pg-accent:#8a4b1c;--pg-good:#3f6b2c;--pg-warn:#9a3412;--pg-wood:#2c1a0e;--pg-wood-light:#3f2714;--pg-serif:"Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;--pg-sans:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;--pg-top:0px}.pg-panel{background:linear-gradient(180deg, var(--pg-wood-light), var(--pg-wood));color:var(--pg-ink);font-family:var(--pg-serif);border-radius:12px;padding:7px;box-shadow:0 18px 50px #0000008c,inset 0 0 0 1px #ffdcaa1f}.pg-page{background:radial-gradient(120% 90% at 30% 10%, var(--pg-paper-light) 0%, var(--pg-paper) 55%, var(--pg-paper-edge) 100%)}.pg-slip,.pg-strip{border:2px solid var(--pg-wood-light);background:radial-gradient(140% 120% at 30% 0%, var(--pg-paper-light) 0%, var(--pg-paper) 60%, var(--pg-paper-edge) 100%);color:var(--pg-ink);font-family:var(--pg-sans);border-radius:8px;box-shadow:0 2px 9px #00000073}.pg-slip{text-align:center;padding:5px 12px 6px;font-size:14px;line-height:1.25}.pg-slip strong,.pg-slip.is-title{font-family:var(--pg-serif);letter-spacing:.01em;font-weight:700}.pg-slip.is-good{border-left:6px solid var(--pg-good)}.pg-slip.is-warn{border-left:6px solid var(--pg-warn)}.pg-slip.is-bad{color:var(--pg-paper-light);background:linear-gradient(#7a2413,#5a1a0e);border-color:#5a1a0e}.pg-strip{align-items:center;gap:2px;padding:2px;display:flex}.pg-count{white-space:nowrap;background:#78501e17;border-radius:5px;align-items:center;gap:5px;min-height:26px;padding:1px 8px 1px 2px;font-size:13px;display:inline-flex}.pg-count img{object-fit:cover;background:#cdbb93;border-radius:4px;width:24px;height:24px;display:block}.pg-count span{color:var(--pg-ink-soft)}.pg-count b{font-variant-numeric:tabular-nums;min-width:1.1em;color:var(--pg-accent);text-align:right;font-size:15px;font-weight:750}.pg-count.is-none{opacity:.62}.pg-count.is-none b{color:var(--pg-ink-soft)}.pg-count.is-held{background:#3f6b2c29}.pg-count.is-held b{color:var(--pg-good)}.pg-key{border:1px solid var(--pg-wood);background:linear-gradient(180deg, var(--pg-wood-light), var(--pg-wood));min-width:1.1em;color:var(--pg-paper-light);font:650 .92em/1.45 var(--pg-sans);text-align:center;white-space:nowrap;border-bottom-width:2px;border-radius:4px;margin-right:5px;padding:0 6px 1px;display:inline-block}.pg-button{background:linear-gradient(180deg, var(--pg-wood-light), var(--pg-wood));color:var(--pg-paper-light);font:700 16px/1.2 var(--pg-serif);letter-spacing:.01em;cursor:pointer;border:2px solid #e2cf9f;border-radius:9px;padding:10px 20px 11px;box-shadow:0 3px 10px #00000073}.pg-button:hover{background:linear-gradient(#51341c,#36210f)}.pg-button.is-quiet{font:600 12.5px/1.2 var(--pg-sans);opacity:.92;border-width:1px;border-radius:7px;padding:4px 10px 5px;box-shadow:0 1px 5px #0006}.pg-round{background:radial-gradient(circle at 35% 28%, #5a3a20 0%, var(--pg-wood-light) 45%, var(--pg-wood) 100%);color:var(--pg-paper-light);font-family:var(--pg-sans);opacity:.94;touch-action:none;-webkit-user-select:none;user-select:none;border:2px solid #e2cf9f;border-radius:50%;flex-direction:column;justify-content:center;align-items:center;gap:1px;padding:0;display:flex;box-shadow:0 2px 8px #00000080}.pg-round.is-down{background:radial-gradient(circle,#7a5330 0%,#51341c 100%);transform:scale(.96)}.pg-round.is-go{background:radial-gradient(circle at 35% 28%,#5d7f3a 0%,#3f6b2c 45%,#284a1b 100%);border-color:#f4ecd2}.pg-round.is-stop{background:radial-gradient(circle at 35% 28%,#96391d 0%,#7a2413 45%,#521509 100%)}.pg-round.is-hold{border-style:dashed}.pg-round svg{fill:none;stroke:currentColor;stroke-width:2.1px;stroke-linecap:round;stroke-linejoin:round;width:23px;height:23px;display:block}.pg-round .pg-label{text-align:center;text-shadow:0 1px 2px #000000d9;max-width:84px;font-size:10.5px;font-weight:650;line-height:1.05}.pg-round .pg-label:empty{display:none}:root{--safe-top:env(safe-area-inset-top,0px);--safe-right:env(safe-area-inset-right,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px);color:var(--pg-paper-light,#f7eed8);font-family:var(--pg-sans,system-ui, sans-serif);font-synthesis:none;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;background:#1a1009}*{box-sizing:border-box}html,body{overscroll-behavior:none;background:#1a1009;width:100%;height:100%;margin:0;overflow:hidden}body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;touch-action:none;position:fixed;inset:0}#app{width:100vw;height:100vh;background:radial-gradient(120% 90% at 50% 20%,#3f2714 0%,#2c1a0e 55%,#1a1009 100%);height:100dvh;position:fixed;top:0;left:0;overflow:hidden}#game-canvas{touch-action:none;outline:none;width:100%;height:100%;display:block;position:absolute;inset:0}#ui{pointer-events:none;font-size:16px;line-height:1.35;position:absolute;inset:0}#ui>*{pointer-events:auto}#ui [hidden]{display:none!important}#ui>#feature-ui{pointer-events:none;position:absolute;inset:0}button{font:inherit;color:inherit;touch-action:manipulation}svg{fill:none;stroke:currentColor;stroke-width:1.8px;stroke-linecap:round;stroke-linejoin:round;width:24px;height:24px}.pg-button:active{transform:translateY(1px)}.pg-button:focus-visible,.pg-round:focus-visible,.segments button:focus-visible,.link:focus-visible,.switch:focus-visible,input[type=range]:focus-visible{outline:2px solid var(--pg-paper-light);outline-offset:3px}.link{border:0;border-bottom:1px solid var(--pg-accent);color:var(--pg-accent);cursor:pointer;background:0 0;padding:2px 0}#loading-screen,#context-lost{background:radial-gradient(120% 90% at 50% 20%,#3f2714 0%,#2c1a0e 55%,#1a1009 100%);place-items:center;padding:24px;display:grid;position:absolute;inset:0}#context-lost{background:#1a1009db}.loading-block{text-align:center;justify-items:center;gap:16px;width:min(420px,100%);display:grid}#loading-text{font-family:var(--pg-serif);letter-spacing:.02em;font-variant-numeric:tabular-nums;margin:0;font-size:1.15rem}.bar{background:#0000004d;border:1px solid #e2cf9f80;border-radius:4px;width:100%;height:6px;overflow:hidden}#loading-bar{background:linear-gradient(180deg, var(--pg-paper-light), var(--pg-paper-edge));width:0%;height:100%;transition:width .25s ease-out}.error-title{font-family:var(--pg-serif);margin:0;font-size:1.2rem;font-weight:700}.note{overflow-wrap:anywhere;opacity:.8;margin:0;font-size:.9rem}#title-screen{padding:calc(20px + var(--safe-top)) calc(20px + var(--safe-right)) calc(20px + var(--safe-bottom)) calc(max(20px, 5vw) + var(--safe-left));pointer-events:none;place-items:center start;display:grid;position:absolute;inset:0}.title-block{pointer-events:auto;width:min(300px,31vw);min-width:190px;container-type:inline-size}.title-page{text-align:center;border-radius:7px;justify-items:center;gap:clamp(10px,3vh,22px);padding:clamp(16px,5vh,34px) 18px clamp(16px,4.5vh,30px);display:grid}#title-screen h1{font-size:clamp(1.2rem,min(4.2vw,9vh),2.8rem);max-width:100%;font-size:clamp(1.2rem,min(16cqw,13vh),2.9rem);font-family:var(--pg-serif);letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;color:var(--pg-ink);margin:0 -.08em 0 0;font-weight:700;line-height:1}.title-rule{background:linear-gradient(90deg, transparent, var(--pg-accent), transparent);width:70%;height:2px}#enter-button{min-width:min(168px,100%);min-height:48px;font-size:1.1rem}#hud{position:absolute;inset:0;pointer-events:none!important}#hud-dot{background:var(--pg-paper-light);opacity:.9;border-radius:50%;width:6px;height:6px;margin:-3px 0 0 -3px;position:absolute;top:50%;left:50%;box-shadow:0 0 0 1.5px #2c1a0ebf}#hud-meters{left:calc(12px + var(--safe-left));bottom:calc(12px + var(--safe-bottom));flex-direction:column;align-items:stretch;gap:3px;padding:5px 7px;position:absolute}.hud-meter{align-items:center;gap:6px;display:flex}.hud-meter svg{stroke-width:2.2px;width:15px;height:15px;color:var(--pg-accent)}.hud-meter[data-meter=health] svg{color:var(--pg-warn)}.hud-meter[data-meter=water] svg{color:#2f6076}.hud-bar{border:1px solid var(--pg-wood-light);background:#4a301438;border-radius:4px;width:78px;height:7px;display:block;overflow:hidden}.hud-bar i{background:var(--pg-accent);width:100%;height:100%;transition:width .3s;display:block}.hud-meter[data-meter=health] .hud-bar i{background:var(--pg-warn)}.hud-meter[data-meter=water] .hud-bar i{background:#2f6076}#hud-hotbar{left:50%;bottom:calc(12px + var(--safe-bottom));gap:3px;padding:3px;position:absolute;transform:translate(-50%)}.hud-slot{border:1px solid var(--pg-rule);width:44px;height:44px;color:var(--pg-ink);background:#78501e17;border-radius:5px;place-items:center;display:grid;position:relative}.hud-slot.is-on{border:2px solid var(--pg-accent);background:#8a4b1c29}.hud-slot b{color:var(--pg-ink-soft);font-size:10px;font-weight:650;position:absolute;top:1px;left:4px}.hud-slot img{object-fit:contain;width:34px;height:34px;display:block}.hud-slot svg{width:26px;height:26px}#hud-message{top:calc(64px + var(--safe-top) + var(--pg-top));max-width:min(480px,100% - 32px);position:absolute;left:50%;transform:translate(-50%)}body.touch #hud-meters{top:calc(10px + var(--safe-top));padding:4px 6px;bottom:auto}body.touch .hud-bar{width:44px;height:6px}body.touch #hud-hotbar{top:calc(12px + var(--safe-top));bottom:auto}body.touch .hud-slot{width:36px;height:36px}body.touch #hud-message{top:calc(62px + var(--safe-top) + var(--pg-top))}#settings-button{top:calc(12px + var(--safe-top));right:calc(12px + var(--safe-right));cursor:pointer;width:46px;height:46px;position:absolute}body.touch #stats{top:calc(74px + var(--safe-top))}#stats{top:calc(64px + var(--safe-top));left:calc(12px + var(--safe-left));max-width:calc(100% - 24px - var(--safe-left) - var(--safe-right));font-variant-numeric:tabular-nums;text-align:left;pointer-events:none;padding:4px 9px 5px;font-size:.78rem;position:absolute}#rotate-hint{top:calc(66px + var(--safe-top));white-space:nowrap;align-items:center;gap:8px;padding:8px 14px 8px 10px;font-size:.92rem;display:none;position:absolute;left:50%;transform:translate(-50%)}#keys-hint{bottom:calc(72px + var(--safe-bottom));pointer-events:none;flex-wrap:wrap;justify-content:center;gap:6px 18px;width:max-content;max-width:calc(100% - 32px);padding:8px 16px;font-size:.88rem;animation:.6s ease-in 7s forwards hint-out;position:absolute;left:50%;transform:translate(-50%)}@keyframes hint-out{to{opacity:0;visibility:hidden}}#resume-hint{margin-top:44px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}#settings-sheet{background:#0c090580;justify-content:flex-end;display:flex;position:absolute;inset:0}.sheet{width:min(380px,100%);height:100%;padding:calc(7px + var(--safe-top)) calc(7px + var(--safe-right)) calc(7px + var(--safe-bottom)) 7px;border-radius:12px 0 0 12px}.sheet-page{touch-action:pan-y;height:100%;font-family:var(--pg-sans);border-radius:7px;align-content:start;gap:22px;padding:20px;display:grid;overflow-y:auto}.sheet h2{font-family:var(--pg-serif);letter-spacing:.01em;border-bottom:1px solid var(--pg-rule);margin:0;padding-bottom:8px;font-size:1.5rem;font-weight:700}.field{gap:10px;display:grid}.field.row{grid-template-columns:1fr auto;align-items:center}.label{color:var(--pg-ink-soft);letter-spacing:.06em;text-transform:uppercase;justify-content:space-between;font-size:.82rem;font-weight:650;display:flex}.label output{color:var(--pg-ink);font-variant-numeric:tabular-nums}.segments{border:2px solid var(--pg-wood-light);border-radius:8px;grid-template-columns:repeat(4,1fr);display:grid;overflow:hidden}.segments button{border:0;border-left:1px solid var(--pg-rule);min-height:46px;color:var(--pg-ink-soft);cursor:pointer;background:#78501e12;padding:8px 2px;font-size:.9rem}.segments button:first-child{border-left:0}.segments button[aria-checked=true]{background:linear-gradient(180deg, var(--pg-wood-light), var(--pg-wood));color:var(--pg-paper-light);font-weight:700}.sheet .note{color:var(--pg-ink-soft);opacity:1}input[type=range]{width:100%;height:32px;accent-color:var(--pg-accent);touch-action:pan-x;margin:0}.switch{appearance:none;border:2px solid var(--pg-wood-light);cursor:pointer;background:#78501e1f;border-radius:8px;width:52px;height:30px;margin:0;position:relative}.switch:after{content:"";background:var(--pg-ink-soft);border-radius:4px;width:20px;height:20px;transition:transform .15s;position:absolute;top:3px;left:3px}.switch:checked{background:#3f6b2c40}.switch:checked:after{background:var(--pg-good);transform:translate(22px)}.sheet .pg-button{width:100%;min-height:48px;margin-top:6px}#touch-layer,#touch-buttons{display:none}body.touch.playing #touch-layer{touch-action:none;display:block;position:absolute;inset:0}#touch-stick{pointer-events:none;background:radial-gradient(circle,#2c1a0e6b 0%,#2c1a0e9e 100%);border:2px solid #e2cf9f;border-radius:50%;width:112px;height:112px;margin:-56px 0 0 -56px;position:absolute;top:0;left:0;box-shadow:0 2px 10px #0006}#touch-stick:not(.is-held){top:auto;bottom:calc(34px + var(--safe-bottom));left:calc(40px + var(--safe-left));opacity:.78;margin:0;transform:none!important}#touch-knob{background:radial-gradient(circle at 35% 28%, #5a3a20 0%, var(--pg-wood-light) 45%, var(--pg-wood) 100%);border:2px solid #e2cf9f;border-radius:50%;width:48px;height:48px;margin:-24px 0 0 -24px;position:absolute;top:50%;left:50%;box-shadow:0 2px 6px #00000080}#touch-stick:not(.is-held) #touch-knob{transform:none!important}body.touch.playing #touch-buttons{right:calc(22px + var(--safe-right));bottom:calc(26px + var(--safe-bottom));pointer-events:none;grid-template-columns:repeat(3,auto);place-items:end;gap:14px;display:grid;position:absolute}.touch-button{pointer-events:auto;width:58px;height:58px}.touch-button.large{width:72px;height:72px}.touch-button.small{width:48px;height:48px}.touch-button.large svg{width:30px;height:30px}.touch-button.is-idle{opacity:.45}.touch-button.is-held,.touch-button.is-on{border-color:var(--pg-paper-light);background:radial-gradient(circle,#7a5330 0%,#51341c 100%);transform:scale(.96)}#touch-jump{grid-area:3/3}#touch-sprint{grid-area:3/2}#touch-primary{grid-area:2/3}#touch-interact{grid-area:2/2}#touch-secondary{grid-area:3/1}#touch-rotate{grid-area:1/3}#touch-book{grid-area:1/2}@media (orientation:portrait){body.touch #rotate-hint:not([hidden]){display:flex}body.touch:not(.playing) #rotate-hint{top:auto;bottom:calc(28px + var(--safe-bottom))}body.touch #hud-hotbar{top:calc(70px + var(--safe-top))}#title-screen{padding-top:calc(max(20px, 7vh) + var(--safe-top));place-items:start center}.title-block{width:min(300px,78vw)}}@media (max-width:520px){.sheet{border-radius:0;width:100%}.segments button{font-size:.82rem}}@media (max-height:430px){.sheet-page{gap:12px;padding:12px 16px}#touch-stick:not(.is-held){bottom:calc(22px + var(--safe-bottom))}body.touch.playing #touch-buttons{bottom:calc(18px + var(--safe-bottom))}}
