/* Higher or Lower: Space Edition (/play/higher-or-lower, ADR 0112), light
   theme; higher-or-lower-dark.css overrides it. Built on learn.css (cards,
   kicker, sources). Phone first: two cards side by side, the answers as two
   wide buttons under the thumb. */

.hl-page {
  --hl-right: #1a8a52;
  --hl-right-soft: #e3f4ea;
  --hl-wrong: #c2412f;
  --hl-wrong-soft: #fbe7e3;
  --hl-up: #4a5a8c;
  --hl-down: #9a5a16;
  --hl-mystery: #0b1130;
  --hl-mystery-ink: #e7ebfa;
}

.hl-game { max-width: 760px; margin-inline: auto; touch-action: pan-x pinch-zoom; }
.hl-how { max-width: 760px; margin-inline: auto; }

.hl-modes { display: flex; gap: 6px; margin-bottom: 12px; }
.hl-mode {
  flex: 1 1 0; min-height: 40px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
}
.hl-mode[aria-pressed="true"] { background: var(--accent-moon-soft); border-color: var(--accent-moon); color: var(--accent-moon); }

.hl-dots { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 12px; justify-content: center; }
.hl-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); }
.hl-dot.is-now { border-color: var(--accent-moon); }
.hl-dot.is-right { background: var(--hl-right); border-color: var(--hl-right); }
.hl-dot.is-wrong { background: var(--hl-wrong); border-color: var(--hl-wrong); }

.hl-status { display: flex; justify-content: center; gap: 16px; margin: 0 0 12px; font-weight: 650; }
.hl-status span { padding: 2px 12px; border-radius: 999px; background: var(--accent-moon-soft); color: var(--accent-moon); }

.hl-round { text-align: center; margin: 0 0 4px; color: var(--muted); }
.hl-round strong { color: var(--text); }
.hl-hint { text-align: center; margin: 0 0 10px; color: var(--muted); font-size: 0.88rem; }

.hl-cards { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: stretch; margin: 10px 0; }
.hl-cards-small { grid-template-columns: 1fr 1fr; }
.hl-vs { align-self: center; color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.hl-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 10px; text-align: center;
  background: var(--surface); display: flex; flex-direction: column; gap: 2px; min-width: 0;
  transition: transform 0.18s ease;
}
.hl-card.hl-hidden { background: var(--hl-mystery); color: var(--hl-mystery-ink); border-color: var(--hl-mystery); }
.hl-kind { margin: 0; font-size: 0.72rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; }
.hl-name { margin: 2px 0 6px; font-size: 1.08rem; line-height: 1.25; overflow-wrap: anywhere; }
.hl-figure { margin: auto 0 0; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hl-unknown { font-size: 2rem; }
.hl-note { margin: 0; font-size: 0.8rem; opacity: 0.8; }
.hl-src { font-size: 0.8rem; margin-top: 4px; }
.hl-hidden .hl-src { color: #a9c1ff; }
.hl-cards-small .hl-card { padding: 8px; }
.hl-cards-small .hl-name { font-size: 0.95rem; margin-bottom: 2px; }
.hl-cards-small .hl-figure { font-size: 1rem; }

.hl-question { text-align: center; font-size: 1.1rem; font-weight: 650; margin: 12px 0 10px; }
.hl-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hl-choice {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px;
  border-radius: 14px; border: 2px solid currentColor; background: var(--surface);
  font: inherit; font-size: 1.08rem; font-weight: 700; text-decoration: none; cursor: pointer;
}
.hl-up { color: var(--hl-up); }
.hl-down { color: var(--hl-down); }
.hl-choice:hover, .hl-choice:focus-visible { background: var(--accent-moon-soft); }
.hl-swipe { text-align: center; color: var(--muted); font-size: 0.82rem; margin: 8px 0 0; }

.hl-result { border-radius: 14px; padding: 10px 12px; margin: 0 0 14px; }
.hl-result p { margin: 0 0 6px; }
.hl-result.is-right { background: var(--hl-right-soft); }
.hl-result.is-right strong { color: var(--hl-right); }
.hl-result.is-wrong { background: var(--hl-wrong-soft); }
.hl-result.is-wrong strong { color: var(--hl-wrong); }

.hl-summary { text-align: center; padding: 8px 0; }
.hl-total { font-size: 1.5rem; font-weight: 750; margin: 6px 0; }
.hl-squares { font-size: clamp(0.95rem, 5vw, 1.4rem); letter-spacing: 1px; white-space: nowrap; margin: 4px 0 10px; }
.hl-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.hl-note-out { color: var(--muted); min-height: 1.4em; margin: 6px 0 0; }

/* Swipe feedback while a finger drags the stage. */
.hl-stage.is-up .hl-hidden { transform: translateY(-8px); }
.hl-stage.is-down .hl-hidden { transform: translateY(8px); }

@media (min-width: 640px) {
  .hl-card { padding: 18px 14px; }
  .hl-name { font-size: 1.3rem; }
  .hl-figure { font-size: 1.5rem; }
  .hl-cards { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .hl-card { transition: none; }
}
