/* src/stil.css — BLOCKFALL Oberfläche. Dunkel, Glas, Neon-Akzente; die Grube selbst
   rendert WebGL hinter den transparenten Bereichen #grube / #vorschau / #gegner-grube. */
@font-face {
  font-family: 'Switzer'; font-weight: 700; font-style: normal; font-display: swap;
  src: url('../assets/switzer-700.woff2') format('woff2');
}
:root {
  --bg: #05070E;
  --text: #EEF2F7;
  --mut: #A3AEC0;
  --dim: #8794A7;
  --lime: #9DCD5A;
  --neon: #38E0AE;
  --gold: #F4C95D;
  --rot: #FF5468;
  --orange: #F2B84B;
  --glas: linear-gradient(160deg, rgba(26, 34, 58, 0.82), rgba(9, 13, 26, 0.76));
  --rand: rgba(255, 255, 255, 0.075);
  --rand-hell: rgba(255, 255, 255, 0.15);
  --schatten: 0 18px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --titel: 'Switzer', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --zahl: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --seite: 264px;
  --kopf-h: 0px;
  --touch-h: 0px;
  --rechts-h: 0px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body {
  color: var(--text); font: 15px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden; overscroll-behavior: none; -webkit-font-smoothing: antialiased;
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
kbd {
  display: inline-grid; place-items: center; min-width: 26px; height: 24px; padding: 0 6px; margin-right: 3px;
  border-radius: 6px; border: 1px solid var(--rand-hell); border-bottom-width: 2px;
  background: rgba(255, 255, 255, 0.06); font: 600 12px/1 var(--zahl); color: var(--text);
}
kbd.lang { min-width: 74px; }

#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }

#app {
  position: fixed; inset: 0; z-index: 1; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
}
body.z-laden #app { visibility: hidden; }

/* ── Ladebildschirm ─────────────────────────────────────────────────────────── */
#laden {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(900px 600px at 50% 40%, rgba(56, 224, 174, 0.07), transparent 60%), var(--bg);
  transition: opacity 0.45s ease;
}
body:not(.z-laden) #laden { opacity: 0; pointer-events: none; }
.lade-logo { font: 700 clamp(30px, 7vw, 56px)/1 var(--titel); letter-spacing: 0.16em; }
.lade-logo b, .logo-klein b { color: var(--lime); }
.lade-balken { width: 180px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.lade-balken i { display: block; width: 40%; height: 100%; background: linear-gradient(90deg, var(--lime), var(--neon)); animation: laden 1.1s ease-in-out infinite; }
@keyframes laden { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
#ladetext { color: var(--mut); font-size: 13px; }

/* ── Bühne ──────────────────────────────────────────────────────────────────── */
#kopf { display: none; grid-row: 1; }
#buehne { min-height: 0; position: relative; grid-row: 2; }
#touch { grid-row: 3; }
#grube-zelle { position: relative; }
#grube-rahmen { position: absolute; inset: 0; }
#grube { position: absolute; inset: 0; touch-action: none; }
#tiefe {
  position: absolute; top: 9%; bottom: 9%; left: -22px; width: 10px;
  display: flex; flex-direction: column-reverse; gap: 3px; pointer-events: none;
}
#tiefe i {
  flex: 1; border-radius: 3px; background: var(--f); opacity: 0.2;
  transition: opacity 0.25s ease, box-shadow 0.25s ease;
}
#tiefe i.belegt { opacity: 0.95; box-shadow: 0 0 10px var(--f); }
#tiefe i.stein { outline: 1.5px solid rgba(255, 255, 255, 0.9); outline-offset: 1px; opacity: 0.6; }

.seite { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tafel {
  position: relative; padding: 14px 16px; border-radius: 14px;
  background: var(--glas); border: 1px solid var(--rand); box-shadow: var(--schatten);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.tafel-label { display: block; font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); font-weight: 650; }
.punkte {
  font: 800 40px/1.1 var(--zahl); font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
  background: linear-gradient(180deg, #FFFFFF, #CFE9FF); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(120, 220, 255, 0.25));
}
.punkte-sprung {
  position: absolute; right: 16px; top: 12px; font: 800 15px/1 var(--zahl); color: var(--neon);
  opacity: 0; pointer-events: none;
}
.punkte-sprung.an { animation: sprung 0.9s ease-out; }
@keyframes sprung { 0% { opacity: 0; transform: translateY(8px); } 15% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-16px); } }
.wert { display: block; font: 750 24px/1.2 var(--zahl); font-variant-numeric: tabular-nums; }
.wert.gold { color: var(--gold); }
.raster3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.logo-klein { font: 700 22px/1 var(--titel); letter-spacing: 0.18em; padding: 4px 4px 6px; }
.tasten-hilfe { display: grid; gap: 7px; font-size: 12.5px; color: var(--mut); }
.tasten-hilfe div { display: flex; align-items: center; gap: 2px; }
.tasten-hilfe span { margin-left: 6px; }

/* Render-Fenster (#vorschau, #gegner-grube): Die Karte darf über WebGL NICHTS verdecken
   oder verwischen. Darum kein backdrop-filter; die Kartenfläche entsteht aus dem Schatten
   des Fensters (füllt alles AUSSER dem Fenster), die Karte schneidet ihn mit overflow ab. */
.vorschau-tafel, .gegner-tafel { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; overflow: hidden; }
#vorschau, #gegner-grube { box-shadow: 0 0 0 999px rgba(15, 21, 38, 0.86); border-radius: 10px; }
.vorschau-tafel .tafel-label, .gegner-tafel > * { position: relative; z-index: 1; }
/* Das Render-Fenster malt seinen 999-px-Schatten über die Karte: es muss UNTER Kopfzeile und Namen liegen
   (gleicher z-index → das spätere Geschwister gewinnt, Name und „Gegner“ waren fast unsichtbar). */
.gegner-tafel > #gegner-grube { z-index: 0; }
.vorschau-tafel #vorschau { width: 100%; aspect-ratio: 1.6; margin-top: 6px; }
.gegner-tafel { display: none; }
body.m-duell .gegner-tafel { display: block; }
.gegner-name { font: 700 16px/1.3 var(--titel); letter-spacing: 0.02em; margin: 2px 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#gegner-grube { width: 100%; aspect-ratio: 1; border-radius: 10px; }
.gegner-werte { margin-top: 6px; font-size: 12.5px; color: var(--mut); }
.gegner-werte b { color: var(--text); font-variant-numeric: tabular-nums; }
.mobil-rekord { display: none; }

/* ── Sprachchat (nur im Duell; Push-to-Talk, src/sprache.js) ───────────────── */
.sprach-tafel { display: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.m-duell .sprach-tafel { display: block; }
.sprach-zeile { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; margin-top: 8px; }
.sprech-knopf {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 0; padding: 0 10px;
  border-radius: 12px; border: 1px solid var(--rand-hell); background: rgba(56, 224, 174, 0.08); color: var(--text);
  font-weight: 700; font-size: 14px; touch-action: none; -webkit-touch-callout: none;
  transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.06s ease, opacity 0.12s ease;
}
.sprech-knopf svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sprech-knopf kbd { margin: 0; min-width: 22px; height: 20px; font-size: 11px; }
.sprach-tafel.sendet .sprech-knopf { background: linear-gradient(160deg, rgba(56, 224, 174, 0.95), rgba(32, 168, 128, 0.95)); border-color: rgba(190, 255, 232, 0.9);
  color: #04140F; box-shadow: 0 0 0 2px rgba(56, 224, 174, 0.35), 0 0 30px rgba(56, 224, 174, 0.65); transform: scale(0.98); }
.sprach-tafel.sendet .sprech-knopf kbd { color: #04140F; border-color: rgba(4, 20, 15, 0.5); background: rgba(255, 255, 255, 0.35); }
.sprach-tafel.sendet .sprach-status { color: var(--neon); }
.sprach-tafel.nur-hoeren .sprech-knopf, .sprach-tafel.aus .sprech-knopf, .sprach-tafel.ohne-server .sprech-knopf { opacity: 0.45; }
.stumm-knopf { display: grid; place-items: center; min-width: 0; border-radius: 12px; border: 1px solid var(--rand-hell); background: rgba(255, 255, 255, 0.04); }
.stumm-knopf svg { width: 20px; height: 20px; fill: none; stroke: var(--text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stumm-knopf .kreuz-x { display: none; }
.stumm-knopf[aria-pressed="true"] { border-color: rgba(255, 84, 104, 0.6); background: rgba(255, 84, 104, 0.12); }
.stumm-knopf[aria-pressed="true"] .welle { display: none; }
.stumm-knopf[aria-pressed="true"] .kreuz-x { display: inline; stroke: #FFB3BC; }
.sprach-status { margin-top: 8px; font-size: 12.5px; color: var(--mut); min-height: 1.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sprach-tafel.gegner-spricht .sprach-status { color: var(--neon); }
body.m-duell .sprach-tafel { padding-bottom: 20px; }
.sprach-pegel { position: absolute; left: 16px; right: 16px; bottom: 9px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.09); overflow: hidden; }
.sprach-pegel b { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--neon), var(--lime)); transform-origin: left center; transform: scaleX(var(--pegel, 0)); transition: transform 0.08s linear; }
body.m-duell .gegner-tafel.spricht { border-color: transparent; box-shadow: 0 0 0 2px rgba(56, 224, 174, 0.9), 0 0 34px rgba(56, 224, 174, 0.5); }
.tasten-hilfe .nur-duell { display: none; }
body.m-duell .tasten-hilfe .nur-duell { display: flex; }
body.m-duell .tasten-hilfe .nur-solo { display: none; }
.sprach-hinweis kbd { height: 20px; min-width: 22px; font-size: 11px; }
.fuss a, .sprach-hinweis a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.fuss a:hover, .sprach-hinweis a:hover { color: var(--text); }

/* Meldungen über der Grube */
#countdown, #toasts { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
#countdown span {
  font: 700 clamp(64px, 16vmin, 150px)/1 var(--titel); color: #fff;
  text-shadow: 0 0 40px rgba(56, 224, 174, 0.7), 0 0 90px rgba(56, 224, 174, 0.35);
  animation: zaehlen 0.7s cubic-bezier(.2, .9, .3, 1.2) both;
}
@keyframes zaehlen { 0% { opacity: 0; transform: scale(1.8); } 25% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(0.85); } }
#toasts { align-content: center; gap: 6px; }
.toast {
  font: 700 clamp(22px, 5vmin, 40px)/1.1 var(--titel); letter-spacing: 0.08em; text-align: center; padding: 0 12px;
  color: #fff; text-shadow: 0 0 24px rgba(120, 220, 255, 0.65);
  animation: toast 1.35s cubic-bezier(.2, .9, .3, 1.2) both;
}
.toast.gross { font-size: clamp(30px, 7vmin, 58px); background: linear-gradient(180deg, #fff, #9FF3D6); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 22px rgba(56, 224, 174, 0.6)); text-shadow: none; }
.toast.gold { font-size: clamp(32px, 8vmin, 64px); color: var(--gold); text-shadow: 0 0 30px rgba(244, 201, 93, 0.8); }
.toast.level { color: var(--lime); text-shadow: 0 0 26px rgba(157, 205, 90, 0.8); }
.toast.warn { font-size: clamp(15px, 3.2vmin, 22px); color: #FFB3BC; text-shadow: 0 0 18px rgba(255, 84, 104, 0.7); letter-spacing: 0.02em; }
.toast.angriff, .toast.info { font-size: clamp(14px, 3vmin, 20px); color: var(--neon); letter-spacing: 0.02em; }
@keyframes toast { 0% { opacity: 0; transform: scale(0.6); } 14% { opacity: 1; transform: scale(1.08); } 26% { transform: scale(1); } 78% { opacity: 1; } 100% { opacity: 0; transform: translateY(-18px) scale(0.96); } }
#muell-anzeige {
  position: absolute; left: 50%; bottom: 3%; transform: translateX(-50%); padding: 5px 12px; border-radius: 9px;
  font: 700 13px/1.2 var(--zahl); color: #fff; background: rgba(255, 84, 104, 0.82); box-shadow: 0 0 22px rgba(255, 84, 104, 0.55);
  opacity: 0; transition: opacity 0.2s ease; pointer-events: none; white-space: nowrap;
}
#muell-anzeige.an { opacity: 1; animation: pochen 0.9s ease-in-out infinite; }
@keyframes pochen { 50% { box-shadow: 0 0 34px rgba(255, 84, 104, 0.85); } }

/* ── Knöpfe, Felder ─────────────────────────────────────────────────────────── */
.primaer-knopf, .sekundaer-knopf, .leise-knopf {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px;
  border-radius: 12px; border: 1px solid transparent; font-weight: 700; letter-spacing: 0.01em;
  transition: transform 0.12s ease, filter 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.primaer-knopf {
  color: #06110C; font-size: 16.5px; background: linear-gradient(135deg, #B9EC72, #4FD6A5);
  box-shadow: 0 10px 30px rgba(79, 214, 165, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.sekundaer-knopf { color: var(--text); background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.24); }
.leise-knopf { color: #C3CCDA; background: rgba(255, 255, 255, 0.035); min-height: 44px; font-weight: 600; }
.primaer-knopf:hover, .sekundaer-knopf:hover { filter: brightness(1.1); transform: translateY(-1px); }
.leise-knopf:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.primaer-knopf:active, .sekundaer-knopf:active, .leise-knopf:active { transform: scale(0.98); }
button:focus-visible, input:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; }
.sekundaer-knopf small { font-weight: 600; color: var(--neon); font-size: 12.5px; }
.symbol-knopf {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--rand-hell);
}
.symbol-knopf svg { width: 20px; height: 20px; fill: var(--text); }
.feld { display: grid; gap: 6px; font-size: 12px; color: var(--dim); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 650; }
.feld input, .online-form input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--rand-hell);
  background: rgba(3, 6, 14, 0.7); color: var(--text); font-size: 16px; letter-spacing: 0; text-transform: none; font-weight: 500;
  user-select: text; -webkit-user-select: text;
}
.feld input:focus, .online-form input:focus { border-color: var(--neon); box-shadow: 0 0 0 3px rgba(56, 224, 174, 0.16); outline: none; }

/* ── Schirme (Overlays) ─────────────────────────────────────────────────────── */
/* ⛔ Kein backdrop-filter und keine Opacity-Animation auf dem SCHIRM: verschachtelt mit dem
   Filter der Karte blieb die Einblend-Animation bei opacity 0 hängen (Pause/Ende unsichtbar,
   gemessen 11.10.2026). Abdunklung nur per Verlauf; die Karte blendet sich selbst ein. */
.schirm {
  position: fixed; inset: 0; z-index: 10; display: none; align-items: center; justify-content: center; padding: 16px;
  background: radial-gradient(circle at 50% 45%, rgba(5, 7, 14, 0.55), rgba(5, 7, 14, 0.88));
}
.schirm.an { display: flex; }
.karte {
  width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow: auto; display: flex; flex-direction: column; gap: 12px;
  padding: 28px; border-radius: 20px; background: var(--glas); border: 1px solid var(--rand);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(56, 224, 174, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%);
  user-select: auto; -webkit-user-select: auto;
  /* ⛔ keine Animation: auf backdrop-filter-Elementen blieb opacity beim 1. Keyframe hängen (Karte unsichtbar) */
}
.karte.schmal { width: min(380px, 100%); }
.karte.breite-karte { width: min(720px, 100%); }
.karte h2 { margin: 0; font: 700 26px/1.15 var(--titel); letter-spacing: 0.06em; }
.karte h3 { margin: 6px 0 8px; font: 700 14px/1.2 var(--titel); letter-spacing: 0.12em; text-transform: uppercase; color: var(--mut); }
.unterzeile { margin: 0; color: var(--mut); font-size: 14.5px; }
.hinweis { margin: 0; color: var(--dim); font-size: 13px; }

/* Titel */
#s-titel { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: none; }
#s-titel .karte { pointer-events: auto; gap: 13px; }
.logo { margin: 0 0 2px; font: 700 clamp(40px, 5.2vw, 58px)/0.95 var(--titel); letter-spacing: 0.13em; }
.logo span { background: linear-gradient(180deg, #FFFFFF, #C9D6E6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo b {
  background: linear-gradient(135deg, #C3F07C, #38E0AE); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(56, 224, 174, 0.45));
}
.claim { margin: 0 0 6px; color: var(--mut); font-size: 14.5px; }
.knopfreihe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.knopfreihe .leise-knopf { font-size: 13.5px; padding: 0 4px; }
.rekordzeile {
  display: flex; justify-content: space-between; align-items: baseline; padding: 10px 2px 2px;
  border-top: 1px solid var(--rand); font-size: 13.5px; color: var(--mut);
}
.rekordzeile strong { font: 800 18px/1 var(--zahl); color: var(--gold); font-variant-numeric: tabular-nums; }
.fuss { margin: 2px 0 0; font-size: 12.5px; color: var(--dim); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.alpha { padding: 2px 7px; border-radius: 5px; border: 1px solid rgba(242, 184, 75, 0.5); color: var(--orange); font-weight: 700; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }

/* Bestenliste */
.bestenliste { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 5px; counter-reset: platz; }
.bestenliste li {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 10px; background: rgba(255, 255, 255, 0.035); border: 1px solid transparent; font-size: 14.5px;
}
.bestenliste li .platz { font: 800 14px/1 var(--zahl); color: var(--dim); text-align: center; }
.bestenliste li .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.bestenliste li .name small { color: var(--dim); font-weight: 500; margin-left: 6px; }
.bestenliste li .pkt { font: 800 15px/1 var(--zahl); font-variant-numeric: tabular-nums; }
.bestenliste li:nth-child(1) .platz { color: #F4C95D; }
.bestenliste li:nth-child(2) .platz { color: #C9D3E0; }
.bestenliste li:nth-child(3) .platz { color: #E3A06A; }
.bestenliste li.ich { border-color: rgba(56, 224, 174, 0.45); background: rgba(56, 224, 174, 0.08); }
.bestenliste li.leer { display: block; text-align: center; color: var(--dim); }

/* Steuerung */
.zwei-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tastenliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: var(--mut); }
.tastenliste li { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 8px; }
.tastenliste .geste { color: var(--text); font-weight: 650; }

/* Einstellungen */
.regler, .schalter { display: grid; align-items: center; gap: 12px; padding: 10px 2px; font-size: 15px; }
.regler { grid-template-columns: 90px 1fr 44px; }
.regler output { font: 700 14px/1 var(--zahl); color: var(--mut); text-align: right; font-variant-numeric: tabular-nums; }
.regler input { width: 100%; accent-color: var(--neon); }
.schalter { grid-template-columns: 22px 1fr; cursor: pointer; }
.schalter input { width: 20px; height: 20px; accent-color: var(--neon); }

/* Ende */
.ende-titel { font-size: clamp(32px, 6vw, 44px) !important; letter-spacing: 0.1em !important; }
.ende-titel.sieg { color: var(--lime); text-shadow: 0 0 30px rgba(157, 205, 90, 0.55); }
.ende-titel.niederlage { color: #FF8796; text-shadow: 0 0 30px rgba(255, 84, 104, 0.45); }
.ende-punkte { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 6px 0 2px; }
.ende-punkte .tafel-label { width: 100%; }
.ende-punkte strong { font: 800 48px/1 var(--zahl); font-variant-numeric: tabular-nums; }
.rekord-abzeichen {
  display: none; padding: 4px 9px; border-radius: 7px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: #2A1A00; background: linear-gradient(135deg, #FFE08A, #F4B93D); box-shadow: 0 0 20px rgba(244, 201, 93, 0.45);
}
.rekord-abzeichen.an { display: inline-block; }
.ende-raster { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ende-raster div { padding: 10px; border-radius: 11px; background: rgba(255, 255, 255, 0.04); }
.ende-raster b { display: block; font: 750 20px/1.2 var(--zahl); font-variant-numeric: tabular-nums; }
.ende-online { display: grid; gap: 8px; }
.online-status { margin: 0; font-size: 14px; color: var(--mut); min-height: 1.4em; }
.online-status.gut { color: var(--neon); }
.online-status.schlecht { color: #FF9AA6; }
.online-form { display: none; grid-template-columns: 1fr auto; gap: 8px; }
.online-form.an { display: grid; }
.online-form .sekundaer-knopf { width: auto; padding: 0 16px; min-height: 48px; }

/* Warten */
.lader { display: flex; gap: 8px; justify-content: center; margin-bottom: 4px; }
.lader i { width: 14px; height: 14px; border-radius: 3px; background: var(--neon); animation: lader 1s ease-in-out infinite; box-shadow: 0 0 14px rgba(56, 224, 174, 0.6); }
.lader i:nth-child(2) { animation-delay: 0.15s; background: var(--lime); }
.lader i:nth-child(3) { animation-delay: 0.3s; background: #5B8CFF; }
@keyframes lader { 0%, 100% { transform: translateY(0) rotate(0); opacity: 0.6; } 50% { transform: translateY(-10px) rotate(90deg); opacity: 1; } }

/* ── Touch-Steuerung ────────────────────────────────────────────────────────── */
#touch { display: none; }
body.touch.z-spiel #touch, body.touch.z-pause #touch {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; padding: 6px 4px 2px;
  touch-action: none;
}
#touch button {
  display: grid; place-items: center; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.2); min-width: 0;
  background: linear-gradient(160deg, rgba(44, 58, 94, 0.85), rgba(16, 22, 40, 0.85));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  touch-action: none;
  transition: transform 0.06s ease, background 0.1s ease, box-shadow 0.1s ease;
}
#touch button svg { width: 26px; height: 26px; fill: none; stroke: #EAF6FF; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
#touch button svg .duenn { stroke-width: 1.4; opacity: 0.55; }
#touch button span { font-size: 10.5px; font-weight: 700; color: #C9D3E2; letter-spacing: 0.01em; margin-top: -2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#touch button.gedrueckt { transform: scale(0.93); background: linear-gradient(160deg, rgba(56, 224, 174, 0.42), rgba(20, 60, 50, 0.6)); box-shadow: 0 0 22px rgba(56, 224, 174, 0.45); }
.kreuz { display: grid; grid-template-columns: repeat(3, 58px); grid-template-rows: repeat(3, 52px); gap: 5px; }
.kreuz .k-oben { grid-area: 1 / 2; } .kreuz .k-links { grid-area: 2 / 1; } .kreuz .k-rechts { grid-area: 2 / 3; } .kreuz .k-unten { grid-area: 3 / 2; }
.dreh { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: 64px 64px; gap: 8px; min-width: 0; }
.dreh button { align-content: center; gap: 2px; }
.dreh .fallen {
  grid-column: 1 / 4; background: linear-gradient(135deg, rgba(185, 236, 114, 0.9), rgba(79, 214, 165, 0.9)) !important; border-color: transparent !important;
  grid-auto-flow: column; gap: 8px; box-shadow: 0 8px 26px rgba(79, 214, 165, 0.32) !important;
}
#touch .dreh .fallen svg { stroke: #06110C; } #touch .dreh .fallen span { color: #06110C; font-size: 15px; font-weight: 800; }

/* ── Desktop / Querformat ───────────────────────────────────────────────────── */
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  #buehne { display: grid; grid-template-columns: var(--seite) auto var(--seite); gap: 34px; align-items: center; justify-content: center;
    --pit: min(calc(100dvh - 40px), calc(100vw - 2 * var(--seite) - 2 * 34px - 80px)); }
  #grube-zelle { width: var(--pit); height: var(--pit); }
  #pause-knopf-seite svg { width: 18px; height: 18px; fill: currentColor; }
  body.m-duell #pause-knopf-seite { display: none; }
  body.z-titel #buehne { grid-template-columns: auto; justify-content: start; padding-left: max(3vw, 24px); }
  body.z-titel #links, body.z-titel #rechts { display: none; }
  body.z-titel #buehne { --pit: min(calc(100dvh - 40px), calc(100vw - 500px - 10vw)); }
  #s-titel { justify-content: flex-end; padding-right: max(4vw, 24px); }
  #s-titel .karte { width: min(440px, 38vw); }
  body.z-titel #tiefe { opacity: 0; }
}
@media (min-width: 900px) and (min-aspect-ratio: 1/1) and (max-height: 640px) {
  .tasten-hilfe { display: none; }
}
/* Duell: Vorschau + Gegner + Sprachchat brauchen ≈ 680 px; die Tastenhilfe nur, wenn Platz ist */
@media (min-width: 900px) and (min-aspect-ratio: 1/1) and (max-height: 920px) {
  body.m-duell .tasten-hilfe { display: none; }
}

/* ── Handy / Hochformat ─────────────────────────────────────────────────────── */
@media (max-width: 899.98px), (max-aspect-ratio: 1/1) {
  body.z-spiel, body.z-pause { --kopf-h: 52px; --rechts-h: 84px; }
  body.touch.z-spiel, body.touch.z-pause { --touch-h: 196px; }
  body.z-spiel #kopf, body.z-pause #kopf, body.z-ende #kopf {
    display: grid; grid-template-columns: 1.5fr 1fr 1fr 44px; gap: 6px; align-items: center; height: var(--kopf-h, 52px); margin-bottom: 6px;
  }
  .kopf-wert { display: flex; flex-direction: column; justify-content: center; padding: 4px 10px; height: 46px; border-radius: 11px; background: var(--glas); border: 1px solid var(--rand); }
  .k-label { font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
  .k-zahl { font: 800 18px/1.15 var(--zahl); font-variant-numeric: tabular-nums; }
  .kopf-wert.breit .k-zahl { font-size: 20px; }
  #buehne { display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; gap: 8px; }
  #links { display: none; }
  /* --pit auf #buehne: #grube-zelle UND #rechts (Geschwister) lesen dieselbe Breite */
  #buehne { --pit: min(calc(100vw - 24px), calc(100dvh - var(--kopf-h) - var(--rechts-h) - var(--touch-h) - 46px)); }
  #grube-zelle { width: var(--pit); height: var(--pit); flex: 0 0 auto; }
  #tiefe { display: none; }
  .vorschau-tafel .tafel-label { font-size: 10px; letter-spacing: 0.1em; }
  #rechts { flex-direction: row; width: var(--pit); height: var(--rechts-h); gap: 8px; }
  body.z-titel #rechts { display: none; }
  #rechts .tafel { padding: 8px 10px; }
  .vorschau-tafel { flex: 0 0 34%; display: flex; flex-direction: column; }
  .vorschau-tafel #vorschau { flex: 1; aspect-ratio: auto; }
  .mobil-rekord { display: block; flex: 1; }
  .mobil-rekord .wert { font-size: 20px; }
  body.m-duell .mobil-rekord { display: none; }
  body.m-duell .gegner-tafel { flex: 1; display: grid; grid-template-columns: 62px 1fr; grid-template-rows: auto auto 1fr; column-gap: 8px; }
  .gegner-tafel .tafel-label { grid-column: 2; }
  .gegner-tafel #gegner-grube { grid-row: 1 / 4; grid-column: 1; width: 62px; height: 62px; }
  .gegner-tafel .gegner-name { grid-column: 2; font-size: 14px; margin: 0; }
  .gegner-tafel .gegner-werte { grid-column: 2; margin: 0; font-size: 11.5px; }
  /* schmale Gegner-Karte (Sprachchat-Spalte daneben): Punkte und Ebenen je eine Zeile, ohne hängenden Trennpunkt */
  .gegner-werte .trenner { display: none; }
  .gegner-werte > span:not(.trenner) { display: block; }
  /* Sprachchat mobil: schmale Spalte rechts — Mikrofon-Knopf (halten) + Stumm-Knopf */
  body.m-duell .sprach-tafel { flex: 0 0 58px; display: grid; grid-template-rows: minmax(0, 1fr) 22px; gap: 4px; }
  #rechts .sprach-tafel { padding: 6px; }
  .sprach-tafel .tafel-label, .sprach-tafel .sprach-status, .sprech-knopf .sprech-text, .sprech-knopf kbd { display: none; }
  .sprach-zeile { display: contents; }
  .sprech-knopf { min-height: 0; padding: 0; border-radius: 10px; }
  .sprech-knopf svg { width: 24px; height: 24px; }
  .stumm-knopf { border-radius: 8px; }
  .stumm-knopf svg { width: 15px; height: 15px; }
  .sprach-pegel { left: 6px; right: 6px; bottom: 2px; height: 2px; }
  #pause-knopf-seite, .tasten-hilfe { display: none; }
  body.z-titel #buehne { justify-content: flex-start; }
  body.z-titel #buehne { --pit: min(calc(100vw - 24px), 40dvh); }
  body.z-titel #grube-zelle { margin-top: 4px; }
  body.z-titel #tiefe { opacity: 0; }
  #s-titel { align-items: flex-end; padding: 8px; }
  #s-titel .karte { width: 100%; max-height: calc(60dvh - 24px); padding: 20px 18px; gap: 10px; border-radius: 20px; }
  .fuss .build-teil { display: none; }          /* Build-Nummer nur am Desktop (sonst 2. Fußzeile) */
  .logo { font-size: clamp(34px, 10vw, 46px); }
  .claim { font-size: 13.5px; }
  .karte { padding: 22px 18px; }
  .zwei-spalten { grid-template-columns: 1fr; }
  .tastenliste li { grid-template-columns: 130px 1fr; }
  .ende-raster { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 899.98px) and (min-height: 780px), (max-aspect-ratio: 1/1) and (min-height: 780px) {
  body.touch.z-spiel, body.touch.z-pause { --touch-h: 210px; }
  .kreuz { grid-template-columns: repeat(3, 62px); grid-template-rows: repeat(3, 62px); }
  .dreh { grid-template-rows: 78px 78px; }
}
@media (max-width: 430px) {
  .kreuz { grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(3, 56px); gap: 4px; }
  .vorschau-tafel { flex-basis: 40% !important; }
  /* Duell: Vorschau + Gegner + Sprachchat teilen sich die Zeile — Vorschau schmaler, damit die Gegner-Werte Platz haben */
  body.m-duell .vorschau-tafel { flex-basis: 30% !important; }
  .vorschau-tafel .tafel-label { letter-spacing: 0.05em !important; }
}
@media (max-width: 380px) {
  .kreuz { grid-template-columns: repeat(3, 52px); grid-template-rows: repeat(3, 48px); }
  .dreh { grid-template-rows: 58px 58px; }
  .knopfreihe .leise-knopf { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
