:root {
  --ink: #eef0f6;
  --ink-soft: rgb(238 240 246 / 0.74);
  --ink-faint: rgb(238 240 246 / 0.5);
  --brass: #e0bd7c;
  --line: rgb(220 228 255 / 0.16);
  --night: #07080d;
}
html, body { margin: 0; height: 100%; background: var(--night); overflow: hidden; color: var(--ink); font-family: var(--kit-sans); }
#stage canvas { touch-action: none; }
.veil { position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(70% 60% at 0% 0%, rgb(5 6 12 / 0.55) 0%, rgb(5 6 12 / 0) 60%), linear-gradient(to top, rgb(5 6 12 / 0.4) 0%, rgb(5 6 12 / 0) 25%); }
.dim { position: fixed; inset: 0; pointer-events: none; background: rgb(2 3 6 / 0.86); opacity: 0; transition: opacity 0.7s ease; }

.mast { position: fixed; left: 56px; top: 50px; max-width: 440px; }
.over { margin: 0 0 14px; font: 600 11.5px/1 var(--kit-sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--brass); }
h1 { margin: 0; font: italic 400 54px/1.04 var(--kit-oldstyle); letter-spacing: -0.012em; text-shadow: 0 2px 30px rgb(0 0 0 / 0.55); }
.line { margin: 14px 0 22px; max-width: 360px; font: 400 15px/1.55 var(--kit-sans); color: var(--ink-soft); text-shadow: 0 1px 14px rgb(0 0 0 / 0.7); }
.pill { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 19px 0 15px; border-radius: 999px;
  font: 500 14px/1 var(--kit-sans); background: var(--ink); color: #0d0f17; transition: background 0.2s, transform 0.2s; }
.pill:hover { background: #fff; }
.pill:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }

/* The eyepiece: a small inset at rest, the main view when looking. */
.eye { position: fixed; right: 56px; bottom: 50px; margin: 0; width: 214px; display: flex; flex-direction: column; align-items: center; gap: 14px;
  transition: right 0.8s cubic-bezier(.2,.7,.2,1), bottom 0.8s cubic-bezier(.2,.7,.2,1), width 0.8s cubic-bezier(.2,.7,.2,1); z-index: 3; }
.eye-ring { all: unset; cursor: pointer; position: relative; display: block; width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 0 1px rgb(255 230 180 / 0.35), 0 0 0 7px rgb(14 12 10 / 0.9), 0 0 0 8px rgb(224 189 124 / 0.55), 0 18px 50px rgb(0 0 0 / 0.6); background: #010103; }
.eye-ring::after { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgb(0 0 0 / 0) 58%, rgb(0 0 0 / 0.55) 70%, rgb(0 0 0 / 0.96) 71.5%); }
.eye-ring:focus-visible { outline: 2px solid var(--brass); outline-offset: 10px; }
.eye canvas { width: 100%; height: 100%; display: block; transform: rotate(180deg); }
.eye-cap { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; white-space: nowrap; font: 500 12.5px/1.2 var(--kit-sans); color: var(--ink); text-shadow: 0 1px 10px rgb(0 0 0 / 0.8); }
.eye-cap small { font: 400 11px/1.2 var(--kit-sans); color: var(--ink-faint); }

.facts { position: fixed; right: 64px; top: 50%; transform: translate(24px, -50%); width: 300px; opacity: 0; pointer-events: none; transition: opacity 0.6s 0.2s, transform 0.6s 0.2s; z-index: 3; }
.facts p, .facts dl { margin: 0; }
.facts-title { font: 600 11px/1 var(--kit-sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--brass); }
.phase-name { margin-top: 12px !important; font: italic 400 34px/1.05 var(--kit-oldstyle); }
.phase-age { margin-top: 8px !important; font: 500 13px/1.3 var(--kit-sans); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.phase-row { display: flex; align-items: center; gap: 10px; margin: 18px 0 22px; font: 500 12px/1 var(--kit-sans); color: var(--ink-faint); }
.phase-row input { flex: 1; accent-color: var(--brass); }
.mini { all: unset; cursor: pointer; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); font: 500 12px/1 var(--kit-sans); color: var(--ink); }
.mini:hover { background: rgb(255 255 255 / 0.08); }
.facts dl { display: grid; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts dl div { display: flex; justify-content: space-between; gap: 12px; }
.facts dt { font: 400 13px/1.3 var(--kit-sans); color: var(--ink-soft); }
.facts dd { margin: 0; font: 600 13px/1.3 var(--kit-sans); font-variant-numeric: tabular-nums; }
.note { margin-top: 14px !important; font: 400 12.5px/1.5 var(--kit-sans); color: var(--ink-soft); }
.src { margin-top: 14px !important; font: 400 10.5px/1.4 var(--kit-sans); color: var(--ink-faint); }

.is-looking .dim { opacity: 1; }
.is-looking .eye { right: calc(50vw - min(58vh, 540px) / 2 + 150px); bottom: calc(50vh - min(58vh, 540px) / 2 - 46px); width: min(58vh, 540px); }
.is-looking .eye-cap { opacity: 0.85; }
.is-looking .facts { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }
.mast h1, .mast .line, .mast .over { transition: opacity 0.5s; }
.is-looking .mast .line, .is-looking .mast .over, .is-looking .mast h1 { opacity: 0.12; }

.hint { position: fixed; right: 56px; top: 54px; margin: 0; padding: 7px 13px; border-radius: 999px; background: rgb(8 10 18 / 0.5); border: 1px solid var(--line);
  font: 400 12px/1 var(--kit-sans); color: var(--ink-soft); transition: opacity 0.6s; }
.hint.is-gone { opacity: 0; }
@media (max-width: 1200px) { h1 { font-size: 44px; } .mast { left: 40px; } .eye { right: 40px; width: 180px; } .facts { right: 40px; width: 270px; } }
