/* ============================================================================
   Higher or Lower — its own skin. Rides on the shared palette in css/style.css
   (--ink, --gold, --parchment, --serif-display/-body, --text-light), so it
   follows the site's light/dark theme automatically.
   ========================================================================== */

.hl-body { min-height: 100vh; overflow-y: auto; }
html:has(.hl-body) { height: auto; overflow-y: auto; }

.hl-shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: 26px 18px 60px;
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
}

/* the engine shows one section at a time */
.hl-hidden { display: none !important; }
.hl-sec { width: 100%; }

/* the home / daily-intro screen reuses the old setup styling */
#hl-home { text-align: center; margin: auto 0; padding: 20px 0; }
#hl-home h1 {
  font-family: var(--serif-display);
  font-size: clamp(30px, 6vw, 52px);
  color: var(--gold-bright);
  margin: 0 0 14px;
  letter-spacing: 0.02em;
}
.hl-start {
  margin-top: 6px; padding: 14px 30px;
  border: none; border-radius: 11px;
  background: var(--gold); color: var(--ink);
  font-family: var(--serif-display); font-size: 17px; cursor: pointer;
  transition: background 0.14s;
}
.hl-start:hover { background: var(--gold-bright); }
.hl-ghostbtn {
  display: block; margin: 14px auto 0;
  background: none; border: none; color: var(--gold);
  font-family: var(--serif-display); font-size: 14px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.hl-ghostbtn:hover { color: var(--gold-bright); }
.hl-daily-done {
  max-width: 440px; margin: 0 auto 22px;
  font-family: var(--serif-body); font-size: 16px; line-height: 1.5;
  color: var(--text-light); opacity: 0.9;
}
.hl-daily-done .daily-badge { margin-right: 4px; }

/* the metric tag under the prompt, and the daily round counter */
.hl-metrictag {
  text-align: center;
  font-family: var(--serif-body); font-size: 13px; font-style: italic;
  color: var(--gold); opacity: 0.85; margin: -10px 0 16px;
}
.hl-rounds {
  font-family: var(--serif-display); font-size: 14px; color: var(--gold);
  letter-spacing: 0.04em;
}
.hl-rounds b { color: var(--gold-bright); font-size: 18px; }
.dr-scoreline {
  font-family: var(--serif-body); font-size: 14px; color: var(--gold-dim);
  margin-bottom: 14px;
}

.hl-kicker {
  font-family: var(--serif-display);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--gold);
  margin-bottom: 8px;
}

/* ===================================================== SETUP ============= */
#hl-setup { text-align: center; margin: auto 0; padding: 20px 0; }
#hl-setup h1 {
  font-family: var(--serif-display);
  font-size: clamp(30px, 6vw, 52px);
  color: var(--gold-bright);
  margin: 0 0 14px;
  letter-spacing: 0.02em;
}
.hl-sub {
  max-width: 560px;
  margin: 0 auto 30px;
  font-family: var(--serif-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-light);
  opacity: 0.85;
}

.hl-picks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  max-width: 720px;
  margin: 0 auto;
}
.hl-pick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 18px 18px 16px;
  border: 1px solid var(--gold-dim);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(201,161,90,0.08), rgba(0,0,0,0.14));
  color: var(--text-light);
  cursor: pointer;
  transition: transform 0.14s, border-color 0.14s, box-shadow 0.14s;
}
.hl-pick:hover {
  transform: translateY(-3px);
  border-color: var(--gold-bright);
  box-shadow: 0 10px 26px rgba(0,0,0,0.28);
}
.hl-pick-emoji { font-size: 30px; line-height: 1; margin-bottom: 6px; }
.hl-pick-name { font-family: var(--serif-display); font-size: 19px; color: var(--gold-bright); }
.hl-pick-tag { font-family: var(--serif-body); font-size: 14px; opacity: 0.82; }
.hl-pick-best {
  margin-top: 8px;
  font-style: normal;
  font-family: var(--serif-display);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.hl-pick-best-none { color: var(--gold-dim); }

/* ===================================================== PLAY ============== */
.hl-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.hl-quit {
  background: none;
  border: none;
  color: var(--gold);
  font-family: var(--serif-display);
  font-size: 13px;
  letter-spacing: 0.05em;
  cursor: pointer;
  padding: 6px 2px;
}
.hl-quit:hover { color: var(--gold-bright); }
.hl-scoreboard {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.hl-score-now {
  font-family: var(--serif-display);
  font-size: 26px;
  color: var(--gold-bright);
  font-weight: 600;
  min-width: 1ch;
  text-align: right;
}
.hl-score-lbl {
  font-family: var(--serif-display);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dim);
}
.hl-score-best {
  margin-left: 10px;
  padding-left: 12px;
  border-left: 1px solid var(--gold-dim);
  font-family: var(--serif-display);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.hl-metricline {
  text-align: center;
  font-family: var(--serif-display);
  font-size: clamp(18px, 3.4vw, 26px);
  color: var(--text-light);
  margin: 6px 0 18px;
}
.hl-metricline-emoji { margin-right: 8px; }

/* ---- the arena: known card | middle | mystery card --------------------- */
.hl-arena {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
}

.hl-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--gold-dim);
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--ink-2);
  box-shadow: 0 14px 34px rgba(0,0,0,0.30);
}
.hl-c-media { position: absolute; inset: 0; }
.hl-c-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 28%;
  display: block;
}
.hl-c-media.hl-c-sigil {
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(201,161,90,0.16), rgba(0,0,0,0.30));
}
.hl-c-media.hl-c-sigil img {
  width: 62%; height: 62%;
  object-fit: contain;
  margin: 0 auto;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.5));
}
.hl-img-fail { opacity: 0; }               /* a broken portrait just leaves the plate */
.hl-c-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6,4,2,0.92) 8%, rgba(6,4,2,0.45) 44%, rgba(6,4,2,0.05) 78%);
}
.hl-c-body {
  position: relative;
  padding: 18px 18px 20px;
  text-align: center;
  color: #f0e6d2;                          /* always light: it sits on a dark scrim */
}
.hl-c-name {
  display: block;
  font-family: var(--serif-display);
  font-size: clamp(19px, 3.4vw, 26px);
  color: #f4ecd8;
  line-height: 1.1;
}
.hl-c-sub {
  display: block;
  font-family: var(--serif-body);
  font-size: 13px;
  opacity: 0.82;
  margin-top: 3px;
  min-height: 1.2em;
}
.hl-c-metric {
  display: block;
  margin-top: 12px;
  line-height: 1;
}
.hl-num {
  font-family: var(--serif-display);
  font-size: clamp(34px, 7vw, 52px);
  font-weight: 600;
  color: var(--gold-bright);
  display: inline-block;
}
.hl-num-q { color: #f4ecd8; opacity: 0.55; }
.hl-unit {
  display: block;
  font-family: var(--serif-display);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 4px;
}
.hl-bar {
  display: block;
  height: 6px;
  margin-top: 14px;
  border-radius: 4px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
}
.hl-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transition: width 0.85s cubic-bezier(0.2, 0.8, 0.25, 1);
}

/* verdict tints */
.hl-card.hl-right { border-color: #6fae6f; box-shadow: 0 0 0 2px rgba(111,174,111,0.55), 0 14px 34px rgba(0,0,0,0.30); }
.hl-card.hl-wrong { border-color: #c65b5b; box-shadow: 0 0 0 2px rgba(198,91,91,0.55), 0 14px 34px rgba(0,0,0,0.30); }

/* ---- the middle column ------------------------------------------------- */
.hl-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 132px;
  padding: 0 4px;
}
.hl-vs {
  font-family: var(--serif-display);
  font-size: 20px;
  color: var(--gold-dim);
  letter-spacing: 0.1em;
}
.hl-choices { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.hl-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px 12px;
  border: 1px solid var(--gold);
  border-radius: 11px;
  background: linear-gradient(160deg, rgba(201,161,90,0.14), rgba(0,0,0,0.12));
  color: var(--text-light);
  font-family: var(--serif-display);
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.12s, background 0.12s, border-color 0.12s;
}
.hl-choice:hover {
  transform: scale(1.03);
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold-bright);
}
.hl-choice-arrow { font-size: 12px; }
.hl-choice-up .hl-choice-arrow { color: #6fae6f; }
.hl-choice-down .hl-choice-arrow { color: #c98a5b; }
.hl-choice:hover .hl-choice-arrow { color: inherit; }
.hl-choices-done .hl-choice { pointer-events: none; opacity: 0.4; transform: none; }
.hl-choices-done .hl-choice.hl-chosen { opacity: 1; border-color: var(--gold-bright); background: var(--gold); color: var(--ink); }

.hl-verdict { min-height: 20px; text-align: center; }
.hl-verdict-on { animation: hl-pop 0.3s ease; }
.hl-verdict .hl-v-good { color: #7dc07d; font-family: var(--serif-display); font-size: 14px; }
.hl-verdict .hl-v-bad { color: #d97a7a; font-family: var(--serif-display); font-size: 14px; }
.hl-verdict .hl-v-tie { color: var(--gold-bright); font-family: var(--serif-display); font-size: 13px; }

.hl-source {
  margin-top: 16px;
  text-align: center;
  font-family: var(--serif-body);
  font-size: 12px;
  font-style: italic;
  opacity: 0.6;
  color: var(--text-light);
}

/* entrance animations */
.hl-slidein { animation: hl-slidein 0.42s cubic-bezier(0.2, 0.8, 0.25, 1); }
@keyframes hl-slidein {
  from { transform: translateX(26px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes hl-pop {
  0% { transform: scale(0.7); opacity: 0; }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

/* ===================================================== GAME OVER ========= */
#hl-over { margin: auto 0; text-align: center; }
.hl-over-card {
  max-width: 460px;
  margin: 0 auto;
  padding: 34px 28px 30px;
  border: 1px solid var(--gold-dim);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(201,161,90,0.08), rgba(0,0,0,0.16));
  animation: hl-pop 0.4s ease;
}
.hl-over-num {
  font-family: var(--serif-display);
  font-size: 74px;
  font-weight: 600;
  line-height: 1;
  color: var(--gold-bright);
}
.hl-over-lbl {
  font-family: var(--serif-display);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 4px;
}
.hl-over-record { margin-top: 14px; color: var(--gold-bright); font-family: var(--serif-display); font-size: 17px; }
.hl-over-best { margin-top: 14px; color: var(--gold-dim); font-family: var(--serif-display); font-size: 14px; }
.hl-over-miss {
  margin-top: 18px;
  font-family: var(--serif-body);
  font-size: 15px;
  line-height: 1.5;
  opacity: 0.85;
  color: var(--text-light);
}
.hl-over-actions { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.hl-again {
  padding: 14px;
  border: none;
  border-radius: 11px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--serif-display);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.14s;
}
.hl-again:hover { background: var(--gold-bright); }
.hl-change {
  padding: 11px;
  border: 1px solid var(--gold-dim);
  border-radius: 11px;
  background: none;
  color: var(--gold);
  font-family: var(--serif-display);
  font-size: 14px;
  cursor: pointer;
}
.hl-change:hover { border-color: var(--gold); color: var(--gold-bright); }

.game-backlink { text-align: center; margin-top: 30px; }
.game-backlink a { color: var(--gold); font-family: var(--serif-display); font-size: 13px; text-decoration: none; }
.game-backlink a:hover { color: var(--gold-bright); }

/* ===================================================== MOBILE =========== */
@media (max-width: 680px) {
  .hl-arena {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .hl-card { min-height: 220px; }
  .hl-mid { flex-direction: row; flex-wrap: wrap; min-width: 0; padding: 4px 0; }
  .hl-vs { order: -1; width: 100%; }
  .hl-choices { flex-direction: row; }
  .hl-choice { flex: 1; }
  .hl-verdict { width: 100%; }
  .hl-c-media img { object-position: 50% 22%; }
}

/* honor reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .hl-slidein, .hl-verdict-on, .hl-over-card { animation: none; }
  .hl-bar-fill { transition: none; }
}
