/* ============================================================
   Pétanque Cup – Styles
   "Liquid Glass": dunkler, warmer Abendhimmel über dem Terrain,
   langsam treibende Farb-Schleier (Terracotta/Oliv/Gold), und
   ALLES schwebt in Glas: Pillen-Navigation, Glas-Karten mit
   Blur + Lichtkante (iOS-26-Optik), Personen als Glas-Pillen.
   Verspielt durch Animationen (gestaffeltes Einschweben,
   federnde Buttons, schwebende Kugel), sonst minimalistisch.
   ============================================================ */

:root {
  color-scheme: dark;

  --bg: #0c0f0e;
  --text: #f4f2ec;
  --text-2: #ccd1c6;
  --text-3: #96a095;
  --text-4: #67716a;

  /* Glas-Rezept (Basis für alle Flächen) */
  --glass-bg: linear-gradient(155deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
  --glass-bg-strong: linear-gradient(155deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.07));
  --glass-border: rgba(255, 255, 255, 0.13);
  --glass-border-soft: rgba(255, 255, 255, 0.08);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.15);
  --glass-shadow: 0 12px 32px -14px rgba(0, 0, 0, 0.55);
  --well: rgba(0, 0, 0, 0.26);

  /* Akzente */
  --accent: #d97757;            /* Terracotta: Kies + Cochonnet */
  --accent-bright: #e08a67;
  --accent-deep: #cd6a44;
  --accent-tint: rgba(217, 119, 87, 0.16);
  --olive: #9db97e;
  --olive-tint: rgba(120, 140, 93, 0.2);
  --gold: #e0b184;              /* Champion */
  --gold-tint: rgba(224, 177, 132, 0.14);
  --gold-line: rgba(224, 177, 132, 0.45);
  --danger: #e07d6d;
  --danger-tint: rgba(224, 90, 74, 0.16);
  --live: #ff5d5d;              /* LIVE-Markierung spielbereiter Matches */

  --radius: 24px;
  --spring: cubic-bezier(0.3, 1.4, 0.5, 1);

  /* Seitenbreite: auf grossen Bildschirmen ~75% nutzen (nie mehr als 80%),
     auf kleineren wie bisher 1100px. */
  --page-w: clamp(1100px, 75vw, 1900px);
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
}
html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body { background: transparent; }

/* Treibende Farb-Schleier hinter dem Glas (Abendlicht überm Terrain) */
html::before {
  content: '';
  position: fixed;
  z-index: -1;
  width: 58vmax;
  height: 58vmax;
  left: -14vmax;
  top: -20vmax;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 42% 42%, rgba(217, 119, 87, 0.17), transparent 65%);
  filter: blur(44px);
  animation: drift1 38s ease-in-out infinite alternate;
}
body::before {
  content: '';
  position: fixed;
  z-index: -1;
  width: 64vmax;
  height: 64vmax;
  right: -22vmax;
  bottom: -26vmax;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle at 32% 32%, rgba(224, 177, 132, 0.10), transparent 60%),
    radial-gradient(circle at 68% 68%, rgba(120, 140, 93, 0.15), transparent 62%);
  filter: blur(44px);
  animation: drift2 46s ease-in-out infinite alternate;
}
@keyframes drift1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(9vmax, 7vmax) scale(1.18); }
}
@keyframes drift2 {
  0% { transform: translate(0, 0) scale(1.1); }
  100% { transform: translate(-8vmax, -6vmax) scale(0.95); }
}

/* Feiner Grain über allem */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

button { font-family: inherit; }
.ico { flex-shrink: 0; }
::selection { background: rgba(217, 119, 87, 0.35); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Gestaffeltes Einschweben: Elemente mit style="--i:n" erscheinen nacheinander */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.card, .player-pill, .admin-row, .match-input, .mode-opt, .section-title, .champion-banner {
  animation: rise 0.5s var(--spring) both;
  animation-delay: calc(var(--i, 0) * 35ms);
}

/* ---------- Header: schwebende Glas-Pille ---------- */
.header {
  position: sticky;
  top: 10px;
  z-index: 40;
  max-width: min(var(--page-w), calc(100% - 20px));
  margin: 10px auto 0;
  padding: 10px 16px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight), var(--glass-shadow);
}
.header-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  margin: 0;
}
.brand {
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.05;
}
.brand .accent { color: var(--accent-bright); }
.brand-sub {
  font-size: clamp(11px, 1vw, 13px);
  color: var(--text-4);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  margin-top: 3px;
}

/* Tabs: Segmented Control in der Glas-Pille */
.tabs {
  display: flex;
  gap: 3px;
  margin: 0;
  padding: 4px;
  background: var(--well);
  border: 1px solid var(--glass-border-soft);
  border-radius: 999px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-3);
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, transform 0.15s var(--spring);
}
.tab:hover:not(:disabled):not(.active) { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.tab:active:not(:disabled) { transform: scale(0.96); }
.tab.active {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.1));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 10px rgba(0, 0, 0, 0.35);
}
.tab:disabled { color: var(--text-4); opacity: 0.55; cursor: not-allowed; }
/* Handy: Pille darf umbrechen, damit alle 5 Tabs auffindbar bleiben */
@media (max-width: 640px) {
  .header { top: 6px; padding: 9px 12px; border-radius: 24px; }
  .tabs { flex-wrap: wrap; border-radius: 20px; justify-content: center; }
  .tab { padding: 7px 11px; font-size: 12.5px; }
}

.main {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 30px 18px 90px;
}

.section-title { margin-bottom: 22px; }
.section-title h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
}
.section-title h2::after { content: '.'; color: var(--accent-bright); }
.section-title .sub { font-size: 13.5px; color: var(--text-3); margin-top: 7px; }

/* ---------- Glas-Karten ---------- */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--glass-highlight), var(--glass-shadow);
}

.empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--text-4);
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius);
  font-size: 14px;
}

.warning {
  background: var(--gold-tint);
  border: 1px solid var(--gold-line);
  color: var(--gold);
  padding: 11px 15px;
  border-radius: 18px;
  margin-bottom: 18px;
  font-size: 13px;
  line-height: 1.5;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.list-label {
  font-size: 11px;
  color: var(--text-4);
  margin-bottom: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

/* ---------- Boule-Avatare / Team-Glyphen ---------- */
.boule {
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #f4f7f9 0%, #c3ccd2 26%, #8c969d 55%, #5b656d 78%, #3a4147 100%);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
  padding: 3px;
  position: relative;
  flex-shrink: 0;
  display: inline-block;
}
.boule-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #2b3238;
  display: flex;
  align-items: center;
  justify-content: center;
}
.boule-inner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.boule-initials { color: #cfd6da; font-weight: 700; }
.boule-shine {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  filter: blur(2px);
  pointer-events: none;
}

.team-glyph {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.5s, opacity 0.5s;
}
.team-glyph .boule {
  box-shadow: 0 0 0 2px var(--tc, rgba(255, 255, 255, 0.18)), 0 3px 10px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.3s;
}
.glyph-win .boule {
  box-shadow: 0 0 0 2.5px var(--tc, var(--accent)), 0 0 16px -2px var(--tc, var(--accent)), 0 4px 14px rgba(0, 0, 0, 0.5);
}
.glyph-dim { filter: grayscale(1) brightness(0.62); opacity: 0.45; }
.glyph-champion .boule {
  box-shadow: 0 0 0 2.5px var(--gold), 0 0 26px -2px var(--gold), 0 4px 16px rgba(0, 0, 0, 0.55);
}
.cochonnet {
  border-radius: 50%;
  background: var(--accent);
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

/* ---------- Formulare / Buttons (alles Pillen) ---------- */
.text-input {
  background: var(--well);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 12px 18px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.text-input::placeholder { color: var(--text-4); }
.text-input:focus {
  border-color: rgba(217, 119, 87, 0.65);
  box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.18);
  background: rgba(0, 0, 0, 0.35);
}
.text-input.grow { flex: 1; min-width: 160px; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent-deep));
  color: #fff6f1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 6px 20px -8px var(--accent);
  transition: transform 0.2s var(--spring), box-shadow 0.2s, filter 0.15s;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 10px 26px -8px var(--accent); }
.btn-primary:active:not(:disabled) { transform: scale(0.96); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn-block { width: 100%; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  color: var(--text-2);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--glass-highlight);
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.2s var(--spring);
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.28); color: var(--text); }
.btn-ghost:active { transform: scale(0.96); }
.btn-ghost.btn-danger { color: var(--danger); }
.btn-ghost.btn-danger:hover { border-color: var(--danger); background: var(--danger-tint); }

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-4);
  cursor: pointer;
  padding: 8px;
  border-radius: 999px;
  display: inline-flex;
  transition: color 0.15s, background 0.15s, transform 0.2s var(--spring);
}
.icon-btn:hover { color: var(--danger); background: var(--danger-tint); }
.icon-btn:active { transform: scale(0.9); }

.actions-row { display: flex; gap: 12px; flex-wrap: wrap; }

.toast {
  color: var(--olive);
  font-weight: 600;
  height: 20px;
  opacity: 0;
  transition: opacity 0.2s;
}
.toast.show { opacity: 1; }

/* ---------- Anmeldung ----------
   Ab 860px (Desktop): Formular + "Bereits dabei" nebeneinander, Formular
   selbst breit und horizontal (Foto links, Name+Button rechts).
   Darunter (Handy/Tablet): Formular über die volle Breite, darunter die
   bereits angemeldeten Personen. */
.reg-grid {
  display: grid;
  grid-template-columns: minmax(420px, 560px) 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 860px) {
  .reg-grid { grid-template-columns: 1fr; gap: 20px; }
}
.reg-card { padding: 28px 22px; }
@media (min-width: 861px) {
  .reg-card { padding: 34px 34px; }
  .reg-form { flex-direction: row; align-items: center; gap: 28px; }
  .reg-photo-col { flex-shrink: 0; text-align: center; }
  .reg-fields { flex: 1; min-width: 0; }
  .reg-fields .text-input { font-size: 17px; padding: 15px 20px; }
  .reg-fields .btn-primary { font-size: 16px; padding: 15px 22px; }
  .reg-photo-col .hint { font-size: 14px; }
}
.reg-form { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.photo-picker { border: none; background: none; cursor: pointer; position: relative; padding: 0; }
/* Die grosse Kugel schwebt sanft */
.reg-form .photo-picker { animation: floatBob 4.5s ease-in-out infinite; }
@keyframes floatBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.camera-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent-deep));
  color: #fff6f1;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
}
/* Kleine Variante für die Foto-ändern-Kugel in der Personenliste */
.camera-badge-sm {
  width: 17px;
  height: 17px;
  bottom: -3px;
  right: -3px;
  border-width: 1px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.hint { font-size: 13px; color: var(--text-3); }

/* Personen als Glas-Pillen in einem echten Grid statt loser Wolke: auf dem
   Handy immer 2 Spalten, ab Tablet/Desktop wachsen die Pillen mit (bis max.
   4 Spalten auf sehr breiten Screens), statt vieler winziger Pillen in
   einer Reihe mit viel Leerraum daneben. */
.player-cloud {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  max-width: 980px;
}
.player-cloud .empty { grid-column: 1 / -1; }
.player-pill {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 10px 22px 10px 10px;
  border-radius: 999px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight), 0 6px 18px -10px rgba(0, 0, 0, 0.5);
  min-width: 0;
  max-width: 100%;
  transition: transform 0.25s var(--spring), border-color 0.2s;
}
.player-pill:hover { transform: translateY(-2px) rotate(-1deg); border-color: rgba(255, 255, 255, 0.25); }
.player-pill span {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .player-cloud { grid-template-columns: 1fr 1fr; gap: 10px; max-width: none; }
  .player-pill { padding: 8px 14px 8px 8px; gap: 10px; }
  .player-pill span { font-size: 14px; }
}
/* "Ohne Team": bewusst kompakter/dezenter als "Bereits dabei" (Warnhinweis,
   keine grosse Feier-Liste) */
.no-team-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  max-width: 700px;
  margin-bottom: 8px;
}
.player-pill.no-team {
  padding: 6px 15px 6px 7px;
  border: 1px dashed var(--gold-line);
  background: var(--gold-tint);
}
.player-pill.no-team span { font-size: 13.5px; }
.player-pill.no-team .boule { filter: grayscale(0.35); }
@media (max-width: 640px) {
  .no-team-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Verwaltung ---------- */
.admin-add {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
  max-width: 640px;
  border-radius: 999px;
  padding: 10px 12px;
}
@media (max-width: 560px) {
  .admin-add { border-radius: var(--radius); }
}
/* Personenliste als Pillen-Grid: Desktop mehrere Spalten, Handy 2 Spalten */
.admin-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.admin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border-soft);
  border-radius: 999px;
  padding: 6px 8px 6px 7px;
  min-width: 0;
  box-shadow: var(--glass-highlight);
  transition: border-color 0.2s;
}
.admin-row:hover { border-color: var(--glass-border); }
.admin-list .empty { grid-column: 1 / -1; }
.admin-row .grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-row .icon-btn { flex-shrink: 0; padding: 6px; }
.admin-row .boule { flex-shrink: 0; }
.admin-row .photo-picker { flex-shrink: 0; }
@media (max-width: 640px) {
  .admin-list { grid-template-columns: 1fr 1fr; gap: 8px; }
  .admin-row { gap: 8px; }
}
.grow { flex: 1; font-weight: 500; min-width: 0; }

/* Oberer "Teams auslosen"-Button (direkt nach Spielmodus/Trostrunde) */
.admin-draw-top { margin-bottom: 28px; }
.avatar-gen-btn { margin: 4px 0 22px; }

/* "Ohne Team"-Grid/Pillen: siehe .no-team-grid / .player-pill.no-team weiter
   oben (bei .player-cloud), dort gemeinsam mit dem Grid-Layout definiert. */
.no-team-hint { margin-bottom: 18px; }

/* Spielmodus-Auswahl (Tête-à-tête / Doublette / Triplette) */
.mode-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 680px;
  margin-bottom: 20px;
}
.mode-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mode-opt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 13px 15px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  min-width: 0;
  box-shadow: var(--glass-highlight);
  transition: border-color 0.15s, background 0.15s, transform 0.2s var(--spring);
}
.mode-opt:hover { border-color: rgba(217, 119, 87, 0.55); }
.mode-opt:active { transform: scale(0.98); }
.mode-opt.active {
  border-color: var(--accent);
  background: linear-gradient(155deg, rgba(217, 119, 87, 0.24), rgba(217, 119, 87, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 22px -8px var(--accent);
}
.mode-opt .mode-label { font-weight: 800; font-size: 14px; }
.mode-opt.active .mode-label { color: var(--accent-bright); }
.mode-opt .mode-name { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.mode-opt .mode-sub { font-size: 11px; color: var(--text-3); }
@media (max-width: 480px) {
  .mode-row, .mode-row.two { grid-template-columns: 1fr; gap: 8px; }
  .mode-opt { flex-direction: row; align-items: baseline; gap: 8px; flex-wrap: wrap; }
}

/* ---------- Regeln ---------- */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.rule-card h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.rule-card h3 .ico { color: var(--accent-bright); flex-shrink: 0; }
.rule-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.6;
}
.rule-card li { margin-bottom: 6px; }
.rule-card li:last-child { margin-bottom: 0; }
.rule-card b { color: var(--text); }
.rule-card-wide { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .rules-grid { grid-template-columns: 1fr; gap: 10px; }
}

/* ---------- Teams ---------- */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.team-card {
  border-top: 3px solid var(--tc, var(--glass-border));
  box-shadow: var(--glass-highlight), 0 0 30px -18px var(--tc, transparent), var(--glass-shadow);
  transition: transform 0.25s var(--spring), box-shadow 0.25s;
}
.team-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-highlight), 0 0 34px -14px var(--tc, transparent), var(--glass-shadow);
}
.team-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.team-num {
  color: #10130c;
  background: var(--tc, var(--accent));
  font-weight: 800;
  font-size: 12px;
  border-radius: 999px;
  padding: 2px 9px;
}
.team-name { font-weight: 800; font-size: 16.5px; letter-spacing: -0.01em; }
.team-body { display: flex; align-items: center; gap: 14px; }
.team-players { font-size: 13px; color: var(--text-2); line-height: 1.5; }

.draw-info {
  font-size: 13px;
  font-style: italic;
  color: var(--text-3);
  margin: -8px 0 18px;
}

/* ---------- Turnierkreis ---------- */
.bracket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.champion-banner {
  background: linear-gradient(155deg, rgba(224, 177, 132, 0.2), rgba(224, 177, 132, 0.06));
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 46px -18px var(--gold);
  padding: 18px 20px;
  margin: 8px 0 18px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.champion-banner .trophy { color: var(--gold); display: flex; }
.champion-label {
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
}
/* Startgrösse; fitChampionNames() in app.js verkleinert bei Bedarf dynamisch,
   damit der Name auf eine Zeile passt statt umzubrechen/abzuschneiden.
   overflow-wrap ist nur der Fallback, falls JS mal nicht läuft. */
.champion-name { font-size: 25px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; overflow-wrap: anywhere; }
.champion-players { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.champion-banner.cons {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight), var(--glass-shadow);
  padding: 12px 16px;
}
.champion-banner.cons .trophy { color: var(--olive); }
.champion-banner.cons .champion-label { color: var(--olive); }
.champion-banner.cons .champion-name { font-size: 19px; }

.wheel-caption {
  font-size: 11px;
  color: var(--text-4);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 20px 0 8px;
  text-align: center;
}
.wheel-caption .caption-sub {
  display: block;
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 500;
  font-size: 12.5px;
  font-style: italic;
  color: var(--text-4);
  margin-top: 4px;
}

/* Das Rad in einem grossen dunklen Glas-Panel */
.wheel-outer {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56vh;
  max-height: 620px;
  background: rgba(4, 6, 5, 0.4);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--glass-border-soft);
  border-radius: 28px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 0 80px rgba(0, 0, 0, 0.3);
}
.wheel-outer.consolante { height: 42vh; max-height: 440px; }
@media (max-width: 640px) {
  .wheel-outer { height: min(96vw, 58vh); border-radius: 20px; }
  .wheel-outer.consolante { height: min(80vw, 44vh); }
}
/* Am Handy ist der Turnierkreis zu klein zum Lesen: Rad ausblenden und
   stattdessen die Ergebnis-Tabelle (.results-mobile) zeigen. Der Vollbild-
   Modus (TV) ist davon nicht betroffen (eigene .tv-root-Shell). */
.results-mobile { display: none; }
@media (max-width: 640px) {
  .bracket-wheels { display: none; }
  .results-mobile { display: block; margin-top: 20px; }
}
.results-list { display: flex; flex-direction: column; gap: 10px; }
.result-card { padding: 12px 14px 13px; }
.rc-tag {
  color: var(--text-4);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  margin-bottom: 9px;
}
.rc-tag.cons { color: var(--olive); }
.rc-team {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 0;
}
.rc-team .legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tc);
  box-shadow: 0 0 8px -1px var(--tc);
  flex-shrink: 0;
}
.rc-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.25;
}
.rc-team.won .rc-name { font-weight: 800; font-size: 15px; color: var(--tc); }
.rc-team.lost { opacity: 0.5; }
.rc-team.lost .rc-name { font-weight: 500; font-size: 14px; color: var(--text-3); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.3); }
.rc-check { color: var(--tc); display: inline-flex; flex-shrink: 0; }

.wheel-inner { position: relative; }
.wheel-svg { position: absolute; top: 0; left: 0; pointer-events: none; }

.wheel-ring { fill: none; stroke: rgba(244, 242, 236, 0.06); stroke-width: 1; }
.wheel-edge {
  fill: none;
  stroke: rgba(244, 242, 236, 0.11);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wheel-edge.edge-dead { stroke: rgba(244, 242, 236, 0.04); }

.edge-glow {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.15;
}
.edge-core {
  fill: none;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.95;
}
.edge-core.edge-walkover { stroke-dasharray: 2 8; opacity: 0.75; }
.edge-glow.edge-walkover { opacity: 0.07; }
.edge-core.edge-out { opacity: 0.2; }
.edge-glow.edge-out { opacity: 0.04; }
.edge-core.edge-champ { stroke-width: 4; }
.edge-glow.edge-champ { stroke-width: 13; opacity: 0.3; }

.ring-sweep {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 14 86;
  opacity: 0;
  animation: ringSweep 2s ease-out 0.25s;
}
@keyframes ringSweep {
  0% { stroke-dashoffset: 0; opacity: 0; }
  12% { opacity: 0.9; }
  85% { opacity: 0.55; }
  100% { stroke-dashoffset: -200; opacity: 0; }
}

.wheel-avatars { position: absolute; inset: 0; }
.wheel-node {
  position: absolute;
  border: none;
  background: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}
button.wheel-node { cursor: pointer; }
.wheel-node:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 999px; }
.wheel-node.champion-node { z-index: 3; }

/* Pulsierender LIVE-Ring: dieses Spiel ist bereit und läuft jetzt.
   Die spielbereiten Knoten sind zusätzlich grösser gerendert (readyScale in
   buildWheelInnerHTML) und liegen über den anderen. */
.wheel-node.ready { z-index: 4; }
.wheel-node.ready .team-glyph::after {
  content: '';
  position: absolute;
  inset: -7px -10px;
  border-radius: 999px;
  border: 2px solid var(--live);
  opacity: 0;
  animation: readyPulse 2.2s ease-out infinite;
  pointer-events: none;
}
.tv-stage .wheel-node.ready .team-glyph::after { border-width: 3px; }
@keyframes readyPulse {
  0% { opacity: 0; transform: scale(0.85); }
  30% { opacity: 0.7; }
  100% { opacity: 0; transform: scale(1.18); }
}

/* Blink-Animation für Live-Markierungen (Liste + TV-Seitenleiste; im Rad
   selbst gibt es bewusst keinen "LIVE"-Schriftzug mehr, dort reichen
   Vergrösserung + roter Puls-Ring) */
@keyframes liveBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.wheel-node.node-arrive { animation: nodePop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes nodePop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
/* Ankunft nach der Wander-Animation: bleibt dank animation-delay (inline,
   von JS auf TRAVEL_MS gesetzt) unsichtbar, bis der Wanderpunkt eintrifft,
   dann Split-in mit leichtem Überschwingen ("aus einem Punkt werden wieder
   zwei Kugeln"). animation-fill-mode "both" sorgt dafür, dass der 0%-Zustand
   (unsichtbar) schon WÄHREND der Verzögerung gilt. */
.wheel-node.node-arrive-slow { animation: nodeSplitIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes nodeSplitIn {
  0% { transform: scale(0.3); opacity: 0; }
  55% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
/* Abflug-Puls an der alten Position, im selben Moment wie der Lichtblitz
   des Wanderpunkts (t=0) – deutet an, dass hier gerade Energie aufbricht. */
.wheel-node.node-depart-pulse .team-glyph { animation: departPulse 0.5s ease-out; }
@keyframes departPulse {
  0% { filter: brightness(1) saturate(1); transform: scale(1); }
  35% { filter: brightness(1.7) saturate(1.4); transform: scale(1.14); }
  100% { filter: brightness(1) saturate(1); transform: scale(1); }
}
.wheel-node.node-justlost .team-glyph { animation: fadeToDim 0.9s ease 0.2s both; }
@keyframes fadeToDim {
  from { filter: none; opacity: 1; }
  to { filter: grayscale(1) brightness(0.62); opacity: 0.45; }
}

.wheel-team-label {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}
/* Im TV-Vollbild ist rund ums Rad mehr Platz: Namen dürfen breiter werden. */
.tv-stage .wheel-team-label { font-size: 13px; max-width: 190px; }
.wheel-center-mark {
  position: absolute;
  transform: translate(-50%, -50%);
  color: rgba(244, 242, 236, 0.14);
  pointer-events: none;
  animation: centerBreath 4s ease-in-out infinite;
}
@keyframes centerBreath {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ---------- Offene Spiele (Eingabe) ---------- */
.open-matches { margin-top: 22px; }
.match-input {
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--glass-border-soft);
  border-radius: 20px;
  padding: 10px 12px 12px;
  margin-bottom: 10px;
  box-shadow: var(--glass-highlight), var(--glass-shadow);
}
.match-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: var(--text-4);
  margin: 2px 0 8px 4px;
}
/* Blinkender Live-Punkt NUR vor dem gerade laufenden Spiel (dieselbe
   Sprache wie das LIVE-Abzeichen im Turnierkreis) */
.match-tag.live::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 8px var(--live);
  margin-right: 8px;
  vertical-align: 1px;
  animation: liveBlink 1.4s ease-in-out infinite;
}
.match-tag.live { color: #ff9d96; }
.match-tag.cons { color: var(--olive); }
/* Laufendes Spiel hervorheben, wartende Spiele ausgrauen und sperren */
.match-input.live { border-color: rgba(255, 93, 93, 0.4); }
.match-input.queued { opacity: 0.55; }
.match-input.queued .match-side { cursor: not-allowed; }
.match-input.queued .match-side:hover { border-color: var(--glass-border-soft); background: var(--well); transform: none; }
.match-row { display: flex; align-items: stretch; gap: 10px; }
.match-side {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 14px;
  background: var(--well);
  border: 1px solid var(--glass-border-soft);
  border-left: 3px solid var(--tc, var(--glass-border));
  border-radius: 16px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.2s var(--spring);
}
.match-side:hover { border-color: var(--tc, var(--accent)); background: rgba(255, 255, 255, 0.05); }
.match-side:active { transform: scale(0.98); background: var(--accent-tint); }
.ms-text { min-width: 0; }
.ms-name {
  font-weight: 700;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ms-players {
  font-size: 12px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ms-vs {
  align-self: center;
  color: var(--text-4);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}
/* Schmale Bildschirme (Handy): Kugeln oben, Teamname + Spieler zentriert
   darunter – nebeneinander wird der Text sonst abgeschnitten. */
@media (max-width: 640px) {
  .match-side {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    padding: 12px 8px 11px;
    text-align: center;
    border-left: 1px solid var(--glass-border-soft);
    border-top: 3px solid var(--tc, var(--glass-border));
  }
  .ms-text { width: 100%; }
  .ms-name {
    font-size: 13.5px;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.25;
  }
  .ms-players {
    font-size: 11.5px;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
  }
}

.cons-section { margin-top: 28px; }

/* ---------- Bestätigungs-Dialog ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 6, 5, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-card {
  background: linear-gradient(155deg, rgba(48, 54, 50, 0.92), rgba(24, 28, 26, 0.92));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  max-width: 440px;
  width: 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 18px 60px -18px rgba(0, 0, 0, 0.85);
  animation: popIn 0.3s var(--spring);
}
.modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 8px;
}
.modal-title .ico { color: var(--danger); flex-shrink: 0; }
/* Nicht-destruktive Bestätigung (z. B. "Turnier starten?"): Akzent statt Rot */
.modal-ok .modal-title .ico { color: var(--accent-bright); }
.modal-text { color: var(--text-2); font-size: 14px; line-height: 1.55; margin-bottom: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.btn-danger-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, #e0796a, #c2503f);
  color: #fff4f1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.2s var(--spring), box-shadow 0.15s;
}
.btn-danger-solid:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 18px -8px var(--danger); }
.btn-danger-solid:active { transform: scale(0.96); }

/* ---------- Vollbild / TV ---------- */
.tv-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  background:
    radial-gradient(1100px 750px at 78% -10%, rgba(217, 119, 87, 0.1), transparent 60%),
    radial-gradient(950px 700px at 5% 112%, rgba(120, 140, 93, 0.08), transparent 60%),
    var(--bg);
}
/* Eigener Grain im Vollbild (body::after ist im Fullscreen-Element nicht sichtbar) */
.tv-root::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.tv-stage { flex: 1; min-width: 0; display: flex; }
.tv-stage .wheel-outer {
  height: 100%;
  max-height: none;
  flex: 1;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Ziehbarer Trenner zwischen Rad und Seitenleiste (nur im TV-Querformat) */
.tv-resizer {
  flex: 0 0 10px;
  align-self: stretch;
  position: relative;
  cursor: col-resize;
  z-index: 60;
  touch-action: none;
}
.tv-resizer::before {
  content: '';
  position: absolute;
  inset: 0 4px;
  border-radius: 3px;
  background: var(--glass-border-soft);
  transition: background 0.15s;
}
.tv-resizer::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 46px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.28);
  transition: background 0.15s;
}
.tv-resizer:hover::before, .tv-resizer.dragging::before { background: rgba(217, 119, 87, 0.55); }
.tv-resizer:hover::after, .tv-resizer.dragging::after { background: var(--accent-bright); }

.tv-side {
  flex-shrink: 0;
  width: clamp(270px, 25vw, 410px);
  border-left: 1px solid var(--glass-border-soft);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}
.tv-side .champion-banner { margin: 0; }
/* Seitenleiste ist schmal: kleinere Start-/Maximalgrösse; fitChampionNames()
   schrumpft von hier aus weiter, falls der Name noch nicht passt. */
.tv-side .champion-name { font-size: 22px; }
.tv-side .champion-banner .grow { min-width: 0; }
.tv-brand .brand { font-size: 23px; }
.tv-block .list-label { margin-bottom: 8px; }

.tv-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border-soft);
  box-shadow: var(--glass-highlight);
  font-size: 13.5px;
  font-weight: 600;
  max-width: 100%;
}
.legend-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tc, var(--text-3));
  box-shadow: 0 0 9px -1px var(--tc, transparent);
  flex-shrink: 0;
}
.legend-chip.out { opacity: 0.35; filter: grayscale(0.7); }
.legend-chip.out span { text-decoration: line-through; }

.tv-next-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border-soft);
  box-shadow: var(--glass-highlight);
  margin-bottom: 8px;
  font-size: 14.5px;
  font-weight: 600;
}
.tv-next-row.cons { border-left: 3px solid var(--olive); }
/* Das gerade laufende Spiel in der TV-Seitenleiste */
.tv-next-row.live {
  border-color: rgba(255, 93, 93, 0.45);
  box-shadow: var(--glass-highlight), 0 0 20px -8px var(--live);
}
.tv-next-label { margin-top: 14px; }
.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 93, 93, 0.15);
  border: 1px solid rgba(255, 93, 93, 0.5);
  color: #ff9d96;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  flex-shrink: 0;
}
.live-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 8px var(--live);
  animation: liveBlink 1.4s ease-in-out infinite;
}
.tv-next-team {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tv-next-team:last-of-type { justify-content: flex-end; }
.tv-next-vs { color: var(--text-4); font-size: 11px; font-weight: 700; flex-shrink: 0; }

.tv-cons-wheel {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  max-height: none;
  background: rgba(4, 6, 5, 0.35);
  border: 1px solid var(--glass-border-soft);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.exit-fullscreen-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(12, 15, 14, 0.6);
  color: var(--text-2);
  cursor: pointer;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s, transform 0.2s var(--spring);
}
.exit-fullscreen-btn:hover { border-color: rgba(255, 255, 255, 0.3); color: var(--text); }
.exit-fullscreen-btn:active { transform: scale(0.9); }
.tv-root .exit-fullscreen-btn { right: auto; left: 16px; }

/* Hochformat / schmale Screens: nur der Kreis im Vollbild */
@media (max-aspect-ratio: 6/5), (max-width: 760px) {
  .tv-side, .tv-resizer { display: none; }
  .tv-root .exit-fullscreen-btn { left: auto; right: 16px; }
}

/* ---------- Konfetti-Canvas ---------- */
.fx-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 120;
}

@keyframes popIn {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

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