html, body { margin: 0; height: 100%; background: #0b0d10; overflow: hidden; }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: #f4f1ea; -webkit-font-smoothing: antialiased; }
#view { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; cursor: grab; }
#view:active { cursor: grabbing; }
#hud { position: fixed; inset: 0; pointer-events: none; transition: opacity 1.2s ease; text-shadow: 0 1px 10px rgba(0, 0, 0, .45), 0 0 2px rgba(0, 0, 0, .35); }
#hud.quiet #readout, #hud.quiet #hint, #hud.quiet #goal { opacity: 0; }
#hud.hidden { opacity: 0; }
#titleblock { position: absolute; left: 28px; top: 22px; }
#title { font-family: Fraunces, Georgia, serif; font-weight: 500; font-size: 22px; letter-spacing: .01em; }
#goal { margin-top: 3px; font-size: 13px; font-weight: 500; opacity: .92; transition: opacity 1.2s ease; }
#hint { margin-top: 5px; font-size: 12px; opacity: .72; letter-spacing: .01em; transition: opacity 1.2s ease; max-width: 62vw; }
#place { position: absolute; left: 28px; top: 96px; font-family: Fraunces, Georgia, serif; font-size: 15px; font-style: normal; opacity: 0; transition: opacity 1.6s ease; }
#place.show { opacity: .9; }
#readout { position: absolute; left: 28px; bottom: 24px; display: flex; gap: 26px; align-items: flex-end; transition: opacity 1.2s ease; }
#readout .cell { display: flex; align-items: baseline; gap: 6px; }
#readout span { font-size: 30px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
#readout .cell:nth-child(n+2) span { font-size: 18px; }
#readout small { font-size: 11px; opacity: .75; letter-spacing: .03em; }
#sound { pointer-events: auto; position: absolute; right: 24px; top: 22px; font: 500 12px Inter, system-ui, sans-serif; color: #f4f1ea; background: rgba(18, 20, 24, .38); border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; padding: 8px 14px; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); text-shadow: none; }
#sound:hover { background: rgba(18, 20, 24, .6); }
#finish { position: fixed; left: 28px; bottom: 28px; text-shadow: 0 1px 12px rgba(0, 0, 0, .5); opacity: 0; transition: opacity 1.8s ease; pointer-events: none; }
#finish.show { opacity: 1; }
#finish .fin-title { font-family: Fraunces, Georgia, serif; font-size: 34px; font-weight: 500; }
#finish .fin-sub { font-size: 13px; opacity: .85; margin-top: 2px; }
#finish .fin-grid { display: flex; gap: 34px; margin-top: 18px; }
#finish .fin-grid b { display: block; font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; }
#finish .fin-grid small { font-size: 11px; opacity: .75; letter-spacing: .03em; }
#finish .fin-hint { margin-top: 16px; font-size: 12px; opacity: .75; }
#loading { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: #0b0d10; font-family: Fraunces, Georgia, serif; font-size: 22px; letter-spacing: .02em; color: #d9d2c4; transition: opacity .9s ease; pointer-events: none; }
#loading.done { opacity: 0; }

/* a frozen frame (?t=) shows its final state at once: nothing in it depends on when it is looked at */
body.frozen, body.frozen * { transition: none !important; animation: none !important; }

/* loading: a hairline under the title fills as the valley arrives */
#loading { flex-direction: column; gap: 18px; }
#loadbar { display: block; width: 160px; height: 1px; background: rgba(255, 255, 255, 0.14); }
#loadbar b { display: block; height: 1px; width: 0; background: rgba(255, 240, 215, 0.75); transition: width 0.3s ease-out; }
