/* ============================================================
   WM-Tippspiel — Design System
   Premium · dunkel · sportlich · stilisierter Rasen
   ============================================================ */

/* Google Fonts are loaded via <link> in the layout head */

:root {
  /* — Pitch / surfaces — */
  --pitch-deep:   #05130c;
  --pitch-0:      #08200f;
  --pitch-1:      #0a2613;   /* mow stripe a */
  --pitch-2:      #0c2e17;   /* mow stripe b */
  --line:         rgba(233,255,238,0.16);
  --line-soft:    rgba(233,255,238,0.09);

  --surface:      rgba(9,26,16,0.72);
  --surface-2:    rgba(13,34,21,0.86);
  --surface-hi:   rgba(20,46,29,0.9);
  --hairline:     rgba(180,255,205,0.10);
  --hairline-2:   rgba(180,255,205,0.18);

  /* — Accents — */
  --accent:       #CFFB4D;   /* action / untipped / CTA  (energy)      */
  --accent-deep:  #9ad400;
  --accent-ink:   #11270a;   /* text on accent */
  --gold:         #ECC15B;   /* achievement / points / medals (prestige) */
  --gold-deep:    #b8893a;
  --silver:       #cdd6da;
  --bronze:       #d79a62;
  --live:         #ff5a4d;   /* live / urgent */

  /* — Text — */
  --ink:          #F2F7F0;
  --ink-2:        rgba(242,247,240,0.62);
  --ink-3:        rgba(242,247,240,0.38);

  /* — Type — */
  --display: 'Archivo', system-ui, sans-serif;
  --body:    'Hanken Grotesque', system-ui, sans-serif;

  /* — Geometry — */
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;
  --shadow: 0 18px 40px -18px rgba(0,0,0,0.7), 0 2px 0 rgba(255,255,255,0.02) inset;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  background: var(--pitch-deep);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
}

body {
  /* Centered column: full width on phones, max 480px on desktop */
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
}

/* ============================================================
   PITCH BACKGROUND
   ============================================================ */
.pitch-wrap {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100%;            /* NICHT inset:0 + left:50%: das uebrig bleibende
                             right:0 halbiert die Breite auf schmalen Screens */
  max-width: 480px;
  transform: translateX(-50%);
  overflow: hidden;
  background: var(--pitch-deep);
  z-index: 0;
}

/* mow stripes */
.pitch-stripes {
  position: absolute;
  inset: -20%;
  background:
    repeating-linear-gradient(
      180deg,
      var(--pitch-1) 0,
      var(--pitch-1) 64px,
      var(--pitch-2) 64px,
      var(--pitch-2) 128px
    );
  transition: transform .5s ease, background .4s ease;
}
[data-field="diagonal"] .pitch-stripes {
  transform: rotate(-18deg) scale(1.5);
  background:
    repeating-linear-gradient(
      180deg,
      var(--pitch-1) 0,
      var(--pitch-1) 58px,
      var(--pitch-2) 58px,
      var(--pitch-2) 116px
    );
}
[data-field="subtle"] .pitch-stripes {
  background:
    repeating-linear-gradient(
      180deg,
      var(--pitch-0) 0,
      var(--pitch-0) 90px,
      #092411 90px,
      #092411 180px
    );
  opacity: .5;
}

/* turf grain */
.pitch-grain {
  position: absolute;
  inset: 0;
  opacity: .5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* field line markings (vertical pitch) */
.pitch-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.pitch-lines path,
.pitch-lines circle,
.pitch-lines rect,
.pitch-lines line {
  fill: none;
  stroke: var(--line);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
[data-field="subtle"] .pitch-lines { opacity: .55; }
[data-field="diagonal"] .pitch-lines { opacity: .8; }

/* vignette + top glow for depth */
.pitch-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(120,255,150,0.10), transparent 55%),
    radial-gradient(140% 90% at 50% 110%, rgba(0,0,0,0.55), transparent 60%),
    linear-gradient(180deg, rgba(3,12,7,0.35), rgba(3,12,7,0.0) 22%, rgba(3,12,7,0.0) 70%, rgba(3,12,7,0.5));
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.app-main {
  position: relative;
  /* KEIN z-index hier: würde einen Stacking-Context bilden, in dem das
     Bottom-Sheet (z 80) die fixe Tab-Bar (z 40) nie überdecken kann */
  padding: 0 16px calc(90px + env(safe-area-inset-bottom));
  min-height: 100dvh;
}

/* ============================================================
   SCROLL AREA + LAYOUT
   ============================================================ */
.app-scroll {
  position: relative;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 2;
  padding: 56px 16px 112px;
  -webkit-overflow-scrolling: touch;
}
.app-scroll::-webkit-scrollbar { width: 0; }

/* status-bar safe heading row */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

/* ============================================================
   TYPE HELPERS
   ============================================================ */
.eyebrow {
  font-family: var(--display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.h-display {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
}
.tnum { font-variant-numeric: tabular-nums; }

/* ============================================================
   TOOLTIP  (gestyltes, einheitliches Hover/Tap-Hint, ersetzt title="")
   ------------------------------------------------------------
   Bubble wird per JS (tooltip_controller) an <body> gehängt und
   positioniert — daher hier nur das reine Aussehen + Transition.
   ============================================================ */
[data-controller~="tooltip"] { cursor: help; }
[data-controller~="tooltip"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.tooltip-bubble {
  position: fixed;
  z-index: 1000;
  max-width: min(260px, calc(100vw - 16px));
  padding: 7px 11px;
  background: var(--surface-hi);
  color: var(--ink);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  pointer-events: none;     /* Bubble fängt keine Maus-Events ab */
  opacity: 0;
  transform: translateY(4px) scale(0.98);
  transition: opacity 120ms ease, transform 120ms cubic-bezier(0.22, 1, 0.36, 1);
}
.tooltip-bubble--below {
  transform: translateY(-4px) scale(0.98);
}
.tooltip-bubble.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Pfeil — Position (left) setzt der Controller, hier nur die Form. */
.tooltip-arrow {
  position: absolute;
  bottom: -5px;             /* Standard: Bubble über dem Element → Pfeil unten */
  width: 9px; height: 9px;
  background: var(--surface-hi);
  border-right: 1px solid var(--hairline-2);
  border-bottom: 1px solid var(--hairline-2);
  transform: translateX(-50%) rotate(45deg);
}
.tooltip-bubble--below .tooltip-arrow {
  bottom: auto;
  top: -5px;                /* Bubble unter dem Element → Pfeil oben */
  border: 0;
  border-left: 1px solid var(--hairline-2);
  border-top: 1px solid var(--hairline-2);
}

@media (prefers-reduced-motion: reduce) {
  .tooltip-bubble { transition: opacity 80ms linear; transform: none; }
  .tooltip-bubble.is-visible { transform: none; }
}

/* ============================================================
   GLASS CARD
   ============================================================ */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--shadow);
}
.card-pad { padding: 16px; }

/* ============================================================
   TEAM BADGE
   ============================================================ */
.team-badge {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .02em;
  color: #fff;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.14), 0 6px 14px -6px rgba(0,0,0,0.6);
}

/* ============================================================
   PILLS / BADGES
   ============================================================ */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  font-family: var(--display);
  white-space: nowrap;
}
.pill-open    { background: var(--accent); color: var(--accent-ink); }
.pill-tipped  { background: rgba(207,251,77,0.12); color: var(--accent); border:1px solid rgba(207,251,77,0.3); }
.pill-closed  { background: rgba(242,247,240,0.08); color: var(--ink-2); }
.pill-inactive { background: rgba(242,247,240,0.06); color: var(--ink-2); border:1px solid rgba(242,247,240,0.12); }
.pill-live    { background: var(--live); color:#fff; }
.pill-scored  { background: rgba(236,193,91,0.14); color: var(--gold); border:1px solid rgba(236,193,91,0.35); }
.pill-danger  { background: rgba(219,39,119,0.12); color: #f472b6; border:1px solid rgba(219,39,119,0.32); }
/* Pills, die als Aktion (Link/Button) dienen: kein Link-Default, klickbar */
a.pill, button.pill { text-decoration: none; cursor: pointer; }
button.pill { appearance: none; }

/* Leaderboard-Phasen-Umschalter.
   Desktop: Pills (passen in die Zeile). Mobil (<=480px): natives Dropdown,
   damit die Auswahl sichtbar/entdeckbar ist statt horizontal weggescrollt. */
.lb-phase-switch {
  display: flex; align-items: center; gap: 8px;
  padding: 0 0 16px;
}
.lb-phase-pills { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lb-phase-pills .pill { flex: 0 0 auto; }

.lb-phase-select { display: none; flex: 1 1 auto; min-width: 0; }
.lb-phase-dropdown {
  width: 100%;
  height: 34px; padding: 0 34px 0 14px;
  border-radius: 999px;
  background: rgba(207,251,77,0.12);
  color: var(--accent);
  border: 1px solid rgba(207,251,77,0.3);
  font-family: var(--display); font-weight: 700; font-size: 13px;
  letter-spacing: .04em;
  cursor: pointer;
  appearance: none; -webkit-appearance: none;
  /* Chevron rechts (Akzentfarbe) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23CFFB4D' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.lb-phase-dropdown option { color: #111; }  /* native Menü-Liste: dunkler Text auf hell */

/* Umschaltung Desktop ⇄ Mobil */
@media (max-width: 480px) {
  .lb-phase-pills { display: none; }
  .lb-phase-select { display: block; }
}

.dot-live {
  width:7px;height:7px;border-radius:50%;background:#fff;
  box-shadow:0 0 0 0 rgba(255,255,255,.7);
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  0%{box-shadow:0 0 0 0 rgba(255,255,255,.6);}
  70%{box-shadow:0 0 0 6px rgba(255,255,255,0);}
  100%{box-shadow:0 0 0 0 rgba(255,255,255,0);}
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  appearance: none; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700;
  letter-spacing: .01em;
  border-radius: 14px;
  text-decoration: none;
  transition: transform .12s ease, filter .2s ease, background .2s ease;
}
/* Basis-Button ohne Variante (z. B. Link-Buttons) bekommt den Ghost-Look.
   Auch als Farbe für <a class="btn"> — Varianten (.btn-primary etc.) setzen
   ihre eigene color und werden hier bewusst NICHT überschrieben. */
.btn:not(.btn-primary):not(.btn-ghost):not(.btn-gold) {
  background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--hairline-2);
  height: 48px; font-size: 15px; padding: 0 18px;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  height: 52px; font-size: 16px; width: 100%;
  box-shadow: 0 10px 26px -10px rgba(207,251,77,0.7);
}
.btn-primary:disabled { background: rgba(242,247,240,0.12); color: var(--ink-3); box-shadow:none; cursor: default; }
.btn-ghost {
  background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--hairline-2);
  height: 48px; font-size: 15px;
}
.btn-gold {
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  color: #2a1d05;
}

/* ============================================================
   SCORE STEPPER
   ============================================================ */
.score-box {
  width: 62px; height: 76px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1.5px solid var(--hairline-2);
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 800;
  font-size: 38px; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.score-box.filled {
  border-color: var(--accent);
  background: rgba(207,251,77,0.08);
  box-shadow: 0 0 0 3px rgba(207,251,77,0.12), 0 8px 22px -10px rgba(207,251,77,0.4);
}
.score-sep { font-family: var(--display); font-weight:800; font-size: 30px; color: var(--ink-3); }

.stepper-btn {
  width: 38px; height: 34px; border-radius: 10px;
  background: var(--surface-hi);
  border: 1px solid var(--hairline-2);
  color: var(--ink); font-size: 20px; font-weight: 700;
  display: grid; place-items: center; cursor: pointer;
  transition: background .15s, transform .1s;
}
.stepper-btn:active { transform: scale(.9); background: var(--accent); color: var(--accent-ink); }

/* ============================================================
   BOTTOM NAV / TAB BAR
   ============================================================ */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: calc(480px - 24px);
  bottom: calc(12px + env(safe-area-inset-bottom));
  height: 66px;
  z-index: 40;
  border-radius: 22px;
  background: rgba(7,20,12,0.82);
  border: 1px solid var(--hairline-2);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  display: grid; grid-template-columns: repeat(4, 1fr);
  box-shadow: 0 20px 40px -18px rgba(0,0,0,0.8);
}
.nav-item {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  color: var(--ink-3); cursor: pointer;
  font-family: var(--display); font-weight: 700;
  font-size: 10px; letter-spacing: .04em; text-transform: uppercase;
  position: relative;
  text-decoration: none;
}
.nav-item.active { color: var(--accent); }
.nav-item.active::before {
  content:''; position:absolute; top:8px;
  width: 30px; height: 30px; border-radius: 10px;
  background: radial-gradient(circle, rgba(207,251,77,0.22), transparent 70%);
}
.nav-item.disabled { opacity: 0.4; cursor: default; }
.nav-item svg { width: 23px; height: 23px; }

/* ============================================================
   GROUP SWITCHER
   ============================================================ */
.group-chip {
  display:inline-flex; align-items:center; gap:9px;
  height: 40px; padding: 0 14px 0 8px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--hairline-2);
  cursor: pointer;
  color: var(--ink);
}
.avatar {
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 800;
  color: #fff; flex-shrink: 0;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.18);
}
img.avatar {
  display: block;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.18);
}

/* day divider */
.day-divider {
  display:flex; align-items:center; gap:12px;
  margin: 22px 2px 12px;
}
.day-divider .line { flex:1; height:1px; background: var(--hairline); }
.day-divider .lbl {
  font-family: var(--display); font-weight: 800;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-2);
}

/* sheet / modal */
.sheet-backdrop {
  position:fixed; inset:0; z-index:80;
  background: rgba(2,8,5,0.74);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display:flex; align-items:flex-end;
}
.sheet {
  width: 100%;
  max-width: 480px;   /* an die App-Spalte koppeln, nicht an den Viewport */
  margin: 0 auto;
  background: linear-gradient(180deg, var(--surface-hi), var(--surface-2));
  border-top: 1px solid var(--hairline-2);
  border-radius: 28px 28px 0 0;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 50px -10px rgba(0,0,0,0.7);
  animation: slideUp .34s cubic-bezier(.2,.9,.25,1);
  max-height: 92%;
  overflow-y: auto;
}
.sheet-grip { width:40px;height:5px;border-radius:99px;background:var(--hairline-2);margin:4px auto 14px; }
@keyframes fade { from{opacity:.35} to{opacity:1} }
@keyframes slideUp { from{transform:translateY(22px)} to{transform:translateY(0)} }

/* checkbox row for multi-group tip */
.check-row {
  display:flex; align-items:center; gap:12px;
  padding: 12px 14px; border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  cursor: pointer; transition: border-color .2s, background .2s;
  color: var(--ink);
}
.check-row.on { border-color: rgba(207,251,77,0.4); background: rgba(207,251,77,0.06); }
.check-box {
  width: 24px; height: 24px; border-radius: 8px;
  border: 2px solid var(--hairline-2);
  display:grid; place-items:center; flex-shrink:0;
  transition: background .15s, border-color .15s;
}
.check-row.on .check-box { background: var(--accent); border-color: var(--accent); }

/* dashboard bits */
.mini-empty {
  width: 26px; height: 32px; border-radius: 8px;
  border: 1.5px dashed var(--accent);
  background: rgba(207,251,77,0.06);
  display:grid; place-items:center;
  color: var(--accent); font-weight: 800; font-family: var(--display);
}
.count-badge {
  min-width: 24px; height: 24px; padding: 0 7px;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-family: var(--display); font-weight: 800; font-size: 13px;
  display: grid; place-items: center;
}
/* Offene-To-Dos-Zähler am Gruppen-Switcher (Chip + Sheet-Zeilen) */
.switcher-badge {
  min-width: 18px; height: 18px; padding: 0 5px; flex-shrink: 0;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-family: var(--display); font-weight: 800; font-size: 11px;
  display: inline-grid; place-items: center;
}
.link-btn {
  background: none; border: none; cursor: pointer;
  color: var(--ink-2); font-family: var(--display); font-weight: 700;
  font-size: 13px; display: inline-flex; align-items: center; gap: 4px;
}
.match-open { animation: glowPulse 2.4s ease-in-out infinite; }
@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(207,251,77,0.08), var(--shadow); }
  50%     { box-shadow: 0 0 0 5px rgba(207,251,77,0.18), var(--shadow); }
}
.open-strip {
  display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 6px;
  margin: 0 -16px; padding-left: 16px; padding-right: 16px;
  scroll-snap-type: x mandatory;
}
.open-strip::-webkit-scrollbar { height: 0; }
.open-card {
  flex: 0 0 auto; width: 150px; scroll-snap-align: start;
  background: linear-gradient(165deg, rgba(207,251,77,0.10), var(--surface-2));
  border: 1.5px solid rgba(207,251,77,0.34);
  border-radius: var(--r-md); padding: 12px; cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .14s ease;
}
.open-card:active { transform: scale(.97); }

/* tip entry glow */
.tip-pitch-glow {
  position:absolute; inset:0;
  background: radial-gradient(80% 120% at 50% 0%, rgba(207,251,77,0.10), transparent 60%);
  pointer-events:none;
}
.score-box.active-box {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(207,251,77,0.22);
}

/* Zahlen-Säulen */
.num-col {
  display:flex; flex-direction:column; gap:5px;
  max-height: 168px; overflow-y:auto;
  padding: 2px; scroll-snap-type: y mandatory;
}
.num-col::-webkit-scrollbar { width:0; }
.num-pick {
  width: 46px; height: 38px; flex-shrink:0; scroll-snap-align:center;
  border-radius: 10px; cursor:pointer;
  background: var(--surface-2); border:1px solid var(--hairline);
  color: var(--ink-2); font-family: var(--display); font-weight:800; font-size:20px;
  font-variant-numeric: tabular-nums;
}
.num-pick.sel {
  background: var(--accent); color: var(--accent-ink);
  border-color: var(--accent); transform: scale(1.04);
  box-shadow: 0 6px 16px -6px rgba(207,251,77,0.6);
}

/* Tastenfeld */
.keypad {
  display:grid; grid-template-columns: repeat(3,1fr); gap:9px;
}
.key {
  height: 52px; border-radius: 14px; cursor:pointer;
  background: var(--surface-2); border:1px solid var(--hairline-2);
  color: var(--ink); font-family: var(--display); font-weight:800; font-size:24px;
  font-variant-numeric: tabular-nums;
  display:grid; place-items:center;
  transition: transform .1s, background .15s;
}
.key:active { transform: scale(.94); background: var(--accent); color: var(--accent-ink); }
.key-fn { background: rgba(242,247,240,0.05); color: var(--ink-2); font-size:18px; }

/* Formularfelder */
.field-label {
  display:block; font-family: var(--display); font-weight:700; font-size:12px;
  letter-spacing:.04em; text-transform:uppercase; color: var(--ink-3);
  margin-bottom:8px;
}
.field {
  width:100%; height:50px; border-radius:14px; padding:0 16px;
  background: var(--surface-2); border:1.5px solid var(--hairline-2);
  color: var(--ink); font-family: var(--body); font-size:16px; font-weight:600;
  outline:none; transition: border-color .2s, box-shadow .2s;
}
.field::placeholder { color: var(--ink-3); }
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(207,251,77,0.14); }

/* "Remember me"-Zeile im Login */
.remember-row {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--body); font-size: 14px; font-weight: 600; color: var(--ink-2);
  cursor: pointer; user-select: none;
}
.remember-check {
  width: 18px; height: 18px; flex-shrink: 0;
  accent-color: var(--accent); cursor: pointer;
}

.comp-card {
  display:flex; align-items:center; gap:12px;
  padding:12px; border-radius:16px;
  background: rgba(207,251,77,0.06); border:1.5px solid rgba(207,251,77,0.3);
}
.rule-pill {
  flex:1; height:44px; border-radius:13px; cursor:pointer;
  background: var(--surface-2); border:1px solid var(--hairline-2);
  color: var(--ink-2); font-family: var(--display); font-weight:700; font-size:14px;
}
.rule-pill.sel { background: rgba(207,251,77,0.12); border-color: var(--accent); color: var(--accent); }
.rules-detail {
  margin-top:10px; font-size:12px; color:var(--ink-3); text-align:center;
  font-variant-numeric: tabular-nums; letter-spacing:.02em;
}

.invite-box {
  display:flex; align-items:center; gap:10px;
  padding:12px 12px 12px 14px; border-radius:16px;
  background: var(--surface-2); border:1.5px solid var(--hairline-2);
}
.copy-btn {
  width:38px; height:38px; border-radius:11px; flex-shrink:0; cursor:pointer;
  background: var(--accent); color: var(--accent-ink); border:none;
  display:grid; place-items:center;
}

/* leaderboard row */
.lb-row {
  display:flex; align-items:center; gap:12px;
  padding:11px 14px;
}
.lb-me {
  border-color: rgba(207,251,77,0.45) !important;
  background: rgba(207,251,77,0.07) !important;
}
/* Eigene Zeile während der Rang-Animation (rank_shift_controller) hervorheben */
.rank-shift-me .lb-row {
  box-shadow: 0 10px 26px rgba(207,251,77,0.22), 0 0 0 2px rgba(207,251,77,0.5) !important;
  transition: box-shadow .3s ease;
}

/* Antippbare Übersichtszahl → öffnet das Breakdown-Sheet */
.stat-tap {
  display: inline-block; cursor: pointer;
  border-radius: 12px; padding: 4px 8px; margin: -4px -8px;
  transition: background .15s, transform .1s;
}
.stat-tap:hover { background: rgba(255,255,255,0.05); }
.stat-tap:active { transform: scale(0.97); }

/* Antippbares Award-Badge auf der Profilseite */
.award-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--hairline);
  color: var(--ink-2); font-family: var(--display); font-weight: 700; font-size: 12.5px;
  text-decoration: none; cursor: pointer; transition: border-color .15s, transform .1s;
}
.award-chip:hover { border-color: rgba(207,251,77,0.4); }
.award-chip:active { transform: scale(0.97); }

/* Antippbare Activity-Feed-Zeile → öffnet Detail/Sheet */
.activity-tap:hover { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--hairline-2); }
.activity-tap:active { opacity: .6; }

/* ——— Login-Recap (flashy Punkte-Sequenz) ——— */
.recap {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 28px 22px calc(28px + env(safe-area-inset-bottom));
  /* Ruhige Stadion-Nacht: dunkler Verlauf + dezente LED-Punktmatrix unten. */
  background:
    radial-gradient(rgba(180,255,205,0.045) 1px, transparent 1.4px) 0 0 / 16px 16px,
    linear-gradient(180deg, #020805 0%, var(--pitch-deep, #05130c) 55%, #07150d 100%);
  overflow: hidden;
  animation: recapIn .32s ease;
}
.recap.recap-out { animation: recapOut .26s ease forwards; }
@keyframes recapIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes recapOut { to { opacity: 0; } }

/* Stadion-Kulisse: zwei ruhige Flutlicht-Streben oben, statt des alten Pulsier-Glows. */
.recap-stadium { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.recap-floodlight {
  position: absolute; top: -28%; width: 60vw; height: 95vh;
  background: linear-gradient(180deg, rgba(207,251,77,0.10), transparent 70%);
  filter: blur(8px); opacity: 0; transform-origin: top center;
}
.recap-floodlight--l { left: -8%;  transform: rotate(14deg);  animation: recapLight .9s ease-out .15s forwards; }
.recap-floodlight--r { right: -8%; transform: rotate(-14deg); animation: recapLight .9s ease-out .30s forwards; }
@keyframes recapLight { from { opacity: 0; } to { opacity: 1; } }

.recap-inner {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px; text-align: center;
}

/* Anzeigetafel-Panel um den Punktestand */
.recap-board {
  position: relative;
  background: linear-gradient(180deg, rgba(6,18,11,0.92), rgba(3,10,6,0.92));
  border: 1px solid var(--hairline-2);
  border-radius: 20px;
  padding: 22px 20px 20px;
  margin-bottom: 22px;
  box-shadow: 0 18px 50px -18px rgba(0,0,0,0.7), inset 0 1px 0 rgba(180,255,205,0.06);
}
.recap-board::before {
  /* feine LED-Rasterung auf der Tafel */
  content: ""; position: absolute; inset: 0; border-radius: 20px; pointer-events: none;
  background: radial-gradient(rgba(207,251,77,0.05) 1px, transparent 1.3px) 0 0 / 9px 9px;
  opacity: .7;
}
.recap-eyebrow {
  font-family: var(--display); font-weight: 800; font-size: 12px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
  opacity: .9; margin-bottom: 6px;
}
.recap-points {
  position: relative;
  font-family: var(--display); font-weight: 900; line-height: 1;
  font-size: clamp(72px, 26vw, 116px);
  font-variant-numeric: tabular-nums; letter-spacing: .01em;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(207,251,77,0.45), 0 0 2px rgba(207,251,77,0.6);
  animation: recapPop .55s cubic-bezier(.2,1.1,.3,1) both;
}
.recap-plus { color: var(--accent); opacity: .85; }
@keyframes recapPop { 0% { transform: scale(.72); opacity: 0; }
                      100% { transform: scale(1); opacity: 1; } }
.recap-points-unit {
  font-family: var(--display); font-weight: 800; font-size: 16px;
  color: var(--ink-2); text-transform: uppercase; letter-spacing: .18em;
  margin-top: 6px;
}

.recap-todo {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  margin-top: 18px; padding: 11px 16px; border-radius: 14px;
  background: rgba(236,193,91,0.12); border: 1px solid rgba(236,193,91,0.35);
  color: var(--gold); font-family: var(--display); font-weight: 700; font-size: 13px;
  line-height: 1.35; text-align: center;
}

.recap-rank {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--display); font-weight: 800; font-size: 15px;
  color: var(--accent); background: rgba(207,251,77,0.12);
  border: 1px solid rgba(207,251,77,0.3); border-radius: 999px;
  padding: 7px 16px; margin-bottom: 18px;
}
.recap-rank-up { font-size: 12px; }

.recap-prize {
  display: flex; align-items: center; gap: 12px; justify-content: center;
  margin-bottom: 18px; padding: 13px 18px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(236,193,91,0.22), rgba(236,193,91,0.10));
  border: 1px solid rgba(236,193,91,0.5);
  box-shadow: 0 0 24px -8px rgba(236,193,91,0.5);
}
.recap-prize-emoji { font-size: 26px; line-height: 1; flex-shrink: 0; }
.recap-prize-text {
  font-family: var(--display); font-weight: 800; font-size: 14.5px;
  color: var(--gold); line-height: 1.35; text-align: left;
}

.recap-list { display: flex; flex-direction: column; gap: 8px; }
.recap-row {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--hairline);
  border-radius: 14px; padding: 11px 14px;
}
.recap-match { flex: 1; text-align: left; font-family: var(--display); font-weight: 700; font-size: 14px; }
.recap-score { font-family: var(--display); font-weight: 800; color: var(--ink-2); font-size: 14px; }
.recap-gain  { font-family: var(--display); font-weight: 900; color: var(--accent); font-size: 16px; min-width: 34px; text-align: right; }

.recap-awards { margin-top: 18px; }
.recap-awards-label {
  font-family: var(--display); font-weight: 800; font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px;
}
.recap-awards-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.recap-award-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 13px; border-radius: 999px;
  background: rgba(236,193,91,0.14); border: 1px solid rgba(236,193,91,0.4);
  color: var(--gold); font-family: var(--display); font-weight: 800; font-size: 13px;
}

.recap-continue {
  width: 100%; margin-top: 26px;
  background: var(--accent); color: var(--accent-ink, #061a10);
  font-family: var(--display); font-weight: 800; font-size: 16px;
  border: none; border-radius: 16px; padding: 15px; cursor: pointer;
  box-shadow: 0 10px 30px -6px rgba(207,251,77,0.5);
}
.recap-continue:active { transform: scale(.98); }

/* ——— Stern-Streak (letzte 5 Spiele als Medaillen-Sterne) ——— */
.recap-streak { margin: 4px 0 20px; }
.streak-stars {
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.streak-star {
  --star-fill: #1a2a20;            /* leer: dunkles Slot-Innere */
  --star-edge: rgba(180,255,205,0.16);
  --star-glow: transparent;
  position: relative; width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
}
@media (max-width: 360px) { .streak-star { width: 40px; height: 40px; gap: 8px; } }

/* Gefüllte Stufen: metallische Verläufe + passender Glow. */
.streak-star.is-filled.streak-star--bronze {
  --star-fill: linear-gradient(150deg, #efb079 0%, #c7763a 48%, #9c531f 100%);
  --star-edge: rgba(238,165,110,0.55); --star-glow: rgba(215,154,98,0.55);
}
.streak-star.is-filled.streak-star--silver {
  --star-fill: linear-gradient(150deg, #ffffff 0%, #d6dee3 46%, #9fabb2 100%);
  --star-edge: rgba(230,238,242,0.6); --star-glow: rgba(205,214,218,0.55);
}
.streak-star.is-filled.streak-star--gold {
  --star-fill: linear-gradient(150deg, #fff0bd 0%, #f0c95a 46%, #cf9a2c 100%);
  --star-edge: rgba(255,225,140,0.7); --star-glow: rgba(236,193,91,0.7);
}

/* Stern-Silhouette via clip-path; Glow als weicher Schein dahinter. */
.streak-star-shape, .streak-star-shine, .streak-star-glow {
  position: absolute; inset: 3px;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%,
                     50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.streak-star-shape {
  background: var(--star-fill);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.25), inset 0 -2px 4px rgba(0,0,0,0.35);
  border: 0;
  outline: 1px solid var(--star-edge);
  transition: background .25s ease;
}
.streak-star-glow {
  inset: -4px;
  background: radial-gradient(circle, var(--star-glow) 0%, transparent 65%);
  opacity: 0; transition: opacity .3s ease; clip-path: none; border-radius: 50%;
  filter: blur(3px);
}
.streak-star.is-filled .streak-star-glow { opacity: 1; }

/* Diagonaler Glanz-Sweep beim Füllen. */
.streak-star-shine {
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,0.92) 50%, transparent 62%);
  transform: translateX(-130%); opacity: 0;
}
.streak-star.is-pop .streak-star-shine { animation: streakShine .6s ease-out .05s; }
@keyframes streakShine {
  0%   { transform: translateX(-130%); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translateX(130%); opacity: 0; }
}

/* Pop beim Füllen eines gewerteten Sterns. */
.streak-star.is-pop { animation: streakPop .5s cubic-bezier(.2,1.3,.35,1) both; }
@keyframes streakPop {
  0%   { transform: scale(.5); }
  55%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* Komplette Serie: gemeinsames Pulsieren + Banner. */
.streak-complete .streak-star { animation: streakBeat 1.1s ease-in-out infinite; }
.streak-complete .streak-star:nth-child(2) { animation-delay: .08s; }
.streak-complete .streak-star:nth-child(3) { animation-delay: .16s; }
.streak-complete .streak-star:nth-child(4) { animation-delay: .24s; }
.streak-complete .streak-star:nth-child(5) { animation-delay: .32s; }
@keyframes streakBeat {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 transparent); }
  50%      { transform: scale(1.08); filter: drop-shadow(0 0 8px var(--star-glow)); }
}

.streak-banner {
  margin: 14px auto 0; max-width: max-content;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 999px;
  font-family: var(--display); font-weight: 900; font-size: 14px;
  letter-spacing: .04em; text-transform: uppercase;
  background: rgba(236,193,91,0.14); border: 1px solid var(--star-edge, var(--gold));
  color: var(--gold);
  box-shadow: 0 0 24px -4px var(--star-glow, rgba(236,193,91,0.5));
  animation: streakBannerIn .5s cubic-bezier(.2,1.2,.3,1) both;
}
.streak-banner::before { content: "🔥"; }
.streak-banner--bronze { color: #e8a06a; background: rgba(215,154,98,0.16); border-color: rgba(215,154,98,0.5); }
.streak-banner--silver { color: #e6eef2; background: rgba(205,214,218,0.16); border-color: rgba(205,214,218,0.5); }
.streak-banner--gold   { color: var(--gold); background: rgba(236,193,91,0.16); border-color: rgba(236,193,91,0.55); }
@keyframes streakBannerIn {
  0%   { opacity: 0; transform: translateY(8px) scale(.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Reveal-Übergang für Rang/Partien/Awards/Button */
.recap-reveal, .recap-continue { opacity: 0; transform: translateY(14px); }
.recap-reveal-in { opacity: 1; transform: translateY(0); transition: opacity .35s ease, transform .35s cubic-bezier(.2,1,.3,1); }

@media (prefers-reduced-motion: reduce) {
  .recap, .recap-points { animation: none; }
  .recap-floodlight { animation: none; opacity: 1; }
  .recap-reveal, .recap-continue { opacity: 1; transform: none; }
  .streak-star.is-pop, .streak-star-shine, .streak-complete .streak-star, .streak-banner { animation: none; }
}
.legend-chip {
  display:inline-flex; align-items:center; gap:7px;
  height:32px; padding:0 12px; border-radius:999px; cursor:pointer;
  background: var(--surface-2); border:1px solid var(--hairline);
  color: var(--ink-2); font-family: var(--display); font-weight:700; font-size:12px;
  transition: opacity .15s;
}
.legend-chip.off { opacity:.45; }
.legend-chip.me { border-color: rgba(207,251,77,0.4); color: var(--accent); cursor:default; }

/* toast */
.toast {
  position: fixed;
  left: 50%; bottom: 92px; transform: translateX(-50%);
  z-index: 120;
  display: flex; align-items: center; gap: 10px;
  max-width: 90%;
  padding: 11px 16px 11px 11px;
  border-radius: 999px;
  background: rgba(7,20,12,0.92);
  border: 1px solid var(--hairline-2);
  backdrop-filter: blur(16px);
  color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 16px 36px -12px rgba(0,0,0,0.7);
  animation: toastIn .3s cubic-bezier(.2,.9,.25,1);
}
@keyframes toastIn { from{opacity:0; transform:translate(-50%, 12px)} to{opacity:1; transform:translate(-50%,0)} }

.celebration-toast {
  background: var(--surface-hi);
  border-color: var(--accent);
  font-family: var(--display);
  font-weight: 700;
}

/* fade-in helper */
.fade-in { animation: fadeIn .4s ease; }
@keyframes fadeIn { from{transform: translateY(7px)} to{transform:none} }

/* ============================================================
   MATCH TIMELINE
   ============================================================ */
.day-section {
  margin-bottom: 8px;
}

/* match card */
.match-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 8px;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--shadow);
  transition: border-color .2s;
}

/* untipped upcoming match — accent border + glow pulse */
.match-card.match-open {
  border-color: rgba(207,251,77,0.45);
  background: linear-gradient(180deg, rgba(207,251,77,0.06), var(--surface));
  animation: glowPulse 2.4s ease-in-out infinite;
}

/* started/finished match — stretched link onto the detail page */
.match-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.match-card .team-col {
  position: relative;
  z-index: 2; /* keep team links clickable above the stretched link */
}
.match-card.match-linked:hover {
  border-color: var(--hairline-2);
}
.match-chevron {
  color: var(--ink-3);
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
}

.match-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.match-time {
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.match-round {
  font-family: var(--display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  flex: 1;
}

.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.match-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.match-score {
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

/* team badge column */
.team-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 60px;
}

.team-crest {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.team-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60px;
}

/* score inputs in tip form */
.score-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  position: relative;
  z-index: 2; /* Tippfelder bleiben ueber dem Karten-Stretched-Link bedienbar */
}

.score-input {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1.5px solid var(--hairline-2);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  /* hide native spinners */
  -moz-appearance: textfield;
  appearance: textfield;
}
.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.score-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(207,251,77,0.18);
}
.score-input.score-input--filled {
  border-color: rgba(207,251,77,0.5);
  background: rgba(207,251,77,0.07);
}

/* saved indicator */
.tip-saved {
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
  color: var(--accent);
  margin-left: 4px;
}

/* ============================================================
   RESPONSIVE DESKTOP BREAKPOINTS
   ============================================================ */

/* ── 768px+ — tablet / small desktop ─────────────────────── */
@media (min-width: 768px) {
  /* 1. Wider column */
  body {
    max-width: 760px;
  }
  .pitch-wrap {
    max-width: 760px;
  }
  .bottom-nav {
    max-width: calc(520px - 24px);
  }
  .sheet {
    max-width: 760px;
  }

  /* 2. Match timeline — 2-column grid inside each day section */
  .day-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
  }
  /* Day heading (day-divider) spans both columns */
  .day-section .day-divider {
    grid-column: 1 / -1;
    margin: 10px 0 4px;
  }
  /* Cards no longer need bottom margin — gap handles spacing */
  .day-section .match-card {
    margin-bottom: 0;
  }

  /* 3. Dashboard — Nächste Spiele 2-column grid */
  .next-matches-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .next-matches-grid .match-card {
    margin-bottom: 0;
  }

  /* 4. Leaderboard — more horizontal breathing room */
  .lb-row {
    padding: 11px 20px;
  }

  /* 5. Typography scale-up */
  .h-display[style*="font-size: 28px"],
  .h-display[style*="font-size:28px"] {
    font-size: 32px !important;
  }
  .h-display[style*="font-size: 26px"],
  .h-display[style*="font-size:26px"] {
    font-size: 30px !important;
  }

  /* Main content area — more horizontal padding */
  .app-main {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* ── Hover states (pointer devices only) ─────────────────── */
@media (hover: hover) {
  .match-card:hover {
    border-color: var(--hairline-2);
    background: var(--surface-hi);
    transition: border-color .2s, background .2s;
  }
  .match-card.match-open:hover {
    border-color: rgba(207,251,77,0.65);
    background: linear-gradient(180deg, rgba(207,251,77,0.10), var(--surface-hi));
  }

  .lb-row:hover {
    border-color: var(--hairline-2);
    background: var(--surface-hi);
    transition: border-color .18s, background .18s;
  }

  .check-row:hover {
    border-color: var(--hairline-2);
    background: var(--surface-hi);
  }

  .group-chip:hover {
    border-color: var(--hairline-2);
    background: var(--surface-hi);
    transition: border-color .18s, background .18s;
  }

  .nav-item:hover {
    color: var(--ink);
    transition: color .15s;
  }
  .nav-item.active:hover {
    color: var(--accent);
  }

  .btn:hover {
    filter: brightness(1.05);
  }
  .btn-primary:disabled:hover {
    filter: none;
  }
}

/* ── 1100px+ — wide desktop ───────────────────────────────── */
@media (min-width: 1100px) {
  body {
    max-width: 880px;
  }
  .pitch-wrap {
    max-width: 880px;
  }
  .sheet {
    max-width: 880px;
  }

  /* Match grid stays 2 columns, just bigger gap */
  .day-section {
    gap: 18px;
  }
  .next-matches-grid {
    gap: 18px;
  }
}

/* ============================================================
   LEGAL PAGES PROSE
   ============================================================ */
.legal {
  color: var(--ink-2);
  line-height: 1.6;
}
.legal h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 22px 0 8px;
}
.legal h2:first-of-type {
  margin-top: 8px;
}
.legal h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  margin: 16px 0 6px;
}
.legal p {
  margin: 0 0 10px;
  font-size: 14px;
}
.legal ul {
  margin: 0 0 10px;
  padding-left: 20px;
  font-size: 14px;
}
.legal li {
  margin-bottom: 4px;
}
.legal a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.flash {
  margin: 12px 0;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  background: var(--surface-2);
  border: 1px solid var(--hairline-2);
  color: var(--ink);
}
.flash-notice {
  border-color: rgba(207,251,77,0.3);
  background: rgba(207,251,77,0.08);
  color: var(--accent);
}
.flash-alert {
  border-color: rgba(255,90,77,0.3);
  background: rgba(255,90,77,0.08);
  color: var(--live);
}

/* ============================================================
   LOGIN INTRO (Video-Hero + Logo-Choreo)
   ============================================================ */
.login-video {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100%;            /* siehe .pitch-wrap: kein inset + left-Override */
  max-width: 480px;
  transform: translateX(-50%);
  overflow: hidden;
  z-index: 1; /* über Pitch (0), unter Inhalt (2) */
}
.login-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.login-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(3,12,7,0.78),
    rgba(3,12,7,0.30) 34%,
    rgba(3,12,7,0.45) 68%,
    rgba(5,19,12,0.92));
}
@media (min-width: 768px)  { .login-video { max-width: 760px; } }
@media (min-width: 1100px) { .login-video { max-width: 880px; } }

/* Logo fällt mit Bounce von oben ein */
@keyframes logoDrop {
  0%   { transform: translateY(-130%); opacity: 0; }
  60%  { transform: translateY(6%);   opacity: 1; }
  80%  { transform: translateY(-2.5%); }
  100% { transform: translateY(0); }
}
.logo-drop { animation: logoDrop .95s cubic-bezier(.22, 1.1, .36, 1) both; }

/* Ball fällt, prallt zweimal auf und bleibt liegen */
@keyframes ballDrop {
  0%   { transform: translateY(-55vh) rotate(-200deg); opacity: 0; }
  50%  { transform: translateY(0) rotate(0deg); opacity: 1; }
  66%  { transform: translateY(-30px) rotate(45deg); }
  80%  { transform: translateY(0) rotate(85deg); }
  90%  { transform: translateY(-9px) rotate(105deg); }
  100% { transform: translateY(0) rotate(115deg); }
}
.login-ball {
  display: inline-block;
  font-size: .62em;
  vertical-align: .06em;
  animation: ballDrop 1.5s cubic-bezier(.3, .6, .35, 1) .25s both;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.5));
}

/* Gestaffeltes Einblenden der restlichen Elemente */
@keyframes riseIn {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.login-stagger            { animation: riseIn .55s ease both; }
.login-stagger--badge     { animation-delay: .85s; }
.login-stagger--subtitle  { animation-delay: 1.0s; }
.login-stagger--invite    { animation-delay: 1.12s; }
.login-stagger--actions   { animation-delay: 1.2s; }

@media (prefers-reduced-motion: reduce) {
  .login-video video { display: none; }
  .login-video { background: url("/assets/intro-poster-10a53390.jpg") center / cover no-repeat; }
  .logo-drop, .login-ball, .login-stagger { animation: none \!important; }
}

/* Sound-Toggle auf der Login-Seite */
.sound-toggle {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--hairline-2);
  background: rgba(9,26,16,0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ink);
  font-size: 17px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.sound-toggle:hover { border-color: rgba(207,251,77,0.4); }
[data-controller="sound"].sound-on .sound-toggle {
  border-color: rgba(207,251,77,0.55);
  background: rgba(207,251,77,0.12);
}
@media (min-width: 768px) {
  .sound-toggle { right: calc(50% - 380px + 16px); }
}
@media (min-width: 1100px) {
  .sound-toggle { right: calc(50% - 440px + 16px); }
}

/* Bonus question select */
.bonus-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  padding: 12px 40px 12px 14px;
  background: var(--surface-2);
  border: 1.5px solid var(--hairline-2);
  border-radius: 12px;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23CFFB4D' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.bonus-select:focus { outline: none; border-color: rgba(207,251,77,0.55); }
.bonus-select option { background: #0d2215; color: var(--ink); }

/* Datei-Upload-Feld (z. B. Preis-Bild): nativen Button an das Theme anpassen */
.file-input {
  width: 100%;
  font-family: var(--body);
  font-size: 14px;
  color: var(--ink-3);
}
.file-input::file-selector-button {
  appearance: none;
  margin-right: 12px;
  padding: 9px 16px;
  border: 1px solid var(--hairline-2);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.file-input::file-selector-button:hover {
  border-color: rgba(207,251,77,0.55);
}

/* Avatar-Upload im Profil: Klick auf den Avatar öffnet die Dateiauswahl */
.avatar-upload-btn {
  position: relative;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-block;
}
.avatar-pencil {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  border: 3px solid var(--pitch-deep);
  display: grid;
  place-items: center;
  transition: transform .15s ease;
}

/* Attention-pulse: subtle glow animation for the due-today banner */
@keyframes attention-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(207, 251, 77, 0.0); }
  50%       { box-shadow: 0 0 0 6px rgba(207, 251, 77, 0.18); }
}
.attention-pulse {
  animation: attention-pulse 2.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .attention-pulse { animation: none; }
}
.avatar-upload-btn:hover .avatar-pencil { transform: scale(1.12); }

/* ── WM-Recap ("Wrapped") — self-contained dark event look ─────────── */
/* The recap is a full-bleed takeover. The app caps `body` at max-width:880px
   on wide screens (see the 1100px+ block above) and centers it — that would
   pin the recap to a left-of-centre 880px column. Override to full width so
   every slide truly spans and centres in the viewport. !important beats the
   media-query body rule regardless of source order. */
.wrapped-body {
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
  background: #07100b; color: #f4fff2;
}
.wrapped {
  height: 100dvh; overflow-y: scroll; scroll-snap-type: y mandatory;
  scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
}
.wrapped-slide {
  position: relative;
  height: 100dvh; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 56px 24px 40px; gap: 18px;
  background: radial-gradient(120% 120% at 50% 0%, #0d2419 0%, #07100b 70%);
}
/* Keep the content block itself centered and readable on wide laptop screens. */
.wrapped-slide > * { max-width: 640px; margin-inline: auto; }
.wrapped-h1 { font-size: clamp(28px, 8vw, 56px); font-weight: 800; margin: 0; }
.wrapped-h2 { font-size: clamp(20px, 6vw, 34px); font-weight: 700; margin: 0; color: #cffb4d; }
.wrapped-big { font-size: clamp(22px, 6vw, 40px); font-weight: 700; max-width: 18ch; margin: 0; }
.wrapped-sub { font-size: clamp(15px, 4vw, 20px); color: #b6d8bf; margin: 0; }
.wrapped-note { font-size: 14px; color: #8fb79a; margin: 0; }
.wrapped-counter { font-size: clamp(64px, 22vw, 160px); font-weight: 900; color: #cffb4d; line-height: 1; }
.wrapped-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: clamp(16px, 4.5vw, 22px); }
.wrapped-list li { display: flex; align-items: center; gap: 10px; }
.wrapped-bar { display: inline-block; width: 42px; height: 8px; border-radius: 4px; background: #cffb4d; }
.wrapped-finale { background: radial-gradient(120% 120% at 50% 50%, #123a26 0%, #07100b 75%); }
.wrapped-share {
  margin-top: 12px; padding: 12px 28px; border: none; border-radius: 999px;
  background: #cffb4d; color: #07100b; font-weight: 700; font-size: 16px; cursor: pointer;
}
.wrapped-successor {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}

/* Story-style progress bars (Instagram/Spotify Wrapped): one segment per
   slide, fixed across the top. The active segment fills over the slide's
   auto-advance duration; passed segments are full, upcoming ones empty.
   The controller injects these and drives the fill width inline. */
.wrapped-progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; gap: 4px; padding: 10px 12px;
  padding-top: max(10px, env(safe-area-inset-top));
}
.wrapped-progress-seg {
  flex: 1; height: 3px; border-radius: 2px;
  background: rgba(244, 255, 242, 0.22); overflow: hidden;
}
.wrapped-progress-seg > span {
  display: block; height: 100%; width: 0%; border-radius: 2px;
  background: #cffb4d;
}

/* Subtle "tap / scroll to continue" hint on the first slide, so the
   interaction is discoverable even before the first auto-advance fires. */
.wrapped-hint {
  position: absolute; bottom: max(24px, env(safe-area-inset-bottom));
  left: 0; right: 0; text-align: center;
  font-size: 13px; color: #8fb79a; pointer-events: none;
  animation: wrapped-hint-pulse 2s ease-in-out infinite;
}
@keyframes wrapped-hint-pulse {
  0%, 100% { opacity: 0.35; transform: translateY(0); }
  50%      { opacity: 0.9;  transform: translateY(3px); }
}

@media (prefers-reduced-motion: reduce) {
  .wrapped { scroll-behavior: auto; }
  .wrapped-hint { animation: none; opacity: 0.6; }
}

/* Safety net: reveal/counter/bar content is visible by DEFAULT so that if
   JS never runs at all (gsap fails to load, controller never connects),
   the recap is still readable. The controller adds `wrapped-animated` to
   the root element on connect() — only then does GSAP's `.from()` tween
   own the hidden→visible transition (and its own stall-safety timer in
   wrapped_controller.js guarantees a reveal even if the rAF ticker stalls
   mid-animation). Without `wrapped-animated`, these rules always win. */
.wrapped-slide [data-wrapped-target="reveal"],
.wrapped-slide [data-wrapped-target="counter"] {
  opacity: 1;
  visibility: visible;
}
.wrapped-slide [data-wrapped-bar] {
  transform: none;
}
