/* ============================================================
   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; }

/* ============================================================
   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-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); }

.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;
  font-family: var(--display); font-weight: 700;
  letter-spacing: .01em;
  border-radius: 14px;
  transition: transform .12s ease, filter .2s ease, background .2s ease;
}
.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);
}

/* 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;
}
.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); }

.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;
}
.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)} }

/* 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 {
  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;
}

.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;
}

.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("/videos/intro-poster.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); }
}
