:root{color-scheme:dark;font-family:Inter,system-ui,sans-serif;color:#eef5e7;--mint:#bdfa87;--muted:#abc0b2;--edge:#b2e7bd38}*{box-sizing:border-box}body{margin:0;background:#152920}main,#world,.vignette,.shade{position:fixed;inset:0;width:100%;height:100%}#world{outline:0;touch-action:none;display:block}.vignette{pointer-events:none;background:radial-gradient(ellipse at center,transparent 46%,#06181172 100%)}.brand,.hud,.questDock,.controls{position:fixed}.brand{left:26px;top:25px;display:flex;align-items:center;gap:11px;text-shadow:0 2px 10px #091a12}.brand strong,.heading,.health,.orb{letter-spacing:.13em;font-size:11px;font-weight:800}.brand small,.orb small{display:block;font-size:9px;letter-spacing:.15em;color:var(--muted);margin-top:5px}.mark{font-size:32px;color:var(--mint)}.glass{background:#11271fe8;border:1px solid var(--edge);box-shadow:0 14px 45px #091a1540;border-radius:13px}.hud{right:24px;top:23px;width:254px;padding:16px}.heading,.health{display:flex;justify-content:space-between;gap:10px;align-items:center}.heading{color:var(--muted)}#score{color:var(--mint);font-variant-numeric:tabular-nums}.health{margin-top:15px;color:#ffd2a5;font-size:10px}.track{height:6px;background:#354a3d;border-radius:10px;margin-top:7px}.track div{height:100%;background:linear-gradient(90deg,#fa9864,#ffe0a5);border-radius:inherit}.stash{margin-top:14px;font-size:9px}#inventory{margin-top:7px;display:flex;gap:5px;flex-wrap:wrap}#inventory span{background:#223d30;border-radius:5px;padding:4px 6px;font-size:10px}.questDock{bottom:24px;left:24px;width:min(295px,calc(100vw - 48px));pointer-events:none}.quest{padding:16px;margin-bottom:12px;pointer-events:auto}.quest[hidden]{display:none}.quest h2{margin:6px 0 0;font-size:22px}.quest h2 span{color:var(--muted);font-size:13px;padding-left:9px;font-weight:500}.quest p{color:#d6e7d9;font-size:12px;margin:0}.quest svg{display:block;width:100%;height:97px}.orb{pointer-events:auto;display:flex;align-items:center;gap:10px;text-align:left;color:#fff;background:#10271ee8;border:1px solid var(--edge);padding:5px 14px 5px 5px;border-radius:50px}.orbIcon{display:grid;place-items:center;border-radius:100%;width:43px;height:43px;font-size:26px;color:#16382b;background:radial-gradient(circle at 35% 30%,#eaffc9,#96df75 50%,#319472);box-shadow:0 0 17px #bdfa8766}.controls{bottom:25px;right:24px;color:#dce9da;font-size:11px;text-shadow:0 2px 5px #172317;background:#12271bdc;padding:9px;border-radius:6px}kbd{font:inherit;color:white;background:#42624e;padding:2px 4px;border-radius:3px}.aim{position:fixed;left:50%;top:50%;width:8px;height:8px;border-radius:50%;border:1px solid white;pointer-events:none}.shade{display:grid;place-items:center;background:#071b15a0;z-index:2;padding:16px}.shade[hidden]{display:none}.intro{width:min(422px,100%);padding:30px;background:#122920ed}.intro h1{font-family:Georgia,serif;line-height:.91;font-size:clamp(48px,9vw,76px);margin:20px 0;color:#e7ffc8;letter-spacing:-.055em}.intro p{line-height:1.55;color:#d0e0d3}.intro .tip,.intro a{font-size:11px;color:#afc4b6}.intro button{border:0;border-radius:7px;background:var(--mint);color:#112819;padding:12px 20px;font-weight:850}button{cursor:pointer}button:disabled{cursor:wait;opacity:.55}button:focus-visible,a:focus-visible{outline:2px solid #fff;outline-offset:3px}#toast{position:fixed;left:50%;transform:translateX(-50%);top:20%;padding:9px 15px;border-radius:8px;background:#10271eed;color:var(--mint);font-size:13px;pointer-events:none;white-space:nowrap}#toast:empty{display:none}@media(max-width:700px){.brand{left:12px;top:13px}.hud{right:12px;top:13px;width:155px;padding:10px}.questDock{bottom:53px;left:12px;width:235px}.controls{bottom:10px;right:12px;font-size:9px}}

#targetHint{position:fixed;top:calc(50% + 22px);left:50%;transform:translateX(-50%);pointer-events:none;background:#10271eed;color:#eef5e7;padding:6px 9px;border-radius:5px;font-size:11px;font-weight:700;white-space:nowrap}
#targetHint:empty,#sourceClue:empty{display:none}
.quest #sourceClue{font-size:10px;color:#abc0b2;margin-top:8px;line-height:1.4}

#confetti{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:4}
#confetti span{position:absolute;top:-20px;width:8px;height:13px;border-radius:2px;animation:confetti-fall linear both}
@keyframes confetti-fall{from{transform:translateY(0) rotate(0)}to{transform:translate(var(--drift),calc(100vh + 36px)) rotate(650deg)}}
#milestone{position:fixed;top:28%;left:50%;transform:translateX(-50%);z-index:5;pointer-events:none;background:#10271e;color:var(--mint);padding:12px 20px;border:1px solid var(--edge);border-radius:10px;font-size:clamp(21px,4vw,35px);font-weight:850;white-space:nowrap}
#milestone:empty{display:none}
#milestone:not(:empty){animation:milestone-banner 4s both}
@keyframes milestone-banner{0%,85%{opacity:1}100%{opacity:0}}
@media(prefers-reduced-motion:reduce){#milestone:not(:empty){animation:none}}

.hud p{font-size:12px;color:#d0e0d3;margin:14px 0 0}
.quest h2{line-height:1.2;margin-bottom:12px}
.quest p{line-height:1.5}
.intro{max-height:calc(100vh - 32px);overflow:auto}
.intro h1{font-size:clamp(42px,8vw,64px)}
#authForm label{display:block;color:#d0e0d3;font-size:12px;font-weight:700;margin:12px 0}
#authForm input{display:block;width:100%;margin-top:5px;padding:10px;border:1px solid #729884;border-radius:6px;color:#fff;background:#1a382b;font:inherit;font-size:16px}
.authActions{display:flex;gap:8px;flex-wrap:wrap}
.intro #register,.intro #logout{background:#355d47;color:#fff}
.intro #logout{margin-left:8px}
#authMessage{min-height:1.4em;font-size:12px;color:#ffd2a5}
#authMessage:empty{display:none}

.thoughtBubble{position:fixed;z-index:1;width:min(300px,calc(100vw - 16px));padding:14px 18px;border:2px solid #6c9679;border-radius:26px;background:#f4ffed;color:#173b29;box-shadow:0 6px 24px #091a1566;pointer-events:none}
.thoughtBubble[hidden]{display:none}
.thoughtBubble::before,.thoughtBubble::after{content:"";position:absolute;background:#f4ffed;border:2px solid #6c9679;border-radius:50%}
.thoughtBubble::before{width:14px;height:14px;left:calc(50% - 8px);bottom:-14px}
.thoughtBubble::after{width:7px;height:7px;left:calc(50% - 4px);bottom:-24px}
.thoughtBubble strong{display:block;color:#386b4a;font-size:12px;letter-spacing:.08em;text-transform:uppercase}
.thoughtBubble p{margin:6px 0 0;font-size:16px;line-height:1.4;font-weight:600}
