/* ── Design tokens ─────────────────────────────────────────────────────
   Lives in tokens.css now so admin-stats.css / admin-users.css /
   admin-settings.css can import the exact same values instead of
   maintaining their own hand-copied palette. See that file's header
   comment for why this moved. */
@import url("tokens.css");

/* ── Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: radial-gradient(120% 100% at 50% -8%, var(--surface-1) 0%, var(--bg) 55%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
}

/* ── Skip link ─────────────────────────────────── */
/* Off-screen until it receives keyboard focus (Tab from the very top of
   the page) — lets screen reader and keyboard-only users jump straight
   past the nav instead of tabbing through every link in it, including
   the Help submenu, on every single page. */
.skip-link {
  position: absolute;
  top: -60px;
  left: 1rem;
  z-index: 300;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 1rem;
}

/* ── Nav ───────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] nav {
  background: rgba(35, 38, 45, 0.82);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-decoration: none;
}
.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

/* ── Theme toggle ──────────────────────────────
   Two presentations sharing one class/behavior (see theme.js): a small
   icon button in the nav, and a labeled switch on the profile page's
   Appearance card. Both just flip [data-theme] on <html> and stay in
   sync with each other if more than one is on the page at once. */
.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface-1);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.theme-toggle--nav {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.theme-toggle--nav:hover { border-color: var(--accent); }
/* Icon shown is the mode a click would switch TO, not the current mode —
   moon in light mode (an invitation to go dark), sun in dark mode. Each
   icon is an inline SVG using currentColor, so it just inherits this
   color instead of needing its own fill/stroke overrides per theme. */
.theme-toggle-icon { display: none; color: var(--text-mid); }
.theme-toggle-icon svg { display: block; }
[data-theme="dark"] .theme-toggle-icon--sun { display: inline-flex; }
.theme-toggle-icon--moon { display: inline-flex; }
[data-theme="dark"] .theme-toggle-icon--moon { display: none; }

.theme-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.theme-toggle-row span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
}
.theme-toggle--switch {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  padding: 3px;
  position: relative;
}
.theme-toggle--switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-mid);
  transition: transform 0.15s ease, background 0.15s ease;
}
.theme-toggle--switch[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
}
.theme-toggle--switch[aria-pressed="true"]::after {
  transform: translateX(18px);
  background: var(--on-accent);
}

/* Help dropdown */
.nav-dropdown {
  position: relative;
  list-style: none;
}
.nav-dropdown-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mid);
  transition: color 0.2s;
}
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle[aria-expanded="true"] {
  color: var(--accent);
}
.nav-dropdown-toggle::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.2s;
}
.nav-dropdown-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 170px;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 250;
}
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu li a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 5px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown-menu li a:hover {
  background: rgba(255, 228, 56, 0.12);
  color: var(--accent);
}

/* The profile dropdown's "Log out" item is a <form><button> like the
   old top-level logout link was — same reasoning (GET logout is
   forgeable). Sharing the exact rule set with "li a" above keeps it
   visually identical to every other item in the menu. */
.nav-dropdown-form {
  margin: 0;
}
.nav-dropdown-form-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.55rem 0.75rem;
  border-radius: 5px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text);
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown-form-btn:hover {
  background: rgba(255, 228, 56, 0.12);
  color: var(--accent);
}

/* ── Hero / Banner ─────────────────────────────── */
.hero {
  position: relative;
  min-height: auto;       /* Changed from 60vh to let content sit tighter */
  padding: 4rem 2rem 1rem; /* Reduced top (6rem -> 4rem) and bottom (3rem -> 1rem) padding */
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}


/* Fixed beam — stays in place as the page scrolls */
.beam-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 1rem 2rem;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 800;
  line-height: 1.05;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero-headline em {
  font-style: normal;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-mid);
  max-width: 480px;
  margin: 0 auto 2rem;
}

/* ── Content sections ──────────────────────────── */
/* .section-title is the one survivor of what used to be a full
   .section/.section-label/.section-title/.section-body family — it's
   repurposed today as the heading style on every auth card (login,
   register, forgot-password, etc.). The rest of the family had no
   remaining callers and was removed along with this comment's neighbor
   below (the old feature-strip/game-grid content they used to wrap). */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1rem;
}

/* Three-column feature strip and the old game-card grid that used to live
   here have been removed — index.html now uses a single spotlight card
   (see .games-spotlight/.spotlight-card below) instead of a themed
   3-feature strip or a multi-game grid, so all of that markup-specific
   CSS (game-art variants, card-fan, spit-scene, etc.) went with it rather
   than sitting here unused. */

/* ── Games spotlight — the homepage's one real piece of content ──
   Deliberately a single card, not a grid: this page's only job is to
   get someone from "I'm on lightlol.com" to "I'm on games.lightlol.com"
   in one obvious move, not to re-list what's already fully laid out
   there. See games/landing/public/index.html's .category-btn for the
   sibling pattern this borrows from (circular glow-icon + label), scaled
   up since here it's the one and only card, not one of three. */
.games-spotlight {
  display: flex;
  justify-content: center;
  padding: 1rem 2rem 5rem;
  position: relative;
  z-index: 1;
}
.spotlight-card {
  all: unset;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  width: 100%;
  max-width: 320px;
  padding: 2.5rem 2rem 2.25rem;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.spotlight-card:hover, .spotlight-card:focus-visible {
  transform: translateY(-5px);
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: 0 16px 36px -10px rgba(255, 228, 56, 0.4);
}
.spotlight-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.spotlight-card:active { transform: translateY(-2px) scale(0.98); }

.spotlight-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  background: radial-gradient(circle at 35% 30%, rgba(255, 228, 56, 0.32), transparent 70%), var(--surface-2);
  border: 1px solid var(--border-strong);
}
.spotlight-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text);
}
.spotlight-desc {
  font-size: 0.95rem;
  color: var(--text-mid);
}
.spotlight-cta {
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--text-mid);
  transition: color 0.25s ease;
}
.spotlight-card:hover .spotlight-cta,
.spotlight-card:focus-visible .spotlight-cta {
  color: var(--accent);
}

/* ── Category preview pills ────────────────────── */
/* Quiet supporting row under the spotlight card — not a second CTA, just
   enough of a peek at what's on games.lightlol.com to make the page feel
   like there's something behind the one button. Colors echo the category
   accents already established on games.lightlol.com's own picker
   (party/cards/puzzle/action), so a visitor recognizes the same
   categories when they land there. */
.category-preview {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0 2rem 1.5rem;
  position: relative;
  z-index: 1;
}
.preview-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.1rem;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-mid);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.preview-pill:hover, .preview-pill:focus-visible {
  transform: translateY(-2px);
  color: var(--text);
}
.preview-pill--party:hover  { border-color: #C77DC4; }
.preview-pill--cards:hover  { border-color: var(--accent); }
.preview-pill--puzzle:hover { border-color: #4FA8D8; } /* same --puzzle-accent as games.lightlol.com */
.preview-pill--action:hover { border-color: var(--danger); }
.preview-icon { font-size: 1rem; }

.hero-footnote {
  text-align: center;
  padding: 0 2rem 4rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}

/* ── Flash messages ────────────────────────────── */
.flash-messages {
  max-width: 480px;
  margin: 90px auto 0;
  padding: 0 1rem;
  position: relative;
  z-index: 150;
}
.flash {
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

/* ── Auth pages (login, register, forgot/reset password) ──
   Previously each template hardcoded its own <style> block with
   fallback values that didn't match this file's palette (a dark-sage
   theme copied from infotech). Centralizing it here means there's one
   source of truth and the two can't drift apart again. ── */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 65vh;
  padding: 2rem 1rem;
  position: relative;
  z-index: 1;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2.5rem 2rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.auth-card .section-title {
  text-align: center;
  margin: 0 0 1.75rem;
  color: var(--text);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-field label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-mid);
}

.auth-field input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  font-size: 1rem;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 228, 56, 0.2);
}

.auth-field small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.auth-form button {
  margin-top: 0.5rem;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: 999px;
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.auth-form button:hover {
  background: var(--accent-hover);
}

.auth-form button:active {
  transform: scale(0.98);
}

.auth-alt {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-mid);
}

.auth-alt a {
  color: var(--accent);
  text-decoration: none;
}

.auth-alt a:hover {
  text-decoration: underline;
}

/* ── Footer ────────────────────────────────────── */
footer {
  background: var(--surface-2);
  color: var(--text-mid);
  text-align: center;
  padding: 2rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  position: relative;
  z-index: 1;
}
.footer-copy {
  margin-bottom: 1rem;
}

/* Footer donate link — plain inline text, not a competing CTA pill.
   It's a quiet aside in a small, otherwise-plain footer; the accent
   color is enough to make it noticeable without shouting. */
.footer-support {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
}
.footer-support a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.footer-support a:hover {
  text-decoration: underline;
}

/* ── Donate page ──────────────────────────────── */
.donate-intro {
  color: var(--text-mid);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 1.5rem;
  text-align: center;
}
.donate-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}
.donate-amount {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.donate-amount input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.donate-amount:has(input:checked) {
  border-color: var(--accent);
  background: rgba(255, 228, 56, 0.15);
}

/* ── Profile page ──────────────────────────────── */
.profile-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 130px 1.5rem 4rem;
  position: relative;
  z-index: 1;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--on-accent);
  flex-shrink: 0;
}

.profile-username {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
}

.profile-email {
  color: var(--text-mid);
  font-size: 0.9rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.profile-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
}

.profile-card-wide {
  grid-column: 1 / -1;
}

.profile-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.profile-card-desc {
  color: var(--text-mid);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.mfa-status {
  font-weight: 700;
}
.mfa-status-on { color: #357A56; }
.mfa-status-off { color: var(--text-muted); }

.btn-accent {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}
.btn-accent:hover { background: var(--accent-hover); }

.btn-danger-outline {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger-deep);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-danger-outline:hover {
  background: var(--danger-deep);
  color: var(--text);
}

.profile-inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
.profile-inline-label {
  font-size: 0.8rem;
  color: var(--text-mid);
  width: 100%;
}
.profile-inline-form input[type="password"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  color: var(--text);
  font-size: 0.9rem;
  flex: 1;
  min-width: 160px;
}
.profile-inline-form input[type="password"]:focus {
  outline: none;
  border-color: var(--danger);
}

.avatar-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.avatar-swatch-form { margin: 0; }
.avatar-swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.avatar-swatch:hover { transform: scale(1.1); }
.avatar-swatch-active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text);
}

/* One class per AVATAR_COLORS entry in profile.py (fixed palette, not
   arbitrary input) — real CSS classes instead of inline style="" so
   this doesn't need a style-src CSP exception. Used on both the small
   swatch buttons and the large .profile-avatar circle. Class name is
   just the hex value lowercased with the # dropped, generated the same
   way in the templates, so this list has to be kept in sync with
   AVATAR_COLORS if that palette ever changes. */
.avatar-color-f2a93e { background: #F2A93E; }
.avatar-color-e2635a { background: #E2635A; }
.avatar-color-6fa8dc { background: #6FA8DC; }
.avatar-color-8aad96 { background: #8AAD96; }
.avatar-color-b48ead { background: #B48EAD; }
.avatar-color-5cc8c2 { background: #5CC8C2; }
.avatar-color-d9a441 { background: #D9A441; }
.avatar-color-8c9eff { background: #8C9EFF; }

.profile-stats-table {
  width: 100%;
  border-collapse: collapse;
}
.profile-stats-table th, .profile-stats-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.profile-stats-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ── MFA setup page ────────────────────────────── */
.mfa-steps {
  color: var(--text-mid);
  font-size: 0.88rem;
  line-height: 1.7;
  margin: 0 0 1.5rem 1.2rem;
}

.mfa-qr-wrap {
  display: flex;
  justify-content: center;
  background: var(--white);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.mfa-qr-wrap svg {
  width: 200px;
  height: 200px;
  display: block;
}

.mfa-manual-label {
  font-size: 0.8rem;
  color: var(--text-mid);
  text-align: center;
  margin-bottom: 0.4rem;
}
.mfa-manual-secret {
  display: block;
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  word-break: break-all;
}

.auth-card-narrow { max-width: 440px; }
.auth-form-spaced { margin-top: 1.5rem; }
.auth-alt-tight { margin-top: -1rem; margin-bottom: 1.5rem; }
.auth-alt-raised { margin-top: 0.5rem; }
/* Reduced-motion handling for the beam effect now lives in beam.js —
   it's driven by requestAnimationFrame, not CSS animation, so a CSS
   rule here could never actually stop it. See beam.js's matchMedia
   check near the top of the file. */
/* ── Stats, challenges, and stats-visibility (profile + /u/<username>) ── */
.stats-game-name { font-weight: 600; color: var(--text); }
.stats-extra { color: var(--text-mid); font-size: 0.82rem; white-space: nowrap; }
.stats-footnote {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 0.75rem;
}

.btn-small { padding: 0.4rem 0.9rem; font-size: 0.8rem; }

.challenge-group-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 1.25rem 0 0.6rem;
}
.challenge-group-title:first-child { margin-top: 0; }
.challenge-count {
  display: inline-block;
  min-width: 1.4em;
  text-align: center;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 999px;
  padding: 0 0.4em;
  margin-left: 0.3em;
  font-size: 0.75rem;
}

.challenge-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}
.challenge {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
}
.challenge-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  background: var(--surface-2);
  color: var(--text-mid);
}
.challenge--done .challenge-icon { background: var(--accent); color: var(--on-accent); font-size: 1.1rem; }
.challenge--dark { opacity: 0.55; }
.challenge-body { min-width: 0; flex: 1; }
.challenge-title { font-weight: 700; font-size: 0.92rem; color: var(--text); }
.challenge-game {
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: 0.35em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.challenge-desc { font-size: 0.84rem; color: var(--text-mid); margin-top: 0.15rem; line-height: 1.4; }
.challenge-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.35rem; }
.challenge-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  margin-top: 0.5rem;
  overflow: hidden;
}
.challenge-bar-fill { height: 100%; background: var(--accent); border-radius: 999px; }

.access-list { list-style: none; margin: 0; padding: 0; }
.access-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.access-row:last-child { border-bottom: none; }
.access-row form { margin: 0; }
.access-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--on-accent);
}
.access-name { flex: 1; font-weight: 600; font-size: 0.9rem; color: var(--text); text-decoration: none; }
a.access-name:hover { text-decoration: underline; }
