:root {
  --bg: #14120f;
  --surface: #1e1b17;
  --line: #2e2a24;
  --text: #ece6dc;
  --muted: #9a9286;
  --accent: #e8a33d;
  --radius-frame: 6px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.wordmark {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.status {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.status strong {
  color: var(--accent);
  font-weight: 600;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h2 {
  margin: 48px 0 16px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.intro {
  max-width: 640px;
  padding-top: 12vh;
}

.lede {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 18px;
}

.fine {
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #1a1206;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms var(--ease), opacity 120ms var(--ease);
}

.button:active {
  transform: scale(0.97);
}

.button:disabled {
  opacity: 0.5;
  cursor: progress;
}

.button.ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}

.button:focus-visible,
.shot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.round {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.choice {
  margin: 0;
}

.shot {
  display: block;
  width: 100%;
  height: min(68vh, 640px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-frame);
  background: #0c0b09;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 120ms var(--ease), transform 120ms var(--ease);
}

.shot:hover {
  border-color: var(--muted);
}

.shot:active {
  transform: scale(0.99);
}

.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 200ms var(--ease);
}

.shot img.loaded {
  opacity: 1;
}

.pair.busy .shot {
  pointer-events: none;
}

figcaption {
  margin-top: 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hint {
  margin-top: 16px;
  color: var(--muted);
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.specs {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 24px;
  margin: 0 0 32px;
}

.specs dt {
  color: var(--muted);
}

.specs dd {
  margin: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.runners {
  margin: 0;
  padding: 0;
  list-style: none;
}

.runners li {
  display: flex;
  justify-content: space-between;
  max-width: 480px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.runners span {
  color: var(--muted);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.gallery figure {
  margin: 0;
}

.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-frame);
  background: var(--surface);
  object-fit: cover;
}

.gallery figcaption a {
  text-decoration: none;
}

.gallery figcaption a:hover {
  text-decoration: underline;
}

@media (max-width: 700px) {
  main {
    padding-top: 16px;
  }

  .pair {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .shot {
    height: 38dvh;
  }

  .hint {
    display: none;
  }

  .actions .button {
    flex: 1 1 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
