:root {
  --bg: #f4f6f3;
  --surface: #ffffff;
  --surface-2: #eef2ec;
  --text: #17201a;
  --muted: #5d6b61;
  --line: #dde3db;
  --accent: #1f7a3d;
  --accent-soft: #e2f1e6;
  --live: #c62828;
  --today: #1f7a3d;
  --brand: #1f7a3d;
  --away: #2f6fd6;
  --away-soft: #e3ecfb;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 2px 8px rgba(0, 0, 0, .04);
  color-scheme: light;
}

/* Nur helles Design (Panel-Look, siehe docs/design/DESIGN.md) – kein Dunkelmodus mehr. */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); }

/* Grüne App-Leiste oben. Am iPhone liegt die Statusleiste darüber (Abstand über safe-area). */
header.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right)) 12px calc(20px + env(safe-area-inset-left));
  background: var(--brand);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .12);
}
header.top h1 { font-size: 18px; margin: 0; }
header.top nav { display: flex; align-items: center; gap: 14px; }
header.top nav a { text-decoration: none; font-size: 14px; color: rgba(255, 255, 255, .78); }
header.top nav a:hover { color: #fff; }
header.top nav a[hidden] { display: none; }
header.top .lang { border-color: rgba(255, 255, 255, .35); }
header.top .lang button { background: transparent; color: rgba(255, 255, 255, .8); }
header.top .lang button + button { border-left-color: rgba(255, 255, 255, .35); }
header.top .lang button.on { background: #fff; color: var(--brand); }

.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang button {
  border: 0; border-radius: 0; padding: 4px 9px; font-size: 12.5px; font-weight: 600;
  background: var(--surface); color: var(--muted);
}
.lang button + button { border-left: 1px solid var(--line); }
.lang button.on { background: var(--accent); color: #fff; }

main { max-width: 1200px; margin: 0 auto; padding: 20px 16px 48px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

button, .btn {
  font: inherit;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
}
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button:disabled { opacity: .5; cursor: default; }

input[type=text], input[type=password] {
  font: inherit;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.muted { color: var(--muted); }
.notice { padding: 14px 16px; margin-bottom: 16px; }
.notice.warn { border-color: #e0b84a; }

/* ---------- Kalender ---------- */

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.toolbar h2 { margin: 0 8px; font-size: 20px; min-width: 170px; text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip {
  font-size: 13px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
}
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }

.month { overflow: hidden; }
.weekdays, .grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekdays div {
  padding: 8px; font-size: 12px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line);
}
.day {
  min-height: 104px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  cursor: pointer; text-align: left; background: none; border-radius: 0; border-top: 0; border-left: 0;
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.day:nth-child(7n) { border-right: 0; }
.day:hover { background: var(--surface-2); }
.day.other { color: var(--muted); background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.day.selected { outline: 2px solid var(--accent); outline-offset: -2px; }
.day .num { font-size: 13px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.day.today .num { background: var(--today); color: #fff; }
.mini {
  font-size: 11.5px; line-height: 1.3; padding: 2px 5px; border-radius: 5px;
  background: var(--accent-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mini.post { opacity: .65; }
.more { font-size: 11px; color: var(--muted); }
.dots { display: none; gap: 3px; }
.dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.panel { padding: 16px; }
.panel h3 { margin: 0 0 12px; font-size: 16px; }
.panel + .panel { margin-top: 16px; }

/* Jedes Spiel eine eigene Kachel – klar getrennt von den anderen */
.match { padding: 12px; margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.match:first-of-type { margin-top: 0; }
.match .meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.match .time { font-weight: 700; color: var(--text); }
.match .live { color: var(--live); font-weight: 700; }
.teams { display: grid; gap: 4px; }
.team { display: flex; align-items: center; gap: 8px; }
.team img { width: 22px; height: 22px; object-fit: contain; }
.team .name { flex: 1; min-width: 0; }
.team .score { font-weight: 700; font-variant-numeric: tabular-nums; }
.venue { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.streams { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.stream { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }
.stream.none { color: var(--muted); border-style: dashed; background: none; }
.stream.from-tv { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }

.upcoming .dayhead { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; margin: 14px 0 6px; letter-spacing: .03em; }
.upcoming .dayhead:first-of-type { margin-top: 0; }

/* ---------- Admin ---------- */

.error { color: var(--live); font-size: 14px; min-height: 1.2em; }

.league { margin-bottom: 12px; }
.league > summary {
  list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer;
}
.league > summary::-webkit-details-marker { display: none; }
.league > summary .count { margin-left: auto; font-size: 13px; color: var(--muted); }
.league .body { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.league label.field { display: block; margin: 14px 0 6px; font-weight: 600; font-size: 14px; }
.teamlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; margin-top: 10px; }
.teamlist label {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.teamlist label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.teamlist img { width: 20px; height: 20px; object-fit: contain; }
.teamlist.disabled { opacity: .45; pointer-events: none; }
.savebar {
  position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; justify-content: flex-end;
  padding: 12px 16px; margin-top: 16px;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }  /* nie breiter als der Bildschirm */
}
@media (max-width: 600px) {
  header.top { padding: 12px 16px; }
  .day { min-height: 52px; align-items: center; }
  .mini, .more { display: none; }
  .dots { display: flex; }
  .toolbar h2 { min-width: 0; font-size: 17px; flex: 1; white-space: nowrap; }
  .toolbar #status { flex-basis: 100%; font-size: 13px; }
}

/* ---------- Live, Ergebnisse, Tagesnavigation ---------- */

button.icon { padding: 2px 10px; font-size: 16px; line-height: 1.4; }
button.small { font-size: 12.5px; padding: 3px 9px; }
.dayhead-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.dayhead-row h3 { flex: 1; margin: 0; text-align: center; font-size: 15px; }

.match.is-live {
  background: color-mix(in srgb, var(--live) 7%, var(--bg));
  border-color: color-mix(in srgb, var(--live) 40%, var(--line));
}
.match .final { margin-left: 8px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.team.winner .name, .team.winner .score { font-weight: 700; }
.team .nologo { width: 22px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.actions .streams { margin-top: 0; }
.actions button.small { margin-left: auto; }

.mini.in { background: color-mix(in srgb, var(--live) 18%, transparent); font-weight: 600; }
.mini.post { background: var(--surface-2); opacity: 1; color: var(--muted); }
.dots span.post { background: var(--muted); }
.dots span.in { background: var(--live); }

button.dayhead { display: block; border: 0; padding: 0; background: none; text-align: left; }
button.dayhead:hover { color: var(--accent); }

/* ---------- Tabellen-Fenster ---------- */

.table-dialog {
  width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0;
  color: var(--text); overflow: hidden; display: none; flex-direction: column;
}
.table-dialog[open] { display: flex; }
.table-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.dlg-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dlg-head h3 { flex: 1; margin: 0; font-size: 17px; }
#tableBody { overflow: auto; padding: 14px 16px 16px; }
#tableBody h4 { margin: 16px 0 6px; font-size: 14px; color: var(--muted); }

#tableSummary:not(:empty) { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.table-summary .pick {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  border: 2px solid var(--accent); background: var(--accent-soft);
}
.table-summary .pick.away { border-color: var(--away); background: var(--away-soft); }
.table-summary img { width: 34px; height: 34px; object-fit: contain; }
.table-summary .muted { font-size: 13px; }

.table-wrap { overflow-x: auto; }
table.standings { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.standings th { font-size: 12px; color: var(--muted); font-weight: 600; text-align: left; padding: 6px 6px; border-bottom: 1px solid var(--line); }
.standings td { padding: 6px 6px; border-bottom: 1px solid var(--line); }
.standings .num { text-align: right; white-space: nowrap; }
.standings .rank { text-align: center; box-shadow: inset 4px 0 0 var(--zone, transparent); width: 34px; }
.standings .pts { font-weight: 700; }
.standings .tteam { display: flex; align-items: center; gap: 8px; }
.standings .tteam img { width: 20px; height: 20px; object-fit: contain; }
.standings tr.hl td { background: var(--accent-soft); font-weight: 700; }
.standings tr.hl.away td { background: var(--away-soft); }
.standings tr.hl td:first-child { border-left: 3px solid var(--accent); }
.standings tr.hl.away td:first-child { border-left-color: var(--away); }
.standings .role {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 1px 6px; border-radius: 999px; background: var(--accent); color: #fff;
}
.standings tr.away .role { background: var(--away); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

@media (max-width: 560px) {
  .standings .opt { display: none; }
  .table-summary { grid-template-columns: 1fr; }
}

/* ---------- Kopfzeile mit Benutzermenü ---------- */

header.top .brand { display: inline-flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 800; letter-spacing: .01em; color: #fff; text-decoration: none; white-space: nowrap; }
header.top .brand img { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
header.top nav { flex-wrap: wrap; justify-content: flex-end; }
header.top nav a.active { color: #fff; font-weight: 700; }
.user-chip { font-size: 14px; color: #fff; }
button.linklike { border: 0; background: none; padding: 0; color: rgba(255, 255, 255, .78); font-size: 14px; }
button.linklike:hover { color: #fff; }

/* ---------- Login & Einladung ---------- */

.auth-page { min-height: 100vh; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; position: relative; }
.auth-lang { position: absolute; top: 16px; right: 16px; }
.auth-card { width: min(420px, 100%); padding: 32px 28px; text-align: center; display: grid; gap: 10px; }
.auth-card h1 { margin: 0; font-size: 20px; }
.auth-card h2 { margin: 6px 0 0; font-size: 24px; }
.auth-card p { margin: 4px 0; }
.auth-card input { text-align: center; font-size: 16px; }
.auth-card .field { text-align: left; margin-top: 8px; font-weight: 600; font-size: 14px; }
.auth-logo { width: 76px; height: 76px; border-radius: 18px; margin: 0 auto 4px; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
button.big, .btn.big { padding: 13px 18px; font-size: 16px; margin-top: 8px; }
.btn { display: inline-block; text-decoration: none; }
.steps { text-align: left; margin: 6px 0; padding-left: 22px; color: var(--muted); font-size: 14px; }
.steps li { margin: 3px 0; }
.small { font-size: 13px; }

/* ---------- Einstellungen & Admin ---------- */

main.narrow { max-width: 860px; }
.section { padding: 20px; margin-bottom: 16px; }
.section h2 { margin: 0 0 6px; font-size: 19px; }
.section > p.muted { margin-top: 0; }
.welcome { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }

.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0; }
.inline-form input[type=text] { flex: 1 1 220px; width: auto; }
.inline-form .field { margin: 0; font-weight: 600; font-size: 14px; }
.check { display: inline-flex; align-items: flex-start; gap: 8px; font-size: 14px; white-space: normal; max-width: 100%; }
.check input { flex: none; margin-top: 3px; }   /* lange Texte brechen um – sonst wird die Seite am Handy breiter */

.savebar-inline { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 14px; }

details.league { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: var(--surface); }
details.league > summary { padding: 12px 14px; }
details.league .body { padding: 0 14px 14px; }

.user-list { display: grid; gap: 8px; margin-top: 8px; }
.user-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
}
.user-row.disabled { opacity: .6; }
.user-main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.user-main .muted { flex-basis: 100%; }
.user-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.badge.admin { background: var(--accent); color: #fff; }
.badge.super { background: linear-gradient(135deg, #b8860b, #e0b84a); color: #2b2100; }
.badge.you { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.badge.off { background: var(--live); color: #fff; }
.badge.pending { background: #e0b84a; color: #2b2100; }
button.danger { color: var(--live); }
button.danger:hover { border-color: var(--live); }

.streaming-list { display: grid; gap: 8px; }
.stream-row { display: grid; grid-template-columns: 240px 1fr; align-items: center; gap: 10px; font-size: 14px; }

.passkey-list { display: grid; gap: 8px; margin: 10px 0 14px; }
.passkey-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.pk-icon { font-size: 20px; }
.pk-main { flex: 1; min-width: 0; }

/* ---------- Link mit QR-Code ---------- */

.link-dialog { width: min(620px, calc(100vw - 32px)); padding: 0; color: var(--text); }
.link-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.link-body { padding: 16px; }
#connectBox:not(:empty) { margin-top: 14px; }
.linkbox { display: flex; gap: 18px; align-items: flex-start; }
.linkbox .qr { width: 180px; height: 180px; background: #fff; border-radius: 10px; padding: 6px; flex: none; }
.linkbox.expired .qr { opacity: .2; }
.linkbox-text { flex: 1; min-width: 0; }
.linkbox-text p { margin: 0 0 10px; }
.copyrow { display: flex; gap: 6px; }
.copyrow input { flex: 1; min-width: 0; font-size: 13px; }
.countdown { margin-top: 8px; font-size: 13px; }
.warn-text { margin-top: 10px !important; font-size: 13px; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, #e0b84a 18%, transparent); }

@media (max-width: 600px) {
  .linkbox { flex-direction: column; align-items: center; }
  .stream-row { grid-template-columns: 1fr; gap: 4px; }
  header.top { flex-wrap: wrap; }
  header.top nav { gap: 10px; }
}

/* ---------- App-Auftritt am Handy (Home-Bildschirm) ---------- */

html { background: var(--brand); }  /* Farbe beim Über-Scrollen oben */
body { min-height: 100vh; -webkit-tap-highlight-color: transparent; }
main { padding-left: calc(16px + env(safe-area-inset-left)); padding-right: calc(16px + env(safe-area-inset-right)); }
.auth { padding-top: calc(24px + env(safe-area-inset-top)); padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.auth-lang { top: calc(16px + env(safe-area-inset-top)); }
.panel { scroll-margin-top: calc(70px + env(safe-area-inset-top)); }

.account-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; }
.account-row .field { font-weight: 600; font-size: 14px; }
.big-lang button { padding: 6px 14px; font-size: 14px; }

/* Wisch-Animation beim Tageswechsel */
@keyframes slideNext { from { opacity: .3; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes slidePrev { from { opacity: .3; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
#dayList.slide-next { animation: slideNext .22s ease-out; }
#dayList.slide-prev { animation: slidePrev .22s ease-out; }

/* Navigation unten – nur am Handy */
.tabbar { display: none; }

@media (max-width: 760px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  header.top { padding-top: calc(10px + env(safe-area-inset-top)); padding-bottom: 10px; }
  header.top nav { display: none; }       /* Menü steckt unten in der Leiste */
  main { padding-top: 14px; }
  input[type=text], input[type=password] { font-size: 16px; } /* verhindert Zoomen am iPhone */

  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 6px calc(4px + env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) calc(4px + env(safe-area-inset-left));
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
    border-top: 1px solid var(--line);
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0;
    color: var(--muted); text-decoration: none; font-size: 10.5px; font-weight: 600; user-select: none;
  }
  .tabbar a.active { color: var(--accent); }
  .tab-icon svg {
    width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
  }
  .tab-icon svg .fill { fill: currentColor; stroke: none; }

  /* Kalender-Seite: "Heute" zeigt Tag + Listen, "Kalender" zeigt das Monatsraster + Tag */
  body[data-view="heute"] .toolbar,
  body[data-view="heute"] .month { display: none; }
  body[data-view="heute"] .layout { gap: 12px; }
  body[data-view="kalender"] .upcoming { display: none; }
  .toolbar { justify-content: space-between; }
  .toolbar h2 { min-width: 55%; }
  .toolbar #status { flex: 1 1 auto; order: 3; }   /* zweite Zeile: Status + Heute */
  .toolbar #todayBtn { order: 4; }

  .table-dialog, .link-dialog { max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px); }
}

/* Als App vom Home-Bildschirm gestartet: etwas mehr Luft, keine Textauswahl auf Bedienelementen */
@media (display-mode: standalone) {
  button, .tabbar, .chip { -webkit-user-select: none; user-select: none; }
}

/* ---------- Seite System ---------- */

.sys-status { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.sys-status h2 { margin: 0; }
.sys-dot { width: 16px; height: 16px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 5px color-mix(in srgb, #2ecc71 25%, transparent); flex: none; }
.sys-lines { display: grid; gap: 6px; margin: 8px 0 12px; font-size: 14px; }
.sys-line.warn { color: #b7791f; font-weight: 600; }
.sys-line.strong { font-weight: 600; margin-top: 6px; }
.sys-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.sys-message:not(:empty) { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); font-weight: 600; }
.sys-message.ok { background: var(--accent-soft); color: var(--accent); }
.sys-message.error { color: var(--live); }
.sys-message.busy::before { content: "⏳ "; }
#updateBox:not(:empty) { margin-top: 12px; }
.update-list ul { margin: 8px 0 12px; padding-left: 20px; font-size: 14px; }
.update-list code { font-size: 12.5px; color: var(--muted); }
.ok-text { color: var(--accent); font-weight: 600; }
.sys-list { display: grid; gap: 6px; }
.sys-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.sys-row .right { margin-left: auto; }
.log-list { display: grid; gap: 2px; max-height: 360px; overflow: auto; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.log-row { display: flex; gap: 10px; padding: 4px 6px; border-radius: 4px; }
.log-row:nth-child(odd) { background: var(--surface-2); }
.log-row.warn .log-text { color: #b7791f; }
.log-row.error .log-text { color: var(--live); font-weight: 600; }
.log-time { color: var(--muted); white-space: nowrap; }
.log-text { word-break: break-word; }
#adminSwitch a.chip { text-decoration: none; }
@media (max-width: 600px) { .log-row { flex-direction: column; gap: 0; } }

/* ---------- Spieldetails ---------- */

.match.clickable { cursor: pointer; }
.match.clickable:hover .teams .name { text-decoration: underline; text-decoration-color: var(--line); }
.action-buttons { display: inline-flex; gap: 6px; margin-left: auto; }
.actions .action-buttons button.small { margin-left: 0; }

.match-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.mh-team { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-weight: 600; font-size: 14px; }
.mh-team img { width: 44px; height: 44px; object-fit: contain; }
.mh-score { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mh-score strong { font-size: 30px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.mh-score span { font-size: 12.5px; }

.seg { display: flex; gap: 4px; margin: 0 16px 4px; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.seg button { flex: 1; border: 0; background: none; border-radius: 8px; padding: 7px 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
#matchBody { overflow: auto; padding: 12px 16px 18px; }

.timeline { display: grid; gap: 4px; }
.tl-row { display: grid; grid-template-columns: 1fr 44px 1fr; align-items: center; gap: 4px; }
.tl-row.home .tl-event { justify-self: end; }
.tl-row.away .tl-event { justify-self: start; }
.tl-minute { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-event { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); font-size: 13.5px; min-width: 0; }
.tl-row.home .tl-event { flex-direction: row-reverse; text-align: right; }
.tl-event.goal, .tl-event.penalty, .tl-event.owngoal { background: var(--accent-soft); }
.ev-icon { font-size: 15px; flex: none; }
.ev-text { display: flex; flex-direction: column; min-width: 0; }
.ev-text span, .ev-text strong { overflow-wrap: anywhere; }
.ev-text .muted { font-size: 12px; }
.sub-in { color: var(--accent); font-weight: 600; }
.sub-out { color: var(--live); }
.tl-phase { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tl-phase::before, .tl-phase::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.stats { display: grid; gap: 12px; }
.stat-values { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; margin-bottom: 4px; }
.stat-values .muted { font-size: 13px; }
.stat-bar { display: flex; gap: 3px; height: 6px; }
.stat-bar span { border-radius: 3px; }
.stat-bar .home { background: var(--accent); }
.stat-bar .away { background: var(--away); }

.lineups { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lineup h4 { margin: 0 0 8px; font-size: 14px; }
.lineup h5 { margin: 12px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.lineup ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 13.5px; }
.lineup li { display: flex; align-items: center; gap: 8px; }
.lineup .num { width: 24px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.lineup .pname { flex: 1; min-width: 0; }
.lineup .bench { opacity: .8; }
@media (max-width: 560px) { .lineups { grid-template-columns: 1fr; } }

/* ---------- Benachrichtigungen ---------- */

#notifyState { margin: 6px 0 14px; }
.notify-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.notice-text { margin: 0; padding: 10px 12px; border-radius: 8px; font-size: 14px; background: color-mix(in srgb, #e0b84a 16%, transparent); }
#notifyPrefs .field, #notifyDevices .field { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 8px; }
.notify-prefs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; }
.notify-prefs .check { white-space: normal; }
#notifyDevices .passkey-list { margin: 0 0 10px; }
#notifyMessage { margin-top: 8px; }
#notifyMessage.error { color: var(--live); }

/* Design-Auswahl im Profil */
.seg.theme-seg { margin: 0; flex: 0 1 auto; }
.seg.theme-seg button { padding: 6px 10px; white-space: nowrap; }

/* ---------- Ligen-Filter am Handy ---------- */

.hdr-btn { display: none; }
.filter-bar { display: none; }
.sheet::backdrop { background: rgba(0, 0, 0, .45); }

@media (max-width: 760px) {
  #chips { display: none; }   /* am Handy: statt Knöpfen der Filter in der Kopfzeile */
  .hdr-btn:not([hidden]) {
    display: grid; place-items: center; position: relative; width: 38px; height: 38px; padding: 0;
    border: 0; border-radius: 10px; background: rgba(255, 255, 255, .14); color: #fff;
  }
  .hdr-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
  .hdr-dot:not([hidden]) {
    position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%;
    background: #ffd54f; box-shadow: 0 0 0 2px var(--brand);
  }
  .filter-bar:not([hidden]) {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px;
    padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 14px; font-weight: 600;
  }
  .linkbtn { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 700; }

  .sheet {
    margin: auto 0 0; width: 100%; max-width: 100%; border: 0; border-radius: 18px 18px 0 0;
    padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
    background: var(--surface); color: var(--text);
  }
  .sheet[open] { animation: sheetUp .22s ease-out; }
  @keyframes sheetUp { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
  .sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
  .sheet h3 { margin: 0 0 10px; font-size: 17px; }
  .filter-list { display: grid; gap: 2px; }
  .filter-item { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); font-size: 16px; }
  .filter-item input { width: 22px; height: 22px; accent-color: var(--accent); }
  .sheet-actions { display: flex; gap: 10px; margin-top: 16px; }
  .sheet-actions button { flex: 1; padding: 11px; font-size: 15px; }
}

/* ---------- Torlaut-Prognose ---------- */

.pred { margin-top: 8px; }
.pred-title { font-size: 11.5px; font-weight: 700; color: var(--muted); margin-bottom: 4px; letter-spacing: .02em; }
.pred-bar { display: flex; gap: 2px; height: 7px; border-radius: 4px; overflow: hidden; }
.pred-bar span { min-width: 3px; }
.pred-bar .h { background: var(--accent); }
.pred-bar .d { background: var(--line); }
.pred-bar .a { background: var(--away); }
.pred-labels { display: flex; justify-content: space-between; gap: 6px; margin-top: 3px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pred-labels > span { display: flex; gap: 4px; min-width: 0; white-space: nowrap; }
.pred-labels .ph { color: var(--accent); flex: 1 1 0; }
.pred-labels .pa { color: var(--away); flex: 1 1 0; justify-content: flex-end; }
.pred-labels .pd { flex: none; }
.pred-labels .pn { overflow: hidden; text-overflow: ellipsis; }
.pred-result { margin-top: 8px; font-size: 12.5px; font-weight: 600; }
.pred-result.right { color: var(--accent); }
.pred-result.wrong { color: var(--muted); }
#matchHeader .pred, #matchHeader .pred-result { margin: 0 16px 10px; }

.seg.voice-seg { margin: 0 0 6px; max-width: 320px; }
.voice-example { margin: 4px 0 4px; }

/* Spalten dürfen schrumpfen, lange Texte werden gekürzt statt die Seite zu verbreitern */
.layout > *, aside, .panel, .match { min-width: 0; }
body { overflow-x: clip; }  /* "clip" statt "hidden": stört die fixierte Kopfzeile nicht */

/* ---------- Torlauts Tipp ---------- */

.tip { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 8px; padding: 7px 10px;
  border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.tip-label { color: var(--muted); font-weight: 600; }
.tip-score { font-size: 16px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.tip-who, .tip-status { color: var(--muted); }
.tip.live.exact, .tip.live.on_track { background: var(--accent-soft); }
.tip.live.exact .tip-status, .tip.live.on_track .tip-status { color: var(--accent); font-weight: 600; }
.tip.live.off .tip-status { color: var(--live); }
.tip-result { margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tip-result.exact { color: var(--accent); }
.tip-result.tendency { color: var(--accent); }
#matchHeader .tip, #matchHeader .tip-result { margin: 0 16px 10px; }

.slogan { margin: -4px 0 4px !important; font-weight: 800; letter-spacing: .03em; color: var(--accent); text-transform: uppercase; font-size: 13px; }

/* ---------- Torlaut sagt … ---------- */

.torlaut-says { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.tl-mascot { width: 64px; height: 64px; flex: none; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .18)); }
.tl-bubble {
  position: relative; flex: 1; min-width: 0; padding: 8px 12px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.35;
}
.tl-bubble::before {   /* Spitze der Sprechblase zur Figur */
  content: ""; position: absolute; left: -7px; top: 50%; width: 12px; height: 12px; transform: translateY(-50%) rotate(45deg);
  background: var(--surface-2); border-left: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.tl-bubble strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.torlaut-says.live.exact .tl-bubble, .torlaut-says.live.on_track .tl-bubble,
.torlaut-says.done.exact .tl-bubble, .torlaut-says.done.tendency .tl-bubble { background: var(--accent-soft); }
.torlaut-says.live.exact .tl-bubble::before, .torlaut-says.live.on_track .tl-bubble::before,
.torlaut-says.done.exact .tl-bubble::before, .torlaut-says.done.tendency .tl-bubble::before { background: var(--accent-soft); }
#matchHeader .torlaut-says { margin: 0 16px 10px; }

/* Figur auf leeren Seiten */
.empty-state { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.empty-state .tl-mascot { width: 56px; height: 56px; }

/* ---------- Marke: Schriftzug und Figur ---------- */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
header.top .brand img.brand-wordmark { height: 32px; width: auto; display: block; border-radius: 0; box-shadow: none; }
.auth-hero { width: 170px; height: 170px; margin: -10px auto 0; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .18)); }
.auth-wordmark { margin: 0; }
.auth-wordmark img { width: min(260px, 80%); height: auto; display: block; margin: 0 auto; }

.torlaut-says.bold .tl-bubble { border-color: #e0b84a; }

/* Slogan neben dem Schriftzug in der Kopfzeile */
header.top .brand-slogan {
  padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .35);
  font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  color: rgba(255, 255, 255, .88); line-height: 1.2; white-space: nowrap;
}
@media (max-width: 400px) { header.top .brand-slogan { font-size: 9.5px; letter-spacing: .04em; padding-left: 8px; } }
@media (max-width: 340px) { header.top .brand-slogan { display: none; } }

/* ---------- Gespräch mit Torlaut ---------- */

.torlaut-says.talkable { cursor: pointer; }
.torlaut-says.talkable .tl-bubble { padding-right: 30px; }
.torlaut-says.talkable .tl-bubble::after {   /* kleiner Hinweis: hier kann man antworten */
  content: "💬"; position: absolute; right: 7px; bottom: 5px; font-size: 13px; opacity: .7;
}
/* Hover nur mit Maus – am iPhone "klebt" :hover nach dem Antippen und ließe den Rand grün */
@media (hover: hover) { .torlaut-says.talkable:hover .tl-bubble { border-color: var(--accent); } }
.tl-mine {
  display: block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--away);
}

.talk-dialog { width: min(480px, calc(100vw - 24px)); max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px); }
/* Verlauf schrumpft (und scrollt), die Knöpfe unten bleiben immer ganz sichtbar */
.talk-log {
  flex: 1 1 auto; min-height: 72px; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px;
}
.talk-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 88%; }
.talk-msg.me { align-self: flex-end; }
.talk-avatar { width: 40px; height: 40px; flex: none; object-fit: contain; }
.talk-bubble {
  padding: 8px 12px; border-radius: 16px; font-size: 14px; line-height: 1.4;
  background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px;
  animation: talkIn .18s ease-out;
}
.talk-bubble strong { font-variant-numeric: tabular-nums; }
.talk-msg.me .talk-bubble {
  background: var(--accent); color: #fff; border-color: transparent; border-radius: 16px; border-bottom-right-radius: 4px;
}
@keyframes talkIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.talk-msg.typing .dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.talk-msg.typing .dots i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: talkDot 1s infinite ease-in-out;
}
.talk-msg.typing .dots i:nth-child(2) { animation-delay: .15s; }
.talk-msg.typing .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes talkDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .talk-bubble, .talk-msg.typing .dots i { animation: none; } }

.talk-replies {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); min-height: 20px; flex: none; max-height: 70%; overflow-y: auto;
}
.talk-replies .chip { font-size: 14px; padding: 7px 13px; }
.tip-picker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; justify-content: center; }
.tp-team { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; max-width: 40%; }
.tp-name { font-size: 12px; color: var(--muted); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tp-step { display: flex; align-items: center; gap: 6px; }
.tp-step button { width: 36px; height: 36px; padding: 0; font-size: 20px; }
.tp-value { font-size: 24px; min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.tp-colon { font-size: 22px; font-weight: 700; margin-top: 18px; }
.tip-picker .primary { flex-basis: 100%; padding: 10px; }

/* ---------- Anmelden mit dem Handy (QR-Code) ---------- */

.pair-button { margin-top: 2px; }
.pair-box { display: grid; gap: 4px; justify-items: center; padding-top: 6px; border-top: 1px solid var(--line); }
.pair-box[hidden], #pairInfo[hidden] { display: none; }
.pair-qr { width: 200px; height: 200px; background: #fff; border-radius: 10px; padding: 6px; }
.pair-code { font-size: 30px; font-weight: 800; letter-spacing: .25em; font-variant-numeric: tabular-nums; margin: 0 !important; }
.pair-code-label { margin-bottom: 0 !important; }
.pair-device { font-weight: 600; }
.pair-actions { display: flex; gap: 10px; margin-top: 8px; }
.pair-actions button { flex: 1; padding: 11px; font-size: 15px; }

/* ---------- Ansicht "Live" ---------- */

#liveView { display: none; }
body[data-view="live"] #liveView { display: block; }
body[data-view="live"] .toolbar, body[data-view="live"] .layout { display: none; }

.live-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; }
.live-head h2 { flex: 1; margin: 0; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.live-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 var(--live);
  animation: livePulse 1.6s infinite; }
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(198, 40, 40, .5); }
  70% { box-shadow: 0 0 0 9px rgba(198, 40, 40, 0); }
  100% { box-shadow: 0 0 0 0 rgba(198, 40, 40, 0); }
}
@media (prefers-reduced-motion: reduce) { .live-pulse { animation: none; } }
.live-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
.live-list > .empty-state { grid-column: 1 / -1; }
.live-quiet { margin-top: 14px; }

.live-hint { margin-top: 16px; padding: 12px 14px; display: grid; gap: 10px; }
.live-hint-head { display: flex; align-items: center; gap: 10px; }
.live-hint-head > div { flex: 1; min-width: 0; }
.live-hint-head .muted { font-size: 13px; }
.tl-mascot.small { width: 44px; height: 44px; }
.live-group { display: grid; gap: 4px; }
.live-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 13px; margin-top: 4px; }
.live-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; align-items: center; gap: 8px;
  width: 100%; padding: 8px 10px; border-radius: 10px; text-align: left; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--text); font-size: 13.5px;
}
.live-row .lr-team { display: flex; align-items: center; gap: 6px; min-width: 0; }
.live-row .lr-team img, .live-row .nologo { width: 18px; height: 18px; object-fit: contain; flex: none; }
.live-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-row .lr-score { font-size: 15px; font-variant-numeric: tabular-nums; }
.live-row .live { font-size: 12px; white-space: nowrap; }

/* Punkt am Live-Knopf unten, wenn eines deiner Spiele läuft */
#tabbar a[data-tab="live"] { position: relative; }
#tabbar a[data-tab="live"].has-live::after {
  content: ""; position: absolute; top: 6px; left: calc(50% + 9px); width: 8px; height: 8px; border-radius: 50%;
  background: var(--live); border: 2px solid var(--surface);
}
.live-group-head .linkbtn { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 700; font-size: 13px; }

/* In der Live-Ansicht liegen die Kacheln direkt auf dem Hintergrund */
.live-list .match { margin-top: 0; background: var(--surface); box-shadow: var(--shadow); }
.live-list .match.is-live { background: color-mix(in srgb, var(--live) 7%, var(--surface)); }
.dayhead + .match { margin-top: 4px; }

/* Benachrichtigungs-Protokoll auf der Seite System */
.push-row .log-text { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; }
.push-status { margin-left: auto; font-weight: 600; white-space: nowrap; color: var(--accent); }
.push-row.warn .push-status { color: #b7791f; }
.push-row.error .push-status { color: var(--live); }

/* ---------- Torlauts Spielbericht ---------- */
.report { display: grid; gap: 10px; font-size: 14.5px; line-height: 1.5; }
.report-head { display: flex; align-items: center; gap: 12px; }
.report-mascot { width: 72px; height: 72px; }
.report p { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.report p:first-of-type { font-weight: 600; }
.report strong { font-variant-numeric: tabular-nums; }

/* Treffsicherheit: "So hab ich gerechnet" */
.score-details { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--surface-2); }
.score-details summary { cursor: pointer; font-weight: 600; }
.score-details table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13.5px; }
.score-details th, .score-details td { padding: 5px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.score-details .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.score-details .asp-full { color: var(--accent); font-weight: 600; }
.score-details .asp-near { color: #b7791f; }
.score-details .asp-miss { color: var(--muted); }
.score-details p { margin: 8px 0 2px; padding: 0; border: 0; background: none; font-weight: 400 !important; }
.score-details .table-scroll { overflow-x: auto; }
.score-details td:first-child { min-width: 92px; }

/* Sprechblase ist antippbar: kein Browser-Fokusrahmen (z. B. nach dem Schließen des Chats am iPhone),
   bei Tastaturbedienung stattdessen ein grüner Rand an der Blase */
.torlaut-says.talkable:focus { outline: none; }
.torlaut-says.talkable:focus-visible .tl-bubble { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.tl-tip { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.tl-tip strong { font-size: 12px; }

/* Spieldetails: bis zu fünf Reiter – kompakt, notfalls seitlich wischbar */
#matchTabs { overflow-x: auto; scrollbar-width: none; gap: 2px; }
#matchTabs::-webkit-scrollbar { display: none; }
#matchTabs button { flex: 1 0 auto; padding: 7px 7px; font-size: 13px; white-space: nowrap; }

/* ---------- Torlauts Kiosk (spielfreie Zeit) ---------- */

.kiosk { margin-top: 14px; display: grid; gap: 12px; }
.live-view #liveKiosk .kiosk { padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.kiosk-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.kiosk-head h3 { margin: 0; }
.kiosk h4 { margin: 4px 0 6px; font-size: 14px; }
.kiosk-say { margin-top: 0; align-items: flex-start; }
.kiosk-say .tl-mascot { width: 56px; height: 56px; }
.kiosk-say .tl-bubble::before { top: 26px; }
.kiosk-stats { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.kiosk-memory + .kiosk-memory { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.kiosk-memory-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; font-weight: 600; line-height: 1.2; }
.kiosk-memory-score span:first-child { text-align: right; }
.kiosk-memory-score strong { font-variant-numeric: tabular-nums; font-size: 16px; }
.kiosk-news { padding: 10px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.kiosk-news:first-of-type { border-top: 0; }
.kiosk-comment { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-style: italic; }
.tl-mascot.tiny { width: 34px; height: 34px; }
.kiosk-headline { font-weight: 700; color: var(--text); text-decoration: none; line-height: 1.3; }
.kiosk-headline:hover, .kiosk-headline:focus-visible { color: var(--accent); text-decoration: underline; }
.kiosk-teaser { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.35; }   /* ganz zeigen – Server kürzt am Satzende */
.kiosk-lang { margin-left: 6px; padding: 0 6px; border-radius: 8px; border: 1px solid var(--line); font-size: 11px; }

/* ---------- Torlaut bewegt sich: kleine Animationen je Stimmung ----------
   Nur wo gerade was passiert (Live-Spiele, Spieldetails, neueste Chat-Nachricht, Kiosk-Countdown) –
   und nur, wenn am Gerät "Bewegung reduzieren" aus ist. Die ganze Figur bewegt sich, keine Einzelteile. */

@keyframes tl-tremble { 0%, 100% { transform: translateX(0) rotate(0); } 20% { transform: translateX(-1.5px) rotate(-2deg); }
  40% { transform: translateX(1.5px) rotate(2deg); } 60% { transform: translateX(-1px) rotate(-1deg); } 80% { transform: translateX(1px) rotate(1deg); } }
@keyframes tl-hop { 0%, 60%, 100% { transform: translateY(0) scale(1, 1); } 10% { transform: translateY(0) scale(1.06, .94); }
  25% { transform: translateY(-9px) scale(.96, 1.05); } 40% { transform: translateY(0) scale(1.04, .96); } 50% { transform: translateY(0) scale(1, 1); } }
@keyframes tl-heartbeat { 0%, 40%, 100% { transform: scale(1); } 10% { transform: scale(1.08); } 20% { transform: scale(1); } 30% { transform: scale(1.06); } }
@keyframes tl-sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes tl-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.03, .97); } }
@keyframes tl-shake { 0%, 50%, 100% { transform: translateX(0); } 5%, 15%, 25%, 35% { transform: translateX(-3px) rotate(-3deg); }
  10%, 20%, 30%, 40% { transform: translateX(3px) rotate(3deg); } }
@keyframes tl-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes tl-lean { 0%, 100% { transform: rotate(0) translateX(0); } 50% { transform: rotate(4deg) translateX(2px); } }
@keyframes tl-pop { 0% { transform: scale(.8); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: no-preference) {
  :is(.torlaut-says.live, #matchHeader, .talk-msg.tl:last-child, .kiosk-say) img[data-mood] { transform-origin: 50% 100%; }
  :is(.torlaut-says.live, #matchHeader, .talk-msg.tl:last-child, .kiosk-say)
    img:is([data-mood="nervoes"], [data-mood="elfer_angst"], [data-mood="var_check"]) { animation: tl-tremble .9s ease-in-out infinite; }
  :is(.torlaut-says.live, #matchHeader, .talk-msg.tl:last-child, .kiosk-say)
    img:is([data-mood="jubel"], [data-mood="begeistert"], [data-mood="champion"]) { animation: tl-hop 1.8s ease-out infinite; }
  :is(.torlaut-says.live, #matchHeader, .talk-msg.tl:last-child, .kiosk-say)
    img[data-mood="puls180"] { animation: tl-heartbeat .7s ease-in-out infinite; }
  :is(.torlaut-says.live, #matchHeader, .talk-msg.tl:last-child, .kiosk-say)
    img[data-mood="gelangweilt"] { animation: tl-sway 4s ease-in-out infinite; }
  :is(.torlaut-says.live, #matchHeader, .talk-msg.tl:last-child, .kiosk-say, .empty-state)
    img[data-mood="schlaeft"] { animation: tl-breathe 3.5s ease-in-out infinite; transform-origin: 50% 100%; }
  :is(.torlaut-says.live, #matchHeader, .talk-msg.tl:last-child, .kiosk-say)
    img:is([data-mood="rotekarte"], [data-mood="wuetend"], [data-mood="aberglaube_paranoia"]) { animation: tl-shake 2.4s ease-in-out infinite; }
  :is(.torlaut-says.live, #matchHeader, .talk-msg.tl:last-child, .kiosk-say)
    img:is([data-mood="hoffnung"], [data-mood="vorfreude"]) { animation: tl-float 2.6s ease-in-out infinite; }
  :is(.torlaut-says.live, #matchHeader, .talk-msg.tl:last-child, .kiosk-say)
    img[data-mood="angriff"] { animation: tl-lean 1.4s ease-in-out infinite; }
  :is(.torlaut-says.live, #matchHeader, .talk-msg.tl:last-child, .kiosk-say)
    img:is([data-mood="aluminium"], [data-mood="ueberrascht"], [data-mood="fassungslos"]) { animation: tl-pop .5s ease-out 1; }
}

/* ---------- Tagesduell (du gegen Torlaut) ---------- */
.day-duel { display: grid; gap: 6px; margin: 4px 0 12px; }
.day-duel-score { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-weight: 600; }
.day-duel-score strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.day-duel-score .muted { margin-left: auto; font-weight: 400; }

/* ---------- Glocke & Nachrichtenverlauf ---------- */
.bell-btn {
  margin-left: auto; position: relative; display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 10px; background: rgba(255, 255, 255, .14); color: #fff; flex: none;
}
.bell-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; stroke-linecap: round; }
.bell-count:not([hidden]) {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #ffd54f; color: #1b1b1b; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--brand);
}
header.top .bell-btn + .hdr-btn { margin-left: 0; }
.inbox-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.inbox-tools .spacer { flex: 1; }
.inbox-day { margin: 14px 0 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.inbox-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); margin-bottom: 8px; cursor: pointer; text-align: left; width: 100%; color: var(--text); font: inherit; }
.inbox-item.unread { border-color: var(--accent); background: var(--accent-soft); }
.inbox-item .tl-mascot { width: 42px; height: 42px; }
.inbox-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.inbox-title { font-weight: 700; }
.inbox-body { font-size: 14px; line-height: 1.35; white-space: pre-line; }
.inbox-meta { font-size: 12px; color: var(--muted); }
.inbox-group { border: 1px solid var(--line); border-radius: 16px; margin-bottom: 8px; background: var(--surface); overflow: hidden; }
.inbox-group > summary { list-style: none; cursor: pointer; padding: 10px 12px; display: flex; gap: 8px; align-items: center; font-weight: 700; }
.inbox-group > summary::-webkit-details-marker { display: none; }
.inbox-group > summary .muted { font-weight: 400; margin-left: auto; font-size: 13px; }
.inbox-group[open] > summary { border-bottom: 1px solid var(--line); }
.inbox-group .inbox-item { border: 0; border-radius: 0; margin: 0; border-bottom: 1px solid var(--line); }
.inbox-group .inbox-item:last-child { border-bottom: 0; }
.inbox-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }

/* Torlauts Kommentare im Spielverlauf (ein-/ausblendbar) */
.tl-comments-toggle { margin-bottom: 10px; }
.tl-comment { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0; padding: 0 4px; }
.tl-comment-bubble { flex: 1; padding: 7px 11px; border-radius: 14px; border-top-left-radius: 4px; font-size: 13.5px;
  line-height: 1.35; background: var(--accent-soft); border: 1px solid var(--line); }

/* ---------- Live-Fragen ---------- */
.live-quiz { display: grid; gap: 8px; margin-bottom: 12px; }
.lq { padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); display: grid; gap: 6px; }
.lq.open { border-color: #e0b84a; box-shadow: 0 0 0 2px rgba(224, 184, 74, .25); }
.lq-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.lq-text { font-weight: 600; }
.lq-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.lq-result { font-size: 13px; color: var(--muted); }
.lq-result.user { color: var(--accent); font-weight: 700; }
.kiosk-live { margin: -4px 0 0 64px; }

/* ---------- Tagesduell live (eigene Rubrik in der Live-Ansicht) ---------- */
.live-duel { display: grid; gap: 10px; margin-bottom: 12px; padding: 14px; }
.live-duel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ld-board { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: start; }
.ld-side { display: grid; gap: 6px; align-content: start; }
.ld-side.user { text-align: left; }
.ld-side.torlaut { text-align: right; }
.ld-label { font-weight: 700; color: var(--muted); }
.ld-score { font-size: 36px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ld-side.user .ld-score { color: var(--accent); }
.ld-colon { font-size: 30px; font-weight: 800; padding-top: 20px; color: var(--muted); }
.ld-game { display: grid; gap: 1px; padding: 6px 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; }
.ld-game .ld-name { font-weight: 600; }
.ld-game .ld-mark { font-size: 10px; color: var(--muted); }
.ld-game.live .ld-mark { color: #e0b84a; }
.ld-ties { display: grid; gap: 6px; }
.live-duel .day-duel { margin: 0; }
.live-duel .day-duel .day-duel-score { display: none; }   /* der Stand steht schon groß oben */
.ld-game { grid-template-columns: auto 1fr; column-gap: 6px; align-items: baseline; }
.ld-game .muted { grid-column: 1 / -1; }
.ld-side.torlaut .ld-game { grid-template-columns: 1fr auto; }
.ld-side.torlaut .ld-game .ld-mark { order: 2; }
@keyframes lqFlash { 0%, 100% { box-shadow: 0 0 0 2px rgba(224, 184, 74, .25); } 50% { box-shadow: 0 0 0 6px rgba(224, 184, 74, .55); } }
.lq.flash { animation: lqFlash .8s ease-in-out 3; }

/* Spieldetails: Kopf, Spielstand und Reiter nie zusammenquetschen – nur der Inhalt darunter scrollt */
.match-dialog > .dlg-head, #matchHeader, #matchTabs { flex: none; }
#matchBody { flex: 1 1 auto; min-height: 0; }

/* Kopfzeile am Handy: Glocke und Filter nebeneinander – der Slogan bricht dafür in zwei Zeilen um */
@media (max-width: 760px) {
  header.top { flex-wrap: nowrap; gap: 8px; }
  header.top .brand { min-width: 0; flex: 1 1 auto; }
  header.top .bell-btn { margin-left: auto; }
}
@media (max-width: 480px) {
  header.top .brand-slogan { white-space: normal; max-width: 140px; line-height: 1.2; }
}

/* ---------- Spielkarte als Anzeigetafel: Stand · Torlaut · Du ---------- */
:root { --mint: #00a876; }
.match.board .team .score, .match.board .tl-col { width: 30px; flex: none; text-align: center; font-variant-numeric: tabular-nums; }
.match.board .team .score { width: 34px; font-size: 17px; }
.match.board .tl-col { font-weight: 700; font-size: 15px; border-radius: 6px; line-height: 1.5; }
.match.board .tl-col.t { color: var(--mint); }
.match.board .tl-col.u { color: var(--away); }
.match.board .tl-col.t.hit { background: color-mix(in srgb, var(--mint) 18%, transparent); }
.match.board .tl-col.u.hit { background: color-mix(in srgb, var(--away) 18%, transparent); }
.match.board .board-head { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: -2px; }
.match.board .board-head .score { font-size: 10.5px; font-weight: 600; }
.match.board .board-head .tl-col { font-size: 10.5px; display: grid; place-items: center; }
.board-face { width: 22px; height: 22px; object-fit: contain; }
.match.board .board-head .nologo { visibility: hidden; }
/* dein Tipp steht schon in der Tafel → in der Sprechblase nur noch der Zusatz (z. B. "wie meiner – wir zwei!") */
.match.board .tl-mine.only-score { display: none; }
.match.board .tl-mine .tl-mine-score { display: none; }

/* Einheitliche Farben überall: du = Blau, Torlaut = Grün (Mint wie im Logo) */
.c-you { color: var(--away); }
.c-tl { color: var(--mint); }
.ld-side.user .ld-score, .ld-side.user .ld-label { color: var(--away); }
.ld-side.torlaut .ld-score, .ld-side.torlaut .ld-label { color: var(--mint); }
.ld-tips { color: var(--muted); }
.ld-game .ld-tips { grid-column: 1 / -1; }
.ld-game .ld-mark { font-size: 11px; font-weight: 700; color: var(--muted); }
.ld-game.live .ld-mark { color: var(--live); }
.ld-side.torlaut .ld-game .ld-mark { order: 0; justify-self: end; }   /* Minute/Ende vor dem Spiel, rechtsbündig */

/* Live-Fragen heute (Übersicht in der Live-Ansicht) */
.live-quiz-today { display: grid; gap: 8px; margin-bottom: 12px; padding: 14px; }
.live-quiz-today .lq { cursor: pointer; }
.lqt-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.lq-result.user { color: var(--away); }
.lq-result.torlaut { color: var(--mint); font-weight: 700; }

/* Tagesduell live – Spielkarte neu: Minute | Heim | Ergebnis | Gast, die Tipps direkt unter dem Ergebnis */
.ld-game { display: grid; grid-template-columns: auto 1fr auto 1fr; column-gap: 6px; row-gap: 0; align-items: baseline; }
.ld-side.torlaut .ld-game { grid-template-columns: auto 1fr auto 1fr; }
.ld-game .ld-mark { grid-column: 1; grid-row: 1; justify-self: start; order: 0; }
.ld-game .ld-home { grid-column: 2; text-align: right; font-weight: 600; }
.ld-game .ld-res { grid-column: 3; font-weight: 800; text-align: center; min-width: 30px; }
.ld-game .ld-away { grid-column: 4; font-weight: 600; }
.ld-game .ld-tip { grid-column: 3; text-align: center; font-size: 12.5px; font-weight: 700; line-height: 1.3; }
.ld-side.torlaut .ld-game .ld-mark { justify-self: start; }
.ld-game .ld-away { text-align: left; }
.ld-game .ld-exact { grid-column: 1 / -1; text-align: center; font-size: 11.5px; font-weight: 800; color: #e0b84a; margin-top: 2px; }

/* iPhone: Kopfzeile etwas weiter unter die Statusleiste (iOS legt dort eine Unschärfe drüber) */
@media (max-width: 760px) {
  header.top { padding-top: calc(22px + env(safe-area-inset-top)); }
}

/* Tagesduell live: große Zahlen rücken zur Mitte (an den Doppelpunkt), Spalten dürfen nicht über die Karte hinaus */
.ld-board { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.ld-side { min-width: 0; }
.ld-side.user .ld-label, .ld-side.user .ld-score { text-align: right; }
.ld-side.torlaut .ld-label, .ld-side.torlaut .ld-score { text-align: left; }
.ld-score { padding: 0 6px; }
.ld-game { min-width: 0; padding: 6px; font-size: 12.5px; }
.ld-game .ld-mark { font-size: 10.5px; }
.ld-game .ld-home, .ld-game .ld-away { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* Minute/Ende als eigene kleine Zeile oben – so passen auch "90'+4'" und die Kürzel nebeneinander */
.ld-game, .ld-side.torlaut .ld-game { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.ld-game .ld-mark, .ld-side.torlaut .ld-game .ld-mark { grid-column: 1 / -1; grid-row: 1; justify-self: center; margin-bottom: 1px; }
.ld-game .ld-home { grid-column: 1; grid-row: 2; }
.ld-game .ld-res { grid-column: 2; grid-row: 2; }
.ld-game .ld-away { grid-column: 3; grid-row: 2; }
.ld-game .ld-tip { grid-column: 2; }
.ld-game .ld-home, .ld-game .ld-away { text-overflow: clip; overflow: visible; }
/* Große Zahl (und Name) mittig über der eigenen Spalte mit den Spielen */
.ld-side.user .ld-label, .ld-side.user .ld-score, .ld-side.torlaut .ld-label, .ld-side.torlaut .ld-score { text-align: center; }

/* ---------- Ein-/ausklappbare Rubriken (Tagesduell live, Live-Fragen) ---------- */
.fold { padding: 0; margin-bottom: 12px; overflow: hidden; }
.fold-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px; border: 0; border-radius: 0;
  background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.fold-head:hover { border-color: transparent; }
.fold-title { font-weight: 700; font-size: 16px; }
.fold-summary { margin-left: auto; font-size: 14px; font-weight: 700; white-space: nowrap; }
.fold-chevron { color: var(--muted); transition: transform .2s; }
.fold.open .fold-chevron { transform: rotate(180deg); }
.fold-body { display: none; padding: 0 14px 14px; }
.fold.open .fold-body { display: grid; gap: 10px; }
.fold .live-duel, .fold .live-quiz-today { padding: 0; margin: 0; border: 0; background: none; }
.fold-alert { color: #e0b84a; font-weight: 800; }
.live-duel-fold .fold-summary { font-size: 18px; }

/* Versuch: Mut-Punkte grau neben dem großen Stand */
.ld-score-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; column-gap: 8px; }
.ld-score-row .ld-score { grid-column: 2; grid-row: 1; }              /* große Zahl bleibt genau mittig über der Spalte */
.ld-side.user .ld-alt { grid-column: 1; grid-row: 1; justify-self: end; }
.ld-side.torlaut .ld-alt { grid-column: 3; grid-row: 1; justify-self: start; }
.ld-alt { font-size: 15px; font-weight: 700; color: var(--muted); opacity: .8; font-variant-numeric: tabular-nums; }
.ld-alt-note { font-size: 11px; color: var(--muted); text-align: center; }

/* Versuch Match-Note: grau neben jedem Tipp in der Spielkarte, außen (du links, Torlaut rechts) */
.ld-game .ld-tip.r3, .ld-game .ld-note.r3 { grid-row: 3; }
.ld-game .ld-tip.r4, .ld-game .ld-note.r4 { grid-row: 4; }
.ld-game .ld-exact { grid-row: 5; }
.ld-note { font-size: 11px; font-weight: 700; color: var(--muted); opacity: .8; font-variant-numeric: tabular-nums; align-self: center; }
.ld-side.user .ld-game .ld-note { grid-column: 1; justify-self: end; }
.ld-side.torlaut .ld-game .ld-note { grid-column: 3; justify-self: start; }
.ld-ties .ld-game .ld-note { grid-column: 3; justify-self: start; }

/* Profil: Tipp-Skill (Versuch) */
.skill-main { display: flex; align-items: baseline; gap: 10px; }
.skill-big { font-size: 44px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.skill-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin-top: 12px; }
.skill-stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; }
.skill-stat-value { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.skill-stat-label { font-size: 11px; color: var(--muted); }
.skill-titles { display: grid; gap: 8px; margin-top: 14px; }
.skill-titles-head { font-weight: 700; }
.skill-title { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.skill-title-icon { font-size: 22px; }
.skill-title-name { font-weight: 800; color: #e0b84a; }
.skill-title.weak .skill-title-name { color: var(--muted); }
.skill-stat-sub { font-size: 10.5px; color: var(--muted); opacity: .8; }

/* ================================================================ Stadion-Look (TV-Grafik: Flutlicht, Rasen, Neonrahmen)
   Immer dunkel – auch im hellen Design, wie eine Einblendung im Fernsehen. Kinder bekommen eigene Farbwerte. */
.stadium {
  --text: #eef4ef; --muted: #a9b7ad; --surface-2: rgba(0, 0, 0, .32); --line: rgba(255, 255, 255, .13);
  --mint: #00f4a6; --away: #6ea4ff; --live: #ff6b6b; --accent: #6ea4ff;
  --glow: var(--mint);
  position: relative; overflow: hidden; isolation: isolate; color: var(--text); border-radius: 18px;
  border: 2px solid color-mix(in srgb, var(--glow) 85%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--glow) 25%, transparent), 0 0 16px color-mix(in srgb, var(--glow) 40%, transparent),
              inset 0 0 22px color-mix(in srgb, var(--glow) 15%, transparent);
  background:
    radial-gradient(circle at 14% 16%, rgba(255,255,255,.22) 0 5px, transparent 20px),
    radial-gradient(circle at 31% 9%, rgba(255,255,255,.15) 0 4px, transparent 18px),
    radial-gradient(circle at 56% 14%, rgba(180,220,255,.17) 0 6px, transparent 22px),
    radial-gradient(circle at 79% 8%, rgba(255,255,255,.2) 0 5px, transparent 20px),
    radial-gradient(circle at 93% 20%, rgba(255,255,255,.11) 0 4px, transparent 16px),
    radial-gradient(ellipse at 50% 0%, rgba(120,190,255,.22), transparent 60%),
    linear-gradient(180deg, #13261c 0%, #0f1f17 55%, #164d2a 84%, #1f7a3d 100%);
}
.stadium::after {   /* gemähter Rasen unten */
  content: ""; position: absolute; inset: auto 0 0 0; height: 26%; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 28px, transparent 28px 56px);
}
.stadium.glow-live { --glow: var(--live, #ff5a5a); }
.stadium.glow-gold { --glow: #ffd54f; }
.stadium.glow-calm { --glow: #7fa6c9; }
.st-tag { text-align: center; font-size: 11px; letter-spacing: .14em; font-weight: 800; text-transform: uppercase; color: var(--glow); }
.st-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; }
.st-team { display: grid; justify-items: center; gap: 6px; min-width: 0; text-align: center; font-weight: 700; font-size: 13px; }
.st-team span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-crest { width: 72px; height: 72px; object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.6)) drop-shadow(0 0 1px rgba(255,255,255,.8)); }
.st-score { font-size: 56px; font-weight: 900; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 18px rgba(0,0,0,.7); white-space: nowrap; }
.st-score .c { opacity: .75; margin: 0 2px; }
.st-min { justify-self: start; color: #fff; background: var(--live, #ff5a5a); font-weight: 900; font-size: 12px; padding: 2px 8px;
  border-radius: 6px; box-shadow: 0 0 10px rgba(255, 90, 90, .6); }
.st-chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.st-chip { font-size: 12.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.45); border: 1px solid; }
.st-chip.tl { color: var(--mint); border-color: rgba(0,244,166,.5); }
.st-chip.you { color: var(--away); border-color: rgba(110,164,255,.55); }
.st-chip.hit { box-shadow: 0 0 12px currentColor; }
.st-board { display: grid; gap: 10px; padding: 14px 12px 14px; margin: 4px 12px 10px; }
.st-head { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--muted); }
.st-board.compact { margin: 0; padding: 10px 10px 12px; gap: 8px; }
.st-board.compact .st-crest { width: 56px; height: 56px; }
.st-board.compact .st-score { font-size: 44px; }
.live-card { display: grid; gap: 6px; margin-bottom: 14px; cursor: pointer; }
.live-card .st-board { margin: 0; }
/* Tagesduell live im Stadion-Look */
.ld-stadium { padding: 14px 10px 12px; }
.ld-stadium .ld-side { justify-items: center; }
.ld-stadium .ld-side > .ld-game, .ld-stadium .ld-score-row { justify-self: stretch; }
.ld-avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; font-weight: 900; color: #fff;
  background: radial-gradient(circle at 35% 30%, #8fb8ff, #2f5fbf); box-shadow: 0 0 14px rgba(110,164,255,.6); }
.ld-mascot { width: 64px; height: 64px; margin: -4px 0; filter: drop-shadow(0 0 10px rgba(0,244,166,.55)); }
.ld-stadium .ld-score { font-size: 48px; font-weight: 900; }
.ld-stadium .ld-side.user .ld-score { text-shadow: 0 0 16px rgba(110,164,255,.6); }
.ld-stadium .ld-side.torlaut .ld-score { text-shadow: 0 0 16px rgba(0,244,166,.6); }
.ld-stadium .ld-colon { font-size: 34px; font-weight: 900; opacity: .7; align-self: start; margin-top: 64px; }
.ld-stadium .ld-game { background: rgba(0,0,0,.38); border-color: rgba(255,255,255,.12); backdrop-filter: blur(3px); }
/* Tagesduell-Stand im Heute-Bereich als kleine TV-Einblendung */
.day-duel-score.stadium { padding: 12px 14px; border-radius: 14px; align-items: center; justify-content: center; gap: 12px; }
.day-duel-score.stadium::after { height: 40%; }
.day-duel-score.stadium strong { font-size: 30px; font-weight: 900; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.day-duel-score.stadium .c-you, .day-duel-score.stadium .c-tl { font-weight: 800; }
.day-duel-score.stadium .muted { margin-left: 0; flex-basis: 100%; text-align: center; font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; font-weight: 800; color: #ffd54f; order: -1; }
/* Kiosk: schlanke Nachrichten ohne Kommentar, Knopf für mehr */
.kiosk-news.slim .kiosk-headline { font-size: 14.5px; }
.more-news { justify-self: start; margin-top: 4px; }
.kiosk-news-list { display: grid; gap: 0; }
.more-list { margin-top: 4px; }
.st-score.st-kickoff { font-size: 40px; opacity: .92; }
.st-board.compact .st-score.st-kickoff { font-size: 34px; }

/* ---------- Spielkarten entschlackt: größere Wappen, ruhige Sender-Zeile ---------- */
.match .team img { width: 26px; height: 26px; }
.match .team .name { font-weight: 600; }
.stream-line { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.stream-line.from-tv { font-style: normal; }
.mh-venue { text-align: center; font-size: 12px; color: var(--muted); margin: -4px 12px 8px; }
/* Tipps stehen schon in der Anzeigetafel bzw. in den leuchtenden Chips → in der Sprechblase nicht noch einmal */
.match.board .tl-tip, #matchHeader .tl-tip, .live-card .tl-tip { display: none; }
#matchHeader .tl-mine.only-score, #matchHeader .tl-mine .tl-mine-score,
.live-card .tl-mine.only-score, .live-card .tl-mine .tl-mine-score { display: none; }
/* Spieldetails: kleiner Kopf beim Scrollen */
#matchHeader .st-board, #matchHeader .st-crest, #matchHeader .st-score { transition: all .2s ease; }
.match-dialog.head-small #matchHeader .torlaut-says, .match-dialog.head-small #matchHeader .mh-venue,
.match-dialog.head-small #matchHeader .st-chips, .match-dialog.head-small #matchHeader .st-team span { display: none; }
.match-dialog.head-small #matchHeader .st-board { padding: 6px 10px; gap: 2px; margin-bottom: 6px; }
.match-dialog.head-small #matchHeader .st-crest { width: 34px; height: 34px; }
.match-dialog.head-small #matchHeader .st-score { font-size: 30px; }
.match-dialog.head-small #matchHeader .st-tag, .match-dialog.head-small #matchHeader .st-head { font-size: 10px; }

/* ================================================================ Volltreffer-Sammelkarten
   Eigenes Kartenformat (Hochformat, runde Ecken, Innenrahmen), Material je Stufe, Torlaut-Abzeichen oben */
.tcard, .tcard-mini { --ink: #1d2228; position: relative; overflow: hidden; color: var(--ink); text-align: center; isolation: isolate;
  box-shadow: 0 8px 18px rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,255,255,.35); }
.tcard::before, .tcard-mini::before { content: ""; position: absolute; inset: 6px; border-radius: 11px; border: 1.5px solid rgba(0,0,0,.2); pointer-events: none; }
.tcard::after, .tcard-mini::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(115deg, transparent 25%, rgba(255,255,255,.35) 38%, transparent 50%); mix-blend-mode: soft-light; }
.tier-bronze  { background: linear-gradient(160deg,#e9b98a 0%,#b9773f 35%,#8a5226 65%,#c98d58 100%); --ink: #2c1606; }
.tier-silber  { background: linear-gradient(160deg,#f4f6f8 0%,#c7ccd2 35%,#9aa1aa 65%,#dfe3e8 100%); --ink: #1d2228; }
.tier-gold    { background: linear-gradient(160deg,#fff3b0 0%,#f2cf63 30%,#c99620 62%,#f6dc84 100%); --ink: #2f2206; }
.tier-diamant { background: conic-gradient(from 30deg at 50% 40%, #d8fbff, #8fe3ff, #e6fcff, #6fc9f0, #c9f6ff, #9fe7ff, #d8fbff); --ink: #062a3a; }
.tier-meister { background: radial-gradient(circle at 50% 30%, #1f4d3a 0%, #0b2018 55%, #050c09 100%); --ink: #eef4ef; }
.tier-meister::after { background: linear-gradient(115deg, transparent 15%, rgba(0,244,166,.4) 30%, rgba(255,120,220,.3) 42%, rgba(110,164,255,.35) 54%, transparent 70%); mix-blend-mode: screen; }

.tcard { border-radius: 16px; padding: 4px 14px 14px; width: min(320px, 82vw); display: grid; gap: 4px; }
.card-badge { width: 62%; margin: 0 auto -10px; display: block; }
.card-date { font-size: 11px; font-weight: 800; letter-spacing: .06em; opacity: .75; text-transform: uppercase; }
.card-match { font-size: 15px; font-weight: 900; }
.card-result { font-size: 56px; font-weight: 900; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tier-meister .card-result { text-shadow: 0 0 18px rgba(0,244,166,.7); }
.card-small { font-size: 11.5px; font-weight: 800; opacity: .75; }
.card-why { font-size: 13px; font-weight: 700; line-height: 1.35; background: rgba(255,255,255,.25); border-radius: 9px; padding: 7px 9px; margin-top: 4px; }
.tier-meister .card-why { background: rgba(0,244,166,.14); }
.card-moment { font-size: 12.5px; font-style: italic; line-height: 1.35; }
.card-number { font-family: ui-monospace, monospace; font-size: 11px; font-weight: 900; opacity: .7; }
.card-curve { color: var(--ink); } .tier-meister .card-curve { color: var(--mint); }
.card-curve svg { width: 100%; height: auto; display: block; }

.card-dialog { border: 0; padding: 0; background: transparent; overflow: visible; }
.card-dialog::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(4px); }
.card-dialog .card-close { display: block; margin: 12px auto 0; }

.cards-showcase { display: grid; gap: 8px; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.tcard-mini { border: 0; border-radius: 12px; padding: 2px 6px 9px; cursor: pointer; font: inherit; display: grid; gap: 1px; }
.tcard-mini::before { inset: 4px; border-radius: 8px; }
.card-badge-mini { width: 88%; margin: 0 auto -6px; display: block; }
.mini-result { font-size: 22px; font-weight: 900; line-height: 1.05; }
.mini-teams { font-size: 10px; font-weight: 800; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Punkt am Profil-Knopf: neue Sammelkarte wartet */
#tabbar a[data-tab="profile"] { position: relative; }
#tabbar a[data-tab="profile"].has-new::after {
  content: ""; position: absolute; top: 6px; left: calc(50% + 9px); width: 8px; height: 8px; border-radius: 50%;
  background: #ffd54f; border: 2px solid var(--surface);
}
.tcard-mini.is-new { outline: 2px solid #ffd54f; outline-offset: 2px; }

/* Heute ohne Spiel: Torlauts Hauptfigur groß im Kiosk-Kopf */
.kiosk-hero { display: grid; grid-template-columns: 44% 1fr; align-items: center; gap: 6px; padding: 14px 14px 10px 4px; }
.kiosk-hero-figure { width: 100%; height: auto; filter: drop-shadow(0 8px 16px rgba(0,0,0,.5)); animation: tl-hero-wave 4s ease-in-out infinite; transform-origin: 50% 90%; }
.kiosk-hero-text h3 { margin: 0 0 6px; font-size: 20px; }
.kiosk-hero-text p { margin: 0 0 6px; line-height: 1.4; }
.kiosk-hero-text .small { color: var(--muted); font-size: 12.5px; }
@keyframes tl-hero-wave { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-2.5deg) translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .kiosk-hero-figure { animation: none; } }
