/* Prode Mundial 2026 — design tokens + base styles.
 * Paleta y tipografía del §17 del DESIGN_PRODE.md. Dark mode only.
 * Inspiración visual: mockup 00-gate-splash.html.
 */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Sora:wght@400;500;600;700&display=swap');

:root {
  /* ===== Backgrounds ===== */
  --bg: #06080d;
  --bg-2: #0c1018;
  --surface: #131826;
  --surface-2: #1a2030;

  /* ===== Borders ===== */
  --border: #1f2638;
  --border-hi: #2d3450;
  --border-1: #161c2c;   /* subtle inner divider — for stat rows etc. */

  /* ===== Spacing extras ===== */
  --space-2-5: 10px;

  /* ===== Text (3 levels) ===== */
  --text: #e8ecf5;
  --text-2: #8993ad;
  --text-3: #545d78;

  /* ===== Primary accent (celeste) ===== */
  --celeste: #74acdf;
  --celeste-bright: #9fc7e8;
  --celeste-glow: rgba(116, 172, 223, 0.2);

  /* ===== Secondary accents ===== */
  --gold: #f5c842;
  --gold-soft: rgba(245, 200, 66, 0.12);
  --silver: #c5cad6;
  --bronze: #d68a5a;
  --white: #f5f7fa;

  /* ===== Semantic states ===== */
  --success: #4ade80;
  --warn: #ffb547;
  --danger: #ff5566;
  --info: #74acdf;

  /* ===== Shadows ===== */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
  --shadow-glow-celeste: 0 0 24px rgba(116, 172, 223, 0.25);
  --shadow-glow-gold: 0 0 24px rgba(245, 200, 66, 0.25);

  /* ===== Typography ===== */
  --font-sans: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  --text-xs: 11px;
  --text-sm: 12px;
  --text-base: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 36px;
  --text-display: 56px;   /* hero numbers — pot, ob-hero h1 */

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* ===== Spacing (4px base) ===== */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* ===== Border radius ===== */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 10px;
  --radius-2xl: 14px;
  --radius-3xl: 16px;
  --radius-pill: 30px;
  --radius-full: 50%;
}

/* ===== Reset ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: 1.4;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "tnum", "lnum";
}

/* Subtle ambient gradients (from mockup) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 25% 0%, rgba(116, 172, 223, 0.08), transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(245, 200, 66, 0.04), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--celeste);
  text-decoration: none;
}
a:hover {
  color: var(--celeste-bright);
}

/* ===== Layout primitives ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-5);
  position: relative;
  z-index: 1;
}

.stack-1 > * + * { margin-top: var(--space-1); }
.stack-2 > * + * { margin-top: var(--space-2); }
.stack-3 > * + * { margin-top: var(--space-3); }
.stack-4 > * + * { margin-top: var(--space-4); }
.stack-5 > * + * { margin-top: var(--space-5); }
.stack-6 > * + * { margin-top: var(--space-6); }
.stack-8 > * + * { margin-top: var(--space-8); }

/* ===== Typography helpers ===== */
.t-mono { font-family: var(--font-mono); }
.t-tiny { font-size: var(--text-xs); }
.t-sm   { font-size: var(--text-sm); }
.t-md   { font-size: var(--text-md); }
.t-lg   { font-size: var(--text-lg); }
.t-xl   { font-size: var(--text-xl); }
.t-2xl  { font-size: var(--text-2xl); }
.t-3xl  { font-size: var(--text-3xl); }
.t-display { font-size: var(--text-display); }

.t-text   { color: var(--text); }
.t-text-2 { color: var(--text-2); }
.t-text-3 { color: var(--text-3); }
.t-celeste { color: var(--celeste); }
.t-gold    { color: var(--gold); }
.t-success { color: var(--success); }
.t-warn    { color: var(--warn); }
.t-danger  { color: var(--danger); }

/* Canonical uppercase-label system. Three sizes, color-agnostic — caller picks
   color via .t-text-2/3 or specific class. Use these everywhere we have
   eyebrows / table headers / tab labels / section headers. */
.eyebrow-sm,
.eyebrow-md,
.eyebrow-lg {
  font-family: var(--font-sans);
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.3;
}
.eyebrow-sm { font-size: 11px; }
.eyebrow-md { font-size: var(--text-sm); }   /* 12px */
.eyebrow-lg { font-size: var(--text-base); } /* 14px */

/* Legacy .t-label kept as alias of .eyebrow-md with text-2 default color
   (avoids touching every <span class="t-label">). New code should use
   .eyebrow-* + a color helper. */
.t-label {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}

/* ===== Unified page headers (used across leaderboard / insights / admin) ===== */
.app-page-header {
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-8);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.app-page-title {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: var(--space-2) 0 0;
}

.app-page-title .accent {
  background: linear-gradient(135deg, var(--celeste-bright), var(--white));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.app-page-eyebrow {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}

/* Section heading inside a page (h2 level) */
.app-section-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: var(--space-10) 0 var(--space-4);
}
.app-section-title:first-child { margin-top: 0; }

.app-section-sub {
  color: var(--text-2);
  line-height: 1.6;
  margin: 0 0 var(--space-5);
  max-width: 600px;
}

/* ===== Card ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
}

.card-elevated {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  box-shadow: var(--shadow-md);
}

.card-prominent {
  position: relative;
}
.card-prominent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--celeste), transparent);
  opacity: 0.6;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-xl);
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
  min-width: 44px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(180deg, var(--celeste-bright), var(--celeste));
  color: var(--bg);
  border: none;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-celeste);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover:not(:disabled) {
  border-color: var(--border-hi);
  background: var(--surface-2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
}
.btn-ghost:hover:not(:disabled) {
  color: var(--text);
}

.btn-danger {
  background: var(--surface);
  border-color: var(--danger);
  color: var(--danger);
}

/* ===== Form inputs ===== */
.input {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  color: var(--text);
  font-size: var(--text-md);
  font-family: var(--font-sans);
  outline: none;
  transition: all 0.2s;
}

.input:focus {
  border-color: var(--celeste);
  box-shadow: 0 0 0 3px var(--celeste-glow);
}

.input.error {
  border-color: var(--danger);
}

.input::placeholder {
  color: var(--text-3);
}

/* ===== Badges / pills ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
}

.badge-success { color: var(--success); border-color: rgba(74, 222, 128, 0.3); }
.badge-warn    { color: var(--warn); border-color: rgba(255, 181, 71, 0.3); }
.badge-danger  { color: var(--danger); border-color: rgba(255, 85, 102, 0.3); }
.badge-gold    { color: var(--gold); background: var(--gold-soft); border-color: rgba(245, 200, 66, 0.3); }
.badge-celeste { color: var(--celeste); background: var(--celeste-glow); border-color: rgba(116, 172, 223, 0.3); }

/* ===== Toast ===== */
.toast-host {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-xl);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  pointer-events: auto;
  animation: toastSlideUp 0.25s ease-out;
}

.toast-success { border-color: rgba(74, 222, 128, 0.4); color: var(--success); }
.toast-warn    { border-color: rgba(255, 181, 71, 0.4); color: var(--warn); }
.toast-danger  { border-color: rgba(255, 85, 102, 0.4); color: var(--danger); }

/* ===== Gate splash (overlay con z-index 1000, mostrado por gate.js) ===== */
.gate-splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none; /* gate.js toggles to 'flex' when needed */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-10) var(--space-5);
  background: var(--bg);
}
.gate-splash.visible { display: flex; }

.gate-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--space-12);
  animation: fadeIn 0.5s ease-out;
}

.gate-logo__mark {
  width: 56px;
  height: 56px;
  background: linear-gradient(180deg, var(--celeste) 33%, var(--white) 33% 66%, var(--celeste) 66%);
  border-radius: var(--radius-2xl);
  position: relative;
  margin-bottom: var(--space-4);
  box-shadow: 0 0 40px var(--celeste-glow);
}
.gate-logo__mark::after {
  content: '';
  position: absolute;
  inset: 50% 35%;
  background: var(--gold);
  border-radius: var(--radius-full);
  width: 12px;
  height: 12px;
  margin: -6px 0 0 0;
  box-shadow: 0 0 20px var(--gold);
}

.gate-logo__text {
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  font-size: var(--text-lg);
  letter-spacing: 0.06em;
  color: var(--text);
}

.gate-card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: var(--space-10) var(--space-8);
  width: 100%;
  max-width: 400px;
  position: relative;
  animation: slideUp 0.4s ease-out;
}
.gate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--celeste), transparent);
  opacity: 0.6;
}

.gate-card .input {
  text-align: center;
  letter-spacing: 0.15em;
}
.gate-card .input::placeholder {
  letter-spacing: 0.06em;
}

.flag-strip {
  height: 5px;
  width: 80px;
  display: flex;
  margin: var(--space-10) auto var(--space-12);
  border-radius: 3px;
  overflow: hidden;
}
.flag-strip > div { flex: 1; }
.flag-strip__c1,
.flag-strip__c3 { background: var(--celeste); }
.flag-strip__c2 { background: var(--white); }

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.shake { animation: shake 0.4s ease-in-out; }

/* ===== play.html: layout sidebar + main ===== */

.play-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.play-sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: var(--space-8) var(--space-6);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.play-sidebar__logo {
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  font-size: var(--text-md);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-bottom: var(--space-7);
  margin-bottom: var(--space-7);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}

.play-user-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-5);
  margin-bottom: var(--space-3);
}

.play-user-card__name {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-1);
}

.play-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--celeste), var(--celeste-bright));
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-bold);
  color: var(--bg);
  font-size: var(--text-md);
  flex-shrink: 0;
}

.play-user-card__handle {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.play-user-card__wallet {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-3);
  margin-top: 2px;
  letter-spacing: 0;
}

.play-user-card__stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-2-5, 10px) 0;
  border-bottom: 1px solid var(--border-1);
}
.play-user-card__stat:last-child { border-bottom: none; }

.play-user-card__stat-label {
  color: var(--text-2);
  font-size: var(--text-sm);
  letter-spacing: 0;
  font-weight: var(--weight-regular);
}

.play-user-card__stat-value {
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  letter-spacing: 0;
}

.play-section-label {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: var(--space-8) 0 var(--space-3);
  font-weight: var(--weight-medium);
}

.play-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-md);
  color: var(--text-2);
  cursor: pointer;
  margin-bottom: 2px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.play-nav-item:hover {
  background: var(--surface);
  color: var(--text);
}

.play-nav-item--active {
  background: var(--surface-2);
  color: var(--celeste-bright);
  border-color: var(--border-hi);
}

.play-nav-item__badge {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--text-3);
}

.play-nav-item--active .play-nav-item__badge {
  color: var(--celeste-bright);
}

.play-main {
  padding: var(--space-8) var(--space-12);
  min-width: 0;
}

.play-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-8);
  gap: var(--space-6);
  flex-wrap: wrap;
}

.play-header__title h1 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--space-2);
}

.play-header__sub {
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--text-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-wrap: wrap;
}
.play-header__sub strong {
  color: var(--text);
  font-weight: var(--weight-semibold);
}
.play-header__sub-sep {
  color: var(--text-3);
  opacity: 0.5;
}

.play-header__title h1 span.accent {
  background: linear-gradient(135deg, var(--celeste-bright), var(--white));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.play-header__progress { text-align: right; }

.play-progress-value {
  font-family: var(--font-sans);
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  color: var(--text);
}

.play-progress-value__total { color: var(--text-3); }

.play-progress-bar {
  width: 200px;
  height: 4px;
  background: var(--surface);
  border-radius: 2px;
  margin-top: var(--space-2);
  overflow: hidden;
}

.play-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--celeste), var(--celeste-bright));
  border-radius: 2px;
  transition: width 0.3s ease-out;
}

.play-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-2);
}

.play-banner--warn {
  border-color: rgba(255, 181, 71, 0.3);
  background: rgba(255, 181, 71, 0.04);
  color: var(--warn);
}

.play-day-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-10) 0 var(--space-5);
}

.play-day-divider__label {
  font-family: var(--font-sans);
  font-size: var(--text-md);
  color: var(--text);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.play-day-divider__label:nth-of-type(2) {
  /* The "X partidos" sub-label can stay quieter */
  color: var(--text-3);
  font-weight: var(--weight-regular);
  font-size: var(--text-sm);
}

.play-day-divider__line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.play-match {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-3);
  display: grid;
  /* 3 symmetric cols → score is always at the geometric center.
     Status badge (PENDING/LIVE/FIN) is positioned absolutely in the corner. */
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-5);
  align-items: center;
  transition: border-color 0.2s;
}

.play-match__status {
  position: absolute;
  top: var(--space-3);
  right: var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  color: var(--text-2);
  text-transform: uppercase;
  display: flex;
  gap: 8px;
  align-items: center;
}
.play-match__status--live { color: var(--celeste); }
.play-match__status--scored { color: var(--text); }
.play-match__status-score { font-weight: var(--weight-semibold); color: var(--text); }
.play-match__status--pts-3 .play-match__status-pts { color: var(--gold); }
.play-match__status--pts-1 .play-match__status-pts { color: var(--success); }

.play-match:hover { border-color: var(--border-hi); }

.play-match--live {
  border-color: var(--celeste);
  box-shadow: 0 0 0 1px var(--celeste-glow), 0 0 24px rgba(116, 172, 223, 0.06);
}

.play-match--finished {
  border-color: var(--success);
  background: rgba(74, 222, 128, 0.04);
}

.play-match__time {
  font-family: var(--font-sans);
}

.play-match__time-hour {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--text);
  white-space: nowrap;
}

.play-match__group {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-2);
  letter-spacing: 0.06em;
  grid-column: 1 / -1;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-1);
  text-align: center;
  text-transform: uppercase;
}

.play-match__venue {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text-2);
  letter-spacing: 0;
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-1);
  text-align: center;
}

.play-match__time-label {
  font-size: 11px;
  font-weight: var(--weight-medium);
  color: var(--text-2);
  letter-spacing: 0.06em;
  margin-top: 2px;
  text-transform: uppercase;
}

.play-match__live-tag {
  display: inline-block;
  background: var(--celeste);
  color: var(--bg);
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.06em;
  margin-top: 4px;
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink { 50% { opacity: 0.5; } }

.play-team {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  min-width: 0;
}

.play-team--away {
  flex-direction: row-reverse;
  text-align: right;
}

.play-team__flag {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-md);
  flex-shrink: 0;
}

.play-flag-img {
  height: auto;
  display: block;
}

.play-team__name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.play-score-input {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.play-input-num {
  width: 56px;
  height: 56px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  text-align: center;
  outline: none;
  transition: all 0.15s;
  -moz-appearance: textfield;
}

.play-input-num::-webkit-inner-spin-button,
.play-input-num::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.play-input-num:focus {
  border-color: var(--celeste);
  box-shadow: 0 0 0 3px var(--celeste-glow);
}

.play-input-num--filled {
  border-color: var(--border-hi);
  background: var(--surface-2);
}

.play-input-num--dirty { border-color: var(--warn); }
.play-input-num--saved { border-color: var(--success); }
.play-input-num--error { border-color: var(--danger); }
.play-input-num:disabled { cursor: not-allowed; opacity: 0.6; }

/* Finished-match outcome states — paint the WHOLE card based on user's pts.
   Opacities tuned so the green/red is clearly visible against the dark
   surface; previous values (0.06–0.07) were so faint that "miss" looked
   identical to "pending". */
.play-match--exact {
  background: rgba(74, 222, 128, 0.22);   /* exact: strong green */
  border-color: var(--success);
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.45);
}
.play-match--outcome {
  background: rgba(74, 222, 128, 0.14);   /* outcome: mid green */
  border-color: rgba(74, 222, 128, 0.50);
}
.play-match--miss {
  background: rgba(248, 113, 113, 0.16);  /* miss: clear red */
  border-color: rgba(248, 113, 113, 0.50);
}

.play-input-colon {
  color: var(--text-3);
  font-family: var(--font-sans);
  font-weight: var(--weight-semibold);
}

.play-real-score {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text-3);
  text-align: right;
}

.play-real-score__label {
  font-size: 11px;
  font-weight: var(--weight-medium);
  color: var(--text-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.play-real-score__value {
  display: block;
  font-size: var(--text-md);
  color: var(--text);
  font-weight: var(--weight-semibold);
}


.play-outright {
  margin-top: var(--space-12);
  padding: var(--space-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-3xl);
  position: relative;
}

.play-outright::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.6;
}

.play-outright__row {
  display: grid;
  grid-template-columns: 200px 1fr 60px;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
}

.play-outright__row:last-child { border-bottom: none; }

.play-outright__label {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.play-outright__points {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--gold);
  text-align: right;
}

.play-select,
.play-text-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  color: var(--text);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  outline: none;
  transition: all 0.2s;
}

.play-select:focus,
.play-text-input:focus {
  border-color: var(--celeste);
  box-shadow: 0 0 0 3px var(--celeste-glow);
}

.play-select--dirty,
.play-text-input--dirty { border-color: var(--warn); }
.play-select--saved,
.play-text-input--saved { border-color: var(--success); }

.play-save-toast {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  background: var(--surface-2);
  border: 1px solid var(--success);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-xl);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--success);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  box-shadow: 0 8px 32px rgba(74, 222, 128, 0.12);
  z-index: 1500;
  animation: toastSlideUp 0.25s ease-out;
}

.play-save-toast::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px var(--success);
}

.play-save-toast--saving {
  border-color: var(--warn);
  color: var(--warn);
}
.play-save-toast--saving::before {
  background: var(--warn);
  box-shadow: 0 0 8px var(--warn);
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.4; } }

.play-save-toast--error { border-color: var(--danger); color: var(--danger); }
.play-save-toast--error::before { background: var(--danger); box-shadow: 0 0 8px var(--danger); }

/* ===== Mobile drawer (≤900px) ===== */
.app-mobile-bar { display: none; }
.app-drawer-close { display: none; }

@media (max-width: 900px) {
  .play-layout {
    grid-template-columns: 1fr;
    /* Drop the desktop stacking context so the fixed sidebar (which lives
       inside this grid) can stack above the body-level backdrop on mobile. */
    position: static;
    z-index: auto;
  }
  .play-main { padding: var(--space-5); }

  /* Sidebar becomes a slide-in drawer with explicit X close on mobile */
  .play-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 320px);
    height: 100vh;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 8px 0 32px rgba(0,0,0,0.55);
  }
  .play-sidebar.is-open { transform: translateX(0); }

  .app-drawer-close {
    display: flex;
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
  }

  /* Compact floating hamburger button — no vertical bar/border, blends with bg */
  .app-mobile-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    z-index: 40;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.25s ease;
  }
  .app-mobile-bar:active { transform: scale(0.96); }
  /* Hide once the drawer is open */
  .app-mobile-bar.is-hidden {
    opacity: 0;
    transform: translateX(-110%);
    pointer-events: none;
  }
  .app-mobile-bar__lines {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
  }
  .app-mobile-bar__lines span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
  }
  .app-mobile-bar__brand { display: none; }

  /* Backdrop */
  .app-drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 50;
  }
  .app-drawer-backdrop.is-visible { display: block; }

  /* Main content uses the full viewport — the floating hamburger overlays. */
  .play-main { margin-left: 0; padding: 64px var(--space-4) var(--space-5); }

  .play-match {
    grid-template-columns: 1fr;
    gap: var(--space-3);
    text-align: center;
    /* Reserve room at the top for the absolute-positioned status badge so the
       GRUPO line never collides with it. */
    padding-top: var(--space-7);
  }
  /* Hide the parenthetical team list on mobile — the GRUPO letter is enough,
     the team-list wrapping was what caused the badge overlap. */
  .play-match__group-teams { display: none; }
  .play-team--away { flex-direction: row; text-align: left; }
  .play-input-num { width: 48px; height: 48px; font-size: var(--text-md); }
  .play-real-score { display: none; }
  .play-outright__row { grid-template-columns: 1fr; gap: var(--space-2); }
  .play-header__title h1 { font-size: var(--text-2xl); }
}

/* ===== Leaderboard ===== */

.lb-pot-card {
  text-align: center;
  padding: var(--space-10) var(--space-8);
  margin-bottom: var(--space-8);
}

.lb-pot-card__pot {
  font-family: var(--font-sans);
  font-size: var(--text-display);
  font-weight: var(--weight-bold);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--celeste-bright);
}

.lb-pot-card__usdc {
  font-size: var(--text-md);
  color: var(--text-2);
  margin-left: var(--space-3);
}

.lb-pot-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-base);
  font-family: var(--font-sans);
  color: var(--text-2);
  letter-spacing: 0;
  flex-wrap: wrap;
}
.lb-pot-card__count {
  color: var(--text);
  font-weight: var(--weight-semibold);
  font-size: var(--text-md);
}
.lb-pot-card__label {
  color: var(--text-2);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.06em;
}
.lb-pot-card__sep {
  color: var(--text-3);
  opacity: 0.5;
}

/* Pot summary box — same visual rhythm as the user card directly above it */
.app-pot-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-5);
  margin: 0 0 var(--space-2);
  display: flex;
  flex-direction: column;
}
.app-pot-card__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-2-5, 10px) 0;
  border-bottom: 1px solid var(--border-1);
}
.app-pot-card__row:last-child { border-bottom: none; }
.app-pot-card__row:first-child { padding-top: 0; }
.app-pot-card__label {
  font-size: var(--text-sm);
  letter-spacing: 0;
  color: var(--text-2);
  font-weight: var(--weight-regular);
}
.app-pot-card__value {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text);
}

.lb-podium {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: var(--space-4);
  align-items: end;
  margin-bottom: var(--space-8);
}

.lb-podium-spot {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-3xl);
  padding: var(--space-6) var(--space-5);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.lb-podium-spot:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
}

.lb-podium-spot--gold {
  border-color: var(--gold);
  background: linear-gradient(180deg, var(--gold-soft), var(--surface));
  box-shadow: 0 0 32px rgba(245, 200, 66, 0.18);
}

.lb-podium-spot--silver { border-color: var(--silver); }
.lb-podium-spot--bronze { border-color: var(--bronze); }

.lb-podium-spot__rank {
  font-family: var(--font-sans);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-3);
}
.lb-podium-spot--gold   .lb-podium-spot__rank { color: var(--gold); }
.lb-podium-spot--silver .lb-podium-spot__rank { color: var(--silver); }
.lb-podium-spot--bronze .lb-podium-spot__rank { color: var(--bronze); }

.lb-podium-spot__avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-3);
  background: linear-gradient(135deg, var(--celeste), var(--celeste-bright));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--bg);
}

.lb-podium-spot__name {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-podium-spot__points {
  font-family: var(--font-sans);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--text);
}

.lb-podium-spot--gold .lb-podium-spot__points { color: var(--gold); font-size: var(--text-3xl); }

.lb-matches-progress {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: var(--space-6) 0 var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text-2);
  letter-spacing: 0;
}
.lb-matches-progress__count {
  color: var(--text);
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}
.lb-matches-progress__label {
  color: var(--text-2);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.06em;
}
.lb-matches-progress__sep {
  color: var(--text-3);
  opacity: 0.5;
}
.lb-matches-progress__live {
  color: var(--celeste);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.06em;
  font-weight: var(--weight-semibold);
}

.lb-matches-progress__hint {
  font-size: 11px;
  color: var(--text-3);
  margin: 0 0 var(--space-4);
  line-height: 1.4;
  max-width: 520px;
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
}

.lb-table thead { background: var(--bg-2); border-bottom: 1px solid var(--border); }

.lb-table th {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: var(--space-4) var(--space-5);
  text-align: left;
  font-weight: var(--weight-medium);
}
.lb-table th.num,
.lb-table td.num { text-align: center; font-family: var(--font-sans); }

.lb-table__th-sub {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  font-weight: var(--weight-regular);
  color: var(--text-3);
  text-transform: lowercase;
  letter-spacing: 0;
}

.lb-table tbody tr {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s, transform 0.4s ease-out;
}

.lb-table tbody tr:last-child { border-bottom: none; }
.lb-table tbody tr:hover { background: var(--surface-2); }

.lb-table td {
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-base);
}

.lb-table td.rank {
  font-family: var(--font-sans);
  color: var(--text-3);
  width: 60px;
}

.lb-table tr.lb-row--me { background: rgba(116, 172, 223, 0.06); }
.lb-table tr.lb-row--me td.rank,
.lb-table tr.lb-row--me td.name { color: var(--celeste-bright); }

/* Mobile leaderboard table — pack columns tighter so all 5 fit on a 375px
   iPhone without horizontal scroll. Trim padding and shrink the rank column. */
@media (max-width: 640px) {
  .lb-table th,
  .lb-table td {
    padding: var(--space-3) var(--space-2);
    font-size: var(--text-sm);
  }
  .lb-table th {
    font-size: 10px;
    letter-spacing: 0.04em;
  }
  .lb-table td.rank {
    width: 28px;
    padding-left: var(--space-3);
  }
  .lb-table td.name {
    /* Allow long names to wrap rather than push the table wider. */
    word-break: break-word;
  }
  /* Indicators are visible on mobile too — tap reveals the explainer
     tooltip. Shrink slightly so they don't blow up the row width. */
  .lb-row-indicator {
    font-size: 10px;
    padding: 1px 6px;
    margin-left: 4px;
  }
}

.lb-paid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-3);
}

.lb-paid-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}

.lb-paid-item__avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--celeste), var(--celeste-bright));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--bg);
  flex-shrink: 0;
}

.lb-paid-item__name {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}

.lb-paid-item__wallet {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-3);
}

.lb-row-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px var(--space-2);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  margin-left: var(--space-2);
  letter-spacing: 0.06em;
  cursor: pointer;
  outline: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.lb-row-indicator--active {
  transform: scale(1.06);
  filter: brightness(1.15);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px currentColor;
}

@media (hover: hover) {
  .lb-row-indicator:hover {
    transform: scale(1.06);
    filter: brightness(1.15);
  }
}

/* Tooltip explaining the ⚡+N / 🔻-N indicator. Fixed positioning relative to
   the viewport — the JS clamps it inside screen edges and flips above/below
   the bolt depending on space. */
.lb-bolt-tooltip {
  position: fixed;
  z-index: 100;
  max-width: 280px;
  padding: var(--space-4) var(--space-5);
  background: var(--bg-2);
  border: 1px solid var(--celeste);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  font-family: var(--font-sans);
  pointer-events: none;
  /* iOS doesn't get :hover styles to avoid 2-tap dance for the bolts. */
}
.lb-bolt-tooltip[hidden] { display: none; }

.lb-bolt-tooltip__title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--celeste-bright);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2);
  font-feature-settings: "tnum";
}

.lb-bolt-tooltip__body {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.5;
}

.lb-row-indicator--live {
  background: rgba(116, 172, 223, 0.10);
  color: var(--celeste-bright);
  border: 1px solid rgba(116, 172, 223, 0.4);
}

.lb-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-3xl);
  max-width: 640px;
  width: 100%;
  padding: var(--space-8);
  max-height: 85vh;
  overflow-y: auto;
}

/* Stat tiles inside the player modal — compact variant. The standalone
   /insights page uses the full-size chips; here we shrink everything so
   the predictions list (the main content) stays above the fold. */
.lb-modal .ins-rank-card {
  padding: var(--space-5);
  gap: var(--space-4);
  border-radius: var(--radius-2xl);
  margin-bottom: var(--space-4);
}
.lb-modal .ins-rank-badge {
  width: 56px;
  height: 56px;
  font-size: var(--text-base);
}
.lb-modal .ins-rank-card__total {
  font-size: var(--text-2xl);
}
.lb-modal .ins-rank-card__total-max {
  font-size: var(--text-md);
}
.lb-modal .ins-stat-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.lb-modal .ins-stat-chip {
  padding: var(--space-3);
  min-height: 96px;
  border-radius: var(--radius-lg);
}
.lb-modal .ins-stat-chip__label {
  top: var(--space-2);
  left: var(--space-2);
  right: var(--space-2);
  font-size: 10px;
}
.lb-modal .ins-stat-chip__value {
  font-size: var(--text-xl);
}
.lb-modal .ins-stat-chip__sub {
  bottom: var(--space-2);
  left: var(--space-2);
  right: var(--space-2);
  font-size: 10px;
  max-width: 100%;
}
.lb-modal .ins-stat-chip:hover {
  transform: none;
}
@media (max-width: 640px) {
  .lb-modal .ins-rank-card {
    padding: var(--space-4);
    grid-template-columns: auto 1fr;
  }
  .lb-modal .ins-rank-card > :last-child {
    grid-column: 1 / -1;
    text-align: left;
  }
  .lb-modal .ins-rank-badge {
    width: 44px;
    height: 44px;
    font-size: var(--text-sm);
  }
  .lb-modal .ins-stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
  }
  .lb-modal .ins-stat-chip {
    padding: var(--space-3);
    min-height: 78px;
  }
  .lb-modal .ins-stat-chip__value {
    font-size: var(--text-lg);
  }
}

.lb-modal__header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-5);
}

.lb-modal__avatar {
  width: 48px; height: 48px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--celeste), var(--celeste-bright));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--bg);
  flex-shrink: 0;
}

.lb-modal__close {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  cursor: pointer;
  flex-shrink: 0;
  margin-left: auto;
}
.lb-modal__close:hover { color: var(--text); border-color: var(--border-hi); }

.lb-modal__group-header {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  color: var(--text-2);
  text-transform: uppercase;
  font-weight: var(--weight-medium);
  margin: var(--space-5) 0 var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px dashed var(--border);
}

.lb-modal__pred-row {
  display: grid;
  /* Teams column flexes; values + status are fixed for alignment across rows */
  grid-template-columns: 1fr 64px 64px 96px;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-3) 0;
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--border-1);
}
.lb-modal__pred-row:last-child { border-bottom: none; }

.lb-modal__pred-row--head {
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-1);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  color: var(--text-3);
  text-transform: uppercase;
}

.lb-modal__pred-teams {
  line-height: 1.3;
  font-size: var(--text-sm);
  color: var(--text);
  /* Allow wrapping but keep values aligned */
  word-break: break-word;
}

.lb-modal__pred-real,
.lb-modal__pred-pick {
  text-align: center;
}

.lb-modal__pred-status {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  text-align: right;
  letter-spacing: 0.06em;
}
.lb-modal__pred-status--exact   { color: var(--gold); }
.lb-modal__pred-status--outcome { color: var(--success); }
.lb-modal__pred-status--miss    { color: var(--text-3); }
.lb-modal__pred-status--pending { color: var(--text-3); }

/* ===== Insights ===== */

.ins-tabs {
  display: flex;
  gap: var(--space-1);
  background: var(--bg-2);
  padding: var(--space-1);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  width: fit-content;
  margin-bottom: var(--space-8);
}

.ins-tab {
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.15s;
}

.ins-tab--active {
  background: var(--surface-2);
  color: var(--celeste-bright);
}

.ins-empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-8);
  color: var(--text-2);
}

.ins-empty-state__icon { font-size: 48px; margin-bottom: var(--space-4); opacity: 0.5; }

.ins-rank-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-6);
  align-items: center;
  padding: var(--space-8);
  background: linear-gradient(135deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-3xl);
  margin-bottom: var(--space-6);
  position: relative;
  overflow: hidden;
}

.ins-rank-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.ins-rank-badge {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--gold), var(--bronze));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--bg);
}

.ins-rank-badge--silver { background: linear-gradient(135deg, var(--silver), #888); }
.ins-rank-badge--bronze { background: linear-gradient(135deg, var(--bronze), #6a4824); }
.ins-rank-badge--other  { background: var(--surface-2); color: var(--text-2); }

.ins-rank-card__total {
  font-family: var(--font-sans);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
}

.ins-rank-card__total-max {
  color: var(--text-3);
  font-size: var(--text-xl);
}

.ins-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.ins-stat-chip {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-6) var(--space-5);
  min-height: 156px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* The label sits at the top edge and the optional sub at the bottom edge
     via position:absolute, so the VALUE is the only flex child in normal
     flow — flex centering puts it at the true geometric center of the box. */
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.ins-stat-chip:hover {
  border-color: var(--border-hi);
  transform: translateY(-1px);
}

.ins-stat-chip__label {
  position: absolute;
  top: var(--space-5);
  left: var(--space-4);
  right: var(--space-4);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  line-height: 1.3;
  text-align: center;
}

.ins-stat-chip__value {
  font-family: var(--font-sans);
  font-size: var(--text-3xl);
  font-weight: var(--weight-semibold);
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.03em;
  display: block;
  text-align: center;
  font-feature-settings: "tnum", "lnum";
  /* Compensate for the superscript suffix which lifts the line-box top.
     Without this, flex-centering the value-box puts the NUMBER above the
     chip's geometric center. The 0.4em padding-top shifts the content
     down so the number's optical center matches the chip center. */
  padding-top: 0.4em;
}

/* Optional sub-line — pinned to the bottom edge so it doesn't push the
   value off-center. Center is guaranteed by flex on the parent. */
.ins-stat-chip__sub {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  right: var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  letter-spacing: 0;
  line-height: 1.4;
  color: var(--text-2);
  text-align: center;
}

/* Suffix is a small, low-contrast superscript so the main number
   visually dominates the cell center even when the suffix is wider
   than the number (e.g. "/10" next to "1"). */
.ins-stat-chip__suffix {
  display: inline-block;
  color: var(--text-3);
  font-size: 0.5em;
  font-weight: var(--weight-medium);
  letter-spacing: 0;
  vertical-align: 0.55em;
  margin-left: 0.1em;
}

.ins-match-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  margin-bottom: var(--space-4);
}

.ins-match-card--best { border-color: rgba(245, 200, 66, 0.4); background: linear-gradient(180deg, var(--gold-soft), var(--surface)); }
.ins-match-card--worst { border-color: rgba(255, 85, 102, 0.3); }

.ins-match-card__label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: var(--space-3);
}

.ins-match-card--best .ins-match-card__label { color: var(--gold); }
.ins-match-card--worst .ins-match-card__label { color: var(--danger); }

.ins-match-card__teams {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-3);
}

.ins-match-card__detail {
  display: flex;
  gap: var(--space-6);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
}

.ins-match-card__detail span.label {
  color: var(--text-3);
  margin-right: var(--space-2);
}

/* Outright distribution — collapsible accordion using native <details>.
   All start collapsed; click a summary to expand. */
.ins-distribution-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  margin-bottom: var(--space-3);
  overflow: hidden;
  transition: border-color 0.18s ease;
}
.ins-distribution-section[open] {
  border-color: var(--border-hi);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
}

.ins-distribution-summary {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  list-style: none;
  user-select: none;
  outline: none;
  transition: background 0.18s ease;
}
.ins-distribution-summary::-webkit-details-marker { display: none; }
.ins-distribution-summary:hover {
  background: var(--surface-2);
}
.ins-distribution-summary:focus-visible {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 2px var(--celeste);
}

.ins-distribution-title {
  flex: 1;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--text);
  letter-spacing: -0.01em;
}

.ins-distribution-meta {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  font-feature-settings: "tnum";
}

.ins-distribution-chevron {
  font-family: var(--font-sans);
  font-size: 18px;
  color: var(--text-3);
  line-height: 1;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), color 0.18s ease;
  display: inline-block;
}
.ins-distribution-section[open] .ins-distribution-chevron {
  transform: rotate(180deg);
  color: var(--celeste-bright);
}

.ins-distribution-body {
  padding: var(--space-2) var(--space-5) var(--space-4);
  border-top: 1px solid var(--border);
}

.ins-dist-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 1fr auto;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-3) 0;
}

.ins-dist-row__label {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}

.ins-dist-bar-track {
  background: var(--surface-2);
  border-radius: var(--radius-md);
  height: 24px;
  position: relative;
  overflow: hidden;
}

.ins-dist-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--celeste), var(--celeste-bright));
  border-radius: var(--radius-md);
  transition: width 0.4s ease-out;
}

.ins-dist-row__count {
  font-family: var(--font-sans);
  color: var(--celeste-bright);
  font-weight: var(--weight-semibold);
  min-width: 40px;
  text-align: right;
}

.ins-dist-row__voters {
  grid-column: 1 / -1;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--text-3);
  margin-top: -4px;
  margin-bottom: var(--space-2);
  padding-left: 0;
  word-break: break-word;
}

/* Gaussian curve fitted to observed match-points. SVG-based, interactive
   dots cluster tied players. Mean line + 1σ shading for visual context. */
.ins-curve {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-3) var(--space-4) var(--space-4);
}

.ins-curve svg {
  width: 100%;
  height: auto;
  display: block;
}

.ins-curve__fill {
  fill: var(--celeste);
  fill-opacity: 0.10;
}

.ins-curve__line {
  fill: none;
  stroke: var(--celeste-bright);
  stroke-width: 2;
}

.ins-curve__sigma {
  fill: var(--celeste-bright);
  fill-opacity: 0.04;
}

.ins-curve__mean {
  stroke: var(--celeste-bright);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  opacity: 0.55;
}

.ins-curve__axis {
  stroke: var(--border);
  stroke-width: 1;
}

.ins-curve__tick-line {
  stroke: var(--border);
  stroke-width: 1;
}

.ins-curve__tick {
  font-family: var(--font-sans);
  font-size: 11px;
  font-feature-settings: "tnum";
  fill: var(--text-3);
}

.ins-curve__axis-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: var(--weight-medium);
  fill: var(--text-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ins-curve__dot {
  cursor: pointer;
  outline: none;
}

.ins-curve__hit {
  fill: transparent;
}

.ins-curve__core {
  fill: var(--celeste-bright);
  stroke: var(--bg);
  stroke-width: 2;
  transition: r 0.18s ease, fill 0.18s ease;
}

.ins-curve__count {
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  font-size: 11px;
  fill: var(--bg);
  pointer-events: none;
  font-feature-settings: "tnum";
}

.ins-curve__dot--active .ins-curve__core {
  fill: var(--white);
  filter: drop-shadow(0 0 6px var(--celeste-bright));
}

/* Hover state — only on devices that support hover. iOS treats elements
   with :hover styles as "hover-needs-tap-first" → 2 taps to click.
   Wrapping in (hover: hover) prevents that. */
@media (hover: hover) {
  .ins-curve__dot:hover .ins-curve__core,
  .ins-curve__dot:focus-visible .ins-curve__core {
    fill: var(--white);
    filter: drop-shadow(0 0 6px var(--celeste-bright));
  }
}

.ins-curve__legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  font-size: var(--text-sm);
  color: var(--text-2);
}

.ins-curve__legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-feature-settings: "tnum";
}

.ins-curve__legend-mean,
.ins-curve__legend-sigma,
.ins-curve__legend-dot {
  display: inline-block;
  width: 14px;
  height: 12px;
  border-radius: 2px;
}

.ins-curve__legend-mean {
  border-top: 1.5px dashed var(--celeste-bright);
  height: 1px;
  margin-top: 6px;
}

.ins-curve__legend-sigma {
  background: var(--celeste-bright);
  opacity: 0.12;
  border: 1px solid var(--celeste);
}

.ins-curve__legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--celeste-bright);
  margin-left: 2px;
}

.ins-curve__tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--bg-2);
  border: 1px solid var(--celeste);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  min-width: 140px;
  z-index: 10;
}

.ins-curve__tooltip[hidden] {
  display: none;
}

.ins-curve__tooltip-pts {
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--celeste-bright);
  letter-spacing: -0.02em;
  font-feature-settings: "tnum";
}

.ins-curve__tooltip-pts-unit {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-2);
  margin-left: 4px;
  letter-spacing: 0;
}

.ins-curve__tooltip-names {
  margin-top: 4px;
  color: var(--text);
  line-height: 1.4;
}

.ins-curve__tooltip-meta {
  margin-top: 2px;
  font-size: var(--text-xs);
  color: var(--text-3);
}

.ins-rarity-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.ins-rarity-row {
  display: grid;
  grid-template-columns: 120px 1fr 60px;
  gap: var(--space-3);
  align-items: center;
}

.ins-rarity-row__name {
  font-size: var(--text-sm);
  color: var(--text);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ins-rarity-row__bar {
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
}

.ins-rarity-row__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--celeste), var(--gold));
  border-radius: 4px;
  transition: width 0.3s;
}

.ins-rarity-row__pct {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text);
  text-align: right;
  font-weight: var(--weight-semibold);
}

@media (max-width: 600px) {
  .ins-rank-card { grid-template-columns: 1fr; text-align: center; }
  .ins-rank-card__total { text-align: center; }
  .ins-dist-row { grid-template-columns: 1fr; }
}

/* ===== Admin pill (inline badge on every page when role=admin) ===== */

.admin-pill {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--gold);
  letter-spacing: 0.06em;
  text-decoration: none;
  margin-left: var(--space-3);
  transition: all 0.15s;
}

.admin-pill:hover {
  background: var(--gold);
  color: var(--bg);
  box-shadow: 0 0 16px rgba(245, 200, 66, 0.3);
}

.admin-pill--floating {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 200;
  margin-left: 0;
}

/* ===== Admin panel ===== */

.adm-tabs {
  display: flex;
  gap: var(--space-1);
  background: var(--bg-2);
  padding: var(--space-1);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  width: fit-content;
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.adm-tab {
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.15s;
}

.adm-tab--active {
  background: var(--surface-2);
  color: var(--gold);
}

.adm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-4);
}

.adm-match-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-5);
  cursor: pointer;
  transition: border-color 0.15s;
}

.adm-match-card:hover { border-color: var(--border-hi); }

.adm-match-card--admin-override {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.adm-match-card--live {
  border-color: var(--celeste);
}

.adm-match-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
}

.adm-match-card__id {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--text-3);
  letter-spacing: 0.06em;
}

.adm-match-card__teams {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
}

.adm-match-card__score {
  font-family: var(--font-sans);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--celeste-bright);
}

.adm-match-card__meta {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.06em;
  margin-top: var(--space-2);
  display: flex;
  justify-content: space-between;
}

.adm-section-title {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  color: var(--text-2);
  text-transform: uppercase;
  margin: var(--space-8) 0 var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}

.adm-hash-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.adm-hash {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--celeste-bright);
  word-break: break-all;
  line-height: 1.4;
}
.adm-hash-row .btn {
  flex-shrink: 0;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
}

.adm-player-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-2);
}

.adm-player-row--incomplete {
  background: rgba(245, 200, 66, 0.06);
  border-color: rgba(245, 200, 66, 0.35);
}

.adm-incomplete-banner {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4) var(--space-5);
  background: rgba(245, 200, 66, 0.08);
  border: 1px solid rgba(245, 200, 66, 0.4);
  border-radius: var(--radius-2xl);
  margin-bottom: var(--space-6);
}
.adm-incomplete-banner__icon {
  font-size: 28px;
  color: var(--gold);
  flex-shrink: 0;
}
.adm-incomplete-banner__title {
  font-weight: var(--weight-semibold);
  font-size: var(--text-md);
  color: var(--text);
}
.adm-incomplete-banner__sub {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.5;
  margin-top: 2px;
}

.adm-player-row__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.adm-player-row__name {
  font-weight: var(--weight-semibold);
}

.adm-player-row__wallet {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-3);
}

.adm-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  font-size: var(--text-sm);
}

.adm-table thead {
  background: var(--bg-2);
}

.adm-table th {
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  text-align: left;
  font-weight: var(--weight-medium);
}

.adm-table td {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border);
  vertical-align: top;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
}

.adm-table td.col-data {
  font-family: var(--font-sans);
  word-break: break-all;
  max-width: 400px;
  color: var(--text-2);
}

.adm-watcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.adm-watcher-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-5);
}

.adm-watcher-card--ok { border-color: rgba(74, 222, 128, 0.4); }
.adm-watcher-card--stale { border-color: rgba(255, 181, 71, 0.4); }
.adm-watcher-card--never { border-color: var(--border); }

.adm-watcher-card__status {
  font-family: var(--font-sans);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
}

.adm-watcher-card--ok .adm-watcher-card__status { color: var(--success); }
.adm-watcher-card--stale .adm-watcher-card__status { color: var(--warn); }
.adm-watcher-card--never .adm-watcher-card__status { color: var(--text-3); }

/* Admin modal form */
.adm-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-3xl);
  max-width: 480px;
  width: 100%;
  padding: var(--space-8);
  max-height: 85vh;
  overflow-y: auto;
}

.adm-form-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.adm-form-row label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}

.adm-form-row input,
.adm-form-row select,
.adm-form-row textarea {
  padding: var(--space-3) var(--space-4);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.adm-form-row input:focus,
.adm-form-row select:focus,
.adm-form-row textarea:focus { border-color: var(--celeste); }

.adm-form-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.adm-form-actions .btn { flex: 1; }

/* ===== Onboarding flow components ===== */

.ob-nav {
  padding: var(--space-6) var(--space-10);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.ob-nav__meta {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  color: var(--text-2);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
}

.ob-logo {
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
  letter-spacing: 0.06em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.ob-logo__mark {
  width: 18px;
  height: 18px;
  background: linear-gradient(180deg, var(--celeste) 33%, var(--white) 33% 66%, var(--celeste) 66%);
  border-radius: var(--radius-sm);
  position: relative;
}
.ob-logo__mark::after {
  content: '';
  position: absolute;
  inset: 50% 35%;
  background: var(--gold);
  border-radius: var(--radius-full);
  width: 4px;
  height: 4px;
  margin: -2px 0 0 0;
  box-shadow: 0 0 6px var(--gold);
}

.ob-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-20);
  align-items: stretch;
  padding: var(--space-12) 0;
  max-width: 1100px;
  margin: 0 auto;
}

/* Left hero column flexes vertically so its bottom aligns with the bottom
   of the wallet card on the right. The 3-stat strip lands at the bottom,
   the title clusters at the top, and the description paragraph stretches
   in the middle. */
.ob-grid > div:first-child {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-6);
}

.ob-hero__meta {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--celeste-bright);
  letter-spacing: 0.06em;
  margin-bottom: var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-transform: uppercase;
}
.ob-hero__meta::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--celeste);
}

.ob-hero__meta-text {
  position: relative;
  display: inline-block;
}

.ob-hero__meta-tm {
  font-size: 13px;
  vertical-align: 0.7em;
  color: var(--celeste-bright);
  font-weight: var(--weight-bold);
  margin-left: 1px;
  letter-spacing: 0;
  line-height: 1;
}

.ob-hero__meta-arr {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 2px;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: none;
  font-weight: var(--weight-regular);
  color: var(--text-3);
  opacity: 0.85;
  white-space: nowrap;
}

/* Cutoff line shown inside the wallet card */
.ob-cutoff-line {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  letter-spacing: 0;
}

.ob-cutoff-line__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
  flex-shrink: 0;
}

.ob-cutoff-line__label {
  color: var(--text-2);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.ob-cutoff-line__value {
  color: var(--text);
  font-weight: var(--weight-semibold);
}

.ob-cutoff-line__sep {
  color: var(--text-3);
  opacity: 0.5;
}

.ob-cutoff-line__note {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-3);
  letter-spacing: 0;
  line-height: 1.4;
}

/* "Solo mirar" card — secondary nav stack inside the wallet card,
   below the cutoff line. Lets gate-authenticated users jump to
   leaderboard / en-vivo without connecting a wallet. */
.ob-quick-card {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}

.ob-quick-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  margin-top: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: var(--weight-medium);
  font-size: var(--text-base);
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.ob-quick-link:hover {
  border-color: var(--celeste);
  background: var(--surface-2);
  transform: translateY(-1px);
}

.ob-quick-link__arrow {
  color: var(--text-3);
  font-size: var(--text-md);
}

.ob-quick-link:hover .ob-quick-link__arrow {
  color: var(--celeste-bright);
}

.ob-quick-link--disabled {
  pointer-events: none;
  opacity: 0.35;
  cursor: not-allowed;
}

/* "Wallet connected → click to disconnect" chip — lives in the top nav,
   replacing the FIFA meta text when the user is logged in. */
.ob-disconnect-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.ob-disconnect-chip:hover {
  border-color: var(--danger);
  color: var(--text);
}
.ob-disconnect-chip__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
}
.ob-disconnect-chip:hover .ob-disconnect-chip__dot { background: var(--danger); }
.ob-disconnect-chip__x {
  color: var(--text-3);
  font-size: 11px;
}

.ob-hero h1 {
  font-size: var(--text-display);
  font-weight: var(--weight-bold);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 0;
}
.ob-hero h1 .accent {
  background: linear-gradient(135deg, var(--celeste-bright), var(--white));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.ob-hero p {
  font-size: var(--text-lg);
  color: var(--text-2);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 0;
}

.ob-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  padding: var(--space-8) 0;
  margin-top: var(--space-12);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  max-width: 520px;
}
.ob-stat__label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: var(--weight-medium);
  color: var(--text-2);
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}
.ob-stat__value {
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  line-height: 1;
}
.ob-stat__value--accent {
  color: var(--celeste-bright);
}

.ob-card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
}
.ob-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--celeste), transparent);
  opacity: 0.6;
}

.ob-step-indicator {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: var(--space-6) 0;
}
.ob-step {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
}
.ob-step:last-child { border-bottom: none; }
.ob-step__num {
  width: 28px;
  height: 28px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-2);
  flex-shrink: 0;
}
.ob-step--done .ob-step__num {
  background: var(--celeste);
  border-color: var(--celeste);
  color: var(--bg);
}
.ob-step--active .ob-step__num {
  background: transparent;
  border-color: var(--celeste);
  color: var(--celeste-bright);
  box-shadow: 0 0 0 4px var(--celeste-glow);
}
.ob-step__text {
  font-size: var(--text-base);
  color: var(--text-2);
}
.ob-step--active .ob-step__text {
  color: var(--text);
  font-weight: var(--weight-semibold);
}
.ob-step--done .ob-step__text {
  color: var(--text-3);
}

.ob-payment-box {
  margin-top: var(--space-6);
  padding: var(--space-5);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
}
.ob-payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) 0;
  font-size: var(--text-base);
}
.ob-payment-row__label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: var(--weight-medium);
  color: var(--text-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ob-payment-row__value {
  font-family: var(--font-sans);
  color: var(--text);
}
.ob-payment-row--total {
  border-top: 1px solid var(--border);
  margin-top: var(--space-3);
  padding-top: var(--space-4);
}
.ob-payment-row--total .ob-payment-row__value {
  font-size: var(--text-xl);
  color: var(--celeste-bright);
  font-weight: var(--weight-semibold);
}

.ob-usdc-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  background: rgba(39, 117, 202, 0.15);
  border: 1px solid rgba(39, 117, 202, 0.4);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-family: var(--font-sans);
  color: #5da7ff;
}
.ob-usdc-pill::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #2775ca;
  border-radius: var(--radius-full);
}

.ob-name-input-wrap {
  position: relative;
}
.ob-name-status {
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--text-xs);
  font-family: var(--font-sans);
}

.ob-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--celeste);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
  margin: var(--space-6) auto;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.ob-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  animation: fadeIn 0.2s ease-out;
}
.ob-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-3xl);
  max-width: 480px;
  width: 100%;
  padding: var(--space-8);
  max-height: 80vh;
  overflow-y: auto;
}

@media (max-width: 900px) {
  .ob-grid { grid-template-columns: 1fr; gap: var(--space-10); padding: var(--space-8) 0; }
  .ob-hero h1 { font-size: var(--text-3xl); }
  .ob-nav { padding: var(--space-4) var(--space-5); flex-direction: column; gap: var(--space-2); align-items: flex-start; }
  .ob-nav__meta { font-size: 9px; }
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .container { padding: 0 var(--space-4); }
  .card { padding: var(--space-5); }
}

/* ===== Accessibility helpers ===== */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== /terminos page ===== */
.terms-page .terms-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.terms-page .terms-list--ol { counter-reset: step; }
.terms-page .terms-list li {
  position: relative;
  padding-left: 28px;
  color: var(--text);
  line-height: 1.65;
  font-size: var(--text-md);
}
.terms-page .terms-list li::before {
  content: '·';
  position: absolute;
  left: 8px;
  top: 0;
  color: var(--celeste-bright);
  font-weight: var(--weight-bold);
  font-size: 22px;
  line-height: 1;
}
.terms-page .terms-list--ol li {
  counter-increment: step;
  padding-left: 36px;
}
.terms-page .terms-list--ol li::before {
  content: counter(step);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: var(--weight-semibold);
  color: var(--celeste-bright);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  left: 0;
  top: 2px;
}
.terms-page .terms-p {
  color: var(--text);
  line-height: 1.7;
  font-size: var(--text-md);
  margin: 0 0 var(--space-4);
}
.terms-page .terms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
  margin: 0 0 var(--space-6);
}
.terms-page .terms-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}
.terms-page .terms-card:last-child {
  margin-bottom: 0;
}
.terms-page .terms-card__title {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--celeste-bright);
  margin-bottom: var(--space-3);
}
.terms-page .terms-card__body {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.6;
}
.terms-page code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--celeste-bright);
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ===================================================================
 * /en-vivo.html — partidos en vivo
 * =================================================================== */

.lv-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.lv-meta__updated {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--text-2);
  letter-spacing: 0.06em;
}

.lv-meta__btn {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.lv-empty {
  text-align: center;
  padding: var(--space-12) var(--space-5);
  border: 1px dashed var(--border);
  border-radius: var(--radius-3xl);
  background: var(--surface);
}

.lv-empty__icon {
  font-size: 48px;
  margin-bottom: var(--space-4);
  opacity: 0.6;
}

.lv-empty__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-3);
  color: var(--text);
}

.lv-empty__sub {
  font-size: var(--text-sm);
  color: var(--text-2);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

.lv-match {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-3xl);
  margin-bottom: var(--space-4);
  box-shadow: 0 8px 24px rgba(116, 172, 223, 0.08);
  overflow: hidden;
  transition: border-color 0.18s ease;
}

.lv-match[open] {
  border-color: var(--celeste);
}

.lv-match__summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-6) var(--space-7);
  outline: none;
  user-select: none;
  transition: background 0.18s ease;
}
.lv-match__summary::-webkit-details-marker { display: none; }
.lv-match__summary:hover {
  background: var(--surface-2);
}
.lv-match__summary:focus-visible {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 2px var(--celeste);
}

.lv-match__chevron {
  margin-left: var(--space-2);
  color: var(--text-3);
  font-size: 18px;
  line-height: 1;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), color 0.18s ease;
}
.lv-match[open] .lv-match__chevron {
  transform: rotate(180deg);
  color: var(--celeste-bright);
}

.lv-match__body {
  padding: 0 var(--space-7) var(--space-6);
  border-top: 1px solid var(--border);
  padding-top: var(--space-5);
}

.lv-match__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
}

.lv-match__dot {
  width: 10px;
  height: 10px;
  background: var(--celeste);
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px var(--celeste);
  animation: blink 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

.lv-match__label {
  color: var(--celeste-bright);
  font-weight: var(--weight-semibold);
}

.lv-match__group {
  color: var(--text-3);
  margin-left: auto;
}

.lv-match__teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-5);
  margin-bottom: 0;
  padding: var(--space-5) var(--space-3);
  border-radius: var(--radius-2xl);
  background: var(--surface-2);
}

.lv-match__team {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text);
}

.lv-match__teams .lv-match__team:first-child {
  text-align: right;
}

.lv-match__score {
  font-family: var(--font-sans);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--celeste-bright);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.lv-match__sep {
  color: var(--text-3);
  font-weight: var(--weight-regular);
  margin: 0 var(--space-2);
}

.lv-bucket {
  margin-bottom: var(--space-4);
}

.lv-bucket:last-child {
  margin-bottom: 0;
}

.lv-bucket__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--space-3);
}

.lv-bucket__title--exact { color: var(--gold); }
.lv-bucket__title--outcome { color: var(--success); }
.lv-bucket__title--miss { color: var(--text-3); }

.lv-bucket__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  color: inherit;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}

.lv-bucket__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.lv-bucket__chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  font-size: var(--text-sm);
  color: var(--text);
}

.lv-bucket__pred {
  color: var(--text-3);
  font-size: var(--text-xs);
}

.lv-bucket__empty {
  font-size: var(--text-sm);
  color: var(--text-3);
}

.lv-movers {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.lv-movers__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.lv-movers__name {
  font-weight: var(--weight-semibold);
  color: var(--text);
}

.lv-movers__pts {
  font-family: var(--font-sans);
  font-weight: var(--weight-semibold);
  color: var(--celeste-bright);
}

.lv-movers__total {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--text-2);
  letter-spacing: 0.06em;
}

@media (max-width: 640px) {
  .lv-match {
    padding: var(--space-5);
  }

  .lv-match__teams {
    grid-template-columns: 1fr;
    gap: var(--space-3);
    text-align: center;
  }

  .lv-match__teams .lv-match__team:first-child {
    text-align: center;
  }

  .lv-match__score {
    font-size: var(--text-2xl);
  }
}

