:root {
  color-scheme: dark;
  --ink: #070908;
  --paper: #e8eee7;
  --muted: #89928b;
  --line: rgba(232, 238, 231, 0.18);
  --solar: #e6b65a;
  font-family: "Arial Narrow", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--ink);
  color: var(--paper);
}

* { box-sizing: border-box; }

html, body, main {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--ink);
}

button, a { color: inherit; font: inherit; }

button:focus-visible, a:focus-visible {
  outline: 2px solid var(--solar);
  outline-offset: 4px;
}

#universe {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

main::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 38%, rgba(2, 3, 3, 0.38) 100%);
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 2;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 3.5vw, 54px);
  border-bottom: 1px solid var(--line);
  pointer-events: none;
}

.wordmark, .sound-toggle { pointer-events: auto; }

.wordmark {
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.sound-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  font-size: 11px;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.sound-bars { display: flex; align-items: center; gap: 2px; height: 13px; }
.sound-bars i { display: block; width: 2px; height: 4px; background: var(--solar); }
.sound-toggle[aria-pressed="true"] .sound-bars i:nth-child(1) { animation: pulse 0.65s ease-in-out infinite alternate; }
.sound-toggle[aria-pressed="true"] .sound-bars i:nth-child(2) { animation: pulse 0.48s ease-in-out 0.12s infinite alternate; }
.sound-toggle[aria-pressed="true"] .sound-bars i:nth-child(3) { animation: pulse 0.8s ease-in-out 0.2s infinite alternate; }

.intro {
  position: fixed;
  z-index: 2;
  left: clamp(20px, 7vw, 110px);
  top: 50%;
  width: min(580px, calc(100vw - 40px));
  transform: translateY(-48%);
  pointer-events: none;
  transition: opacity 1.1s ease, transform 1.1s cubic-bezier(.16, 1, .3, 1);
}

.intro.is-gone { opacity: 0; transform: translateY(-42%); }

.kicker {
  margin: 0 0 20px;
  color: var(--solar);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 9ch;
  font-size: clamp(58px, 8.5vw, 126px);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.82;
}

.instruction {
  max-width: 350px;
  margin: 30px 0 26px;
  color: #b9c1ba;
  font-size: clamp(14px, 1.15vw, 17px);
  line-height: 1.5;
}

.enter {
  pointer-events: auto;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--solar);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s ease, transform .2s ease;
}

.enter:hover { color: var(--solar); }
.enter:active { transform: translateY(1px); }

.field-notes {
  position: fixed;
  z-index: 2;
  right: clamp(20px, 3.5vw, 54px);
  bottom: 28px;
  display: flex;
  gap: 26px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  pointer-events: none;
}

#event-name { color: var(--paper); }

.key-guide {
  position: fixed;
  z-index: 2;
  left: clamp(20px, 3.5vw, 54px);
  bottom: 24px;
  display: grid;
  grid-template-columns: auto auto;
  gap: 5px 12px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
}

.key-guide span { color: var(--solar); font-weight: 700; }
.key-guide b { font-weight: 400; }

noscript {
  position: fixed;
  z-index: 3;
  inset: auto 20px 20px;
  padding: 12px;
  background: var(--ink);
  border: 1px solid var(--line);
}

@keyframes pulse { to { height: 13px; } }

@media (max-width: 700px) {
  .topbar { height: 62px; }
  .intro { top: 47%; left: 20px; }
  h1 { font-size: clamp(54px, 18vw, 82px); }
  .instruction { max-width: 280px; }
  .key-guide { display: none; }
  .field-notes { left: 20px; right: auto; bottom: max(20px, env(safe-area-inset-bottom)); }
  #seed-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media (prefers-contrast: more) {
  :root { --muted: #b8c0b9; --line: rgba(232, 238, 231, 0.4); }
}
