:root{--bg:#faf6eef0;--ink:#2b2418;--muted:#6d6250;--line:#d8ccb4;--accent:#8a5a1c;--accent-ink:#fff;--recon:#d9741c;--today:#3a7bd5}@media (prefers-color-scheme:dark){:root:not([data-theme=light]){--bg:#1e1a14eb;--ink:#f1e9da;--muted:#b9ab92;--line:#4a4134;--accent:#d9a54a;--accent-ink:#1e1a14}}*{box-sizing:border-box}html,body{background:#c9d9e8;height:100%;margin:0;overflow:hidden}body{color:var(--ink);font-family:Assistant,system-ui,sans-serif}#app{position:fixed;inset:0}#app canvas{touch-action:none;display:block}aside,footer{z-index:2;position:fixed}#hud,#info{z-index:4}#hud{background:var(--bg);border:1px solid var(--line);border-radius:12px;width:280px;max-width:calc(100vw - 32px);max-height:calc(100vh - 60px);padding:14px 16px;top:16px;right:16px;overflow:auto;box-shadow:0 6px 24px #00000026}.hud-head{justify-content:space-between;align-items:center;gap:8px;display:flex}#hud-toggle{color:var(--muted);cursor:pointer;background:0 0;border:0;padding:0 4px;font-size:20px;transition:transform .2s}#hud.collapsed>:not(.hud-head){display:none}#hud.collapsed #hud-toggle{transform:rotate(90deg)}h1,h2{margin:0;font-family:Frank Ruhl Libre,serif}h1{font-size:22px}.sub{color:var(--muted);margin:2px 0 12px;font-size:13px}#modebar{z-index:5;bottom:calc(var(--footer-h,26px) + 8px);background:var(--bg);border:1px solid var(--line);border-radius:99px;gap:4px;padding:4px;display:flex;position:fixed;left:50%;transform:translate(-50%);box-shadow:0 6px 24px #0003}#modebar button{min-width:96px;color:var(--ink);font:inherit;cursor:pointer;background:0 0;border:0;border-radius:99px;padding:8px 18px;font-weight:700;transition:background .15s,color .15s}#modebar button:hover:not(.active){background:color-mix(in srgb, var(--accent) 14%, transparent)}#modebar button.active{background:var(--accent);color:var(--accent-ink)}#modebar button:focus-visible,#resume button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.field{color:var(--muted);margin-bottom:8px;font-size:13px;display:block}.field select,.field input{border:1px solid var(--line);width:100%;color:var(--ink);font:inherit;background:0 0;border-radius:8px;margin-top:4px;padding:6px;display:block}.field input::placeholder{color:var(--muted);opacity:.8}.legend{color:var(--muted);margin-top:10px;font-size:13px}.legend summary{cursor:pointer}.legend .badge{margin:6px 0 0 4px}.field select option{color:#2b2418}.toggle{cursor:pointer;align-items:center;gap:8px;margin-top:6px;font-size:14px;display:flex}#info{background:var(--bg);border:1px solid var(--line);border-radius:12px;width:360px;max-width:calc(100vw - 32px);max-height:calc(100vh - 90px);padding:16px;top:16px;left:16px;overflow:auto;box-shadow:0 6px 24px #00000026}#info h2{margin-left:28px;font-size:22px}#info-close{color:var(--muted);cursor:pointer;background:0 0;border:0;font-size:24px;position:absolute;top:8px;left:10px}#info-status{margin:6px 0}.badge{color:#fff;border-radius:99px;padding:2px 8px;font-size:12px;font-weight:700;display:inline-block}.badge.explicit{background:#4b7d3a}.badge.derived{background:#4b6f8d}.badge.josephus{background:#7a5a9a}.badge.reconstruction{background:var(--recon)}#info-dims{margin:6px 0;font-weight:600}#info-meters{color:var(--muted);margin:-2px 0 6px;font-size:13px}#info-note{color:var(--muted);font-size:14px;line-height:1.5}#minimap{border:1px solid var(--line);cursor:crosshair;border-radius:8px;width:170px;margin:10px auto 0;display:block}#whereami{margin-top:8px;font-size:15px;font-weight:700}#whereami small{color:var(--muted);font-size:12px;font-weight:400;display:block}#whereami[hidden]{display:none}.src{border-top:1px solid var(--line);margin-top:10px;padding-top:8px}.src b{color:var(--accent)}.src p{margin:4px 0 0;font-family:Frank Ruhl Libre,serif;font-size:16px;line-height:1.6}#crosshair{z-index:2;pointer-events:none;background:#ffffffe6;border-radius:50%;width:8px;height:8px;margin:-4px 0 0 -4px;position:fixed;top:50%;left:50%;box-shadow:0 0 0 2px #00000059}#resume{z-index:3;color:#fff;text-align:center;cursor:pointer;background:#00000059;place-items:center;display:grid;position:fixed;inset:0}#resume[hidden],#info[hidden],#crosshair[hidden]{display:none}#resume strong{font-family:Frank Ruhl Libre,serif;font-size:30px}#resume .keys{opacity:.85;max-width:520px;margin-inline:auto;padding:0 16px;font-size:14px}#resume button{color:#fff;font:inherit;cursor:pointer;background:#00000040;border:1px solid #ffffffb3;border-radius:99px;margin-top:10px;padding:8px 18px;font-weight:600}#resume button:hover{background:#ffffff26}#hover-label{z-index:3;pointer-events:none;white-space:nowrap;background:var(--bg);color:var(--ink);border:1px solid var(--line);border-radius:99px;padding:3px 10px;font-size:13px;font-weight:600;position:fixed;transform:translate(-50%,-150%);box-shadow:0 2px 10px #00000026}#hover-label[hidden]{display:none}#loading{z-index:10;color:#2b2418;background:#e9e1d2;flex-direction:column;justify-content:center;align-items:center;gap:14px;font-family:Frank Ruhl Libre,serif;font-size:22px;transition:opacity .5s;display:flex;position:fixed;inset:0}#loading.done{opacity:0;pointer-events:none}#loading .spinner{border:3px solid #d8ccb4;border-top-color:#8a5a1c;border-radius:50%;width:34px;height:34px;animation:.9s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){#loading .spinner{animation:none}}#help{color:#fff;pointer-events:none;background:linear-gradient(#0000,#00000073);flex-wrap:wrap;justify-content:space-between;gap:12px;padding:6px 16px;font-size:12px;display:flex;bottom:0;left:0;right:0}#help .attr{opacity:.8}@media (width<=640px){#hud{width:auto;padding:10px 12px;top:8px;left:8px;right:8px}#minimap{width:120px}h1{font-size:18px}.sub{display:none}#info{top:auto;bottom:calc(var(--footer-h,26px) + 60px);width:auto;max-height:45vh;left:8px;right:8px}#modebar button{min-width:80px;padding:7px 12px}}
