:root {
  --paper: #f6f6f3;
  --ink: #171715;
  --muted: #73736e;
  --rule: rgba(23, 23, 21, 0.16);
  --panel: rgba(246, 246, 243, 0.88);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; background: var(--paper); color: var(--ink); }
body { overflow: hidden; font-family: "DM Mono", monospace; }
button, a { color: inherit; font: inherit; }
a { text-decoration: none; }
#field { position: fixed; inset: 0; width: 100%; height: 100%; }
.masthead {
  position: fixed; z-index: 3; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  height: 3rem; padding: 0 1.75rem; border-bottom: 1px solid var(--rule);
  background: rgba(246, 246, 243, 0.66); backdrop-filter: blur(8px);
  font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase;
}
main { position: relative; z-index: 2; width: 100%; height: 100svh; pointer-events: none; }
.identity { position: fixed; top: 5.75rem; left: 1.75rem; width: min(34rem, 46vw); }
.identity p { margin: 0 0 0.55rem; color: var(--muted); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; }
h1 { margin: 0; max-width: 11ch; font: 400 clamp(3.2rem, 7.2vw, 7.2rem)/0.82 "Newsreader", serif; letter-spacing: -0.055em; }
.transport { position: fixed; z-index: 4; left: 1.75rem; bottom: 1.65rem; display: flex; gap: 0.4rem; pointer-events: auto; }
button { min-height: 2.45rem; padding: 0 0.85rem; border: 1px solid var(--rule); background: var(--panel); cursor: pointer; font-size: 0.62rem; text-transform: uppercase; }
#fallback[hidden] { display: none; }
button:hover, button:focus-visible, button[aria-current="true"] { background: var(--ink); color: var(--paper); outline: none; }
.index { position: fixed; z-index: 3; right: 1.75rem; bottom: 1.65rem; width: min(42rem, 48vw); padding: 0.65rem; border: 1px solid var(--rule); background: var(--panel); pointer-events: auto; backdrop-filter: blur(8px); }
#controls { display: grid; grid-template-columns: repeat(20, 1fr); gap: 0.2rem; }
#controls button { min-width: 0; min-height: 1.55rem; padding: 0; font-size: 0.55rem; }
.hint { position: fixed; left: 1.75rem; bottom: 4.75rem; margin: 0; color: var(--muted); font-size: 0.58rem; }
#fallback { position: fixed; inset: 0; z-index: 8; display: grid; place-items: center; background: var(--paper); }
@media (max-width: 760px) {
  .masthead { padding: 0 0.85rem; }
  .masthead span { display: none; }
  .identity { top: 4.5rem; left: 0.9rem; width: calc(100vw - 1.8rem); }
  h1 { font-size: clamp(3rem, 16vw, 5.3rem); }
  .index { right: 0.75rem; left: 0.75rem; bottom: 4.8rem; width: auto; max-height: 28vh; overflow-y: auto; }
  #controls { grid-template-columns: repeat(10, 1fr); }
  .transport { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; justify-content: space-between; }
  .hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
