@font-face { font-family: "Newsreader"; src: url("/fonts/NewsreaderVariable-Italic.woff2") format("woff2"); font-style: italic; font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/NewsreaderVariable.woff2") format("woff2"); font-style: normal; font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/InterVariable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #070d0a; --gold: #e3bf68; --gold-hi: #fbeab4; --gold-lo: #a87520; --glass: rgba(7, 13, 10, .38);
  --line: rgba(251, 234, 180, .28); --white: #fbf6ea;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--white); overflow: hidden; }
body { font-family: "Inter", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.stage { position: fixed; inset: 0; overflow: hidden; background: var(--ink); }
.world { position: absolute; inset: 0; }
.layer { position: absolute; top: 0; left: 0; height: 100%; width: auto; max-width: none; opacity: 0; transition: opacity 1.6s ease; will-change: transform, opacity; }
.layer.on { opacity: 1; }
.layer img, .layer video { display: block; height: 100%; width: auto; }
.layer.fit { width: 100%; height: auto; top: 50%; translate: 0 -50%; }
.layer.fit img, .layer.fit video { width: 100%; height: auto; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(var(--travel)); } }
.layer.drift { animation: drift var(--dur, 80s) ease-in-out infinite alternate; }
.veil { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(7,13,10,.35) 0, rgba(7,13,10,0) 18%, rgba(7,13,10,0) 62%, rgba(7,13,10,.72) 100%); }

.mark { position: fixed; top: max(18px, env(safe-area-inset-top)); left: 22px; z-index: 5; width: 40px; height: 40px; border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line), 0 6px 30px rgba(0,0,0,.4); transition: transform .4s ease, box-shadow .4s ease; }
.mark:hover { transform: rotate(30deg) scale(1.06); box-shadow: 0 0 0 1px var(--gold), 0 0 40px rgba(227,191,104,.35); }
.mark img { width: 100%; height: 100%; display: block; }

.hud { position: fixed; left: clamp(20px, 4vw, 64px); bottom: calc(104px + env(safe-area-inset-bottom)); z-index: 5; max-width: min(90vw, 980px); }
.title { margin: 0 0 18px; font-family: "Newsreader", Georgia, serif; font-style: italic; font-weight: 340; font-variation-settings: "opsz" 72;
  font-size: clamp(2.6rem, 6.4vw, 7rem); line-height: .9; letter-spacing: -0.055em; color: var(--white);
  text-shadow: 0 2px 40px rgba(0,0,0,.45); transition: opacity .8s ease, transform .8s ease; }
.title.out { opacity: 0; transform: translateY(10px); }
.glyphs { display: flex; gap: 12px; align-items: center; }
.g { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: inset 0 0 0 1px var(--line); transition: transform .25s ease, box-shadow .25s ease, background .25s ease; }
.g:hover, .g:focus-visible { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--gold), 0 0 30px rgba(227,191,104,.25); outline: none; }
.g svg { width: 26px; height: 26px; fill: none; stroke: var(--gold-hi); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.g-set { width: 64px; height: 64px; background: radial-gradient(circle at 50% 35%, rgba(251,234,180,.32), rgba(168,117,32,.28) 60%, rgba(7,13,10,.4)); box-shadow: inset 0 0 0 1px var(--gold); }
.g-set svg { width: 34px; height: 34px; }
.g-set .spark { opacity: 0; transition: opacity .3s; }
.g-set:hover .spark { opacity: 1; }
.g.done { box-shadow: inset 0 0 0 2px var(--gold), 0 0 60px rgba(227,191,104,.6); }
.g.done svg { stroke: #fff; }
.g.busy svg { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.g.miss { box-shadow: inset 0 0 0 1px rgba(255,140,120,.7); }

.moments { display: flex; gap: 8px; margin-left: 8px; }
.moment { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); background: var(--glass); display: grid; place-items: center; }
.moment svg { width: 18px; height: 18px; fill: none; stroke: var(--gold-hi); stroke-width: 2; stroke-linecap: round; }
.moment.on { box-shadow: inset 0 0 0 1.5px var(--gold); background: rgba(227,191,104,.22); }

.sheet { display: flex; gap: 10px; margin-top: 14px; }
.sheet[hidden] { display: none; }
.chip { width: 74px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px var(--line); transition: transform .2s, box-shadow .2s; }
.chip:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--gold); }
.chip svg { width: 46px; height: 30px; fill: none; stroke: var(--gold-hi); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chip .on { fill: rgba(227,191,104,.45); }
.chip[hidden] { display: none; }

.strip { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; gap: 10px; padding: 18px clamp(20px, 4vw, 64px) calc(22px + env(safe-area-inset-bottom));
  overflow-x: auto; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.thumb { flex: 0 0 auto; width: 170px; height: 47px; border-radius: 10px; overflow: hidden; position: relative; opacity: .62;
  box-shadow: inset 0 0 0 1px rgba(251,234,180,.18), 0 6px 20px rgba(0,0,0,.35); transition: opacity .3s, transform .3s, box-shadow .3s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { opacity: 1; transform: translateY(-3px); }
.thumb.on { opacity: 1; box-shadow: inset 0 0 0 0 transparent, 0 0 0 2px var(--gold), 0 0 34px rgba(227,191,104,.35); }

.foot { position: fixed; right: 16px; bottom: 6px; z-index: 6; display: flex; gap: 10px; align-items: center; font: 10px/1 ui-monospace, SFMono-Regular, monospace; opacity: .5; }
.access { color: var(--gold); font-size: 11px; }
.build-stamp { color: var(--white) !important; text-decoration: none; }

@media (max-width: 720px) {
  .hud { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .thumb { width: 120px; height: 34px; }
  .g { width: 46px; height: 46px; } .g-set { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) { .layer.drift { animation: none; } }
