/* Hardest Ever, Simpsons trivia game styles.

   Tokens (the CSS custom properties under :root) drive every visual decision
   in the game. Edit a token and the whole UI follows. New components should
   compose existing tokens before introducing new colour or spacing values.

   QXR Software L.L.C., 2026.
*/

:root {
  --he-yellow: #ffd90f;
  --he-yellow-dim: #e6c200;
  --he-blue: #70d1fe;
  --he-blue-dark: #0095da;
  --he-donut-pink: #ff6b9d;
  --he-bg: #1a1a2e;
  --he-bg-card: #252542;
  --he-text: #fff8e7;
  --he-text-dim: #c9c4b0;
  --he-danger: #ff4757;
  --he-success: #2ed573;
  --he-radius: 10px;
  --he-font: "Segoe UI", "Arial Rounded MT Bold", Arial, sans-serif;
  /* // _qxr.web - procedural Springfield Hand reads as block glyphs in browsers; use system stack until v2 font ships. */
  --he-font-display: "Arial Rounded MT Bold", "Franklin Gothic Medium", "Segoe UI", Tahoma, sans-serif;
}

/* Springfield Hand kept in repo for local font-preview.html only - not loaded on production pages. */

* { box-sizing: border-box; }

.he-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--he-font);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255, 217, 15, 0.12), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(112, 209, 254, 0.1), transparent 45%),
    var(--he-bg);
  color: var(--he-text);
  padding-bottom: 5.25rem;
}

/* Skip-link, WCAG 2.4.1. Hidden offscreen until focused with the Tab key. */
.skip-link,
.he-skiplink {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  padding: 0.6rem 1rem;
  background: var(--he-yellow);
  color: #000;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}
.skip-link:focus,
.he-skiplink:focus {
  left: 0;
  outline: 3px solid #000;
  outline-offset: 2px;
}

/* Tournament eligibility pill (shows inside the Tournament mode card) */
.he-mode-pill {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--he-font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(46, 213, 115, 0.18);
  color: #2ed573;
  border: 1px solid rgba(46, 213, 115, 0.55);
  white-space: nowrap;
  pointer-events: none;
}
.he-mode-pill[data-state="cooldown"] {
  background: rgba(255, 165, 2, 0.18);
  color: #ffb84d;
  border-color: rgba(255, 165, 2, 0.55);
}
.he-mode-pill[data-state="cap"] {
  background: rgba(255, 71, 87, 0.2);
  color: #ff7382;
  border-color: rgba(255, 71, 87, 0.55);
}
.he-mode-pill[data-state="locked-monthly"],
.he-mode-pill[data-state="locked-daily"] {
  background: rgba(155, 89, 182, 0.22);
  color: #d8b4fe;
  border-color: rgba(155, 89, 182, 0.55);
}
.he-mode-pill[data-state="signin"],
.he-mode-pill[data-state="offline"] {
  background: rgba(112, 209, 254, 0.18);
  color: var(--he-blue);
  border-color: rgba(112, 209, 254, 0.55);
}

.he-mode-card { position: relative; }

.he-mode-card__timer {
  display: block;
  position: absolute;
  top: 0.35rem;
  left: 0.45rem;
  right: 0.45rem;
  z-index: 1;
  padding: 0.28rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-align: center;
  color: var(--he-yellow);
  background: rgba(8, 10, 18, 0.72);
  border: 1px solid rgba(255, 217, 15, 0.45);
  border-radius: 999px;
  pointer-events: none;
}

.he-mode-card--timer-active {
  padding-top: 2.05rem;
}

.he-mode-card--timer-active .he-mode-card__icon {
  margin-top: 0.1rem;
}

.he-view-desktop .he-mode-card__timer,
.he-view-tablet .he-mode-card__timer {
  display: none;
}

.he-view-desktop .he-mode-card--timer-active,
.he-view-tablet .he-mode-card--timer-active {
  padding-top: 1rem;
}

.he-view-desktop .he-mode-card--timer-active .he-mode-card__icon,
.he-view-tablet .he-mode-card--timer-active .he-mode-card__icon {
  margin-top: 0;
}

.he-featured-panel__timer {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--he-yellow);
}

/* Mobile reset list (single panel above mode cards) */
.he-mobile-reset-panel {
  margin: 0.85rem 0 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--he-radius);
  background: rgba(37, 37, 66, 0.94);
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.he-mobile-reset-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.he-mobile-reset-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 0.55rem;
  row-gap: 0.12rem;
  align-items: center;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.he-mobile-reset-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.he-mobile-reset-row__plays {
  grid-row: 1 / span 2;
  min-width: 3.25rem;
  font-family: var(--he-font-display);
  font-size: clamp(0.88rem, 4vw, 1.08rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--he-yellow);
}

.he-mobile-reset-row__icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.he-mobile-reset-row__label {
  margin: 0;
  font-family: var(--he-font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--he-text-dim);
}

.he-mobile-reset-row__time {
  margin: 0;
  font-family: "DM Mono", "Consolas", "Courier New", monospace;
  font-size: clamp(0.92rem, 3.8vw, 1.05rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.03em;
  color: var(--he-yellow);
  text-align: right;
}

.he-mobile-reset-row__note {
  grid-column: 3 / span 2;
  margin: 0;
  font-size: 0.62rem;
  line-height: 1.35;
  color: var(--he-text-dim);
}

.he-mobile-reset-row--all-games .he-mobile-reset-row__plays,
.he-mobile-reset-row--all-games .he-mobile-reset-row__time {
  color: #7ee8df;
}

.he-mobile-reset-row--all-games .he-mobile-reset-row__icon {
  background: rgba(78, 205, 196, 0.14);
  border-color: rgba(78, 205, 196, 0.45);
}

.he-mobile-reset-row--daily .he-mobile-reset-row__plays,
.he-mobile-reset-row--daily .he-mobile-reset-row__time {
  color: var(--he-blue);
}

.he-mobile-reset-row--daily .he-mobile-reset-row__icon {
  background: rgba(112, 209, 254, 0.14);
  border-color: rgba(112, 209, 254, 0.45);
}

.he-mobile-reset-row--casual .he-mobile-reset-row__plays,
.he-mobile-reset-row--casual .he-mobile-reset-row__time {
  color: var(--he-yellow);
}

.he-mobile-reset-row--casual .he-mobile-reset-row__icon {
  background: rgba(255, 217, 15, 0.14);
  border-color: rgba(255, 217, 15, 0.45);
}

.he-mobile-page .he-mode-card__timer,
.he-mobile-page .he-mode-card__timer--subtle {
  display: none !important;
}

.he-mobile-page .he-mode-card--timer-active,
.he-mobile-page .he-mode-card--played {
  padding-top: 1rem;
}

.he-mobile-page .he-mode-card--wide.he-mode-card--timer-active,
.he-mobile-page .he-mode-card--wide.he-mode-card--played {
  padding-top: 1rem;
}

/* Desktop menu reset clock strip (above Choose Your Fate) */
.he-reset-clocks {
  display: none;
}

.he-view-desktop .he-reset-clocks,
.he-view-tablet .he-reset-clocks {
  display: grid;
  gap: 0.75rem;
  margin: 1.35rem 0 1.65rem;
}

.he-view-desktop .he-reset-clocks {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.he-view-tablet .he-reset-clocks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.he-reset-clock {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem 0.75rem 0.9rem;
  border-radius: var(--he-radius);
  background: rgba(37, 37, 66, 0.92);
  border: 2px solid rgba(255, 255, 255, 0.12);
  min-height: 6.5rem;
}

.he-reset-clock__head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.he-reset-clock__icon {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.he-reset-clock--all-games .he-reset-clock__icon {
  background: rgba(78, 205, 196, 0.14);
  border-color: rgba(78, 205, 196, 0.45);
}

.he-reset-clock--daily .he-reset-clock__icon {
  background: rgba(112, 209, 254, 0.14);
  border-color: rgba(112, 209, 254, 0.45);
}

.he-reset-clock--casual .he-reset-clock__icon {
  background: rgba(255, 217, 15, 0.14);
  border-color: rgba(255, 217, 15, 0.45);
}

.he-reset-clock--tournament .he-reset-clock__icon {
  background: rgba(255, 107, 157, 0.12);
  border-color: rgba(255, 107, 157, 0.35);
}

.he-reset-clock__label {
  margin: 0;
  font-family: var(--he-font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--he-text-dim);
}

.he-reset-clock__time {
  margin: 0;
  font-family: "DM Mono", "Consolas", "Courier New", monospace;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.04em;
  color: var(--he-yellow);
}

.he-reset-clock__note {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--he-text-dim);
}

.he-reset-clock--all-games {
  border-color: rgba(78, 205, 196, 0.55);
}

.he-reset-clock--all-games .he-reset-clock__label,
.he-reset-clock--all-games .he-reset-clock__time {
  color: #7ee8df;
}

.he-reset-clock--daily {
  border-color: rgba(112, 209, 254, 0.55);
}

.he-reset-clock--daily .he-reset-clock__label,
.he-reset-clock--daily .he-reset-clock__time {
  color: var(--he-blue);
}

.he-reset-clock--casual {
  border-color: rgba(255, 217, 15, 0.55);
}

.he-reset-clock--casual .he-reset-clock__label,
.he-reset-clock--casual .he-reset-clock__time {
  color: var(--he-yellow);
}

.he-reset-clock--tournament {
  border-color: rgba(255, 71, 87, 0.65);
  background:
    linear-gradient(145deg, rgba(255, 71, 87, 0.12), rgba(37, 37, 66, 0.95));
}

.he-reset-clock--tournament .he-reset-clock__label,
.he-reset-clock--tournament .he-reset-clock__time {
  color: #ff8a96;
}

.he-reset-clock--tournament.he-reset-clock--disabled {
  opacity: 0.92;
}

.he-reset-clock--tournament.he-reset-clock--disabled .he-reset-clock__time {
  font-family: var(--he-font-display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.he-view-mobile .he-reset-clocks {
  display: none;
}

.he-mobile-hero {
  margin-bottom: 0.65rem;
}

.he-mobile-hero__frame {
  position: relative;
  margin-bottom: 0.55rem;
  border-radius: calc(var(--he-radius) + 4px);
  overflow: hidden;
  border: 2px solid rgba(112, 209, 254, 0.4);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  background:
    linear-gradient(135deg, rgba(255, 107, 157, 0.12), rgba(112, 209, 254, 0.1)),
    rgba(8, 10, 18, 0.65);
}

.he-mobile-hero__banner {
  margin: 0;
}

.he-mobile-hero__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  max-height: min(42vh, 16rem);
  object-fit: cover;
  object-position: center 42%;
}

.he-mobile-hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 10, 18, 0.05) 0%, rgba(8, 10, 18, 0.18) 42%, rgba(8, 10, 18, 0.88) 100%);
  pointer-events: none;
}

.he-mobile-hero__copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.85rem 0.9rem 0.95rem;
  text-align: left;
}

.he-mobile-hero__copy .he-title {
  margin: 0 0 0.2rem;
  font-size: clamp(1.35rem, 6vw, 1.65rem);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.he-mobile-hero__copy .he-subtitle {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 248, 231, 0.92);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

.he-mobile-page .he-tagline-banner {
  margin: 0 0 0.85rem;
  font-size: clamp(1.65rem, 8vw, 2.35rem);
}

.he-mobile-page .he-mobile-menu__title,
.he-mobile-page .he-mobile-menu__sub {
  text-align: left;
}

/* Legacy mobile reset tiles (unused; kept for reference selectors in JS) */
.he-mobile-reset-bar {
  display: none;
}


/* Inline alert block used for tournament cooldown / sign-in messages */
.he-not-ready-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(8, 10, 18, 0.82);
  backdrop-filter: blur(4px);
}

.he-not-ready-overlay[hidden] {
  display: none !important;
}

.he-not-ready-overlay__card {
  width: min(100%, 22rem);
  padding: 1.35rem 1.25rem 1.15rem;
  border-radius: var(--he-radius, 12px);
  border: 1px solid rgba(255, 184, 77, 0.35);
  background: var(--he-surface, #141824);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.he-not-ready-overlay__title {
  margin: 0 0 0.65rem;
  font-family: var(--he-font-display);
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.he-not-ready-overlay__msg {
  margin: 0 0 1rem;
  color: var(--he-text-dim);
  line-height: 1.45;
}

.he-not-ready-overlay__card .he-btn {
  min-width: 7rem;
}

.he-mode-block {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--he-radius);
  background: rgba(255, 71, 87, 0.07);
  border: 1px solid rgba(255, 71, 87, 0.45);
  color: var(--he-text);
}
.he-mode-block--info {
  background: rgba(112, 209, 254, 0.07);
  border-color: rgba(112, 209, 254, 0.45);
}
.he-mode-block__title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: var(--he-danger);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.he-mode-block__lead {
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
  line-height: 1.45;
}
.he-mode-block__facts {
  margin: 0 0 0.85rem;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  color: var(--he-text-dim);
  line-height: 1.45;
}
.he-mode-block__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
}
.he-mode-block__cta .he-btn { min-height: 40px; }
.he-mode-block--rules {
  background: rgba(255, 184, 77, 0.08);
  border-color: rgba(255, 184, 77, 0.5);
}
.he-mode-block--rules .he-mode-block__title { color: var(--he-text); }
.he-mode-block__rules {
  margin: 0 0 0.95rem;
  padding-left: 1.15rem;
  font-size: 0.9rem;
  color: var(--he-text);
  line-height: 1.5;
}
.he-mode-block__rules li { margin: 0 0 0.45rem; }
.he-mode-block__rules strong { color: var(--he-warning, #ffb84d); }

.he-section-desc {
  margin: -0.35rem 0 0.85rem;
  font-size: 0.92rem;
  color: var(--he-text-dim);
  line-height: 1.45;
}
.he-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.65rem;
  margin: 0 0 1.25rem;
}
.he-category-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.85rem 0.95rem;
  border-radius: var(--he-radius);
  border: 1px solid rgba(255, 217, 15, 0.35);
  background: rgba(255, 217, 15, 0.06);
  color: var(--he-text);
  text-align: left;
  cursor: pointer;
  min-height: 48px;
}
.he-category-card:hover,
.he-category-card:focus-visible {
  border-color: var(--he-accent, #ffd90f);
  background: rgba(255, 217, 15, 0.12);
  outline: none;
}
.he-category-card--done {
  opacity: 0.72;
  border-color: rgba(112, 209, 254, 0.45);
  background: rgba(112, 209, 254, 0.06);
  cursor: pointer;
}

.he-category-card--done .he-category-card__meta {
  color: var(--he-yellow);
}
.he-category-card__name {
  font-weight: 600;
  font-size: 0.98rem;
}
.he-category-card__desc {
  font-size: 0.82rem;
  color: var(--he-text-dim);
  line-height: 1.35;
}
.he-category-card__meta {
  font-size: 0.78rem;
  color: var(--he-text-dim);
}

.he-mode-icon {
  width: 4.25rem;
  height: 4.25rem;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  pointer-events: none;
  user-select: none;
}

.he-category-card .he-mode-icon,
.he-category-card__icon.he-mode-icon {
  width: 4rem;
  height: 4rem;
  margin-bottom: 0.1rem;
}

.he-mode-card__icon:has(.he-mode-icon) {
  font-size: 0;
  line-height: 0;
  margin-bottom: 0.45rem;
}

.he-mode-card__icon .he-mode-icon {
  width: 3.75rem;
  height: 3.75rem;
}

.he-featured-panel__icon {
  margin-bottom: 0.65rem;
  display: flex;
  justify-content: flex-start;
}

.he-featured-panel__icon .he-mode-icon {
  width: 3.5rem;
  height: 3.5rem;
}

.he-mode-icon--featured {
  width: 5rem;
  height: 5rem;
}

.he-page-meta {
  margin-bottom: 0.75rem;
}

.he-menu-hero {
  margin: 0 0 1.15rem;
}

.he-menu-hero__banner {
  margin: 0 0 0.5rem;
  border-radius: calc(var(--he-radius) + 2px);
  overflow: hidden;
  border: 2px solid rgba(255, 217, 15, 0.35);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(112, 209, 254, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 107, 157, 0.18), rgba(112, 209, 254, 0.12)),
    rgba(8, 10, 18, 0.65);
}

.he-menu-hero__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 55%;
}

.he-tagline-banner {
  margin: 0.2rem 0 0.95rem;
  text-align: center;
  font-family: var(--he-font-display);
  font-size: clamp(2.15rem, 6.2vw, 3.75rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.05;
  color: var(--he-yellow);
  text-shadow:
    0 2px 18px rgba(255, 217, 15, 0.16),
    0 0 28px rgba(112, 209, 254, 0.12);
}

.he-tagline-word + .he-tagline-word {
  margin-left: 0.28em;
}

.he-tagline-banner--static .he-tagline-word {
  opacity: 1;
  transform: none;
}

.he-view-desktop .he-tagline-banner--animated .he-tagline-word--2,
.he-view-desktop .he-tagline-banner--animated .he-tagline-word--3 {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.14em);
}

.he-view-desktop .he-tagline-banner--animated .he-tagline-word--2 {
  animation: he-tagline-word-2 30s infinite;
}

.he-view-desktop .he-tagline-banner--animated .he-tagline-word--3 {
  animation: he-tagline-word-3 30s infinite;
}

@keyframes he-tagline-word-2 {
  0%, 6.66% { opacity: 0; transform: translateY(0.14em); }
  6.67%, 97.86% { opacity: 1; transform: translateY(0); }
  97.87%, 100% { opacity: 0; transform: translateY(0.14em); }
}

@keyframes he-tagline-word-3 {
  0%, 13.32% { opacity: 0; transform: translateY(0.14em); }
  13.33%, 97.86% { opacity: 1; transform: translateY(0); }
  97.87%, 100% { opacity: 0; transform: translateY(0.14em); }
}

@media (prefers-reduced-motion: reduce) {
  .he-view-desktop .he-tagline-banner--animated .he-tagline-word--2,
  .he-view-desktop .he-tagline-banner--animated .he-tagline-word--3 {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.he-menu-hero__copy {
  text-align: center;
}

.he-menu-hero__copy .he-title {
  margin-bottom: 0.35rem;
}

.he-menu-hero__copy .he-subtitle {
  margin: 0;
  max-width: 36rem;
  margin-inline: auto;
}

.he-page-meta__strip {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  color: var(--he-text-dim);
  text-align: center;
}

.he-daily-portal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 1rem 0 0.5rem;
}

.he-header,
.he-wordle-bar {
  display: none !important;
}

/* // _qxr.web - shared site header (styles.css) only; Simpsons sub-header retired. */
.he-body .site-header + .he-header {
  position: relative;
  z-index: 1;
}

.he-header {
  border-bottom: 3px solid var(--he-yellow);
  background: rgba(0, 0, 0, 0.35);
}

.he-header__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.he-header__qxr-home {
  color: var(--he-yellow);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.he-header__qxr-home:hover,
.he-header__qxr-home:focus-visible {
  text-decoration: underline;
}

.he-header__brand {
  color: var(--he-blue);
  text-decoration: none;
  font-weight: 700;
}

.he-header__title {
  font-family: var(--he-font-display);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.he-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
}

.he-panel[hidden] { display: none !important; }

.he-panel__inner {
  animation: heFadeIn 0.3s ease;
}

@keyframes heFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .he-panel__inner { animation: none; }
}

.he-splash {
  text-align: center;
  padding: 3rem 1rem;
}

.he-splash-hub {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.85rem;
  justify-items: center;
}

.he-splash-hub__lead {
  margin: 0;
  max-width: 36rem;
  color: var(--he-text-dim);
  font-size: 0.95rem;
}

.he-splash-hub__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  width: 100%;
}

.he-daily-review-slot {
  width: min(100%, 40rem);
  margin: 0 auto 1rem;
}

.he-daily-review {
  text-align: left;
  margin: 0 auto 1rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
}

.he-daily-review__title {
  margin: 0 0 0.35rem;
  font-family: var(--he-font-display);
  font-size: 1.15rem;
}

.he-daily-review__meta {
  margin: 0 0 0.75rem;
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.he-daily-review__status {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.he-daily-review__status--pass {
  color: #7dffb2;
}

.he-daily-review__status--fail {
  color: #ff8d8d;
}

.he-daily-review__prompt {
  margin: 0 0 0.75rem;
  padding-left: 0.85rem;
  border-left: 3px solid var(--he-yellow);
  font-style: italic;
}

.he-daily-review__answer,
.he-daily-review__explain,
.he-daily-review__note {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  color: var(--he-text-dim);
}

.he-mode-card--cooldown {
  opacity: 0.72;
}

.he-donut {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--he-donut-pink);
  border: 8px solid var(--he-yellow);
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.15);
}

.he-title {
  margin: 0 0 0.25rem;
  font-family: var(--he-font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.05;
  color: var(--he-yellow);
  text-shadow: 2px 2px 0 var(--he-blue-dark);
  overflow-wrap: break-word;
  word-wrap: break-word;
  text-transform: uppercase;
}

.he-subtitle {
  margin: 0 0 1.5rem;
  color: var(--he-text-dim);
}

.he-section-title {
  margin: 2rem 0 1rem;
  font-size: 1.1rem;
  color: var(--he-blue);
}

.he-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--he-radius);
  padding: 0.65rem 1.2rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.he-btn:active { transform: scale(0.98); }

.he-btn--primary {
  background: linear-gradient(180deg, var(--he-yellow), var(--he-yellow-dim));
  color: #1a1a2e;
}

.he-btn--ghost {
  background: transparent;
  color: var(--he-text-dim);
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 1rem;
}

.he-btn--hero {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
}

/* ─── Mode selector grid ─── */

.he-mode-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .he-mode-grid { grid-template-columns: repeat(3, 1fr); }
}

.he-mode-card {
  text-align: center;
  background: var(--he-bg-card);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--he-radius);
  padding: 1.25rem 1rem;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.he-mode-card:hover { transform: translateY(-3px); }

.he-mode-card--tournament { border-color: var(--he-danger); }
.he-mode-card--tournament:hover { border-color: #ff6b81; }
.he-mode-card--casual { border-color: var(--he-yellow); }
.he-mode-card--casual:hover { border-color: #ffe44d; }
.he-mode-card--daily { border-color: var(--he-blue); }
.he-mode-card--daily:hover { border-color: #a0e0ff; }

.he-mode-card__icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.he-mode-card__name {
  display: block;
  font-family: var(--he-font-display);
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.he-mode-card__desc {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--he-text-dim);
  line-height: 1.4;
}

.he-mode-card__lives {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--he-danger);
}

/* ─── Rounds ─── */

.he-round-grid {
  display: grid;
  gap: 0.75rem;
}

.he-round-card {
  text-align: left;
  background: var(--he-bg-card);
  border: 2px solid rgba(255, 217, 15, 0.25);
  border-radius: var(--he-radius);
  padding: 1rem;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.he-round-card:hover {
  border-color: var(--he-yellow);
  transform: translateY(-2px);
}

.he-round-card__type {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--he-blue);
  margin-bottom: 0.35rem;
}

.he-round-card__name {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
}

.he-round-card__desc {
  display: block;
  margin-top: 0.35rem;
  color: var(--he-text-dim);
  font-size: 0.9rem;
}

.he-round-card__meta {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--he-yellow);
}

/* ─── Gameplay ─── */

.he-game { position: relative; }

.he-hud {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.he-hud strong { color: var(--he-yellow); }

.he-hud__mode {
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1a1a2e;
  background: var(--he-blue);
}

.he-timer {
  position: relative;
  height: 28px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.he-timer::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--timer-pct, 100%);
  background: linear-gradient(90deg, var(--he-blue), var(--he-yellow));
  transition: width 0.9s linear;
}

.he-timer span { position: relative; z-index: 1; }

.he-timer--urgent::before {
  background: linear-gradient(90deg, var(--he-danger), #ff9f43);
  animation: hePulse 0.5s ease infinite alternate;
}

@keyframes hePulse {
  from { opacity: 0.85; }
  to   { opacity: 1; }
}

.he-question-meta {
  font-size: 0.8rem;
  color: var(--he-text-dim);
  margin: 0 0 0.5rem;
}

.he-question-prompt {
  margin: 0 0 1rem;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  line-height: 1.35;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.he-question-hint {
  margin: -0.5rem 0 1rem;
  color: var(--he-blue);
  font-size: 0.9rem;
}

.he-choices {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr;
}

.he-choices--many { grid-template-columns: repeat(2, 1fr); }
.he-choices--wide { grid-template-columns: repeat(2, 1fr); }
.he-choices--dense { grid-template-columns: repeat(2, 1fr); font-size: 0.85rem; }

@media (min-width: 640px) {
  .he-choices--wide { grid-template-columns: repeat(3, 1fr); }
  .he-choices--dense { grid-template-columns: repeat(4, 1fr); }
}

.he-choice {
  text-align: left;
  background: var(--he-bg-card);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--he-radius);
  padding: 0.75rem 0.9rem;
  color: inherit;
  font: inherit;
  cursor: pointer;
  min-height: 44px;
  transition: border-color 0.1s ease;
}

.he-choice:hover { border-color: var(--he-blue); }
.he-choice:focus-visible { outline: 2px solid var(--he-yellow); outline-offset: 2px; }
.he-choice--picked {
  border-color: var(--he-yellow);
  background: rgba(255, 217, 15, 0.12);
}

.he-submit { margin-top: 1rem; width: 100%; }

.he-pick-hint {
  color: var(--he-blue);
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
}

.he-order-list { display: grid; gap: 0.5rem; }

.he-order-row {
  display: grid;
  grid-template-columns: 2rem 1fr auto auto;
  gap: 0.5rem;
  align-items: center;
  background: var(--he-bg-card);
  border-radius: var(--he-radius);
  padding: 0.5rem 0.75rem;
}

.he-order-num {
  font-weight: 800;
  color: var(--he-yellow);
}

.he-order-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.he-order-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.he-input {
  width: 100%;
  padding: 0.85rem 1rem;
  font: inherit;
  font-size: 1.1rem;
  border-radius: var(--he-radius);
  border: 2px solid rgba(255, 217, 15, 0.35);
  background: rgba(0, 0, 0, 0.25);
  color: var(--he-text);
}

.he-input:focus {
  outline: none;
  border-color: var(--he-yellow);
  box-shadow: 0 0 0 3px rgba(255, 217, 15, 0.2);
}

/* ─── Reflex ─── */

.he-reflex-hint {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--he-blue);
  font-weight: 700;
}

.he-input--reflex {
  border-color: rgba(112, 209, 254, 0.5);
}

/* ─── Peril ─── */

.he-peril-warning {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--he-radius);
  background: rgba(255, 71, 87, 0.15);
  border: 2px solid var(--he-danger);
  font-size: 0.88rem;
  text-align: center;
  color: var(--he-danger);
}

.he-peril-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.he-peril-label {
  min-width: 5.5rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--he-text-dim);
}

.he-input--peril {
  border-color: rgba(255, 71, 87, 0.45);
}

.he-btn--peril {
  background: linear-gradient(180deg, var(--he-danger), #c0392b);
  color: #fff;
}

/* ─── Mix & Match ─── */

.he-mix-hint {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--he-blue);
  font-weight: 700;
}

.he-mix-grid {
  display: grid;
  gap: 0.5rem;
}

.he-mix-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.65rem;
  align-items: center;
  background: var(--he-bg-card);
  border-radius: var(--he-radius);
  padding: 0.65rem 0.85rem;
}

.he-mix-left {
  font-weight: 700;
  font-size: 0.9rem;
}

.he-mix-arrow {
  color: var(--he-yellow);
  font-size: 1.1rem;
  font-weight: 800;
}

.he-mix-select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.85rem;
  border-radius: 6px;
  border: 2px solid rgba(255, 217, 15, 0.35);
  background: rgba(0, 0, 0, 0.3);
  color: var(--he-text);
  cursor: pointer;
}

.he-mix-select:focus {
  outline: none;
  border-color: var(--he-yellow);
}

/* ─── Daily note ─── */

.he-daily-note {
  margin-top: 0.75rem;
  color: var(--he-blue);
  font-weight: 700;
}

/* ─── Round banner, feedback, results ─── */

.he-round-banner {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--he-yellow);
}

.he-round-banner[hidden] { display: none !important; }

.he-feedback {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.72);
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.he-feedback[hidden] { display: none !important; }

.he-feedback__card {
  max-width: 420px;
  width: min(100%, 420px);
  max-height: min(85dvh, 640px);
  overflow-y: auto;
  background: var(--he-bg-card);
  border: 3px solid var(--he-yellow);
  border-radius: var(--he-radius);
  padding: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}

.he-feedback__title { margin: 0 0 0.75rem; font-size: clamp(1.15rem, 4vw, 1.45rem); }
.he-feedback__title--ok { color: var(--he-success); }
.he-feedback__title--bad { color: var(--he-danger); }

.he-feedback__detail {
  margin: 0 0 1rem;
  line-height: 1.45;
  color: var(--he-text);
  word-break: break-word;
}

.he-feedback__continue {
  width: 100%;
  min-height: 48px;
}

body.he-feedback-open {
  overflow: hidden;
  touch-action: none;
  width: 100%;
}

.he-view-mobile #panel-results .he-panel__inner.he-results,
.he-view-tablet #panel-results .he-panel__inner.he-results {
  padding-top: max(1rem, env(safe-area-inset-top));
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}

.he-feedback__answer {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 217, 15, 0.45);
  background: rgba(255, 217, 15, 0.08);
  text-align: left;
}

.he-feedback__answer[hidden] {
  display: none;
}

.he-feedback__answer--ok {
  border-color: rgba(46, 213, 115, 0.55);
  background: rgba(46, 213, 115, 0.1);
}

.he-feedback__answer--bad {
  border-color: rgba(255, 71, 87, 0.55);
  background: rgba(255, 71, 87, 0.08);
}

.he-feedback__answer-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--he-text-dim);
}

.he-feedback__answer-text {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--he-text);
  word-break: break-word;
}

.he-round-complete {
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(255, 217, 15, 0.08);
  border-radius: var(--he-radius);
  text-align: center;
}

.he-results {
  text-align: center;
  padding: 2rem 0;
}

.he-results-score {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--he-yellow);
}

.he-error { color: var(--he-danger); }

.he-mobile-page .he-error {
  position: sticky;
  bottom: 0;
  z-index: 40;
  margin: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--he-radius, 12px);
  background: rgba(255, 71, 87, 0.15);
  border: 1px solid rgba(255, 71, 87, 0.45);
  font-weight: 600;
}

.he-footer {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem 2rem;
  font-size: 0.75rem;
  color: var(--he-text-dim);
  text-align: center;
}

.he-footer__links {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
}

.he-footer__links a {
  color: var(--he-blue);
  font-weight: 600;
  text-decoration: none;
}

.he-footer__links a:hover,
.he-footer__links a:focus-visible {
  text-decoration: underline;
}

.he-loading { color: var(--he-text-dim); }

/* ─── Legal / disclaimer (always visible) ─── */

.he-header__strip {
  margin: 0;
  padding: 0.4rem 1rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1a1a2e;
  background: var(--he-yellow);
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.he-disclaimer-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-left: auto;
}

.he-disclaimer-badge {
  display: inline-block;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #1a1a2e;
  background: var(--he-yellow);
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.he-disclaimer-fixed {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 0.45rem 0.75rem;
  text-align: center;
  background: rgba(10, 10, 20, 0.94);
  border-top: 2px solid var(--he-danger);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.45);
}

.he-disclaimer-fixed__line {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--he-yellow);
}

.he-disclaimer-fixed__sub {
  margin: 0.15rem 0 0;
  font-size: 0.65rem;
  color: var(--he-text-dim);
}

.he-disclaimer-inline {
  margin: 0 0 1rem;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: center;
  color: var(--he-yellow);
  background: rgba(255, 71, 87, 0.12);
  border: 1px solid rgba(255, 71, 87, 0.35);
}

.he-disclaimer-inline--game {
  margin-bottom: 0.65rem;
  font-size: 0.62rem;
}

.he-disclaimer-callout {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--he-radius);
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: center;
  color: var(--he-text);
  background: rgba(255, 217, 15, 0.1);
  border: 2px solid rgba(255, 217, 15, 0.35);
}

.he-disclaimer-callout--compact {
  font-size: 0.78rem;
  padding: 0.55rem 0.75rem;
}

.he-disclaimer-panel {
  margin: 0 0 1.25rem;
  padding: 1rem;
  border-radius: var(--he-radius);
  background: rgba(0, 0, 0, 0.25);
  border: 2px dashed rgba(255, 71, 87, 0.45);
}

.he-disclaimer-panel__title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--he-danger);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.he-disclaimer-panel__body .he-disclaimer-section {
  margin-bottom: 0.75rem;
}

.he-disclaimer-panel__body .he-disclaimer-section:last-child {
  margin-bottom: 0;
}

.he-disclaimer-section h3 {
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
  color: var(--he-blue);
}

.he-disclaimer-section p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--he-text-dim);
}

.he-disclaimer-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.88);
}

.he-disclaimer-gate[hidden] {
  display: none !important;
}

.he-disclaimer-gate__card {
  max-width: 520px;
  width: 100%;
  max-height: min(90vh, 720px);
  overflow-y: auto;
  padding: 1.25rem;
  border-radius: var(--he-radius);
  background: var(--he-bg-card);
  border: 3px solid var(--he-danger);
}

.he-disclaimer-gate__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--he-danger);
}

.he-disclaimer-gate__card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  color: var(--he-yellow);
}

.he-disclaimer-gate__body {
  margin-bottom: 0.75rem;
}

.he-disclaimer-gate__free {
  margin: 0 0 1rem;
  padding: 0.65rem;
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1.4;
  background: rgba(46, 213, 115, 0.12);
  border: 1px solid rgba(46, 213, 115, 0.35);
}

.he-feedback__legal {
  margin: 0 0 0.65rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--he-text-dim);
}

.he-footer__title {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--he-yellow);
}

.he-footer__legal {
  text-align: left;
  margin-bottom: 1rem;
}

.he-footer__legal .he-disclaimer-section {
  margin-bottom: 0.65rem;
}

.he-footer__meta {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--he-text-dim);
}

@media (min-width: 640px) {
  .he-disclaimer-badge-row {
    flex-wrap: nowrap;
  }
}

/* ─── Question image + burned-in-style CSS watermark stack ─── */

.he-question-image-wrap {
  position: relative;
  margin: 0 0 1rem;
  border-radius: var(--he-radius);
  overflow: hidden;
  border: 2px solid rgba(255, 71, 87, 0.55);
  background: #000;
}

.he-question-image {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  opacity: 0.88;
}

.he-question-image__caption {
  margin: 0;
  padding: 0.35rem 0.5rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  color: #1a1a2e;
  background: var(--he-yellow);
}

.he-question-image__wm {
  pointer-events: none;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: repeating-linear-gradient(
    -35deg,
    rgba(255, 71, 87, 0.18) 0px,
    rgba(255, 71, 87, 0.18) 12px,
    rgba(255, 217, 15, 0.12) 12px,
    rgba(255, 217, 15, 0.12) 24px
  );
}

.he-question-image__wm-line {
  display: block;
  padding: 0.15rem 0.5rem;
  font-size: clamp(0.55rem, 2vw, 0.72rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  background: rgba(180, 20, 30, 0.72);
  border: 1px solid rgba(255, 217, 15, 0.65);
  transform: rotate(-8deg);
}

.he-question-image__wm-line--diag {
  font-size: clamp(0.5rem, 1.8vw, 0.65rem);
  background: rgba(0, 0, 0, 0.75);
  transform: rotate(-12deg);
}

.he-question-image-wrap::after {
  content: "FREE \00B7  $0.00 \00B7  NO MONETIZATION";
  pointer-events: none;
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 0.2rem 0.4rem;
  font-size: 0.55rem;
  font-weight: 900;
  color: #1a1a2e;
  background: var(--he-yellow);
  border: 2px solid var(--he-danger);
  transform: rotate(6deg);
}

.he-question-image-wrap::before {
  content: "UNLICENSED";
  pointer-events: none;
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 0.2rem 0.4rem;
  font-size: 0.55rem;
  font-weight: 900;
  color: #fff;
  background: var(--he-danger);
  border: 2px solid #fff;
  transform: rotate(-6deg);
  z-index: 2;
}

/* Leaderboard, mobile-first (Android + iOS), tablet plus enhanced.
   100dvh-aware so the iOS Safari bottom bar never crops content.
   44px minimum touch targets, matches Apple HIG and Material guidance.
   Sticky table header, momentum scrolling.
   Tabular numbers for clean score columns.
*/

.he-leaderboard-cta {
  margin: 1.5rem 0 1rem;
  padding: 1rem;
  border: 1px dashed rgba(112, 209, 254, 0.4);
  border-radius: var(--he-radius);
  background: rgba(112, 209, 254, 0.06);
  text-align: center;
}

.he-leaderboard-cta button {
  width: 100%;
  min-height: 48px;
  font-size: 1rem;
}

.he-leaderboard-cta__note {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--he-text-dim);
  line-height: 1.45;
}

.he-leaderboard-cta__note a {
  color: var(--he-blue);
  text-decoration: underline;
}

#panel-leaderboard {
  /* leave room above the fixed bottom disclaimer bar */
  padding-bottom: 1rem;
}

.he-lb-header {
  margin-bottom: 1rem;
  text-align: center;
}

.he-lb-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.he-lb-tab {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.03em;
  min-height: 48px;
  padding: 0.65rem 0.75rem;
  border: 2px solid rgba(255, 217, 15, 0.4);
  border-radius: var(--he-radius);
  background: rgba(0, 0, 0, 0.25);
  color: var(--he-text);
  cursor: pointer;
  touch-action: manipulation;
}

.he-lb-tab:focus-visible {
  outline: 2px solid var(--he-yellow);
  outline-offset: 2px;
}

.he-lb-tab--active {
  background: var(--he-yellow);
  color: #1a1a2e;
  border-color: var(--he-yellow);
}

.he-lb-pane {
  min-height: 12rem;
}

.he-lb-pane[hidden] {
  display: none;
}

.he-lb-loading,
.he-lb-empty {
  margin: 1.5rem 0;
  padding: 1rem;
  text-align: center;
  color: var(--he-text-dim);
  font-style: italic;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--he-radius);
}

.he-lb-signin {
  margin: 0 0 1rem;
  padding: 0.85rem;
  text-align: center;
  background: rgba(46, 213, 115, 0.08);
  border: 1px solid rgba(46, 213, 115, 0.3);
  border-radius: var(--he-radius);
}

.he-lb-signin p {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.he-btn--sm {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  text-decoration: none;
  min-height: 44px;
  line-height: 1.6;
}

.he-lb-you-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.25rem 0.75rem;
  align-items: center;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, rgba(255, 217, 15, 0.14), rgba(112, 209, 254, 0.1));
  border: 2px solid var(--he-yellow);
  border-radius: var(--he-radius);
}

.he-lb-you-card__label {
  grid-column: 1;
  grid-row: 1;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--he-text-dim);
}

.he-lb-you-card__score {
  grid-column: 1;
  grid-row: 2;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--he-yellow);
  font-variant-numeric: tabular-nums;
}

.he-lb-you-card__rank {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-weight: 700;
  text-align: right;
  color: var(--he-blue);
}

.he-lb-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 60vh;
  max-height: 60dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--he-radius);
}

.he-lb-row {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  grid-template-areas:
    "rank name score"
    "rank meta platform";
  align-items: center;
  column-gap: 0.65rem;
  row-gap: 0.1rem;
  padding: 0.6rem 0.75rem;
  min-height: 56px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.he-lb-row--head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(26, 26, 46, 0.95);
  grid-template-areas: "rank name score";
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  min-height: 36px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--he-text-dim);
  font-weight: 700;
}

.he-lb-row--head > span:nth-child(4),
.he-lb-row--head > span:nth-child(5) {
  display: none;
}

.he-lb-row--you {
  background: rgba(255, 217, 15, 0.12);
  border-left: 3px solid var(--he-yellow);
}

.he-lb-rank {
  grid-area: rank;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.08);
  color: var(--he-text);
}

.he-lb-rank--gold   { background: linear-gradient(135deg, #ffe177, #c79a00); color: #1a1a2e; }
.he-lb-rank--silver { background: linear-gradient(135deg, #e9e9ee, #9a9aa6); color: #1a1a2e; }
.he-lb-rank--bronze { background: linear-gradient(135deg, #f0a974, #a35a1e); color: #1a1a2e; }

.he-lb-name {
  grid-area: name;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.he-lb-you-tag {
  font-weight: 500;
  color: var(--he-yellow);
  font-size: 0.85rem;
}

.he-lb-score {
  grid-area: score;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--he-yellow);
}

.he-lb-meta {
  grid-area: meta;
  font-size: 0.75rem;
  color: var(--he-text-dim);
}

.he-lb-platform {
  grid-area: platform;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--he-blue);
  font-weight: 700;
}

.he-lb-back {
  display: block;
  width: 100%;
  margin: 1rem 0 0;
  min-height: 48px;
}

/* Daily stats */

.he-lb-daily {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--he-radius);
}

.he-lb-daily__title {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--he-yellow);
  text-align: center;
}

.he-lb-daily__empty {
  margin: 0;
  text-align: center;
  color: var(--he-text-dim);
}

.he-lb-daily__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.he-lb-mix-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.he-lb-daily__mix h4 {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--he-text-dim);
}

.he-lb-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.65rem 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.he-lb-stat__value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--he-yellow);
  font-variant-numeric: tabular-nums;
}

.he-lb-stat--sm .he-lb-stat__value {
  font-size: 1.1rem;
}

.he-lb-stat__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--he-text-dim);
  margin-top: 0.25rem;
  text-align: center;
}

.he-lb-results-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

@media (min-width: 640px) {
  .he-lb-row {
    grid-template-columns: 3rem minmax(0, 1.6fr) auto auto auto;
    grid-template-areas: "rank name score meta platform";
  }
  .he-lb-row--head {
    grid-template-areas: "rank name score meta platform";
    grid-template-columns: 3rem minmax(0, 1.6fr) auto auto auto;
  }
  .he-lb-row--head > span:nth-child(4),
  .he-lb-row--head > span:nth-child(5) {
    display: inline;
  }
  .he-lb-tabs {
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
  }
  .he-lb-daily__grid {
    grid-template-columns: repeat(5, 1fr);
  }
  .he-lb-results-actions {
    flex-direction: row;
    justify-content: center;
  }
}

/* Honour reduce-motion: kill the panel fade-in if requested */
@media (prefers-reduced-motion: reduce) {
  .he-lb-row { transition: none; }
}

/* iOS form-field font-size minimum to prevent zoom-on-focus */
.he-lb-pane input,
.he-lb-pane select {
  font-size: 16px;
}

/* Personal daily stats card (Wordle-style, local-only).
   Used inside the results panel and the leaderboard Daily tab.
*/
.he-daily-personal {
  background: linear-gradient(140deg, rgba(255, 209, 0, 0.08), rgba(0, 0, 0, 0.35));
  border: 1px solid rgba(255, 209, 0, 0.35);
  border-radius: 12px;
  padding: 1rem 1rem 1.1rem;
  margin: 0 0 1rem;
}

.he-daily-personal__header {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.75rem;
}

.he-daily-personal__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--he-yellow);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.he-daily-personal__sub {
  margin: 0;
  font-size: 0.78rem;
  color: var(--he-text-dim);
}

.he-daily-personal__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.he-daily-personal__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.he-daily-personal__value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--he-yellow);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.he-daily-personal__suffix {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--he-text-dim);
  margin-left: 0.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.he-daily-personal__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--he-text-dim);
  margin-top: 0.3rem;
}

.he-daily-personal__just-played {
  margin: 0.25rem 0 0.75rem;
  padding: 0.55rem 0.75rem;
  background: rgba(0, 0, 0, 0.35);
  border-left: 3px solid var(--he-yellow);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--he-text);
}

.he-daily-personal__cta {
  display: flex;
  justify-content: center;
}

/* Comprehensive final-results summary (score, accuracy, streak, time,
   per-question breakdown). Visible on every game completion.
*/
.he-results-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}

.he-results-summary__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.he-results-summary__value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--he-yellow);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.he-results-summary__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--he-text-dim);
  margin-top: 0.25rem;
}

@media (min-width: 640px) {
  .he-results-summary {
    grid-template-columns: repeat(4, 1fr);
  }
}

.he-results-breakdown {
  margin: 0.75rem 0 1rem;
  padding: 0.6rem 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.he-results-breakdown > summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--he-text);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.he-results-breakdown__list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  max-height: 14rem;
  overflow-y: auto;
}

.he-results-breakdown__row {
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr) 5rem 3.2rem 3rem auto;
  gap: 0.4rem;
  align-items: center;
  padding: 0.35rem 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
}

.he-results-breakdown__row:last-child { border-bottom: 0; }
.he-results-breakdown__row--ok  { color: #c5f0c5; }
.he-results-breakdown__row--bad { color: #ffc0c0; }

.he-results-breakdown__prompt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.he-results-breakdown__status {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.7rem;
}

.he-results-breakdown__time,
.he-results-breakdown__earned {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.he-results-breakdown__tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 212, 0, 0.18);
  color: var(--he-yellow);
}

/* Played-today badge on the Daily mode card */
.he-mode-card--played {
  opacity: 0.85;
  border-style: dashed;
}
.he-mode-card--played .he-mode-card__name::after {
  content: ' \2713';
  color: var(--he-yellow);
  font-weight: 800;
  margin-left: 0.25rem;
}

.he-mode-card--desktop-only {
  border-color: rgba(255, 255, 255, 0.22);
  cursor: not-allowed;
}

.he-mode-card--desktop-only:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.22);
}

.he-mode-card--desktop-only .he-mode-card__desc {
  color: var(--he-text-dim);
}

@media (min-width: 640px) {
  .he-daily-personal__grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.he-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.he-forfeit-note {
  color: var(--he-red, #c0392b);
  font-size: 0.95rem;
  margin: 0.5rem 0 0;
}

.he-daily-portal .he-daily-portal__form {
  margin-top: 1.25rem;
}

.he-daily-portal__streak {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--he-yellow, #ffd90f);
  min-height: 1.25rem;
}

.he-daily-portal__alt {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--he-muted, #666);
}

.he-daily-portal__alt a {
  color: var(--he-blue, #0095da);
}

.he-daily-portal__cookie {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--he-muted, #666);
}

.he-daily-welcome-back {
  margin: 1.25rem auto 2rem;
  max-width: 100%;
  padding: clamp(2rem, 6vw, 3rem) 1.5rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 217, 15, 0.28) 0%, rgba(255, 217, 15, 0.08) 100%);
  border: 2px solid var(--he-yellow, #ffd90f);
  border-radius: 1rem;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.1);
  animation: he-welcome-back-in 0.45s ease-out;
}

.he-daily-welcome-back__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--he-blue, #0095da);
}

.he-daily-welcome-back__title {
  margin: 0 0 0.75rem;
  font-family: var(--he-font-display, "DM Serif Display", serif);
  font-size: clamp(2.5rem, 10vw, 4rem);
  line-height: 1.05;
  color: var(--he-yellow, #ffd90f);
  letter-spacing: 0.02em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
}

.he-daily-welcome-back__sub {
  margin: 0 0 1.25rem;
  font-size: clamp(1.05rem, 3.5vw, 1.25rem);
  font-weight: 600;
  color: var(--he-ink, #1a1a1a);
}

.he-daily-welcome-back__visit {
  margin: 0 0 0.85rem;
  font-size: clamp(1.15rem, 4vw, 1.45rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--he-blue, #0095da);
}

.he-daily-welcome-back__continue {
  min-width: min(100%, 16rem);
  margin: 0 auto;
}

.he-daily-portal__welcome-hero {
  margin: 0 0 1rem;
  padding: 1.25rem 1rem;
  text-align: center;
  border-radius: 0.85rem;
  background: rgba(255, 217, 15, 0.16);
  border: 1px solid rgba(255, 217, 15, 0.55);
}

.he-daily-portal__welcome-hero .he-daily-welcome-back__title {
  margin: 0;
  font-size: clamp(2rem, 8vw, 3rem);
}

@keyframes he-welcome-back-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes he-welcome-back-pulse {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; }
}

/* Daily portal uses standard site header on all viewports. */
.he-daily-portal .site-header {
  display: block;
}

.he-wordle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  max-width: 960px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 217, 15, 0.22);
  background: rgba(0, 0, 0, 0.25);
}

.he-wordle-bar[hidden] {
  display: none !important;
}

.he-wordle-bar__title {
  font-family: var(--he-font-display);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.he-wordle-bar__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  font-size: 0.82rem;
}

.he-wordle-bar__links a {
  color: var(--he-blue, #0095da);
  text-decoration: none;
}

.he-wordle-bar__links a.he-wordle-bar__qxr {
  color: var(--he-yellow);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.he-wordle-bar__links a:hover,
.he-wordle-bar__links a:focus-visible {
  text-decoration: underline;
}

/* // _qxr.web - mobile + legacy touch targets (48px min); reduce double-tap zoom delay. */
.he-btn,
.he-choice,
.he-mode-card,
.he-round-card,
.he-wordle-bar__links a {
  -webkit-tap-highlight-color: rgba(255, 217, 15, 0.22);
  touch-action: manipulation;
}

.he-wordle-footer {
  max-width: 960px;
  margin: 2rem auto 1.5rem;
  padding: 0 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--he-text-dim);
  line-height: 1.45;
}

.he-disclaimer-pass-page .site-header {
  display: block;
}

.he-wordle-daily .he-disclaimer-fixed,
.he-wordle-daily .he-footer,
.he-wordle-daily #cart-backdrop,
.he-wordle-daily #cart-drawer {
  display: none !important;
}

.he-wordle-daily .he-wordle-bar:not([hidden]) {
  display: flex !important;
}

.he-play-focus .he-header,
.he-play-focus .he-wordle-bar,
.he-play-focus .he-disclaimer-fixed,
.he-play-focus .he-footer,
.he-play-focus #cart-backdrop,
.he-play-focus #cart-drawer,
.he-play-focus .he-disclaimer-inline--game {
  display: none !important;
}

.he-play-focus .he-main {
  padding-top: 0.35rem;
}

.he-wordle-daily.he-wordle-results .he-main {
  padding-top: 0.75rem;
}

/* // _qxr.web - full-page disclaimer passthrough (popup-blocker safe). */
.he-disclaimer-pass-page .he-main {
  max-width: 640px;
}

.he-disclaimer-pass {
  padding: 1.5rem 0 2rem;
}

.he-disclaimer-pass__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--he-danger);
}

.he-disclaimer-pass__lead {
  margin: 0 0 1rem;
  color: var(--he-text-dim);
  line-height: 1.5;
}

.he-disclaimer-pass__body {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--he-radius);
  border: 1px solid rgba(255, 217, 15, 0.22);
  background: rgba(255, 255, 255, 0.03);
  max-height: min(52vh, 420px);
  overflow-y: auto;
}

.he-disclaimer-pass__free {
  margin: 0 0 1rem;
  padding: 0.65rem;
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1.4;
  background: rgba(46, 213, 115, 0.12);
  border: 1px solid rgba(46, 213, 115, 0.35);
}

.he-disclaimer-pass__error {
  margin: 0 0 0.75rem;
}

.he-disclaimer-pass__form {
  margin: 0 0 1rem;
}

.he-disclaimer-pass__back {
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--he-text-dim);
}

.he-disclaimer-pass__back a {
  color: var(--he-blue, #0095da);
}

/* // _qxr.web - viewport shells: dedicated mobile / tablet / desktop layouts (fluid, not scaled desktop). */

.he-view-mobile .he-header,
.he-view-mobile .he-main,
.he-view-mobile .he-daily-portal,
.he-view-tablet .he-header,
.he-view-tablet .he-main,
.he-view-tablet .he-daily-portal {
  padding-left: max(0.75rem, env(safe-area-inset-left));
  padding-right: max(0.75rem, env(safe-area-inset-right));
}

.he-view-mobile .he-header,
.he-view-tablet .he-header {
  padding-top: max(0.5rem, env(safe-area-inset-top));
}

.he-view-mobile .he-footer,
.he-view-mobile .he-daily-portal,
.he-view-tablet .he-footer,
.he-view-tablet .he-daily-portal {
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.he-view-mobile .he-btn,
.he-view-mobile .he-choice,
.he-view-mobile .he-mode-card,
.he-view-mobile .he-round-card,
.he-view-tablet .he-btn,
.he-view-tablet .he-choice,
.he-view-tablet .he-mode-card,
.he-view-tablet .he-round-card {
  min-height: 48px;
}

.he-view-mobile .he-input,
.he-view-tablet .he-input {
  font-size: 16px;
}

html.he-view-mobile,
html.he-view-tablet,
html.he-mobile {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.he-view-mobile .he-main {
  padding-top: 0.65rem;
  padding-bottom: max(5rem, calc(env(safe-area-inset-bottom) + 4rem));
}

.he-view-mobile #panel-menu .he-menu-hero__img {
  aspect-ratio: 16 / 9;
  max-height: none;
}

.he-view-mobile #panel-menu .he-title {
  font-size: clamp(1.35rem, 6vw, 1.75rem);
}

.he-view-mobile #panel-menu .he-section-title {
  font-size: 1rem;
  margin-top: 1.25rem;
}

.he-view-tablet .he-mode-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.he-view-tablet .he-mode-card--daily {
  grid-column: 1 / -1;
}

.he-view-mobile.he-wordle-landing .he-main,
.he-view-tablet.he-wordle-landing .he-main {
  min-height: calc(100dvh - 7.5rem);
  display: flex;
  align-items: center;
}

.he-view-mobile .he-wordle-bar,
.he-view-tablet .he-wordle-bar {
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  padding-top: max(0.65rem, env(safe-area-inset-top));
  padding-left: max(0.75rem, env(safe-area-inset-left));
  padding-right: max(0.75rem, env(safe-area-inset-right));
}

.he-view-mobile .he-wordle-bar__title,
.he-view-tablet .he-wordle-bar__title {
  text-align: center;
}

.he-view-mobile .he-wordle-bar__links,
.he-view-tablet .he-wordle-bar__links {
  justify-content: center;
  flex-wrap: wrap;
}

.he-view-mobile .he-daily-portal__form .he-btn--hero,
.he-view-tablet .he-daily-portal__form .he-btn--hero {
  min-height: 52px;
  font-size: 1.05rem;
}

.he-view-mobile.he-play-focus .he-main,
.he-view-tablet.he-play-focus .he-main {
  max-width: none;
  margin: 0;
  padding: 0;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}

.he-view-mobile.he-play-focus .he-panel__inner.he-game,
.he-view-tablet.he-play-focus .he-panel__inner.he-game {
  min-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  padding: 0.35rem max(0.75rem, env(safe-area-inset-left)) max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-right));
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}

.he-view-mobile.he-play-focus #panel-game,
.he-view-tablet.he-play-focus #panel-game {
  scroll-margin-top: 0;
}

.he-view-mobile .he-hud,
.he-view-tablet .he-hud {
  position: sticky;
  top: 0;
  z-index: 12;
  margin: 0 -0.75rem 0.65rem;
  padding: 0.55rem 0.75rem;
  background: rgba(26, 26, 46, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 217, 15, 0.18);
  gap: 0.35rem 0.85rem;
  font-size: 0.8rem;
}

.he-view-mobile .he-timer,
.he-view-tablet .he-timer {
  height: 32px;
  margin-bottom: 0.75rem;
}

.he-view-mobile .he-choices,
.he-view-mobile .he-choices--many,
.he-view-mobile .he-choices--wide,
.he-view-mobile .he-choices--dense,
.he-view-tablet .he-choices,
.he-view-tablet .he-choices--many,
.he-view-tablet .he-choices--wide,
.he-view-tablet .he-choices--dense {
  grid-template-columns: 1fr !important;
  gap: 0.6rem;
  font-size: 1rem;
}

.he-view-mobile .he-choice,
.he-view-tablet .he-choice {
  min-height: 52px;
  padding: 0.85rem 1rem;
}

.he-view-mobile .he-question-prompt,
.he-view-tablet .he-question-prompt {
  font-size: clamp(1.12rem, 4.8vw, 1.4rem);
  line-height: 1.4;
}

.he-view-mobile .he-question-image,
.he-view-tablet .he-question-image {
  max-height: min(42dvh, 320px);
  width: 100%;
  object-fit: contain;
}

.he-view-mobile .he-feedback__card,
.he-view-tablet .he-feedback__card {
  width: min(100%, 420px);
  max-height: min(85dvh, 520px);
}

.he-view-mobile.he-play-focus #btn-back-menu,
.he-view-tablet.he-play-focus #btn-back-menu {
  margin-top: auto;
  width: 100%;
  min-height: 48px;
}

.he-view-mobile .he-disclaimer-pass,
.he-view-tablet .he-disclaimer-pass {
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.he-view-mobile .he-disclaimer-fixed,
.he-view-tablet .he-disclaimer-fixed {
  font-size: 0.68rem;
  padding: 0.4rem max(0.65rem, env(safe-area-inset-left)) max(0.45rem, env(safe-area-inset-bottom)) max(0.65rem, env(safe-area-inset-right));
}

.he-view-mobile .he-disclaimer-fixed__sub,
.he-view-tablet .he-disclaimer-fixed__sub {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .he-view-mobile .he-hud,
  .he-view-tablet .he-hud {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Slim mobile landing (mobile.html) */
.he-mobile-page .he-mobile-main {
  max-width: 520px;
  margin: 0 auto;
  padding-bottom: max(4rem, env(safe-area-inset-bottom));
}

.he-mobile-menu__title {
  font-size: clamp(1.5rem, 6vw, 2rem);
  text-align: center;
}

.he-mobile-menu__sub {
  text-align: center;
  margin-bottom: 1.25rem;
}

.he-mobile-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.he-side-card {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: var(--he-radius, 12px);
  border: 1px solid rgba(255, 217, 15, 0.25);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  cursor: pointer;
}

.he-side-card:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.he-side-card__name {
  display: block;
  font-weight: 600;
}

.he-side-card__meta {
  display: block;
  font-size: 0.85rem;
  opacity: 0.85;
  margin-top: 0.25rem;
}

.he-featured-panel {
  margin: 1.25rem 0;
  padding: 1rem;
  border-radius: var(--he-radius, 12px);
  border: 2px solid rgba(255, 217, 15, 0.35);
  background: rgba(26, 26, 46, 0.6);
}

.he-featured-panel__title {
  font-size: 1rem;
  margin: 0 0 0.35rem;
}

.he-featured-panel__cycle {
  font-size: 0.8rem;
  opacity: 0.85;
  margin: 0 0 0.75rem;
}

.he-featured-panel__name {
  font-weight: 600;
  font-size: 1.05rem;
}

.he-featured-panel__desc,
.he-featured-panel__meta {
  font-size: 0.9rem;
  margin: 0.35rem 0 0;
}

.he-btn--block {
  width: 100%;
  margin-top: 0.75rem;
}

.he-desktop-promo {
  margin-top: 1.25rem;
  padding: 0.85rem;
  border-radius: var(--he-radius, 12px);
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
}

.he-section-desc--meta {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* ─── Mobile campy mode buttons (match desktop energy) ─── */

.he-mobile-page .he-mobile-menu {
  padding: 0.5rem 0.25rem 2rem;
}

.he-mobile-page .he-mobile-stack {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.he-mobile-page .he-mobile-quick-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.he-mobile-page .he-mode-card {
  text-align: center;
  padding: 1.35rem 1.1rem 1.15rem;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-radius: calc(var(--he-radius) + 2px);
  cursor: pointer;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 217, 15, 0.14), transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(112, 209, 254, 0.12), transparent 38%),
    var(--he-bg-card);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
  position: relative;
  overflow: hidden;
}

.he-mobile-page .he-mode-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(255, 255, 255, 0.015) 8px,
    rgba(255, 255, 255, 0.015) 9px
  );
  opacity: 0.65;
}

.he-mobile-page .he-mode-card::after {
  content: "★";
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  font-size: 0.95rem;
  opacity: 0.28;
  pointer-events: none;
}

.he-mobile-page .he-mode-card:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.he-mobile-page .he-mode-card__icon {
  display: block;
  font-size: 2.35rem;
  line-height: 1;
  margin-bottom: 0.55rem;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.35));
}

.he-mobile-page .he-mode-card__name {
  display: block;
  font-family: var(--he-font-display);
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.he-mobile-page .he-mode-card__desc {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.84rem;
  color: var(--he-text-dim);
  line-height: 1.4;
}

.he-mobile-page .he-mode-card__lives {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--he-danger);
}

.he-mobile-page .he-mode-card--daily { border-color: var(--he-blue); }
.he-mobile-page .he-mode-card--casual { border-color: var(--he-yellow); }
.he-mobile-page .he-mode-card--rules { border-color: #c4b5fd; }
.he-mobile-page .he-mode-card--stats { border-color: #86efac; }
.he-mobile-page .he-mode-card--warmup { border-color: #ffb84d; }
.he-mobile-page .he-mode-card--grab-bag { border-color: #ff6b9d; }
.he-mobile-page .he-mode-card--featured { border-color: var(--he-yellow); }

.he-mobile-page .he-side-card,
.he-mobile-page .he-mode-card--wide {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  grid-template-areas:
    "timer timer"
    "icon title"
    "icon desc";
  column-gap: 0.85rem;
  row-gap: 0.25rem;
  align-items: center;
  text-align: left;
  padding: 1.1rem 1.15rem 1.05rem;
  min-height: 4.5rem;
}

.he-mobile-page .he-mode-card--wide .he-mode-card__timer {
  grid-area: timer;
  position: static;
  top: auto;
  left: auto;
  right: auto;
  margin: 0 0 0.1rem;
  text-align: left;
}

.he-mobile-page .he-mode-card--wide .he-mode-card__icon {
  grid-area: icon;
  position: static;
  transform: none;
  margin: 0;
  align-self: center;
  justify-self: center;
  width: 3.25rem;
  flex-shrink: 0;
}

.he-mobile-page .he-mode-card--wide .he-mode-card__icon .he-mode-icon {
  width: 3rem;
  height: 3rem;
  max-width: 100%;
}

.he-mobile-page .he-mode-card--wide .he-mode-card__name {
  grid-area: title;
  text-align: left;
  font-size: 1rem;
  align-self: end;
  min-width: 0;
  overflow-wrap: anywhere;
}

.he-mobile-page .he-mode-card--wide .he-mode-card__desc {
  grid-area: desc;
  text-align: left;
  align-self: start;
  min-width: 0;
  overflow-wrap: anywhere;
}

.he-mobile-page .he-featured-panel {
  margin: 0.5rem 0 0;
  padding: 1.25rem;
}

.he-mobile-page .he-desktop-promo {
  margin-top: 0.5rem;
}

/* ─── Mobile stats + rules (Stats_Rules.drawio SOT) ─── */

.he-panel--overlay-page {
  position: fixed;
  inset: 0;
  z-index: 900;
  overflow-y: auto;
  background: var(--he-bg);
  padding: 0 0 max(5rem, env(safe-area-inset-bottom));
}

.he-stats-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem max(1rem, env(safe-area-inset-right)) 0.85rem max(1rem, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(255, 217, 15, 0.2);
  background: rgba(0, 0, 0, 0.28);
  position: sticky;
  top: 0;
  z-index: 2;
}

.he-stats-header__title {
  margin: 0;
  font-family: var(--he-font-display);
  font-size: 1.15rem;
  color: var(--he-yellow);
}

.he-stats-back { flex-shrink: 0; padding: 0.4rem 0.65rem; }

.he-stats-block {
  margin: 1rem max(1rem, env(safe-area-inset-right)) 0 max(1rem, env(safe-area-inset-left));
  padding: 1rem;
  border-radius: var(--he-radius);
  border: 1px solid rgba(255, 217, 15, 0.22);
  background: rgba(255, 255, 255, 0.04);
}

.he-stats-block--rank {
  border-color: rgba(112, 209, 254, 0.35);
  background: rgba(112, 209, 254, 0.06);
}

.he-stats-block--daily .he-stats-block__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.he-stats-block__title {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--he-text-dim);
}

.he-stats-block__value {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.he-stats-block__hint {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--he-text-dim);
  line-height: 1.4;
}

.he-stats-question-btn {
  white-space: nowrap;
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
}

.he-stats-mode-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.he-stats-mode-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.he-stats-mode-row--highlight {
  border: 1px solid rgba(255, 217, 15, 0.45);
  background: rgba(255, 217, 15, 0.1);
}

.he-mobile-page .he-mode-card--played {
  opacity: 0.92;
}

.he-mobile-page .he-mode-card--played .he-mode-card__desc::after {
  content: ' · tap for stats';
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--he-yellow);
}

.he-mobile-build {
  margin-top: 1rem;
  font-size: 0.72rem;
  color: var(--he-text-dim);
  text-align: center;
}

.he-stats-block__hint--wordle {
  margin: 0.75rem 0 1rem;
}

.he-wordle-daily-review {
  margin-top: 0.75rem;
}

.he-stats-mode-row__name { font-size: 0.88rem; }
.he-stats-mode-row__score {
  font-weight: 800;
  color: var(--he-yellow);
  font-variant-numeric: tabular-nums;
}

.he-stats-lifetime {
  list-style: none;
  margin: 0;
  padding: 0;
}

.he-stats-lifetime li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
}

.he-stats-lifetime li:last-child { border-bottom: 0; }

.he-mobile-rules {
  padding: 0.75rem max(1rem, env(safe-area-inset-right)) 2rem max(1rem, env(safe-area-inset-left));
}

.he-mobile-rules__section {
  margin-bottom: 1.15rem;
  padding: 0.85rem 0.95rem;
  border-radius: var(--he-radius);
  border: 1px solid rgba(255, 217, 15, 0.15);
  background: rgba(255, 255, 255, 0.03);
}

.he-mobile-rules__heading {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--he-yellow);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.he-mobile-rules__section p {
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--he-text-dim);
}

.he-stats-q-overlay {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem max(1rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: rgba(0, 0, 0, 0.72);
}

.he-stats-q-overlay[hidden] { display: none !important; }

.he-stats-q-overlay__card {
  width: min(100%, 420px);
  max-height: min(85vh, 640px);
  overflow-y: auto;
  padding: 1.15rem;
  border-radius: calc(var(--he-radius) + 4px);
  border: 2px solid rgba(255, 217, 15, 0.35);
  background: var(--he-bg-card);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.he-stats-q-overlay__title {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  color: var(--he-yellow);
}

.he-stats-q-overlay__prompt {
  margin: 0 0 0.85rem;
  font-weight: 600;
  line-height: 1.4;
}

.he-stats-q-overlay__answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.he-stats-q-overlay__answer {
  padding: 0.65rem;
  border-radius: 8px;
  font-size: 0.85rem;
}

.he-stats-q-overlay__answer--user {
  background: rgba(255, 71, 87, 0.12);
  border: 1px solid rgba(255, 71, 87, 0.35);
}

.he-stats-q-overlay__answer--correct {
  background: rgba(46, 213, 115, 0.12);
  border: 1px solid rgba(46, 213, 115, 0.35);
}

.he-stats-q-overlay__label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 0.25rem;
}

.he-stats-q-overlay__answer p { margin: 0; }

.he-stats-q-overlay__explain {
  margin: 0 0 0.85rem;
  font-size: 0.86rem;
  color: var(--he-text-dim);
  line-height: 1.45;
}

@media (min-width: 480px) {
  .he-mobile-page .he-mobile-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 0.85rem;
  }

  .he-mobile-page .he-mode-card--wide {
    grid-column: 1 / -1;
  }
}

