:root {
  --ink: #000;
  --paper: #F1EDE6;
  --dim: rgba(241, 237, 230, .55);
  --line: rgba(241, 237, 230, .18);
  --font: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --ui: ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #000; color: var(--paper); overflow: hidden; overscroll-behavior: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
button:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.hud { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 14px) 18px 0; pointer-events: none; }
.dots { display: flex; gap: 7px; list-style: none; margin: 0; padding: 0; min-height: 8px; }
.dots li { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--paper)); box-shadow: 0 0 8px var(--c, var(--paper)); opacity: .85; }
.info-btn { pointer-events: auto; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: none;
  font: 15px var(--ui); color: var(--dim); }

.caption {
  position: fixed; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 38px); margin: 0 auto; padding: 0 28px;
  max-width: 30ch; text-align: center; font: italic 19px/1.4 var(--font); color: var(--paper);
  opacity: 0; transition: opacity 1.2s ease; pointer-events: none; text-shadow: 0 0 18px rgba(0, 0, 0, .9);
}
.caption.on { opacity: .9; }
.caption.clue { font-size: 16px; color: var(--dim); }

.sheet { position: fixed; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 16px;
  padding: 28px 28px calc(env(safe-area-inset-bottom) + 40px);
  background: linear-gradient(to top, rgba(0, 0, 0, .92) 45%, rgba(0, 0, 0, 0)); }
.sheet h1 { margin: 0; font: 400 clamp(52px, 16vw, 88px)/.9 var(--font); letter-spacing: -.02em; font-style: italic; }
.sheet h2 { margin: 0; font: italic 400 36px/1 var(--font); }
.sheet p { margin: 0; max-width: 32ch; font: 18px/1.45 var(--font); color: var(--dim); }
.sheet .fine { font: 13px/1.45 var(--ui); max-width: 40ch; }
.primary { align-self: flex-start; margin-top: 8px; border: 0; border-radius: 999px; padding: 15px 30px;
  font: 600 17px var(--ui); background: var(--paper); color: #000; }
.ghost { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 14px 22px; font: 15px var(--ui); color: var(--dim); margin-top: 8px; }
.row { display: flex; gap: 12px; align-items: center; }
@media (prefers-reduced-motion: reduce) { .caption { transition: none; } }
