:root { --lila: #b14dff; --rot: #D4401A; --anthrazit: #262a2e; --grau: #e8e8e8; }
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; overflow: hidden; background: var(--anthrazit); color: #fff;
  font-family: system-ui, "Segoe UI", sans-serif; user-select: none; -webkit-user-select: none; touch-action: none; }
#szene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 8px; background: var(--rot); color: #fff; font-weight: 700; padding: 12px 20px; }
button:disabled { background: #666; cursor: default; }
button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.klein { font-size: 13px; opacity: .8; }

.box { position: fixed; background: rgba(38,42,46,.82); border-radius: 10px; padding: 10px 14px; font-variant-numeric: tabular-nums; }
#hud-links, #hud-links2 { top: 12px; left: 12px; min-width: 150px; }
#zeit, #zeit2 { font-size: 28px; font-weight: 800; }
#hud-platz, #hud-platz2 { left: 12px; bottom: 12px; padding: 4px 16px; }
#platz, #platz2 { font-size: 40px; font-weight: 900; color: #fff; }
#platz-von, #platz-von2 { font-size: 18px; opacity: .7; }
#item-slot, #item-slot2 { right: 240px; top: 12px; width: 120px; text-align: center; display: grid; gap: 2px; }
#item-slot strong, #item-slot2 strong { font-size: 16px; line-height: 1.15; }
#item-kreis, #item-kreis2 { font-size: 11px; color: #ffb27a; opacity: 1; }
#item-kreis:empty, #item-kreis2:empty { display: none; }
#item-slot.bereit, #item-slot2.bereit { outline: 3px solid var(--rot); }
#item-slot .taste, #item-slot2 .taste { font-size: 11px; }

/* Zwei Spieler: links Spieler 1, rechts Spieler 2, Trennlinie und Karte in der Mitte */
#meldung2 { display: none; }
body.zwei #meldung, body.zwei #meldung2 { display: block; position: fixed; top: 24%; width: 50%; text-align: center; font-size: clamp(30px, 6vw, 72px);
  font-weight: 900; text-shadow: 0 4px 0 var(--anthrazit), 0 0 18px rgba(0,0,0,.5); pointer-events: none; }
body.zwei #meldung { left: 0; right: auto; }
body.zwei #meldung2 { left: 50%; }
body.zwei #hud::after { content: ""; position: fixed; top: 0; bottom: 0; left: 50%; width: 4px; margin-left: -2px; background: var(--anthrazit); }
body.zwei #hud-links2 { left: calc(50% + 12px); }
body.zwei #hud-platz2 { left: auto; right: 12px; } /* unten in der Mitte liegt die Karte */
body.zwei #item-slot { right: calc(50% + 12px); }
body.zwei #item-slot2 { right: 12px; }
body.zwei #karte { right: auto; left: 50%; width: 180px; height: 135px; transform: translateX(-50%); bottom: 12px; top: auto; z-index: 1; }
body.zwei #hud-links2 { outline: 3px solid #b14dff; }
body.zwei #hud-links { outline: 3px solid var(--rot); }
.s2 { color: #d6a6ff; font-weight: 700; }
#ergebnis-feld li.ich.zwei { background: #7b2fc0; }
#karte { position: fixed; top: 12px; right: 12px; background: rgba(38,42,46,.85); border-radius: 10px; width: 216px; height: 162px; box-shadow: 0 2px 10px rgba(0,0,0,.3); }
/* Knöpfe im Rennen: kleine Symbolknöpfe mit Beschriftung, immer sichtbar */
#knoepfe { position: fixed; left: 12px; top: 140px; display: flex; gap: 6px; }
#knoepfe button { width: 58px; padding: 6px 0 5px; display: grid; justify-items: center; gap: 2px; font-size: 10px; font-weight: 600;
  line-height: 1; background: rgba(38,42,46,.82); border: 2px solid transparent; }
#knoepfe button:hover { background: rgba(70,76,82,.9); }
#knoepfe svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
#k-ton .aus, #k-ton[aria-pressed="false"] .an { display: none; }
#k-ton[aria-pressed="false"] .aus { display: inline; }
#knoepfe button[aria-pressed="false"] { opacity: .6; }
#k-gas[aria-pressed="true"] { border-color: var(--rot); }
body.zwei #knoepfe { top: auto; bottom: 12px; left: 50%; transform: translateX(-50%); margin-left: -180px; } /* zu zweit: unten Mitte, links neben der Karte */

#meldung { position: fixed; left: 0; right: 0; top: 24%; text-align: center; font-size: clamp(40px, 10vw, 96px);
  font-weight: 900; text-shadow: 0 4px 0 var(--anthrazit), 0 0 18px rgba(0,0,0,.5); pointer-events: none; }

#menue, #ergebnis { position: fixed; inset: 0; display: flex; align-items: flex-start; justify-content: center; padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom)); overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain; }
#menue { cursor: grab; }
#menue .tafel { cursor: default; }
#ergebnis { align-items: center; background: rgba(0,0,0,.4); }
/* oben links: zurück zu allen Spielen und zum Shop */
#oben { position: fixed; top: max(14px, env(safe-area-inset-top)); left: max(14px, env(safe-area-inset-left)); z-index: 1; display: flex; gap: 8px; }
#oben a { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-size: 17px; font-weight: 700;
  padding: 11px 20px 11px 14px; border-radius: 10px; background: rgba(38,42,46,.88); cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
#oben a.shop { background: var(--rot); }
#oben a:hover { background: var(--rot); filter: brightness(1.1); }
#oben a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
#oben svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tafel { background: rgba(38,42,46,.93); border-radius: 14px; padding: 18px 20px; width: min(920px, 100%); text-align: center; margin-top: auto; }
#ergebnis .tafel { width: min(460px, 100%); margin: auto; }
h1 { font-size: clamp(22px, 3.4vw, 32px); color: var(--rot); }
.kopf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.kopf h1 { margin-right: auto; }
.abschnitt { text-align: left; margin-top: 12px; }
.abschnitt h2, .steuerung h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; opacity: .65; margin-bottom: 6px; font-weight: 700; }
.abschnitt-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; min-height: 26px; }
.abschnitt-kopf h2 { margin: 0; }
.zeile { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }

/* Fahrzeugkarten; zu zweit: Rahmen und Marke in der Spielerfarbe */
#auswahl { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
#auswahl.zwei { padding-top: 8px; margin-top: -8px; }
.fahrzeug { position: relative; background: #3a3f45; border: 3px solid transparent; padding: 8px 10px; text-align: left; font-weight: 400; }
.fahrzeug:hover { background: #42474d; }
.fahrzeug.sp1 { border-color: var(--rot); background: #454b52; }
.fahrzeug.sp2 { border-color: var(--lila); background: #454b52; }
.fahrzeug.sp1.sp2 { border-color: var(--rot); box-shadow: inset 0 0 0 3px var(--lila); }
.fahrzeug strong { display: block; font-size: 15px; line-height: 1.2; }
.fahrzeug small { display: block; font-size: 11px; opacity: .7; }
.marken { position: absolute; top: -9px; right: 6px; display: flex; gap: 3px; }
.marke { font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 9px; line-height: 1.2; }
.marke.p1 { background: var(--rot); }
.marke.p2 { background: var(--lila); }
#fuer { display: flex; align-items: center; gap: 6px; margin-left: auto; }
#fuer button { display: flex; align-items: center; gap: 7px; padding: 5px 12px; font-size: 13px; background: #3a3f45; border: 2px solid transparent; }
#fuer button[data-fuer="1"][aria-pressed="true"] { border-color: var(--rot); background: #454b52; }
#fuer button[data-fuer="2"][aria-pressed="true"] { border-color: var(--lila); background: #454b52; }
#fuer.hinweis button[data-fuer="2"] { animation: puls-lila .8s ease-in-out 3; }
@keyframes puls-lila { 50% { box-shadow: 0 0 0 6px rgba(177,77,255,.45); } }
.punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.punkt.p1 { background: var(--rot); }
.punkt.p2 { background: var(--lila); }

/* Eigenschaften: Feld in der Farbe der Auswahl, Zeiger auf die gewählte Karte */
#werte-feld { --farbe: var(--rot); position: relative; margin-top: 12px; display: grid; grid-template-columns: 190px 1fr; align-items: center; gap: 4px 18px;
  background: #454b52; border: 2px solid var(--farbe); border-radius: 10px; padding: 6px 14px; }
#werte-feld.p2 { --farbe: var(--lila); }
#werte-feld .zeiger { position: absolute; top: -8px; left: var(--x, 60px); width: 14px; height: 14px; margin-left: -7px; background: #454b52;
  border-left: 2px solid var(--farbe); border-top: 2px solid var(--farbe); transform: rotate(45deg); transition: left .25s ease; }
.werte-kopf { display: grid; line-height: 1.25; }
.werte-kopf .klein { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.werte-kopf strong { font-size: 16px; }
#werte { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px 18px; }
.wert { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 6px; font-size: 12px; }
.wert i { height: 7px; background: #222; border-radius: 4px; overflow: hidden; }
.wert b { display: block; height: 100%; background: var(--farbe, var(--rot)); transition: width .3s ease; }

/* Strecken */
#strecken-wahl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.strecke-karte { background: #3a3f45; border: 3px solid transparent; padding: 6px 8px 8px; text-align: left; font-weight: 400; display: grid; gap: 2px; align-content: start; }
.strecke-karte:hover, #modus-wahl button:hover { background: #42474d; }
.strecke-karte[aria-pressed="true"] { border-color: var(--rot); background: #454b52; }
.strecke-karte canvas { width: 100%; height: 60px; display: block; }
.strecke-karte strong { font-size: 14px; }
.strecke-karte small { font-size: 11px; opacity: .7; line-height: 1.25; }

/* Modus: drei Karten untereinander mit kurzer Erklärung */
#modus-wahl { display: grid; gap: 6px; }
#modus-wahl button { display: grid; text-align: left; padding: 4px 12px; background: #3a3f45; border: 3px solid transparent; font-weight: 400; }
#modus-wahl button[aria-pressed="true"] { border-color: var(--rot); background: #454b52; }
#modus-wahl strong { font-size: 15px; }
#modus-wahl small { font-size: 11.5px; opacity: .7; }

#start { font-size: 20px; padding: 12px 48px; margin: 14px 0 4px; }

/* Steuerung: immer sichtbar, als Tasten */
.steuerung { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.12); text-align: left; }
.steuerung .abschnitt-kopf .klein { font-size: 12px; opacity: .7; cursor: pointer; }
.tasten { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; }
.tasten.mitte { justify-content: center; }
/* Gruppe: Tasten links, Beschriftung rechts daneben */
.gr { display: flex; align-items: center; gap: 5px; }
.gr .txt { display: grid; margin-left: 4px; line-height: 1.2; text-align: left; white-space: nowrap; }
.gr b { font-size: 13px; }
.gr small { font-size: 11px; opacity: .65; }
kbd { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 6px; color: #fff;
  background: linear-gradient(#5d636b, #474c53); border: 1px solid #23272b; box-shadow: 0 3px 0 #1a1d20; font: 700 13px/1 system-ui, "Segoe UI", sans-serif;
  transition: transform .08s, box-shadow .08s, background .08s; }
kbd.breit { min-width: 96px; }
kbd.rund { width: 38px; height: 38px; min-width: 0; padding: 0; border-radius: 50%; }
kbd.rund.klein { width: 46px; height: 46px; font-size: 11px; opacity: 1; }
kbd.rot { background: var(--rot); }
kbd.an { background: var(--rot); transform: translateY(2px); box-shadow: 0 1px 0 #1a1d20; }
.kreuz { display: inline-grid; grid-template-columns: repeat(3, auto); gap: 3px; }
.kreuz .w { grid-column: 2; grid-row: 1; }
.kreuz kbd:not(.w) { grid-row: 2; }
.kreuz kbd { min-width: 25px; height: 23px; padding: 0; font-size: 12px; }
.oder { font-size: 11px; opacity: .6; margin: 0 4px; }
.tasten-tabelle { display: grid; grid-template-columns: auto repeat(4, auto) 1fr; gap: 5px 26px; align-items: center; justify-items: start; }
.tasten-tabelle > b { font-size: 12px; opacity: .7; }
.tasten-tabelle > span { display: flex; gap: 3px; align-items: center; }
.tasten-tabelle .gemeinsam { grid-column: 6; grid-row: 1 / 4; justify-self: end; display: grid; gap: 8px; }
.wer { font-size: 13px; font-weight: 700; gap: 7px !important; }
.wer.p1 { color: #ff8a66; }
.wer.p2 { color: #d6a6ff; }
.info { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: 50%; font: italic 800 16px/1 Georgia, serif;
  background: var(--rot); animation: puls-rot 1.6s ease-in-out 3 1.2s; }
@keyframes puls-rot { 50% { box-shadow: 0 0 0 7px rgba(212,64,26,.35); } }
#info-kopf { display: none; }

/* Anleitung mit Animation */
#anleitung { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.55); }
#anleitung .tafel { margin: auto; width: min(700px, 100%); display: grid; gap: 10px; }
.anleitung-kopf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.anleitung-kopf h2 { font-size: 22px; color: var(--rot); }
.reiter { display: flex; gap: 6px; }
.reiter button { padding: 6px 12px; font-size: 14px; background: #3a3f45; border: 2px solid transparent; }
.reiter button[aria-pressed="true"] { border-color: var(--rot); background: #454b52; }
#anleitung .zu { margin-left: auto; width: 38px; height: 38px; padding: 0; font-size: 24px; line-height: 1; background: #555; }
#anleitung-bild { display: block; width: 100%; height: auto; aspect-ratio: 640 / 300; border-radius: 10px; background: #5f646b; }
#anleitung-text { font-size: 17px; font-weight: 700; min-height: 1.4em; }
#ergebnis ol, #ergebnis ul { margin: 12px 0; list-style: none; font-variant-numeric: tabular-nums; text-align: left; }
#ergebnis-feld li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 8px; border-radius: 6px; }
#ergebnis-feld li.ich { background: var(--rot); font-weight: 700; }
#ergebnis-runden { font-size: 13px; opacity: .8; text-align: center !important; }
.wahl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.wahl button { padding: 7px 14px; font-size: 14px; background: #3a3f45; border: 2px solid transparent; }
.wahl button[aria-pressed="true"] { border-color: var(--rot); background: #454b52; }
#ergebnis button { margin: 4px; }
button.zweit { background: #555; }

#touch { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: flex-end;
  padding: 12px max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-bottom)); pointer-events: none; }
#touch .gruppe { display: flex; gap: 10px; pointer-events: auto; }
#touch button { width: 68px; height: 68px; border-radius: 50%; padding: 0; background: rgba(38,42,46,.75); touch-action: none; }
#touch button.an { background: var(--rot); }
#touch #t-item { position: absolute; left: max(12px, env(safe-area-inset-left)); bottom: calc(max(12px, env(safe-area-inset-bottom)) + 78px); background: rgba(212,64,26,.85); }
/* Item-Knopf auch rechts, über Drift/Gas */
#touch #t-item2 { position: absolute; right: max(12px, env(safe-area-inset-right)); bottom: calc(max(12px, env(safe-area-inset-bottom)) + 78px); background: rgba(212,64,26,.85); }
body.autogas #touch #t-item2 { right: calc(max(12px, env(safe-area-inset-right)) + 9px); bottom: calc(max(12px, env(safe-area-inset-bottom)) + 96px); }
/* Auto-Gas: Gas-Knopf entfällt, Drift wird groß */
body.autogas #touch #t-gas { display: none; }
body.autogas #touch #t-drift { width: 86px; height: 86px; font-size: 17px; }

body.touch #karte { width: 132px; height: 99px; }
body.touch #item-slot { top: 121px; right: 12px; width: 132px; }
body.touch #hud-platz { top: 185px; bottom: auto; }
body.touch #item-slot .taste { display: none; }

@media (max-width: 760px) {
  .zeile { grid-template-columns: 1fr; gap: 0; }
  #werte-feld { grid-template-columns: 1fr; }
  #modus-wahl { grid-template-columns: repeat(3, 1fr); }
  .tasten-tabelle { column-gap: 14px; }
  .tasten { flex-wrap: wrap; justify-content: flex-start; }
}
@media (max-width: 640px) {
  #auswahl { grid-template-columns: repeat(2, 1fr); }
  #touch button { width: 56px; height: 56px; font-size: 13px; }
  #touch .gruppe { gap: 6px; }
  #touch #t-item, #touch #t-item2 { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 64px); }
  body.autogas #touch #t-item2 { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 96px); }
}
@media (max-height: 560px) {
  .tafel h1 { font-size: 20px; }
  #werte-feld, .steuerung, .strecke-karte small, #modus-wahl small { display: none; }
  #info-kopf { display: inline-grid; }
  .strecke-karte canvas { height: 40px; }
  #auswahl { grid-template-columns: repeat(5, 1fr); }
  .abschnitt { margin-top: 8px; }
  .zeile { grid-template-columns: 1.3fr 1fr; gap: 12px; }
}
/* Laptop (geringe Höhe): Tafel etwas kompakter, damit oben Platz für das Fahrzeug bleibt */
@media (max-height: 820px) and (min-height: 561px) {
  .tafel { padding: 12px 18px; }
  .tafel h1 { font-size: 24px; }
  .abschnitt { margin-top: 8px; }
  .strecke-karte canvas { height: 44px; }
  #modus-wahl small { display: none; }
  #modus-wahl button { padding: 7px 12px; }
  #start { padding: 9px 44px; margin: 10px 0 2px; }
  .steuerung { margin-top: 6px; padding-top: 6px; }
}
/* Handy quer: Tafel kompakt, damit Start immer sichtbar bleibt */
@media (max-height: 460px) {
  #menue { padding: 8px max(8px, env(safe-area-inset-left)); }
  #menue .tafel { padding: 8px 12px 10px; }
  #menue .kopf .klein, .abschnitt h2, .strecke-karte canvas { display: none; }
  .abschnitt-kopf { min-height: 0; margin-bottom: 4px; }
  #modus-wahl { gap: 4px; }
  #modus-wahl button { padding: 4px 10px; border-width: 2px; }
  #modus-wahl strong { font-size: 13px; }
  .info { width: 24px; height: 24px; font-size: 14px; }
  #oben a { font-size: 14px; padding: 7px 14px 7px 10px; }
  #oben svg { width: 16px; height: 16px; }
  #knoepfe button { width: 50px; padding: 4px 0; }
  #knoepfe svg { width: 18px; height: 18px; }
  #anleitung { padding: 6px; }
  #anleitung .tafel { padding: 8px 12px; gap: 6px; }
  #anleitung-bild { width: auto; max-width: 100%; height: 52vh; margin: 0 auto; }
  #anleitung-text { font-size: 14px; }
  .abschnitt { margin-top: 6px; }
  .tafel h1 { font-size: 17px; }
  #auswahl { gap: 6px; }
  .strecke-karte { padding: 5px 8px; }
  #start { margin: 8px 0 0; }
  .fahrzeug { padding: 6px 8px; font-size: 13px; border-width: 2px; }
  .fahrzeug small { font-size: 10px; margin: 0; }
  .wahl button { padding: 5px 10px; font-size: 13px; }
  #start { font-size: 17px; padding: 9px 40px; margin: 0; }
  /* Anzeige im Rennen: Karte und Item-Feld kleiner, damit der Item-Knopf frei bleibt */
  body.touch #karte { width: 112px; height: 84px; top: 8px; right: max(8px, env(safe-area-inset-right)); }
  body.touch #item-slot { top: 100px; right: max(8px, env(safe-area-inset-right)); width: 112px; padding: 5px 8px; }
  body.touch #item-slot strong { font-size: 14px; }
  #hud-links { top: 8px; left: max(8px, env(safe-area-inset-left)); padding: 6px 10px; min-width: 0; }
  #zeit { font-size: 22px; }
  #knoepfe { top: 112px; left: max(8px, env(safe-area-inset-left)); }
  body.touch #hud-platz { top: 8px; left: 50%; transform: translateX(-50%); padding: 2px 12px; } /* links ist der Item-Knopf */
  #platz { font-size: 30px; }
}
/* Handy hochkant (nach „Trotzdem hochkant“): Fahrzeuge in einer wischbaren Reihe */
@media (max-width: 640px) and (orientation: portrait) {
  #auswahl { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; touch-action: pan-x pan-y; padding-bottom: 4px; }
  .fahrzeug { flex: 0 0 44%; scroll-snap-align: start; }
  #werte-feld { display: none; }
}

/* Hinweis „Handy quer halten“ nur auf Touch-Geräten im Hochformat */
#drehen { display: none; position: fixed; inset: 0; z-index: 20; background: rgba(20, 22, 25, .97); align-items: center; justify-content: center; padding: 24px; }
#drehen .tafel { margin: 0; width: min(380px, 100%); display: grid; gap: 12px; justify-items: center; }
#drehen h2 { font-size: 22px; }
#drehen button { width: 100%; }
@media (orientation: portrait) and (max-width: 820px) {
  body.touch:not(.hochkant) #drehen { display: flex; }
}
.handy { width: 44px; height: 76px; border: 4px solid #fff; border-radius: 10px; margin: 6px 0 4px; position: relative; animation: kippen 2.6s ease-in-out infinite; }
.handy::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 10px; height: 3px; margin-left: -5px; border-radius: 2px; background: #fff; }
@keyframes kippen { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
@media (prefers-reduced-motion: reduce) { .handy { animation: none; transform: rotate(-90deg); } }

/* ---------- Ballonschlacht ---------- */
#hud-links, #hud-links2 { min-width: 0; display: grid; gap: 4px; }
.ballon-zeile { display: flex; align-items: center; gap: 10px; }
.ballon-anzeige { display: inline-flex; gap: 4px; align-items: flex-end; }
.ballon-anzeige i { display: block; width: 18px; height: 22px; border-radius: 50% 50% 48% 48% / 44% 44% 56% 56%; background: var(--farbe, var(--rot));
  box-shadow: inset -3px -4px 0 rgba(0,0,0,.18), inset 3px 3px 0 rgba(255,255,255,.35); position: relative; }
.ballon-anzeige i::after { content: ""; position: absolute; left: 50%; bottom: -4px; margin-left: -2px; border: 2px solid transparent; border-top-color: var(--farbe, var(--rot)); }
.ballon-anzeige i.leer { background: transparent; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.ballon-anzeige i.leer::after { display: none; }
.ballon-anzeige.blink i:not(.leer) { animation: blink .25s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }
#uhr { top: 12px; left: 50%; transform: translateX(-50%); text-align: center; display: grid; padding: 6px 16px; }
#restzeit { font-size: 26px; font-weight: 900; }
#restzeit.knapp { color: #ff8a66; }
#feld { top: 186px; right: 12px; width: 216px; list-style: none; display: grid; gap: 3px; font-size: 12px; padding: 8px 10px; }
#feld li { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
#feld li .name { flex: 1; overflow: hidden; text-overflow: ellipsis; }
#feld li.aus { opacity: .45; text-decoration: line-through; }
#feld .ballon-anzeige i { width: 9px; height: 11px; box-shadow: none; }
#feld .ballon-anzeige i::after { display: none; }
#feld .punkt { flex: none; }
body.zwei #feld { display: none; }
body.zwei #uhr { top: auto; bottom: 159px; z-index: 1; }
#arena-karte { cursor: default; }
#arena-karte { grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
#arena-karte canvas { width: 139px; height: 104px; border-radius: 6px; }
#arena-karte small { display: block; }
#ergebnis-feld li { align-items: center; }
#ergebnis-feld .werte { display: flex; gap: 12px; align-items: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
#ergebnis-feld li > span:first-child { min-width: 0; }
#ergebnis-feld small { font-weight: 400; opacity: .8; }
#ergebnis-feld .ballon-anzeige i { width: 10px; height: 13px; box-shadow: none; }
#ergebnis-feld .ballon-anzeige i::after { display: none; }
body.touch #feld { display: none; }
@media (max-height: 460px) {
  #uhr { top: 8px; padding: 2px 12px; }
  #restzeit { font-size: 20px; }
  .ballon-anzeige i { width: 14px; height: 17px; }
  body.touch #knoepfe { top: 92px; }
}

@media (max-height: 560px) {
  #arena-karte small { display: none; }
  #arena-karte { grid-template-columns: 1fr; }
}

/* Rückwärts-Knopf (Handy): kleiner, links neben Drift */
#touch #t-rueck { width: 54px; height: 54px; font-size: 13px; align-self: flex-end; }
@media (max-height: 460px) { #touch #t-rueck { width: 46px; height: 46px; font-size: 12px; } }

/* Gutschein für Sieger (Code GEWONNEN, 3 € im Shop) */
#gutschein { margin: 10px 0 6px; padding: 10px 12px; border: 2px dashed var(--rot); border-radius: 10px; background: rgba(212,64,26,.14); text-align: center; }
#gutschein p { margin: 0; }
#gutschein .gs-titel { font-weight: 800; margin-bottom: 8px; }
#gutschein .gs-code { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 6px; }
#gs-code { font: 800 22px/1 ui-monospace, Consolas, monospace; letter-spacing: 2px; background: #fff; color: var(--anthrazit); padding: 7px 12px; border-radius: 6px; user-select: all; }
#gutschein button { margin: 0; padding: 7px 14px; }
#gutschein a { color: inherit; }
@media (max-height: 460px) { #gutschein { margin: 6px 0 2px; padding: 6px 10px; } #gutschein .gs-titel { margin-bottom: 4px; } #gs-code { font-size: 17px; padding: 5px 9px; } #gutschein .klein { display: none; } }
/* Ergebnistafel bei wenig Höhe (Handy quer) kompakt, damit Gutschein und Knöpfe ohne Scrollen passen */
@media (max-height: 460px) {
  #ergebnis { padding-top: 8px; padding-bottom: 8px; }
  #ergebnis .tafel { padding-top: 10px; padding-bottom: 10px; }
  #ergebnis h2 { font-size: 20px; margin: 0; }
  #ergebnis ol, #ergebnis ul { margin: 6px 0; }
  #ergebnis-feld li { padding: 1px 8px; font-size: 14px; }
  #ergebnis button { padding: 8px 16px; }
}

/* Teilen: Menü oben (Klappfeld) und Ergebnis-Tafel; nur Links/Gerätemenü, keine fremden Skripte */
#oben { align-items: flex-start; flex-wrap: wrap; }
#teilen-auf { display: flex; align-items: center; gap: 8px; font-size: 17px; padding: 9px 18px 9px 13px; border-radius: 999px; background: rgba(38,42,46,.82); }
#teilen-auf:hover, #teilen-auf[aria-expanded="true"] { background: #444a50; }
#oben #teilen-auf svg { width: 20px; height: 20px; }
#teilen-menue { position: absolute; top: calc(100% + 8px); left: 0; max-width: calc(100vw - 28px); width: max-content; padding: 8px; border-radius: 12px; background: rgba(38,42,46,.95); box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.teilen { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.teilen a, .teilen button { display: flex; align-items: center; gap: 6px; padding: 7px 12px 7px 9px; border-radius: 999px; background: #4a5056;
  color: #fff; text-decoration: none; font: inherit; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.teilen a:hover, .teilen button:hover { background: var(--rot); }
.teilen a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.teilen svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.teilen svg .voll { fill: currentColor; stroke: none; }
#teilen-ergebnis-feld { margin: 10px 0 8px; }
#teilen-ergebnis-titel { margin-bottom: 6px; }
#ergebnis .teilen button { margin: 0; }
@media (max-width: 700px), (max-height: 500px) {
  #teilen-auf { font-size: 14px; padding: 7px 14px 7px 10px; }
  #oben #teilen-auf svg { width: 16px; height: 16px; }
  .teilen a, .teilen button { padding: 6px 9px; font-size: 13px; }
}
@media (max-height: 460px) { #teilen-ergebnis-feld { margin: 4px 0; } #teilen-ergebnis-titel { display: none; } .teilen span { display: none; } .teilen a, .teilen button { padding: 7px; } }
