/* ============================================================
   APP — layout, components, screens
   ============================================================ */

/* ---------- App shell ---------- */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  /* Side + bottom safe-area insets for iOS landscape notches and home indicator.
     Top inset is handled on .app-header so the sticky header itself clears the
     status bar in standalone PWA mode (apple-mobile-web-app-status-bar-style:
     black-translucent overlays content under the status bar). */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  /* Top padding = base padding + iOS status bar inset (0 on non-iOS / browser tab). */
  padding:
    calc(var(--space-3) + env(safe-area-inset-top))
    clamp(var(--space-4), 4vw, var(--space-8))
    var(--space-3);
  border-bottom: 1px solid var(--color-divider);
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.app-header__brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--color-text);
  text-decoration: none;
  min-width: 0;
  flex: 1 1 auto;
}

.app-header__brand:hover { color: var(--color-primary); }
.app-header__brand:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.app-header__logo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.app-header__title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.1;
}

.app-header__subtitle {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  display: block;
  margin-top: 2px;
}

.app-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Mobile: hide the subtitle (it wraps to 3 lines and is redundant with
   the section eyebrow below) and dial in title + actions to fit cleanly
   in 390px viewports without the third icon clipping off-screen. Values
   tuned via Playwright DevTools inspection — title ellipsis at the
   container edge, 12px gap between title and trophy, 12px page padding,
   36px icon buttons (down from 40) so all three actions fit on iPhone
   13/14/15/16 widths.

   Desktop layout is preserved verbatim. */
@media (max-width: 480px) {
  .app-header {
    padding: calc(var(--space-2) + env(safe-area-inset-top)) var(--space-3) var(--space-2);
    gap: var(--space-3);
  }
  .app-header__logo { width: 26px; height: 26px; }
  .brand-menu { gap: var(--space-2); }
  .app-header__brand {
    min-width: 0; /* allow flex shrink so title can ellipsis */
    flex: 1 1 auto;
  }
  .app-header__title {
    font-size: 0.875rem;
    letter-spacing: 0.015em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
  }
  .app-header__subtitle { display: none; }
  .app-header__actions { gap: 0; flex: 0 0 auto; }
  .app-header__actions .icon-btn { width: 36px; height: 36px; }
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  border: 1px solid transparent;
}
.icon-btn:hover {
  color: var(--color-primary);
  background: var(--color-surface-2);
  border-color: var(--color-border);
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-footer {
  padding: var(--space-6) clamp(var(--space-4), 4vw, var(--space-8));
  border-top: 1px solid var(--color-divider);
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.04em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.app-footer__tagline {
  max-width: 64ch;
  line-height: 1.6;
}

.app-footer__nav {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.app-footer__sep {
  color: var(--color-border);
  user-select: none;
}

.app-footer__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  background: none;
  border: 0;
  padding: var(--space-1) 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--color-text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: color 140ms ease;
}

.app-footer__link:hover,
.app-footer__link:focus-visible {
  color: var(--color-text);
  outline: none;
}

/* ---------- PR #28 — Footer maker's mark (Musing Web Design) ---------- */
.app-footer__makers-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-2);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-text-faint);
  border: 1px solid transparent;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}
.app-footer__makers-mark:hover,
.app-footer__makers-mark:focus-visible {
  color: var(--color-primary);
  border-color: var(--color-border);
  background: rgba(198, 150, 71, 0.06);
  outline: none;
}
[data-theme='light'] .app-footer__makers-mark:hover,
[data-theme='light'] .app-footer__makers-mark:focus-visible {
  background: rgba(138, 94, 28, 0.08);
}
.app-footer__mwd-mark {
  flex: 0 0 auto;
  color: var(--color-primary);
  opacity: 0.7;
  transition: opacity 150ms ease, transform 200ms ease;
}
.app-footer__makers-mark:hover .app-footer__mwd-mark,
.app-footer__makers-mark:focus-visible .app-footer__mwd-mark {
  opacity: 1;
  transform: translateY(-1px);
}
@media (max-width: 480px) {
  .app-footer__makers-mark {
    font-size: 0.62rem;
    padding: 3px 8px;
  }
}

.app-footer__link--accent {
  color: var(--color-primary);
}

.app-footer__link--accent:hover,
.app-footer__link--accent:focus-visible {
  color: var(--color-primary-hover);
}

.app-footer__icon {
  flex-shrink: 0;
  opacity: 0.85;
}

@media (min-width: 640px) {
  .app-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    text-align: left;
    gap: var(--space-6);
  }
  .app-footer__tagline {
    justify-self: start;
    max-width: 38ch;
  }
  .app-footer__nav {
    justify-self: center;
  }
  .app-footer__makers-mark {
    justify-self: end;
  }
}

/* ---------- About overlay ---------- */
/* Chain both classes so this wins over the base .overlay__panel
   max-width: 440px declared later in the file. */
.overlay__panel.overlay__panel--about {
  max-width: 560px;
}

/* ---------- Privacy overlay (rc.64.7) ----------
   Inlines /privacy.html content. Same panel sizing as About. Long-form
   prose styling scoped to .privacy-content so it only affects the modal. */
.overlay__panel.overlay__panel--privacy {
  max-width: 640px;
}

.privacy-content {
  color: var(--color-text);
  font-size: 0.95rem;
  line-height: 1.6;
}

.privacy-content .overlay__title {
  margin-bottom: var(--space-1);
}

.privacy-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted, var(--color-text));
  opacity: 0.7;
  margin-top: 0;
  margin-bottom: var(--space-4);
}

.privacy-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.privacy-content h4 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-top: var(--space-3);
  margin-bottom: var(--space-1);
  color: var(--color-text);
  opacity: 0.9;
}

.privacy-content p {
  margin: 0 0 var(--space-3);
}

.privacy-content ul {
  margin: 0 0 var(--space-3);
  padding-left: 1.25rem;
}

.privacy-content li {
  margin-bottom: var(--space-1);
}

.privacy-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  background: rgba(127, 127, 127, 0.15);
  border-radius: 3px;
}

.privacy-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.privacy-content a:hover {
  text-decoration-thickness: 2px;
}

.about-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
  font-weight: 600;
}

.about-lede {
  font-size: var(--text-md);
  line-height: 1.65;
  color: var(--color-text);
  margin: 0 0 var(--space-5);
}

.about-lede em {
  font-style: italic;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.about-modes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
  margin: 0 0 var(--space-5);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.about-mode__name {
  font-family: 'Boska', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.02em;
}

.about-mode__desc {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.about-body {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-3);
}

.about-body strong {
  color: var(--color-text);
  font-weight: 600;
}

.about-tip {
  margin-top: var(--space-5);
  padding: var(--space-5);
  border: 1px solid var(--color-primary);
  border-radius: 8px;
  background: var(--color-primary-highlight);
  position: relative;
}

.about-tip::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(198, 150, 71, 0.04) 100%);
}

.about-tip__title {
  font-family: 'Boska', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 var(--space-2);
  letter-spacing: 0.01em;
}

.about-tip__body {
  margin: 0 0 var(--space-4);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text);
}

/* Merch block — mirrors .about-tip brass-bordered card.
   Uses heritage-red accent on the title to differentiate from the
   brass tip jar block, while keeping the same shimmer + border. */
.about-merch {
  margin-top: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--color-primary);
  border-radius: 8px;
  background: var(--color-primary-highlight);
  position: relative;
}

.about-merch::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(198, 150, 71, 0.04) 100%);
}

.about-merch__title {
  font-family: 'Boska', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 var(--space-2);
  letter-spacing: 0.01em;
}

.about-merch__body {
  margin: 0 0 var(--space-4);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text);
}

.about-legal {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
}

.about-legal__copy {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--color-text-faint);
  letter-spacing: 0.01em;
}

.about-meta {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
  font-size: 0.78rem;
  color: var(--color-text-faint);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  letter-spacing: 0.04em;
}

.about-meta a {
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--color-divider);
  padding-bottom: 1px;
  transition: color 140ms ease, border-color 140ms ease;
}

.about-meta a:hover,
.about-meta a:focus-visible {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  outline: none;
}

/* ---------- Screen system ---------- */
.screen {
  flex: 1;
  flex-direction: column;
  animation: screen-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.screen:not([data-active='true']) { display: none !important; }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SPLASH SCREEN
   ============================================================ */
.splash {
  flex: 1;
  display: grid;
  place-items: start center;
  padding: var(--space-3) clamp(var(--space-4), 4vw, var(--space-8)) var(--space-16);
}

@media (min-width: 640px) {
  .splash {
    padding-top: var(--space-8);
  }
}

.splash__inner {
  width: 100%;
  max-width: 720px;
  text-align: center;
}

.splash__eyebrow {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-primary);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
  background: var(--color-surface);
}

.splash__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.splash__title em {
  font-style: italic;
  color: var(--color-primary);
}

.splash__lede {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin: 0 auto var(--space-10);
  max-width: 540px;
  line-height: 1.5;
}

/* rc.65.6 — Pre-Begin sign-up incentive pill.
   Default hidden so signed-in users never see a flash on reload.
   JS sets data-show="1" only when confirmed signed-out. */
.splash__incentive {
  display: none;
  align-items: center;
  gap: var(--space-3);
  margin: 0 auto var(--space-4);
  padding: 8px 14px 8px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(78, 197, 216, 0.55);
  background: linear-gradient(135deg, rgba(78,197,216,0.18), rgba(78,197,216,0.05));
  color: var(--color-text);
  font-size: 0.8125rem;
  line-height: 1.35;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  text-align: left;
  max-width: 100%;
}
.splash__incentive[data-show="1"] { display: inline-flex; }
.splash__incentive:hover { filter: brightness(1.06); box-shadow: 0 2px 10px rgba(78,197,216,0.18); }
.splash__incentive:active { transform: translateY(1px); }
.splash__incentive:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.splash__incentive-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(78,197,216,0.22);
  color: var(--color-primary);
  flex: 0 0 auto;
}
.splash__incentive-copy strong { color: var(--color-primary); font-weight: 700; }
.splash__incentive-cta {
  color: var(--color-primary);
  font-weight: 600;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .splash__incentive { font-size: 0.78125rem; }
}

.splash__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-text-inverse);
  background: var(--color-primary);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-primary);
  box-shadow: var(--shadow-md);
}
.splash__cta:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.splash__cta:active { transform: translateY(0); }

/* Secondary splash CTA — a quieter pill that takes daily players straight to
   today's run, bypassing category select. Visually subordinate to Begin so
   newcomers still pick the primary path. */
.splash__cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: var(--space-2) var(--space-5);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.splash__cta-secondary:hover,
.splash__cta-secondary:focus-visible {
  color: var(--color-text);
  border-color: var(--color-text-muted);
  background: var(--color-surface);
}
.splash__cta-secondary[data-state='done'] {
  opacity: 0.7;
  cursor: default;
}
.splash__cta-secondary[data-state='done']:hover {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text-muted);
}

.splash__hint {
  margin: var(--space-4) auto 0;
  max-width: 48ch;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-style: italic;
  letter-spacing: 0.01em;
}

.splash__meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-12);
  align-items: start;
  text-align: center;
}
@media (max-width: 720px) {
  .splash__meta { grid-template-columns: repeat(2, 1fr); gap: var(--space-7); }
}
.splash__meta-item {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.4;
}
.splash__meta-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-primary);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  margin-bottom: 4px;
}

/* ============================================================
   MODE SELECT SCREEN
   ============================================================ */
.mode-select {
  flex: 1;
  padding: var(--space-10) clamp(var(--space-4), 4vw, var(--space-8)) var(--space-16);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-10);
}
.section-header__eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}
.section-header__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: var(--space-3);
}
.section-header__lede {
  color: var(--color-text-muted);
  margin: 0 auto;
  max-width: 540px;
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  max-width: 880px;
  margin: 0 auto;
}
@media (min-width: 720px) {
  .mode-grid { grid-template-columns: repeat(3, 1fr); }
}

.mode-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  width: 100%;
  min-height: 200px;
  position: relative;
  overflow: hidden;
}
.mode-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(198, 150, 71, 0.06));
  opacity: 0;
  transition: opacity var(--transition-interactive);
  pointer-events: none;
}
.mode-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.mode-card:hover::before { opacity: 1; }

.mode-card__icon {
  width: 32px;
  height: 32px;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
.mode-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  margin-bottom: var(--space-2);
}
.mode-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  flex: 1;
}
.mode-card__meta {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.mode-card__meta strong {
  color: var(--color-primary);
  font-weight: 600;
}

/* Difficulty chooser */
.difficulty-row {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-10);
  flex-wrap: wrap;
}
.difficulty-row__label {
  display: block;
  width: 100%;
  text-align: center;
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--space-3);
}
.chip {
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  min-height: 40px;
}
.chip:hover {
  color: var(--color-text);
  border-color: var(--color-border-strong);
}
.chip[aria-pressed='true'] {
  color: var(--color-text-inverse);
  background: var(--color-primary);
  border-color: var(--color-primary);
}

/* ============================================================
   GAMEPLAY SCREEN
   ============================================================ */
.game {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) clamp(var(--space-4), 4vw, var(--space-8));
  border-bottom: 1px solid var(--color-divider);
  background: var(--color-surface);
  flex-wrap: wrap;
}

.hud__left, .hud__right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.hud__metric {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 64px;
}
.hud__metric[hidden],
[data-hud-show][hidden] { display: none !important; }
.hud__metric-label {
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  font-weight: 600;
}
.hud__metric-value {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.hud__metric-value--accent { color: var(--color-primary); }
.hud__metric-value--alert { color: var(--color-heritage-red); }

.hud__progress {
  flex: 1;
  min-width: 80px;
  height: 4px;
  background: var(--color-surface-offset);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}
.hud__progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  width: 0%;
  transition: width 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hud__exit {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  letter-spacing: 0.06em;
}
.hud__exit:hover { color: var(--color-heritage-red); background: var(--color-surface-offset); }

/* Game body — mobile first stacked, desktop side-by-side */
.game__body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  padding: var(--space-4) clamp(var(--space-4), 4vw, var(--space-8)) var(--space-8);
  max-width: var(--content-wide);
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 960px) {
  .game__body {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: var(--space-8);
    align-items: start;
    padding-top: var(--space-8);
  }
}

/* Image stage */
.stage {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-md);
}

.stage__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.stage__skeleton {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(110deg,
    var(--color-surface-offset) 25%,
    var(--color-surface-offset-2) 50%,
    var(--color-surface-offset) 75%);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.stage[data-loaded='true'] .stage__skeleton { display: none; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.stage__fallback {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-6);
  color: var(--color-text-muted);
  text-align: center;
  font-size: var(--text-sm);
}
/* Hard image error — only show the simple fallback */
.stage[data-mode='no-photo'] .stage__fallback,
.stage[data-mode='photo'][data-error='true'] .stage__fallback {
  display: flex;
}
.stage[data-mode='no-photo'] .stage__skeleton,
.stage[data-mode='photo'][data-error='true'] .stage__skeleton { display: none; }
.stage[data-mode='no-photo'] .stage__img,
.stage[data-mode='photo'][data-error='true'] .stage__img { display: none; }
.stage[data-mode='no-photo'] .stage__clue-card { display: none; }

/* Photo mode: hide skeleton once loaded, hide clue card always */
.stage[data-mode='photo'][data-loaded='true'] .stage__skeleton { display: none; }
.stage[data-mode='photo'] .stage__clue-card { display: none; }
.stage[data-mode='photo'] .stage__fallback {
  display: none;
}
.stage[data-mode='photo'][data-error='true'] .stage__fallback { display: flex; }

/* Intentional clue-only round — editorial blank slate */
.stage[data-mode='clue-only'] .stage__skeleton,
.stage[data-mode='clue-only'] .stage__img,
.stage[data-mode='clue-only'] .stage__fallback { display: none; }
.stage[data-mode='clue-only'] {
  background:
    radial-gradient(120% 80% at 50% 30%, var(--color-surface-offset-2) 0%, var(--color-surface-offset) 60%, var(--color-surface) 100%);
  border: 1px dashed var(--color-border-strong);
}
.stage__clue-card {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-6);
  color: var(--color-text-muted);
  text-align: center;
}
.stage[data-mode='clue-only'] .stage__clue-card { display: flex; }
.stage__clue-mark {
  width: clamp(120px, 28%, 200px);
  height: auto;
  color: var(--color-primary);
  opacity: 0.55;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.25));
}
.stage__clue-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  font-style: italic;
  color: var(--color-text);
  letter-spacing: 0.01em;
  margin-top: var(--space-2);
}
.stage__clue-sub {
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.stage__badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-1) var(--space-3);
  background: rgba(20, 17, 13, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #f1e9d8;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  border: 1px solid rgba(241, 233, 216, 0.15);
}

.stage__detail-strip {
  display: none;
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-3);
  right: var(--space-3);
  gap: var(--space-2);
  padding: var(--space-2);
  background: rgba(20, 17, 13, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(241, 233, 216, 0.1);
}
.stage[data-has-details='true'] .stage__detail-strip {
  display: flex;
}
.stage__detail-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid rgba(241, 233, 216, 0.15);
  flex-shrink: 0;
}
.stage__detail-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Clue panel */
.clue-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.clues {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.clues__label {
  font-size: 0.6875rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.clues__label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--color-primary);
}
.clues__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.clues__item {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.5;
}
.clues__item-marker {
  flex-shrink: 0;
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-base);
  font-feature-settings: 'tnum';
  width: 1.5rem;
}

.clues--empty {
  display: none;
}

/* Answers */
.answers__label {
  font-size: 0.6875rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 600;
  margin-bottom: var(--space-3);
}
.answers__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 480px) {
  .answers__grid { grid-template-columns: 1fr 1fr; }
}

.answer-btn {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  min-height: 56px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: left;
  line-height: 1.35;
  letter-spacing: 0.01em;
  position: relative;
  width: 100%;
}
.answer-btn:hover:not(:disabled) {
  border-color: var(--color-primary);
  background: var(--color-surface-2);
  transform: translateY(-1px);
}
.answer-btn:disabled { cursor: default; }

.answer-btn__key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text-faint);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.answer-btn[data-state='correct'] {
  border-color: var(--color-success);
  background: var(--color-success-highlight);
  color: var(--color-text);
}
.answer-btn[data-state='correct'] .answer-btn__key {
  background: var(--color-success);
  color: var(--color-text-inverse);
  border-color: var(--color-success);
}
.answer-btn[data-state='incorrect'] {
  border-color: var(--color-heritage-red);
  background: var(--color-error-highlight);
  color: var(--color-text);
}
.answer-btn[data-state='incorrect'] .answer-btn__key {
  background: var(--color-heritage-red);
  color: var(--color-text-inverse);
  border-color: var(--color-heritage-red);
}
.answer-btn[data-state='dim'] { opacity: 0.5; }

@media (max-width: 479px) {
  .answer-btn__key { display: none; }
}

/* ============================================================
   FEEDBACK / REVEAL OVERLAY
   ============================================================ */
.reveal {
  position: fixed;
  inset: auto 0 0 0;
  /* Must sit above .consent-banner (z-index 9000) so the Next round button
     remains tappable when the consent banner is also visible. The banner
     is bottom-anchored too, so without this it physically intercepts taps
     on the lower portion of the reveal panel (rc.42). */
  z-index: 9100;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border-strong);
  box-shadow: var(--shadow-lg);
  transform: translateY(100%);
  transition: transform var(--transition-reveal),
              visibility 0s linear var(--transition-reveal);
  padding: var(--space-5) clamp(var(--space-4), 4vw, var(--space-8));
  padding-bottom: max(var(--space-5), env(safe-area-inset-bottom));
  max-height: 75dvh;
  overflow-y: auto;
  /* Hide the panel from the rendered output entirely when closed.
     Keeping the element with `transform: translateY(100%)` only is not
     enough — full-page screenshot tools (browser DevTools "capture full
     page", GoFullPage, Open Graph snappers, web archivers) stitch the
     scrollable canvas without honoring `position: fixed`, so the panel
     gets rendered at its anchored y-coordinate mid-page. visibility +
     pointer-events removes it from paint without breaking the slide-in
     animation when opened (rc.20). */
  visibility: hidden;
  pointer-events: none;
}
.reveal[data-open='true'] {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
  /* When opening, switch visibility immediately so the slide-in is
     visible. When closing, the linear-delayed visibility transition above
     waits for the slide-out to finish before hiding. */
  transition: transform var(--transition-reveal),
              visibility 0s linear 0s;
}

@media (min-width: 720px) {
  .reveal {
    inset: auto auto var(--space-6) 50%;
    transform: translate(-50%, calc(100% + var(--space-8)));
    width: min(680px, calc(100vw - var(--space-8)));
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border-strong);
    max-height: 70dvh;
  }
  .reveal[data-open='true'] { transform: translate(-50%, 0); }
}

.reveal__verdict {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: -0.005em;
  margin-bottom: var(--space-2);
}
.reveal__verdict-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.reveal[data-result='correct'] .reveal__verdict { color: var(--color-success); }
.reveal[data-result='incorrect'] .reveal__verdict { color: var(--color-heritage-red); }

.reveal__answer-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text);
  margin-bottom: var(--space-2);
  letter-spacing: -0.015em;
}
.reveal__years {
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.reveal__why {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: var(--space-4);
  max-width: 60ch;
}
.reveal__traits {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.reveal__trait {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.reveal__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  min-height: 44px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}
.btn--primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}
.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn--ghost:hover {
  border-color: var(--color-border-strong);
  background: var(--color-surface);
}
.btn--share {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn--share:hover {
  background: var(--color-primary);
  color: var(--color-bg);
  border-color: var(--color-primary);
}
.btn--block { width: 100%; }

/* ============================================================
   RESULTS SCREEN
   ============================================================ */
.results {
  flex: 1;
  display: grid;
  place-items: center;
  padding: var(--space-12) clamp(var(--space-4), 4vw, var(--space-8));
}

.results__inner {
  width: 100%;
  max-width: 720px;
  text-align: center;
}

.results__eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
  /* Override base.css `p { max-width: 72ch }` which clamps the line to
     ~453px and leaves text-align: center centering inside that box,
     not the parent. */
  max-width: none;
}

.results__breadcrumb {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  margin: 0 0 var(--space-5);
  text-align: center;
  max-width: none;
}

.results__score {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  line-height: 1;
  font-weight: 500;
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}
.results__score-suffix {
  color: var(--color-text-faint);
  font-size: 0.4em;
}

.results__verdict {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
}

.results__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-8);
}
.results__stat-label {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--space-1);
  font-weight: 600;
}
.results__stat-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-text);
}
.results__stat-value--accent { color: var(--color-primary); }

.results__breakdown {
  text-align: left;
  margin-bottom: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.results__breakdown-title {
  font-size: 0.6875rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 600;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-divider);
  background: var(--color-surface-offset);
}
.results__breakdown-list {
  list-style: none;
  max-height: 320px;
  overflow-y: auto;
}
.results__breakdown-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--color-divider);
  font-size: var(--text-sm);
}
.results__breakdown-row:last-child { border-bottom: none; }
.results__breakdown-icon {
  width: 18px; height: 18px; flex-shrink: 0;
}
.results__breakdown-row[data-correct='true'] .results__breakdown-icon { color: var(--color-success); }
.results__breakdown-row[data-correct='false'] .results__breakdown-icon { color: var(--color-heritage-red); }
.results__breakdown-name {
  flex: 1;
  color: var(--color-text);
  font-weight: 500;
}
.results__breakdown-meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
}

.results__actions {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   TOAST / TIMER WARNING
   ============================================================ */
.toast {
  position: fixed;
  top: var(--space-4);
  left: 50%;
  transform: translate(-50%, calc(-100% - 32px));
  z-index: 200;
  padding: var(--space-3) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: var(--shadow-md);
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1), opacity 200ms ease;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}
.toast[data-open='true'] {
  transform: translate(-50%, var(--space-4));
  opacity: 1;
  visibility: visible;
}
.toast--alert { color: var(--color-heritage-red); border-color: var(--color-heritage-red); }
.toast--success { color: var(--color-success); border-color: var(--color-success); }

/* ============================================================
   HOTKEY HINT (desktop)
   ============================================================ */
.hotkey-hint {
  display: none;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.04em;
  margin-top: var(--space-3);
}
.hotkey-hint kbd {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 2px 6px;
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
}
@media (min-width: 720px) and (hover: hover) {
  .hotkey-hint { display: inline-flex; }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.muted { color: var(--color-text-muted); }
.accent { color: var(--color-primary); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.divider {
  height: 1px;
  background: var(--color-divider);
  border: none;
  margin: var(--space-6) 0;
}

/* No-script fallback */
.no-js-warning {
  margin: var(--space-8) auto;
  padding: var(--space-5);
  max-width: 520px;
  text-align: center;
  border: 1px solid var(--color-heritage-red);
  border-radius: var(--radius-lg);
  background: var(--color-error-highlight);
  color: var(--color-text);
}

/* =====================================================================
   CATEGORY SELECT (V2 — Solidbody · Hollowbody · All Strings)
   Two-step flow: this is Step 1, then mode-select is Step 2.
   ===================================================================== */

.category-select { padding-block: var(--space-12); }

.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin: 0 auto;
  max-width: 1280px;
}
@media (min-width: 640px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1080px) {
  .category-grid { grid-template-columns: repeat(4, 1fr); }
}

.category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: var(--space-7) var(--space-6) var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  width: 100%;
  min-height: 280px;
  overflow: hidden;
  transition: transform var(--transition-interactive),
              border-color var(--transition-interactive),
              box-shadow var(--transition-interactive);
}
.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 55%, rgba(198, 150, 71, 0.08));
  opacity: 0;
  transition: opacity var(--transition-interactive);
  pointer-events: none;
}
.category-card:hover,
.category-card:focus-visible {
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.category-card:hover::before,
.category-card:focus-visible::before { opacity: 1; }

.category-card__corner {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  border: 1px solid var(--color-divider);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.category-card__icon {
  width: 96px;
  height: 64px;
  color: var(--color-primary);
  margin-bottom: var(--space-5);
}

.category-card__title {
  font-family: var(--font-display);
  /* Cap below --text-2xl so the longest title ("Hollowbody") never
     touches the card's right padding edge in a 4-up desktop grid. */
  font-size: clamp(1.875rem, 1.2rem + 2.1vw, 3rem);
  font-weight: 500;
  line-height: 1.05;
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}
.category-card__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-bottom: var(--space-5);
  flex: 1;
}
.category-card__meta {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.category-card__meta strong {
  color: var(--color-primary);
  font-weight: 600;
  font-size: var(--text-sm);
}

/* Section-header breadcrumb (mode-select Step 2 header) */
.section-header__breadcrumb {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5em;
}
.section-header__breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--color-divider);
  transition: color var(--transition-interactive),
              border-color var(--transition-interactive);
}
.section-header__breadcrumb a:hover {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* HUD category badge (during gameplay) */
.hud__category {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 4px 10px;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-surface);
  margin-right: var(--space-3);
  white-space: nowrap;
}
.hud__category:empty { display: none; }

/* Splash em styling (parent brand introduces three em phrases now) */
.splash__lede em {
  font-style: italic;
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 500;
}

/* ======================================================================
   V3 — Round type, Daily, Versus
   ====================================================================== */

/* HUD round-type glyph */
.hud__roundtype {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: transparent;
  margin-right: var(--space-3);
  white-space: nowrap;
}
.hud__roundtype:empty { display: none; }
.hud__roundtype[data-rt="visual"]   { color: var(--color-text); border-color: var(--color-text-muted); }
.hud__roundtype[data-rt="combined"] { color: var(--color-primary); border-color: var(--color-primary); opacity: 0.85; }
.hud__roundtype[data-rt="clue"]     { color: var(--color-text-muted); border-color: var(--color-divider); font-style: italic; }

/* ===== Round-type select (Step 3) ===== */
.roundtype-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-7);
}
@media (max-width: 800px) {
  .roundtype-grid { grid-template-columns: 1fr; }
}
.roundtype-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-7) var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition-interactive),
              transform var(--transition-interactive),
              background var(--transition-interactive);
  font-family: inherit;
  color: inherit;
}
.roundtype-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}
.roundtype-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.roundtype-card__corner {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.roundtype-card__glyph {
  display: inline-flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  color: var(--color-primary);
  background: var(--color-surface-2, var(--color-bg));
}
.roundtype-card__glyph svg { width: 28px; height: 28px; }
.roundtype-card__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}
.roundtype-card__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0;
}
.roundtype-card--default {
  border-color: var(--color-primary);
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
}

/* ===== Daily mode card accents ===== */
.mode-card {
  position: relative;
}
.mode-card__corner {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--color-bg);
}
/* Daily card description: when a non-all-strings category is selected, the
   description is rewritten in JS to highlight the All-Comers truth. Style
   the <em> as a quiet inline emphasis (dotted underline) so it reads as
   informational rather than decorative. */
.mode-card--daily [data-mode-daily-desc] em {
  font-style: normal;
  border-bottom: 1px dotted currentColor;
  padding-bottom: 1px;
}
.mode-card--daily {
  border-color: var(--color-primary);
}
.mode-card--versus {
  border-color: var(--color-border);
  background: var(--color-surface);
  opacity: 0.85;
}
.mode-card--versus:hover {
  opacity: 1;
}
.mode-card--versus-active {
  border-color: var(--color-primary);
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
  opacity: 1;
  box-shadow: 0 0 0 1px var(--color-primary) inset;
}

/* Section footnote (e.g. "today's daily already played") */
.section-footnote {
  margin: var(--space-6) auto 0;
  max-width: 60ch;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-style: italic;
}

/* ===== Versus head-to-head results panel ===== */
.results__versus {
  margin: var(--space-7) 0 var(--space-5);
  padding: var(--space-6);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.results__versus[hidden] { display: none; }
.results__versus-eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin: 0 0 var(--space-4);
  text-align: center;
}
.results__versus-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.results__versus-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}
.results__versus-label {
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.results__versus-score {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
}
.results__versus-vs {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--color-primary);
}
.results__versus-verdict {
  margin: var(--space-4) 0 0;
  text-align: center;
  font-size: var(--text-base);
  color: var(--color-text);
  font-style: italic;
}

/* Share button — friendlier than the ghost variant */
.btn[data-share-cta] {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn[data-share-cta]:hover {
  background: var(--color-primary);
  color: var(--color-bg);
}

/* Hidden override — class-level display rules win over UA `[hidden]` */
.mode-card[hidden],
.results__versus[hidden],
.section-footnote[hidden],
[data-share-cta][hidden] { display: none !important; }

/* ============================================================
   ACCOUNT BUTTON (header)
   Signed-out: person icon. Signed-in: warm brass disc with initial.
   ============================================================ */
.account-btn {
  position: relative;
  overflow: hidden;
}
.account-btn__initial {
  display: none;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}
.account-btn__icon { display: inline-block; }
.account-btn[data-signed-in='true'] .account-btn__initial { display: inline-flex; }
.account-btn[data-signed-in='true'] .account-btn__icon { display: none; }
.account-btn[data-signed-in='true'] {
  color: var(--color-primary);
  border-color: transparent;
}
.account-btn[data-signed-in='true']:hover {
  background: var(--color-surface-2);
  border-color: var(--color-border);
}

/* ============================================================
   OVERLAY (modal dialog) — sign-in & account
   ============================================================ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background: rgba(10, 8, 6, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}
.overlay[data-open='true'] {
  opacity: 1;
  visibility: visible;
}
.overlay__panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - var(--space-8));
  overflow-y: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg, 0 20px 60px rgba(0, 0, 0, 0.5));
  padding: var(--space-7) var(--space-6) var(--space-6);
  transform: translateY(12px) scale(0.98);
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}
.overlay[data-open='true'] .overlay__panel {
  transform: translateY(0) scale(1);
}
.overlay__close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 36px;
  height: 36px;
}
.overlay__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-3);
  letter-spacing: -0.01em;
}
.overlay__lede {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
  margin: 0 0 var(--space-5);
}
.overlay__note {
  display: inline-block;
  margin-top: var(--space-2);
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  letter-spacing: 0.01em;
}
.overlay__fine-print {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  line-height: 1.55;
  margin: var(--space-5) 0 0;
}
.overlay__divider {
  border: 0;
  border-top: 1px solid var(--color-divider);
  margin: var(--space-6) 0 var(--space-5);
}

/* ============================================================
   SIGN-IN FORM
   ============================================================ */
.signin-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.signin-form__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.signin-form__input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  min-height: 44px;
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: border-color var(--transition-interactive), background var(--transition-interactive);
}
.signin-form__input:hover {
  border-color: var(--color-border-strong);
}
.signin-form__input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-surface-offset-2);
}
.signin-form__input::placeholder {
  color: var(--color-text-faint);
}
.signin-form__hint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin: var(--space-1) 0 0;
}
.signin-form .btn {
  margin-top: var(--space-3);
}

/* ============================================================
   FORM MESSAGE (info / success / error)
   ============================================================ */
.form-message {
  margin: var(--space-4) 0 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: 1.5;
  border: 1px solid var(--color-border);
  background: var(--color-surface-offset);
  color: var(--color-text);
}
.form-message[hidden] { display: none; }
.form-message--info {
  border-color: var(--color-border-strong);
  color: var(--color-text-muted);
}
.form-message--success {
  border-color: var(--color-success, #6c8c5a);
  color: var(--color-success, #6c8c5a);
  background: rgba(108, 140, 90, 0.08);
}
.form-message--error {
  border-color: var(--color-heritage-red, #a8412c);
  color: var(--color-heritage-red, #a8412c);
  background: rgba(168, 65, 44, 0.08);
}

/* ============================================================
   ACCOUNT META (definition list in account overlay)
   ============================================================ */
.account-meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-2) var(--space-4);
  margin: 0 0 var(--space-5);
  padding: var(--space-4);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.account-meta dt {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0;
  align-self: center;
}
.account-meta dd {
  font-size: var(--text-sm);
  color: var(--color-text);
  margin: 0;
  word-break: break-word;
  align-self: center;
}

/* ============================================================
   OAUTH PROVIDERS (sign-in overlay)
   ============================================================ */
.signin-providers {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.btn--oauth {
  background: var(--color-text);          /* warm cream — reads as a "white" CTA on dark surface */
  color: var(--color-text-inverse);
  border-color: var(--color-text);
  gap: var(--space-3);
  font-weight: 600;
}
.btn--oauth:hover {
  background: #ffffff;
  border-color: #ffffff;
}
.btn--oauth:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn--oauth .btn__icon {
  flex-shrink: 0;
  /* Google's G icon ships with brand colors baked in via fill="..." attrs.
     No filter needed; it sits cleanly on the cream surface. */
}

/* Apple Sign-In button — Apple HIG requires black bg + white logo/text
   (or inverse). We use the black variant since the overlay is on a dark
   surface and pairs well with our cream Google CTA above it. The logo
   uses currentColor so it inherits the white text color cleanly. */
.btn--apple {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
}
.btn--apple:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
}
.btn--apple .btn__icon {
  /* Optical alignment — Apple logo sits slightly heavy at the baseline. */
  margin-top: -2px;
}

/* "or" divider between provider buttons and email form */
.overlay__or {
  position: relative;
  text-align: center;
  margin: var(--space-5) 0;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}
.overlay__or::before,
.overlay__or::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 24px);
  height: 1px;
  background: var(--color-divider);
}
.overlay__or::before { left: 0; }
.overlay__or::after  { right: 0; }
.overlay__or span {
  display: inline-block;
  padding: 0 var(--space-2);
  background: var(--color-surface);
}

/* =====================================================================
   ACCOUNT MENU (header dropdown)
   Sits as a positioning context around the account button. When signed
   in, clicking the account button toggles a small dropdown anchored to
   it with name/email + Account settings + Sign out. When signed out,
   clicking opens the full sign-in overlay (handled in auth.js).
   ===================================================================== */
.account-menu { position: relative; display: inline-flex; }

.account-menu__dropdown {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  min-width: 220px;
  padding: var(--space-2) 0;
  background: var(--color-surface, #1c1916);
  border: 1px solid var(--color-border, rgba(255,255,255,0.08));
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  z-index: 1000;
}
.account-menu__dropdown[hidden] { display: none; }

.account-menu__header {
  padding: var(--space-2) var(--space-3) var(--space-3);
}
.account-menu__name {
  font-weight: 600;
  font-size: var(--text-sm, 0.875rem);
  color: var(--color-text, #f4ead6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-menu__email {
  font-size: var(--text-xs, 0.75rem);
  color: var(--color-text-muted, rgba(244,234,214,0.6));
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-menu__divider {
  border: 0;
  border-top: 1px solid var(--color-border, rgba(255,255,255,0.08));
  margin: 0 0 var(--space-1);
}
.account-menu__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: transparent;
  border: 0;
  color: var(--color-text, #f4ead6);
  text-align: left;
  font-size: var(--text-sm, 0.875rem);
  cursor: pointer;
  transition: background 0.12s ease;
}
.account-menu__item:hover,
.account-menu__item:focus-visible {
  background: rgba(255,255,255,0.06);
  outline: none;
}
.account-menu__item svg { flex-shrink: 0; opacity: 0.7; }
.account-menu__item--danger { color: #e89a8a; }
.account-menu__item--danger svg { opacity: 0.85; }
.account-menu__item--danger:hover { background: rgba(232,154,138,0.08); }

/* rc.27 — anchor variant of menu item (for admin link) */
a.account-menu__item { text-decoration: none; }
.account-menu__item--admin { color: var(--color-accent, #4ec5d8); }
.account-menu__item--admin svg { opacity: 0.85; }
.account-menu__item--admin:hover,
.account-menu__item--admin:focus-visible { background: rgba(78,197,216,0.08); }
.account-menu__item--admin[hidden] { display: none !important; }

/* =====================================================================
   DAILY LEADERBOARD (results screen)
   ===================================================================== */
.leaderboard {
  margin-top: var(--space-10, 40px);
  margin-bottom: var(--space-10, 40px);
  padding: var(--space-6, 20px);
  /* Theme-aware card surface + border. Hardcoded rgba(255,255,255,...)
     was invisible on the cream light-mode background. Tokens give a
     subtle recessed card in both themes. */
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 12px);
}

/* Ensure HTML [hidden] beats flex/grid display rules on leaderboard sub-panels. */
.leaderboard [hidden] { display: none !important; }
.leaderboard__header { margin-bottom: var(--space-4, 14px); }
.leaderboard__title {
  font-family: var(--font-display, inherit);
  font-size: var(--text-lg, 1.125rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 var(--space-1, 4px);
  color: var(--color-text, #f4ede1);
}
.leaderboard__subtitle {
  font-size: var(--text-sm, 0.875rem);
  color: var(--color-text-muted, rgba(244,237,225,0.6));
  margin: 0;
}
.leaderboard__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.leaderboard__row {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  align-items: center;
  gap: var(--space-3, 12px);
  padding: var(--space-3, 12px) var(--space-4, 14px);
  border-radius: var(--radius-md, 8px);
  font-size: var(--text-base, 1rem);
}
.leaderboard__row + .leaderboard__row { border-top: 1px solid rgba(255,255,255,0.04); }
.leaderboard__row--me {
  background: rgba(218, 162, 75, 0.10); /* brass accent */
  border: 1px solid rgba(218, 162, 75, 0.25);
}
.leaderboard__rank {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--color-text-muted, rgba(244,237,225,0.6));
  text-align: right;
}
.leaderboard__row--me .leaderboard__rank { color: var(--color-accent, #daa24b); }
.leaderboard__name {
  font-weight: 500;
  color: var(--color-text, #f4ede1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leaderboard__score {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--color-text, #f4ede1);
}
.leaderboard__time {
  font-variant-numeric: tabular-nums;
  font-size: var(--text-sm, 0.875rem);
  color: var(--color-text-muted, rgba(244,237,225,0.6));
}
.leaderboard__myrank {
  margin-top: var(--space-4, 14px);
  padding-top: var(--space-4, 14px);
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--text-sm, 0.875rem);
}
.leaderboard__myrank-label { color: var(--color-text-muted, rgba(244,237,225,0.6)); }
.leaderboard__myrank-value { font-weight: 600; color: var(--color-accent, #daa24b); }
.leaderboard__signin-cta {
  text-align: center;
  padding: var(--space-4, 14px) 0;
}
.leaderboard__signin-cta p {
  margin: 0 0 var(--space-3, 12px);
  color: var(--color-text-muted, rgba(244,237,225,0.7));
}
.leaderboard__empty,
.leaderboard__error {
  text-align: center;
  padding: var(--space-3, 12px) 0;
  color: var(--color-text-muted, rgba(244,237,225,0.6));
  font-size: var(--text-sm, 0.875rem);
}
.leaderboard__error { color: #e89a8a; }

/* =====================================================================
   ACCOUNT OVERLAY — TABS + STATS
   ===================================================================== */
.account-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 var(--space-5, 18px);
  padding: 4px;
  background: rgba(0,0,0,0.18);
  border-radius: var(--radius-md, 8px);
}
.account-tab {
  flex: 1;
  background: transparent;
  border: 0;
  padding: var(--space-2, 8px) var(--space-3, 12px);
  border-radius: 6px;
  color: var(--color-text-muted, rgba(244,237,225,0.65));
  font-family: inherit;
  font-size: var(--text-sm, 0.875rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.account-tab:hover { color: var(--color-text, #f4ede1); }
.account-tab.is-active {
  background: rgba(218, 162, 75, 0.12);
  color: var(--color-accent, #daa24b);
}
.account-pane[hidden] { display: none; }

/* min-width:0 prevents the pane from refusing to shrink when a child
   (e.g. the 5-column .stats-bests__table) reports a wider intrinsic
   width. Without this, the pane forces .overlay__panel to overflow
   and the entire account UI scrolls horizontally on mobile. */
.account-pane { min-width: 0; }

/* Stats — totals grid */
.stats-totals {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3, 12px);
  margin-bottom: var(--space-5, 18px);
}
.stats-totals__item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md, 8px);
  padding: var(--space-3, 12px) var(--space-4, 14px);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stats-totals__label {
  font-size: var(--text-xs, 0.75rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted, rgba(244,237,225,0.5));
}
.stats-totals__value {
  font-family: var(--font-display, inherit);
  font-size: var(--text-2xl, 1.5rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--color-text, #f4ede1);
}

/* Stats — bests table
   Wrap in horizontal scroll so a wide 5-column table never blows out
   its parent pane on narrow viewports. The pane has min-width:0 so it
   can shrink; this container holds the overflow locally. */
.stats-bests {
  margin-bottom: var(--space-5, 18px);
  overflow-x: auto;
  /* Subtle right-edge fade hints at scrollability when content overflows. */
  -webkit-overflow-scrolling: touch;
}
.stats-bests__title,
.stats-recent__title {
  font-size: var(--text-sm, 0.875rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--color-text-muted, rgba(244,237,225,0.55));
  margin: 0 0 var(--space-3, 12px);
}
.stats-bests__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm, 0.875rem);
  font-variant-numeric: tabular-nums;
}
.stats-bests__table th,
.stats-bests__table td {
  padding: var(--space-2, 8px) var(--space-2, 8px);
  text-align: right;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  white-space: nowrap;
}
/* Tighten cells on narrow viewports so the 5-column table has a real
   shot at fitting without horizontal scroll. The .stats-bests wrapper
   above still allows scroll as a fallback for very long values. */
@media (max-width: 480px) {
  .stats-bests__table {
    font-size: 0.8125rem;
  }
  .stats-bests__table th,
  .stats-bests__table td {
    padding: var(--space-2, 8px) 6px;
  }
  .stats-bests__table thead th {
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
  }
}
.stats-bests__table th:first-child,
.stats-bests__table td:first-child {
  text-align: left;
  color: var(--color-text-muted, rgba(244,237,225,0.6));
  font-weight: 500;
  text-transform: capitalize;
}
.stats-bests__table thead th {
  font-weight: 500;
  font-size: var(--text-xs, 0.75rem);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted, rgba(244,237,225,0.45));
  border-bottom-color: rgba(255,255,255,0.10);
}
.stats-bests__table td.is-empty { color: rgba(244,237,225,0.25); }

/* Stats — recent activity */
.stats-recent__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stats-recent__item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-3, 12px);
  align-items: baseline;
  padding: var(--space-2, 8px) var(--space-3, 12px);
  font-size: var(--text-sm, 0.875rem);
  border-radius: 6px;
}
.stats-recent__item:hover { background: rgba(255,255,255,0.03); }
.stats-recent__label {
  color: var(--color-text, #f4ede1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stats-recent__score {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stats-recent__when {
  color: var(--color-text-muted, rgba(244,237,225,0.5));
  font-size: var(--text-xs, 0.75rem);
}

.stats-loading,
.stats-empty {
  text-align: center;
  padding: var(--space-8, 32px) var(--space-4, 14px);
  color: var(--color-text-muted, rgba(244,237,225,0.6));
}

/* =====================================================================
   BADGES — toast + grid
   ===================================================================== */

/* Toast host: stack of cards bottom-right, never blocks gameplay. */
.badge-toast-host {
  position: fixed;
  right: clamp(12px, 3vw, 24px);
  bottom: clamp(12px, 3vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.badge-toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: center;
  min-width: 280px;
  max-width: 360px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(218, 162, 75, 0.15), rgba(20, 16, 12, 0.95));
  border: 1px solid rgba(218, 162, 75, 0.35);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  color: var(--color-text, #f4ede1);
  font-family: var(--font-body, system-ui);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1), opacity 320ms ease;
}
.badge-toast.is-in {
  transform: translateX(0);
  opacity: 1;
}
.badge-toast.is-out {
  transform: translateX(20%);
  opacity: 0;
  transition-duration: 280ms;
}

.badge-toast__icon {
  font-size: 1.75rem;
  text-align: center;
  color: var(--color-accent, #daa24b);
  font-family: var(--font-display, serif);
  line-height: 1;
}

.badge-toast__eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent, #daa24b);
  margin-bottom: 2px;
}

.badge-toast__name {
  font-family: var(--font-display, serif);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.badge-toast__copy {
  font-size: 0.8125rem;
  color: var(--color-text-muted, rgba(244,237,225,0.7));
  line-height: 1.35;
}

/* =====================================================================
   POST-GAME TIP TOAST (rc.23)
   Bottom-right card, fires only after a great run, theme-aware. Sits in
   the same gutter as badge-toast (z-index lower so badge celebrations
   visually outrank the monetization nudge).
   ===================================================================== */
.tip-toast {
  position: fixed;
  right: clamp(12px, 3vw, 24px);
  bottom: clamp(12px, 3vw, 24px);
  z-index: 9990;
  pointer-events: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  padding: 14px 16px 14px 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  color: var(--color-text);
  font-family: var(--font-body, system-ui);
  transform: translateY(20%);
  opacity: 0;
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1), opacity 320ms ease;
}
[data-theme='light'] .tip-toast {
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
}
.tip-toast.is-in {
  transform: translateY(0);
  opacity: 1;
}
.tip-toast.is-out {
  transform: translateY(10%);
  opacity: 0;
  transition-duration: 280ms;
}
.tip-toast__body {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}
.tip-toast__close {
  grid-column: 2;
  grid-row: 1;
  background: transparent;
  border: 0;
  padding: 4px;
  margin: -4px -4px 0 0;
  cursor: pointer;
  color: var(--color-text-muted);
  border-radius: 4px;
  line-height: 0;
}
.tip-toast__close:hover { color: var(--color-text); }
.tip-toast__close:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.tip-toast__eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 4px;
  font-weight: 600;
}
.tip-toast__copy {
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--color-text);
  margin-bottom: 10px;
}
.tip-toast__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tip-toast__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  background: var(--color-primary);
  color: var(--color-bg);
  border: 1px solid var(--color-primary);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: filter 160ms ease;
}
.tip-toast__cta:hover { filter: brightness(1.08); }
.tip-toast__cta:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.tip-toast__later {
  padding: 7px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease;
}
.tip-toast__later:hover { color: var(--color-text); border-color: var(--color-text-muted); }
.tip-toast__later:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) {
  .tip-toast { transition-duration: 0ms; }
}

/* Badges tab grid */
.badges-loading {
  text-align: center;
  padding: var(--space-8, 28px) 0;
  color: var(--color-text-muted, rgba(244,237,225,0.6));
}

.badges-summary {
  text-align: center;
  font-size: var(--text-sm, 0.875rem);
  color: var(--color-text-muted, rgba(244,237,225,0.7));
  margin: 0 0 var(--space-5, 18px);
  letter-spacing: 0.02em;
}
.badges-summary [data-badges-earned-count] {
  color: var(--color-accent, #daa24b);
  font-weight: 600;
}

.badges-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 520px) {
  .badges-grid { grid-template-columns: 1fr 1fr; }
}

.badge-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  transition: border-color 200ms ease, background 200ms ease;
}
.badge-card.is-earned {
  background: rgba(218, 162, 75, 0.08);
  border-color: rgba(218, 162, 75, 0.30);
}
.badge-card.is-locked { opacity: 0.55; }

.badge-card__icon {
  font-size: 1.5rem;
  text-align: center;
  color: var(--color-accent, #daa24b);
  font-family: var(--font-display, serif);
  line-height: 1;
}
.badge-card.is-locked .badge-card__icon { color: var(--color-text-faint, rgba(244,237,225,0.4)); }

.badge-card__name {
  font-family: var(--font-display, serif);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.badge-card__copy {
  font-size: 0.75rem;
  color: var(--color-text-muted, rgba(244,237,225,0.7));
  line-height: 1.35;
}
.badge-card__earned {
  margin-top: 4px;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted, rgba(244,237,225,0.55));
}
.badge-card.is-earned .badge-card__earned { color: var(--color-accent, #daa24b); }

/* =================================================================
   Hall of Fame (Stats tab)
   ================================================================= */
.hof {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  /* Theme-aware divider — was a hardcoded translucent gold that nearly
     vanished on the cream light-mode background. Token border is visible
     in both themes. */
  border-top: 1px solid var(--color-border);
}
.hof__header {
  margin-bottom: 0.875rem;
}
.hof__title {
  font-family: var(--font-display, "Playfair Display", Georgia, serif);
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.125rem;
  color: var(--color-text);
  /* Inline icon sits next to title text on the same baseline,
     vertically centered. Replaces fragile vertical-align tweaks. */
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hof__title svg {
  flex: 0 0 auto;
  color: var(--color-primary);
}
.hof__hint {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0;
}
.hof__controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.hof__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1 1 140px;
  min-width: 0;
}
.hof__field-label {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.hof__select {
  appearance: none;
  -webkit-appearance: none;
  /* Theme-aware: charcoal surface + cream text in dark mode,
     warm-paper surface + ink text in light mode. */
  background-color: var(--color-surface-offset);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 0.9375rem;
  /* Brass chevron — dark-mode default. Light mode overrides below. */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23c69647' stroke-width='1.5'><path d='M1 1.5l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
  background-size: 0.75rem;
  cursor: pointer;
}
[data-theme='light'] .hof__select {
  /* Match light-mode --color-primary (#8a5e1c) so the chevron stays
     readable on the warm-paper backdrop instead of washing out. */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%238a5e1c' stroke-width='1.5'><path d='M1 1.5l5 5 5-5'/></svg>");
}
.hof__select:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}
.hof__board {
  /* Slightly tighter than the results-screen leaderboard. */
  margin: 0;
}

/* =====================================================================
   SIGN-IN PERKS LIST (in sign-in overlay)
   Replaces the old single-paragraph lede with a value-led benefits list.
   ===================================================================== */
.signin-perks {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
  display: grid;
  gap: var(--space-3);
}
.signin-perks__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--color-text-muted);
}
.signin-perks__icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(198, 150, 71, 0.10);
  color: var(--color-primary);
  border: 1px solid rgba(198, 150, 71, 0.20);
}
.signin-perks__copy strong {
  color: var(--color-text);
  font-weight: 600;
  margin-right: 4px;
}
.signin-note {
  display: block;
  margin: 0 0 var(--space-4);
}

/* =====================================================================
   GUEST PILL (splash screen, anon-only, dismissible)
   ===================================================================== */
.guest-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-3) auto var(--space-2);
  padding: 6px 6px 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: rgba(26, 22, 18, 0.6);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
  max-width: max-content;
}
.guest-pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(198, 150, 71, 0.18);
  flex: 0 0 auto;
}
.guest-pill__copy {
  white-space: nowrap;
}
.guest-pill__cta {
  border: none;
  background: transparent;
  color: var(--color-primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  transition: background-color 120ms ease;
}
.guest-pill__cta:hover {
  background: rgba(198, 150, 71, 0.12);
}
.guest-pill__cta:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.guest-pill__close {
  border: none;
  background: transparent;
  color: var(--color-text-faint);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 120ms ease;
}
.guest-pill__close:hover {
  color: var(--color-text);
}
.guest-pill__close:focus-visible {
  outline: 2px solid var(--color-border-strong);
  outline-offset: 2px;
}

/* =====================================================================
   SAVE-RUN UPSELL (results screen, anon-only)
   Mirrors the .about-tip brass-bordered card pattern, with a relative
   anchor so the close button can sit in the corner.
   ===================================================================== */
.save-run {
  position: relative;
  margin: var(--space-5) 0 var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--color-primary);
  border-radius: 8px;
  background: var(--color-primary-highlight);
}
.save-run::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(198, 150, 71, 0.04) 100%);
}
.save-run__close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: transparent;
  color: var(--color-text-faint);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 120ms ease;
  z-index: 1; /* above the ::before gradient */
}
.save-run__close:hover {
  color: var(--color-text);
}
.save-run__close:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.save-run__title {
  font-family: 'Boska', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 var(--space-2);
  letter-spacing: 0.01em;
  /* Reserve space so a 1-line title doesn't sit under the close button. */
  padding-right: var(--space-7);
}
.save-run__body {
  margin: 0 0 var(--space-4);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text);
  position: relative;
  z-index: 1;
}

/* =====================================================================
   PR #25 — Monthly Champion + Community Growth
   ===================================================================== */

/* ---------- FEATURED PRIZE PREVIEW (rc.32) ----------
   Splash card showing the actual product up for grabs this month.
   Two-column on desktop (mockup + body), stacks on mobile. Brass
   border, click-through to the product page on Spreadshop. Sits
   above the .monthly-banner so the prize is the FIRST thing players
   see in the prize stack. */
.prize-preview {
  position: relative;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--space-4);
  align-items: center;
  margin: var(--space-4) auto 0;
  max-width: 640px;
  padding: var(--space-4);
  border: 1px solid var(--color-primary);
  border-radius: 14px;
  background: var(--color-primary-highlight);
  text-decoration: none;
  color: var(--color-text);
  overflow: hidden;
  transition: transform 120ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.prize-preview::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(198,150,71,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.prize-preview:hover,
.prize-preview:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(198,150,71,0.18);
  border-color: var(--color-primary);
  outline: none;
}
.prize-preview__media {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-bg);
  border: 1px solid rgba(198,150,71,0.30);
  flex-shrink: 0;
}
.prize-preview__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.prize-preview__body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.prize-preview__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 4px;
}
.prize-preview__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-text);
  margin: 0;
}
.prize-preview__sub {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}
.prize-preview__blurb {
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--color-text);
  margin: 6px 0 8px;
}
.prize-preview__cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  align-self: flex-start;
}
.prize-preview:hover .prize-preview__cta,
.prize-preview:focus-visible .prize-preview__cta {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Mobile: stack mockup above body, full-width image */
@media (max-width: 560px) {
  .prize-preview {
    grid-template-columns: 1fr;
    text-align: left;
    padding: var(--space-3);
  }
  .prize-preview__media {
    width: 100%;
    height: 240px;
  }
}

/* ---------- MONTHLY CHAMPION BANNER (splash, signed-out) ----------
   Brass-accented strip above the guest pill. Mirrors the .about-tip
   gradient-shimmer pattern but at smaller scale. Dismissible via
   localStorage; auto-hides on auth change. */
.monthly-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin: var(--space-4) auto 0;
  max-width: 640px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-primary);
  border-radius: 12px;
  background: var(--color-primary-highlight);
  overflow: hidden;
}
.monthly-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(198,150,71,0.10) 0%, transparent 60%);
  pointer-events: none;
}
.monthly-banner__icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(198,150,71,0.15);
  color: var(--color-primary);
  position: relative; z-index: 1;
}
.monthly-banner__copy {
  flex: 1 1 240px;
  display: flex; flex-direction: column;
  gap: 2px;
  position: relative; z-index: 1;
}
.monthly-banner__lede {
  font-family: 'Boska', Georgia, serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.005em;
  line-height: 1.3;
}
.monthly-banner__sub {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}
.monthly-banner__rules {
  background: none; border: 0; padding: 0;
  color: var(--color-primary);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.monthly-banner__rules:hover { color: var(--color-text); }
.monthly-banner__cta {
  flex-shrink: 0;
  padding: 6px 14px;
  background: var(--color-primary);
  color: var(--color-primary-highlight);
  border: 0; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 0.85rem;
  cursor: pointer;
  position: relative; z-index: 1;
  transition: filter 0.15s ease;
}
.monthly-banner__cta:hover { filter: brightness(1.08); }
.monthly-banner__cta:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}
.monthly-banner__close {
  flex-shrink: 0;
  background: none; border: 0;
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--color-text-faint);
  cursor: pointer;
  border-radius: 4px;
  position: relative; z-index: 1;
}
.monthly-banner__close:hover { color: var(--color-text); }
.monthly-banner__close:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ---------- COMMUNITY GROWTH BAR ---------- */
.growth-bar {
  margin: var(--space-3) auto 0;
  max-width: 640px;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: rgba(20, 17, 13, 0.6);
}
.growth-bar__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.growth-bar__tier {
  display: flex; flex-direction: column; gap: 2px;
}
.growth-bar__tier-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
}
.growth-bar__tier-name {
  font-family: 'Boska', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.005em;
}
.growth-bar__count {
  text-align: right;
}
.growth-bar__count strong {
  font-family: 'Boska', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1;
}
.growth-bar__count-label {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}
.growth-bar__track {
  height: 6px;
  background: rgba(61, 52, 43, 0.5);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: var(--space-3);
}
.growth-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary) 0%, #e0b46d 100%);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.growth-bar__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.growth-bar__sep { color: var(--color-text-faint); }
.growth-bar__next { color: var(--color-text); font-weight: 500; }
.growth-bar__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
}
.growth-bar__share,
.growth-bar__rules {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: 6px 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.growth-bar__share {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.growth-bar__share:hover,
.growth-bar__share:focus-visible {
  background: var(--color-primary);
  color: var(--color-primary-highlight);
  outline: none;
}
.growth-bar__rules:hover,
.growth-bar__rules:focus-visible {
  border-color: var(--color-primary);
  color: var(--color-primary);
  outline: none;
}

/* ---------- MONTHLY LEADERBOARD COUNTDOWN ---------- */
.monthly-board-wrap {
  margin-bottom: var(--space-6);
}
.monthly-countdown {
  display: inline-block;
  margin-left: var(--space-2);
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(198,150,71,0.12);
  color: var(--color-primary);
  border: 1px solid rgba(198,150,71,0.3);
  border-radius: 999px;
}

/* ---------- ABOUT OVERLAY: MONTHLY CHAMPION SECTION ---------- */
.about-monthly {
  margin: var(--space-6) 0;
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: rgba(20, 17, 13, 0.4);
}
.about-monthly__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: 'Boska', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
  letter-spacing: 0.005em;
}
.about-monthly__body {
  margin: 0 0 var(--space-3);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text);
}
.about-monthly__rules-link {
  margin: var(--space-3) 0 0;
}

/* Reusable inline link button (minimal, brass underline) */
.link-btn {
  background: none; border: 0; padding: 0;
  color: var(--color-primary);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-btn:hover { color: var(--color-text); }
.link-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- PAST CHAMPIONS LIST ---------- */
.past-champions {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}
.past-champions__title {
  font-family: 'Boska', Georgia, serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-3);
  letter-spacing: 0.01em;
}
.past-champions__list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.past-champions__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: rgba(20, 17, 13, 0.5);
  border-radius: 8px;
  font-size: 0.85rem;
}
.past-champions__month {
  flex-shrink: 0;
  min-width: 100px;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.past-champions__handle {
  flex: 1;
  font-weight: 600;
  color: var(--color-primary);
}
.past-champions__score {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.past-champions__empty {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ---------- RECRUITER MILESTONES (rc.65) ---------- */
/* Mirrors .about-monthly aesthetic: brass-on-charcoal, generous padding,
   subtle border. Lives inside the About overlay, signed-in only. */
.milestone-card {
  margin: var(--space-6) 0;
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: rgba(20, 17, 13, 0.4);
}
.milestone-card__head { margin-bottom: var(--space-4); }
.milestone-card__title {
  display: block;
  font-family: 'Boska', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
  letter-spacing: 0.005em;
}
.milestone-card__sub {
  display: block;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--color-text);
}
.milestone-card__sub strong[data-milestone-current] {
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}
.milestone-card__foot {
  margin: var(--space-4) 0 0;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-style: italic;
  line-height: 1.5;
}
.milestone-card__foot em { font-style: normal; color: var(--color-text); }

.milestone-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.milestone-row {
  padding: var(--space-3) var(--space-4);
  background: rgba(20, 17, 13, 0.5);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: border-color 160ms ease, background-color 160ms ease;
}
.milestone-row--locked { opacity: 0.78; }
.milestone-row--ready {
  border-color: var(--color-primary);
  background: rgba(196, 154, 90, 0.08);
}
.milestone-row--claimed {
  border-color: var(--color-border);
  background: rgba(20, 17, 13, 0.35);
  opacity: 0.85;
}
.milestone-row__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.milestone-row__threshold {
  font-family: 'Boska', Georgia, serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
.milestone-row--ready .milestone-row__threshold { color: var(--color-primary); }
.milestone-row__reward {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  text-align: right;
}
.milestone-row__bar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.milestone-row__bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(196, 154, 90, 0.55), rgba(196, 154, 90, 0.95));
  border-radius: inherit;
  transition: width 320ms ease;
}
.milestone-row--claimed .milestone-row__bar-fill {
  background: linear-gradient(90deg, rgba(140, 110, 70, 0.45), rgba(140, 110, 70, 0.7));
}
.milestone-row__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.milestone-row__action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: inherit;
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
}
.milestone-row__action--cta {
  appearance: none;
  border: 1px solid var(--color-primary);
  background: var(--color-primary);
  color: var(--color-bg);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 120ms ease, transform 120ms ease;
}
.milestone-row__action--cta:hover { filter: brightness(1.08); }
.milestone-row__action--cta:active { transform: translateY(1px); }
.milestone-row__action--cta:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.milestone-row__action--cta[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.milestone-row__action--done {
  color: var(--color-text-muted);
  font-style: italic;
}
.milestone-row__action--need { color: var(--color-text-muted); }
.milestone-row__action[href] {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.milestone-row__action[href]:hover { color: var(--color-text); }

@media (max-width: 480px) {
  .milestone-row__head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .milestone-row__reward { text-align: left; }
}

/* ---------- RULES OVERLAY ---------- */
.rules-section {
  margin: var(--space-5) 0;
}
.rules-section__title {
  font-family: 'Boska', Georgia, serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 var(--space-2);
  letter-spacing: 0.01em;
}
.rules-section__hint {
  margin: 0 0 var(--space-3);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}
.rules-section__body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text);
}
.rules-section__list {
  margin: 0; padding-left: var(--space-5);
  display: flex; flex-direction: column;
  gap: var(--space-2);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text);
}
.rules-section__list li::marker { color: var(--color-primary); }
.rules-section__list--numbered { list-style: decimal; }
.rules-section__fineprint {
  margin-top: var(--space-5);
  font-size: 0.78rem;
  color: var(--color-text-faint);
  font-style: italic;
  line-height: 1.5;
}

/* ---------- PRIZE LADDER ---------- */
.prize-ladder {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  counter-reset: tier;
}
.prize-ladder__item {
  position: relative;
  padding: var(--space-3) var(--space-4);
  background: rgba(20, 17, 13, 0.5);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  counter-increment: tier;
}
.prize-ladder__item::before {
  content: counter(tier);
  position: absolute;
  top: var(--space-3); left: var(--space-3);
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-primary);
  color: var(--color-primary-highlight);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-body, inherit);
}
.prize-ladder__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding-left: 32px;
  margin-bottom: 2px;
}
.prize-ladder__name {
  font-family: 'Boska', Georgia, serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
}
.prize-ladder__threshold {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.prize-ladder__prize {
  padding-left: 32px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

/* ---------- MOBILE TWEAKS ---------- */
@media (max-width: 480px) {
  .monthly-banner {
    padding: var(--space-3);
    gap: var(--space-2);
  }
  .monthly-banner__icon {
    width: 28px; height: 28px;
  }
  .monthly-banner__cta {
    order: 3;
    flex: 1;
  }
  .monthly-banner__close {
    order: 4;
  }
  .growth-bar {
    padding: var(--space-3);
  }
  .growth-bar__count {
    text-align: left;
  }
  .past-champions__month {
    min-width: 80px;
  }
}

/* =================================================================
   PR #26 — INVITE FRIENDS CARD (splash, signed-in)
   Sits below the growth bar, above the splash meta grid. Mirrors the
   monthly-banner / growth-bar surface aesthetic: charcoal panel,
   brass borders, generous internal padding.
================================================================= */
.invite-card {
  margin: var(--space-7) auto 0;
  max-width: 640px;
  background: var(--color-primary-highlight);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 14px);
  padding: var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  text-align: left;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.invite-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(198,150,71,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.invite-card > * { position: relative; }
.invite-card[hidden] { display: none; }

.invite-card__head {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}
.invite-card__icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(198, 150, 71, 0.14);
  color: var(--color-primary);
  border: 1px solid rgba(198, 150, 71, 0.4);
}
.invite-card__title-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.invite-card__title {
  font-family: var(--font-display, 'Boska', serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.005em;
}
.invite-card__sub {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: 2px;
  line-height: 1.4;
}

.invite-card__field {
  display: flex;
  gap: var(--space-3);
  align-items: stretch;
  flex-wrap: wrap;
}
.invite-card__input {
  flex: 1 1 240px;
  min-width: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 10px);
  color: var(--color-text);
  font-family: var(--font-mono, 'Satoshi', sans-serif);
  font-size: 0.92rem;
  padding: 10px 12px;
  letter-spacing: 0.01em;
}
.invite-card__input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(198, 150, 71, 0.25);
}
.invite-card__copy,
.invite-card__share {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: var(--radius-md, 10px);
  border: 1px solid var(--color-border);
  background: rgba(198, 150, 71, 0.12);
  color: var(--color-text);
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.invite-card__copy:hover,
.invite-card__share:hover {
  background: rgba(198, 150, 71, 0.22);
  border-color: var(--color-primary);
}
.invite-card__copy:active,
.invite-card__share:active { transform: translateY(1px); }
.invite-card__copy[data-copied="true"] {
  background: var(--color-success-highlight);
  border-color: var(--color-success);
  color: var(--color-success);
}

.invite-card__stats {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.92rem;
  color: var(--color-text-muted);
}
.invite-card__stat strong {
  color: var(--color-text);
  font-weight: 700;
  margin-right: 4px;
}
.invite-card__stat--muted { opacity: 0.85; }
.invite-card__stat--rank {
  margin-left: auto;
  color: var(--color-primary);
  font-weight: 700;
  border: 1px solid rgba(198, 150, 71, 0.4);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.85rem;
}
.invite-card__stat--rank[hidden] { display: none; }

/* rc.65.1 — next-milestone teaser inside the invite card */
.invite-card__milestone {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--color-border);
}
.invite-card__milestone[hidden] { display: none; }
.invite-card__milestone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--color-text);
}
.invite-card__milestone-copy strong {
  color: var(--color-primary);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.invite-card__milestone-link {
  font-size: 0.82rem;
  white-space: nowrap;
}
.invite-card__milestone-bar {
  position: relative;
  margin-top: var(--space-2);
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.invite-card__milestone-fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(196, 154, 90, 0.55), rgba(196, 154, 90, 0.95));
  border-radius: inherit;
  transition: width 320ms ease;
}

/* rc.65.1 — growth-bar reward teaser line */
.growth-bar__rewards {
  margin: var(--space-3) 0 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

@media (max-width: 480px) {
  .invite-card { padding: var(--space-4); }
  .invite-card__head { gap: var(--space-3); }
  .invite-card__icon { width: 32px; height: 32px; }
  .invite-card__title { font-size: 1.05rem; }
  .invite-card__sub { font-size: 0.85rem; }
  .invite-card__share span { display: none; } /* keep just the icon on narrow screens */
  .invite-card__share { padding: 10px 11px; }
  .invite-card__stats { gap: var(--space-3); font-size: 0.85rem; }
  .invite-card__stat--rank { margin-left: 0; }
}

/* =================================================================
   FOUNDERS CLUB (rc.24)
   - .founders-strip  splash counter ("X / 50 founders spots left")
   - .founder-chip    badge in account profile pane
   ================================================================= */
.founders-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: 12px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--color-text);
  margin: var(--space-5) 0 var(--space-3);
}
.founders-strip[hidden] { display: none; }
.founders-strip__copy {
  flex: 1 1 220px;
  min-width: 0;
}
/* rc.65.6 — "Claim your spot" CTA. Signed-out only (controlled by JS).
   Brass-on-brass to match the strip's accent border without competing
   with primary buttons elsewhere on the page. */
.founders-strip__cta {
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid var(--color-primary);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font: 600 0.8125rem/1 var(--font-sans, system-ui, sans-serif);
  letter-spacing: 0.01em;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.founders-strip__cta:hover { filter: brightness(1.08); }
.founders-strip__cta:active { transform: translateY(1px); }
.founders-strip__cta:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
@media (max-width: 480px) {
  /* rc.65.12 — was width:100% + margin-left:38px which overflowed the strip
     by 38px. Use calc() so the button stays within the container. */
  .founders-strip__cta {
    width: calc(100% - 38px);
    margin-left: 38px; /* align under copy, past the pill icon */
  }
}
.founders-strip[data-state='closed'] {
  border-left-color: var(--color-text-muted);
  opacity: 0.85;
}
.founders-strip__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(198, 150, 71, 0.12);
  color: var(--color-primary);
  flex: 0 0 auto;
}
.founders-strip__pill--closed {
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-text-muted);
}
[data-theme='dark'] .founders-strip__pill--closed { background: rgba(255,255,255,0.06); }
.founders-strip__copy strong {
  color: var(--color-primary);
  font-weight: 700;
}

.founder-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-3);
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(198, 150, 71, 0.18), rgba(198, 150, 71, 0.06));
  border: 1px solid rgba(198, 150, 71, 0.45);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-primary);
}
.founder-chip[hidden] { display: none; }
.founder-chip svg { flex: 0 0 auto; }
[data-theme='light'] .founder-chip {
  background: linear-gradient(135deg, rgba(138, 94, 28, 0.14), rgba(138, 94, 28, 0.04));
  border-color: rgba(138, 94, 28, 0.45);
}

/* =================================================================
   PR #26 — RECRUITS CHIP (account · profile pane)
================================================================= */
.recruits-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--space-3);
  padding: 6px 12px;
  background: rgba(198, 150, 71, 0.1);
  border: 1px solid rgba(198, 150, 71, 0.3);
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}
.recruits-chip[hidden] { display: none; }
.recruits-chip__icon {
  display: inline-flex;
  color: var(--color-primary);
  flex: 0 0 auto;
}
.recruits-chip__label {
  letter-spacing: 0.02em;
}
.recruits-chip__count {
  color: var(--color-text);
  font-weight: 700;
}
.recruits-chip__rank {
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(198, 150, 71, 0.16);
  border: 1px solid rgba(198, 150, 71, 0.3);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.8rem;
}
.recruits-chip__rank[hidden] { display: none; }

/* =================================================================
   PR #26 — RECRUITER LEADERBOARD (account · stats pane)
   Sits between Monthly Champion board and Hall of Fame.
================================================================= */
.recruiter-board-wrap {
  margin-top: var(--space-7);
}
.recruiter-list {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.recruiter-row {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 12px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 10px);
  font-size: 0.92rem;
}
.recruiter-row.is-me {
  border-color: rgba(198, 150, 71, 0.55);
  background: linear-gradient(180deg, rgba(198, 150, 71, 0.16), rgba(198, 150, 71, 0.06));
}
.recruiter-row__rank {
  font-family: var(--font-mono, 'Satoshi', sans-serif);
  font-weight: 700;
  color: var(--color-primary);
  font-size: 0.95rem;
}
.recruiter-row__name {
  color: var(--color-text);
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recruiter-row__count {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  white-space: nowrap;
}
.recruiter-row__pending {
  color: var(--color-text-faint);
  font-size: 0.78rem;
  border: 1px dashed var(--color-border);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}
.recruiter-empty {
  margin: var(--space-3) 0 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-style: italic;
}
.recruiter-empty[hidden] { display: none; }

@media (max-width: 480px) {
  .recruiter-row {
    grid-template-columns: 36px 1fr auto;
    gap: var(--space-2);
    padding: 8px 10px;
  }
  .recruiter-row__pending { display: none; } /* stat hidden on narrow */
}

/* =================================================================
   PR #26 — LIGHT MODE OVERRIDES
   The brass tints that read on dark charcoal need to be deepened
   for cream surfaces. These keep the same brass family but with
   stronger alpha + the deeper light-mode primary (#8a5e1c).
================================================================= */
[data-theme='light'] .invite-card__icon {
  background: rgba(138, 94, 28, 0.12);
  border-color: rgba(138, 94, 28, 0.45);
}
[data-theme='light'] .invite-card__copy,
[data-theme='light'] .invite-card__share {
  background: rgba(138, 94, 28, 0.10);
}
[data-theme='light'] .invite-card__copy:hover,
[data-theme='light'] .invite-card__share:hover {
  background: rgba(138, 94, 28, 0.18);
}
[data-theme='light'] .invite-card__stat--rank {
  border-color: rgba(138, 94, 28, 0.45);
  background: rgba(138, 94, 28, 0.08);
}
[data-theme='light'] .recruits-chip {
  background: rgba(138, 94, 28, 0.08);
  border-color: rgba(138, 94, 28, 0.32);
}
[data-theme='light'] .recruits-chip__rank {
  background: rgba(138, 94, 28, 0.14);
  border-color: rgba(138, 94, 28, 0.32);
}
[data-theme='light'] .recruiter-row.is-me {
  border-color: rgba(138, 94, 28, 0.55);
  background: linear-gradient(180deg, rgba(138, 94, 28, 0.14), rgba(138, 94, 28, 0.05));
}

/* ---------- rc.64.6 — Brand menu (logo icon = menu, wordmark = home) ---------- */
.brand-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  flex: 1 1 auto;
}
.app-header__menu-btn {
  background: transparent;
  border: 0;
  padding: 4px;
  margin: -4px;
  cursor: pointer;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.app-header__menu-btn:hover { background: rgba(255,255,255,0.06); }
[data-theme='light'] .app-header__menu-btn:hover { background: rgba(0,0,0,0.05); }
.app-header__menu-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.app-header__menu-btn[aria-expanded='true'] {
  background: rgba(255,255,255,0.08);
}
[data-theme='light'] .app-header__menu-btn[aria-expanded='true'] {
  background: rgba(0,0,0,0.06);
}
.brand-menu__dropdown {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 0;
  min-width: 220px;
  padding: var(--space-2) 0;
  background: var(--color-surface, #1c1916);
  border: 1px solid var(--color-border, rgba(255,255,255,0.08));
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  z-index: 1000;
}
.brand-menu__dropdown[hidden] { display: none; }
.brand-menu__divider {
  border: 0;
  border-top: 1px solid var(--color-border, rgba(255,255,255,0.08));
  margin: var(--space-1) 0;
}
.brand-menu__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: transparent;
  border: 0;
  color: var(--color-text, #f4ead6);
  text-align: left;
  text-decoration: none;
  font-size: var(--text-sm, 0.875rem);
  cursor: pointer;
  transition: background 0.12s ease;
}
.brand-menu__item:hover,
.brand-menu__item:focus-visible {
  background: rgba(255,255,255,0.06);
  outline: none;
}
.brand-menu__item svg { flex-shrink: 0; opacity: 0.75; }
.brand-menu__item[hidden] { display: none !important; }

/* ---------- PR #27.5 — growth bar + reveal (hardcoded dark rgba fixes) ---------- */
/* The growth-bar background and track use literal rgba(20,17,13) and
   rgba(61,52,43) which read as gray smudges on the cream surface. */
[data-theme='light'] .growth-bar {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}
[data-theme='light'] .growth-bar__track {
  background: rgba(138, 94, 28, 0.14);
}
[data-theme='light'] .growth-bar__share {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(138, 94, 28, 0.06);
}
[data-theme='light'] .growth-bar__share:hover,
[data-theme='light'] .growth-bar__share:focus-visible {
  background: var(--color-primary);
  color: var(--color-primary-highlight);
}
[data-theme='light'] .growth-bar__rules {
  border-color: var(--color-border-strong);
  color: var(--color-text);
}
[data-theme='light'] .growth-bar__rules:hover,
[data-theme='light'] .growth-bar__rules:focus-visible {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Reveal panel uses var(--color-surface) which IS theme-aware, but the
   border + shadow tokens need a touch more depth on cream so the panel
   reads as elevated, not flat. */
[data-theme='light'] .reveal {
  background: var(--color-surface-2);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-lg);
}
[data-theme='light'] .reveal__years {
  color: var(--color-primary-hover);
}

/* ---------- PR #27.7 — Guest pill (hardcoded dark rgba fix) ---------- */
/* Same pattern as growth-bar: literal rgba(26,22,18,0.6) reads as a
   charcoal blob on cream. Route to surface tokens. */
[data-theme='light'] .guest-pill {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}
[data-theme='light'] .guest-pill__cta:hover {
  background: rgba(138, 94, 28, 0.12);
}

/* ---------- PR #27.7 — Final dark-rgba sweep ---------- */
/* Five more selectors that hardcoded charcoal rgba and read as gray
   blobs on cream. Route everything to surface tokens. */
[data-theme='light'] .stage__badge {
  background: rgba(250, 244, 232, 0.85);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
[data-theme='light'] .stage__detail-strip {
  background: rgba(250, 244, 232, 0.85);
  border: 1px solid var(--color-border);
  backdrop-filter: blur(6px);
}
[data-theme='light'] .about-monthly {
  background: var(--color-surface);
  border-color: var(--color-border);
}
[data-theme='light'] .past-champions__item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
[data-theme='light'] .prize-ladder__item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

/* =====================================================================
   CONSENT BANNER (rc.11)
   ---------------------------------------------------------------------
   Bottom-fixed banner shown on first visit unless DNT is on. Plausible
   loads regardless; this banner gates Meta/Google/TikTok/Reddit pixels.
   Visual treatment matches the Boska/Satoshi brand: warm cream surface
   on a dark backdrop, generous padding, two buttons. Mobile stacks the
   buttons full-width.
   ===================================================================== */
.consent-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 9000;
  background: rgba(20, 17, 13, 0.96);
  color: #f7f1e3;
  border-top: 1px solid rgba(247, 241, 227, 0.12);
  padding: 14px clamp(16px, 4vw, 32px) calc(14px + env(safe-area-inset-bottom));
  font-family: var(--font-body, 'Satoshi', system-ui, sans-serif);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: consent-banner-slide-in 380ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes consent-banner-slide-in {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.consent-banner__inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.consent-banner__copy {
  flex: 1 1 360px;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(247, 241, 227, 0.86);
}
.consent-banner__inline {
  background: none;
  border: 0;
  padding: 0;
  color: #f7f1e3;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.consent-banner__inline:hover { color: #fff; }
.consent-banner__buttons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.consent-banner__btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 18px;
  font: 500 13px/1 var(--font-body, 'Satoshi', system-ui, sans-serif);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}
.consent-banner__btn--primary {
  background: #f7f1e3;
  color: #14110d;
}
.consent-banner__btn--primary:hover { background: #fff; }
.consent-banner__btn--ghost {
  background: transparent;
  color: rgba(247, 241, 227, 0.78);
  border-color: rgba(247, 241, 227, 0.24);
}
.consent-banner__btn--ghost:hover {
  color: #f7f1e3;
  border-color: rgba(247, 241, 227, 0.48);
}
@media (max-width: 540px) {
  .consent-banner__inner { gap: 12px; }
  .consent-banner__buttons { width: 100%; }
  .consent-banner__btn { flex: 1; padding: 11px 14px; }
}

/* =====================================================================
   rc.19 — TODAY'S TOP 3 SPLASH STRIP
   Compact social-proof strip that surfaces the top 3 daily entries on
   the splash. Reuses the same brass-accent system as the in-results
   leaderboard but at a tighter spacing/type scale.
   ===================================================================== */
.top3 {
  margin: var(--space-5, 16px) auto 0;
  max-width: 520px;
  width: 100%;
  padding: var(--space-4, 14px) var(--space-5, 16px);
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg, 12px);
  text-align: left;
}
.top3[hidden] { display: none !important; }
.top3__head {
  display: flex;
  align-items: center;
  gap: var(--space-2, 8px);
  margin-bottom: var(--space-3, 12px);
}
.top3__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full, 999px);
  background: rgba(218, 162, 75, 0.12);
  color: var(--color-accent, #daa24b);
  flex-shrink: 0;
}
.top3__title {
  /* rc.65.11 — Boska ships only old-style figures (descending '3','5','7','9'),
     and its 'lnum' OpenType feature is not honored. For an uppercase tracked
     small label this looks broken (the '3' drops below the baseline of TOP).
     Use the body sans (Satoshi/Inter) which has lining numerals natively. */
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text, #f4ede1);
  margin: 0;
  white-space: nowrap;
  font-variant-numeric: lining-nums tabular-nums;
}
.top3__date {
  margin-left: auto;
  font-size: var(--text-xs, 0.75rem);
  color: var(--color-text-muted, rgba(244,237,225,0.6));
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* Tight viewports: drop the date to a second line so the trophy + title
   stay together on one row instead of splitting "TOP 3" mid-string. */
@media (max-width: 380px) {
  .top3__head { flex-wrap: wrap; }
  .top3__date { margin-left: 32px; flex-basis: 100%; }
}
.top3__list {
  list-style: none;
  margin: 0 0 var(--space-3, 12px);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.top3__row {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  align-items: center;
  gap: var(--space-3, 12px);
  padding: var(--space-2, 8px) var(--space-3, 12px);
  border-radius: var(--radius-md, 8px);
  font-size: var(--text-sm, 0.875rem);
}
.top3__row + .top3__row { border-top: 1px solid rgba(255,255,255,0.04); }
.top3__row--me {
  background: rgba(218, 162, 75, 0.10);
  border: 1px solid rgba(218, 162, 75, 0.25);
}
.top3__rank {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--color-text-muted, rgba(244,237,225,0.6));
  text-align: right;
}
.top3__row--me .top3__rank { color: var(--color-accent, #daa24b); }
.top3__name {
  font-weight: 500;
  color: var(--color-text, #f4ede1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.top3__score {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--color-text, #f4ede1);
}
.top3__time {
  font-variant-numeric: tabular-nums;
  font-size: var(--text-xs, 0.75rem);
  color: var(--color-text-muted, rgba(244,237,225,0.6));
}
.top3__empty {
  margin: 0 0 var(--space-3, 12px);
  font-size: var(--text-sm, 0.875rem);
  color: var(--color-text-muted, rgba(244,237,225,0.6));
}
.top3__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  padding: 4px 0;
  cursor: pointer;
  color: var(--color-accent, #daa24b);
  font-family: inherit;
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.top3__more:hover { color: var(--color-text, #f4ede1); }

/* =====================================================================
   rc.19 — DEDICATED LEADERBOARDS SCREEN
   Reachable via the trophy icon in the header or the "See all standings"
   link on the splash strip. Stacks four boards vertically with a clear
   header + back button.
   ===================================================================== */
.screen.leaderboards {
  padding: var(--space-8, 32px) clamp(var(--space-4, 14px), 4vw, var(--space-8, 32px))
           var(--space-12, 48px);
}
.leaderboards__inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-6, 20px);
}
.leaderboards__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 8px);
  margin-bottom: var(--space-2, 8px);
}
.leaderboards__title {
  font-family: var(--font-display, inherit);
  font-size: clamp(var(--text-xl, 1.25rem), 4vw, var(--text-2xl, 1.5rem));
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0;
  color: var(--color-text, #f4ede1);
}
.leaderboards__lede {
  font-size: var(--text-sm, 0.875rem);
  color: var(--color-text-muted, rgba(244,237,225,0.6));
  margin: 0;
}

/* Back button — small ghost variant with a leading chevron. */
.btn--back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: var(--text-sm, 0.875rem);
  font-weight: 500;
  border-radius: var(--radius-full, 999px);
  color: var(--color-text-muted, rgba(244,237,225,0.7));
}
.btn--back:hover { color: var(--color-text, #f4ede1); }

/* The .hof blocks already have styles from the account overlay's Stats
   tab (hof__header, hof__title, hof__hint, hof__board, hof__controls,
   hof__field, hof__select). They render correctly as siblings here too;
   no overrides needed beyond the wrapping screen layout above. */

/* =====================================================================
   WINNER BANNER (rc.61)
   ---------------------------------------------------------------------
   Appears at the very top of the app for users with unclaimed prizes.
   Powered by my_unclaimed_prizes() + token-gated /claim.html intake.
   Hidden by default; revealed via JS on auth state change.
   ===================================================================== */
.winner-banner {
  display: flex;
  align-items: center;
  gap: var(--space-2, 8px);
  padding: 10px 14px;
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-weight: 600;
  font-size: var(--text-sm, 0.9rem);
  line-height: 1.3;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  flex-wrap: wrap;
}
.winner-banner[hidden] { display: none; }
.winner-banner__icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}
.winner-banner__text {
  flex: 1 1 auto;
  min-width: 0;
}
.winner-banner__cta {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: #1a1410;
  color: #f4d896;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: var(--text-xs, 0.75rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.winner-banner__cta:hover,
.winner-banner__cta:focus {
  background: #2a1f17;
  color: #fff;
  outline: none;
}
.winner-banner__close {
  background: transparent;
  border: 0;
  color: #1a1410;
  font-size: 1.4rem;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.winner-banner__close:hover,
.winner-banner__close:focus {
  opacity: 1;
  outline: none;
}
@media (max-width: 480px) {
  .winner-banner { font-size: var(--text-xs, 0.8rem); padding: 8px 10px; }
  .winner-banner__cta { padding: 5px 10px; }
}

/* My-prizes count badge in the account dropdown */
.account-menu__badge {
  display: inline-block;
  min-width: 18px;
  padding: 1px 6px;
  margin-left: 6px;
  background: #b8893f;
  color: #1a1410;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 9px;
  line-height: 1.4;
  text-align: center;
}
.account-menu__badge[hidden] { display: none; }
.account-menu__item--prize svg { color: var(--color-primary); }

/* =====================================================================
   rc.65.2 — Thin gold prize banner under the header.
   Signed-out only. Dismissible (localStorage). Hides when auth flips in.
   Single row on mobile too — copy is short enough to fit at 375px.
===================================================================== */
.prize-banner {
  /* rc.65.4 — default hidden in CSS so signed-in users never see a flash on
     reload while auth.js rehydrates the session. JS removes [data-show]
     only after confirming signed-out + not-dismissed. */
  display: none;
}
.prize-banner[data-show="1"] {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 12px;
  /* v2 stage palette — flat cyan band, theme-aware via primary token */
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
  position: relative;
}
.prize-banner[hidden] { display: none !important; }
.prize-banner__cta {
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.prize-banner__cta:hover { text-decoration: underline; }
.prize-banner__cta svg { transition: transform 0.15s ease; }
.prize-banner__cta:hover svg { transform: translateX(2px); }
.prize-banner__dismiss {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: inherit;
  opacity: 0.65;
  padding: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.prize-banner__dismiss:hover { opacity: 1; background: rgba(0, 0, 0, 0.08); }
@media (max-width: 380px) {
  .prize-banner { font-size: 12px; padding: 6px 32px 6px 10px; }
}

/* ============================================================
   MONETIZATION SLOTS (rc.2.10) — affiliate + Daily sponsor
   ============================================================ */
.reveal__buy {
  margin: var(--space-3) 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
  font-size: var(--text-sm);
}
.reveal__buy[hidden] { display: none; }
.reveal__buy-link {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.reveal__buy-link:hover { color: var(--color-text); }
.reveal__buy-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.sponsor-slot {
  margin: 0 auto var(--space-6);
  max-width: 420px;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  text-align: center;
}
.sponsor-slot[hidden], .sponsor-house[hidden] { display: none; }
.sponsor-slot__eyebrow {
  margin: 0;
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}
.sponsor-slot__name {
  display: inline-block;
  margin-top: var(--space-1);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-primary);
  text-decoration: none;
}
.sponsor-slot__name:hover { text-decoration: underline; text-underline-offset: 3px; }
.sponsor-slot__tagline {
  margin: var(--space-1) 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.sponsor-house {
  margin: calc(-1 * var(--space-4)) 0 var(--space-6);
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.sponsor-house a { color: var(--color-text-muted); text-underline-offset: 3px; }
.sponsor-house a:hover { color: var(--color-primary); }

/* Cross-links to the other Musing Web Design field-guide games */
.app-footer__shelf {
  margin: 0;
  grid-column: 1 / -1;
  justify-self: center;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  line-height: 1.6;
}
.app-footer__shelf-link {
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 140ms ease;
}
.app-footer__shelf-link:hover,
.app-footer__shelf-link:focus-visible {
  color: var(--color-text);
}

/* ---------- More Good Eye games (results) ---------- */
.suite-card {
  text-align: left;
  margin: var(--space-6) 0;
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.suite-card__title {
  margin: 0 0 var(--space-3);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.suite-card__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.suite-card__game {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: var(--space-3);
  align-items: center;
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius-md);
}
.suite-card__img { width: 112px; height: auto; aspect-ratio: 40 / 21; object-fit: cover; border-radius: var(--radius-md); background: var(--color-border); }
.suite-card__text { display: grid; gap: 2px; min-width: 0; }
.suite-card__name { font-family: var(--font-display); font-size: 1.0625rem; color: var(--color-text); text-decoration: underline; text-decoration-color: var(--color-border); text-underline-offset: 3px; }
.suite-card__desc { font-size: 0.8125rem; line-height: 1.4; color: var(--color-text-muted); }
.suite-card__game:hover .suite-card__name,
.suite-card__game:focus-visible .suite-card__name { text-decoration-color: currentColor; }
.suite-card__all { display: inline-block; margin-top: var(--space-4); font-size: 0.8125rem; color: var(--color-text-muted); text-decoration: underline; text-underline-offset: 3px; }
.suite-card__all:hover, .suite-card__all:focus-visible { color: var(--color-text); }

/*ge-bar*/
.ge-bar { display: block; background: #16130f; color: #f4f0e8; text-decoration: none; font-size: 14px; line-height: 1; border-bottom: 1px solid #000; }
.ge-bar__in { display: flex; align-items: center; gap: 8px; min-height: 40px; max-width: var(--ge-max, none); margin: 0 auto; padding: 0 max(var(--ge-pad, 16px), env(safe-area-inset-right)) 0 max(var(--ge-pad, 16px), env(safe-area-inset-left)); }
.ge-bar__chev { width: 14px; height: 14px; flex: none; opacity: .75; }
.ge-bar__mark { width: 22px; height: 22px; flex: none; }
.ge-bar__name { font-weight: 700; letter-spacing: .01em; }
.ge-bar__more { margin-left: auto; color: #cbc2b2; font-weight: 500; }
.ge-bar:hover .ge-bar__name, .ge-bar:hover .ge-bar__more { text-decoration: underline; text-underline-offset: 3px; }
.ge-bar:focus-visible { outline: 2px solid #e8673c; outline-offset: -2px; }
@media (display-mode: standalone) { .ge-bar { display: none; } }
@media print { .ge-bar { display: none; } }
.ge-bar { --ge-pad: clamp(16px, 4vw, 32px); }
/*/ge-bar*/
