/* Schaltduell – Oberflaeche (Prototyp). Farben wie die Spielhalle: dunkles Weinrot, Gold, Creme. */
:root { --bg: #14090d; --karte: rgba(26,14,18,0.95); --rand: rgba(242,194,75,0.28); --gold: #f2c24b; --creme: #f6eeda; --dim: #b9a99a;
  --gruen: #35d07f; --rot: #ff6b61; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--creme); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
#app { position: fixed; inset: 0; touch-action: manipulation; }
#buehne { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
.rund { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.18); background: rgba(10,12,16,0.72); font-size: 20px; line-height: 1; display: grid; place-items: center; flex: none; }
#hud { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px;
  background: linear-gradient(rgba(8,10,14,0.65), rgba(8,10,14,0)); pointer-events: none; z-index: 5; }
#hud .rund { pointer-events: auto; }
.h-mitte { display: flex; flex-direction: column; align-items: center; flex: 1; line-height: 1.1; text-shadow: 0 2px 6px rgba(0,0,0,0.7); }
.h-mitte b { font-size: 24px; font-variant-numeric: tabular-nums; }
.h-mitte span { font-size: 12px; color: #e8e2d6; }
#h-abstand { font-weight: 800; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: rgba(10,12,16,0.7); white-space: nowrap; font-variant-numeric: tabular-nums; }
#h-abstand.vorn { color: #7ee08f; } #h-abstand.hinten { color: #ffae5a; }
.overlay { position: absolute; inset: 0; z-index: 10; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 14px; background: rgba(12,6,9,0.72); overflow-y: auto; }
#start { background: radial-gradient(circle at 50% 18%, #2a1230 0%, #0b0810 55%, #050407 100%); align-items: start; }
.karte { width: min(560px, 100%); background: var(--karte); border: 1px solid var(--rand); border-radius: 18px; padding: 16px 16px 12px; box-shadow: 0 12px 40px rgba(0,0,0,0.5); }
#start .karte { margin: max(6px, env(safe-area-inset-top)) 0 18px; }
.kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.logo { font: italic 900 38px/1 system-ui, sans-serif; letter-spacing: -0.02em; color: var(--gold); text-shadow: 0 3px 0 #000, 0 0 24px rgba(242,194,75,0.25); }
.logo small { display: block; font: 800 12px/1.8 system-ui, sans-serif; letter-spacing: 0.3em; text-transform: uppercase; color: #ff8f6b; font-style: normal; }
.unter { margin: 8px 0 12px; color: var(--dim); }
#autos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
#klassen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 4px 0 6px; }
.reiter { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 8px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04); color: #e9dcc7; font: 700 12.5px system-ui, sans-serif; cursor: pointer; }
.reiter small { font-size: 10px; font-weight: 600; color: #9b8f80; }
.reiter.an { border-color: var(--gold); background: rgba(242,194,75,0.14); color: #fff; }
.reiter.an small { color: var(--gold); }
#leiter { margin: 2px 2px 8px; font-size: 13px; color: #e2d3bc; line-height: 1.35; }
#leiter .klein { font-size: 11px; color: var(--dim); } #leiter .gold { color: var(--gold); }
#tuning { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 2px 10px; font-size: 13px; color: #e2d3bc; }
#tuning .tw { padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.04); color: #e9dcc7; font: 700 12.5px system-ui, sans-serif; cursor: pointer; }
#tuning .tw.an { border-color: var(--gold); background: rgba(242,194,75,0.16); color: #fff; }
#tuning .klein { flex-basis: 100%; margin: 0; font-size: 11px; }
.auto .teile { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.teil { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 0.02em; padding: 1px 6px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.12); color: #6f6458; }
.teil.an { border-color: rgba(242,194,75,0.6); color: var(--gold); background: rgba(242,194,75,0.10); }
#werkstatt:empty, #e-teil:empty { display: none; }
#werkstatt { margin: 0 0 10px; padding: 8px 10px; border-radius: 12px; background: rgba(90,200,250,0.07); border: 1px solid rgba(90,200,250,0.25); }
#e-teil { margin: 10px 0 0; text-align: left; }
.wahl-titel { margin: 0 0 6px; font-weight: 800; color: #7fd3ff; font-size: 13px; } .wahl-titel.ok { margin: 0; color: #7ee08f; }
.wahl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.teilwahl { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; padding: 7px 9px; border-radius: 10px; border: 1px solid rgba(90,200,250,0.35);
  background: rgba(90,200,250,0.08); color: #e9f6ff; text-align: left; cursor: pointer; }
.teilwahl b { font-size: 13px; } .teilwahl small { font-size: 11px; color: #a9cfe3; }
.teilwahl:hover, .teilwahl:focus-visible { border-color: #7fd3ff; outline: none; }
.teil.frei { border-color: rgba(90,200,250,0.6); color: #7fd3ff; background: rgba(90,200,250,0.12); }
#e-duell { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.08); }
#e-duell .klein { margin: 0 0 6px; }
.teilen { display: flex; flex-wrap: wrap; gap: 6px; }
.teilen .knopf { flex: 1 1 0; }
#e-rang { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.08); text-align: left; }
.rang-titel { margin: 0 0 6px; font-weight: 800; color: var(--gold); font-size: 13.5px; }
.rangliste { list-style: none; margin: 0 0 8px; padding: 0; font-size: 14px; }
.rangliste li { display: grid; grid-template-columns: 2.2em 1fr auto; gap: 6px; padding: 3px 8px; border-radius: 8px; }
.rangliste li:nth-child(odd) { background: rgba(255,255,255,0.035); }
.rangliste li span { color: var(--dim); font-variant-numeric: tabular-nums; } .rangliste li b { letter-spacing: 0.08em; }
.rangliste li i { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; color: #e9dcc7; }
.rangliste li.du { background: rgba(242,194,75,0.16); outline: 1px solid rgba(242,194,75,0.55); } .rangliste li.du b, .rangliste li.du i { color: var(--gold); }
.rangliste li.leer { display: block; color: var(--dim); font-size: 12.5px; background: none; }
#e-name { text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; }
#e-karte { display: block; width: 100%; max-height: 240px; object-fit: cover; object-position: center 22%; border-radius: 12px; margin: 0 0 8px; cursor: pointer; border: 1px solid rgba(242,194,75,0.25); }
.knopf:disabled { opacity: 0.6; cursor: default; }
.auto .rekord { font-size: 11px; color: #9fd0ff; } .auto .rekord:empty { display: none; }
#leiter .meile { color: #ff8f6b; font-weight: 700; }
.teilen input { flex: 1 1 100%; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.16); background: #1a1216; color: var(--creme); font: 600 14px system-ui, sans-serif; }
.knopf.wa { background: #1f8f4e; border-color: #2fb767; color: #fff; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
#e-kopie { word-break: break-all; margin: 6px 0 0; }
#duell .karte { width: min(440px, 100%); text-align: center; }
#d-titel { margin: 2px 0 6px; font: italic 900 34px/1.1 system-ui, sans-serif; color: var(--gold); }
#d-text { margin: 0 0 8px; font-weight: 800; font-size: 16px; }
#d-auto { width: 100%; height: auto; aspect-ratio: 240 / 110; border-radius: 10px; background: radial-gradient(ellipse at 50% 70%, rgba(255,160,90,0.10), rgba(0,0,0,0) 70%); }
#d-info { margin: 6px 0 12px; }
.warn { color: #ffae5a; font-weight: 700; font-size: 12px; }
.auto .gegner { font-size: 11px; color: #b9a58a; }
.med { font-style: normal; font-weight: 800; font-size: 11px; padding: 1px 6px; border-radius: 8px; }
.med-platin { background: linear-gradient(135deg,#e8f4ff,#9fb6cc); color: #1c2733; } .med-gold { background: linear-gradient(135deg,#ffe38a,#d19a1e); color: #3a2800; }
.med-silber { background: linear-gradient(135deg,#f2f2f2,#9ea3a8); color: #26292c; } .med-bronze { background: linear-gradient(135deg,#f0b27a,#9a5b2b); color: #2b1606; }
#e-leiter { margin: 8px 0 0; font-weight: 800; color: var(--gold); text-align: center; }
#autos .gruppe { grid-column: 1 / -1; margin: 6px 2px -2px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #cdb48f; }
@media (max-width: 560px) { #autos { grid-template-columns: 1fr; } .auto canvas { max-height: 150px; object-fit: contain; } .reiter { padding: 6px 4px; font-size: 12px; } }
.auto { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 8px 10px 10px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12); background: linear-gradient(#241218, #1a0d12); min-width: 0; }
.auto:hover, .auto:focus-visible { border-color: var(--gold); outline: none; }
.auto:active { transform: translateY(1px); }
.auto canvas { width: 100%; height: auto; aspect-ratio: 240 / 110; }
.auto b { font-size: 16px; margin-top: 2px; }
.auto .zeile { font-size: 12px; color: var(--dim); line-height: 1.3; }
.auto .daten { font-size: 11px; color: #d8c4a8; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.auto canvas { background: radial-gradient(ellipse at 50% 70%, rgba(255,160,90,0.10), rgba(0,0,0,0) 70%); border-radius: 10px; }
.auto .zeit { font-size: 12px; font-weight: 700; color: var(--gold); margin-top: 3px; }
.stufe { white-space: nowrap; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; padding: 1px 8px; border-radius: 999px; }
.stufe-leicht { background: rgba(53,208,127,0.18); color: #7ee08f; } .stufe-mittel { background: rgba(242,194,75,0.18); color: var(--gold); }
.stufe-schwer { background: rgba(255,107,97,0.18); color: var(--rot); } .stufe-gaudi { background: rgba(90,200,250,0.18); color: #7fd3ff; }
.sogehts { margin-top: 12px; background: rgba(255,255,255,0.04); border-radius: 12px; padding: 8px 12px; }
.sogehts summary { font-weight: 800; color: var(--gold); cursor: pointer; }
.sogehts ol { margin: 6px 0 4px; padding-left: 20px; } .sogehts li { margin: 3px 0; }
.klein { font-size: 12px; color: var(--dim); margin: 4px 0 0; }
.fuss { margin: 10px 0 0; font-size: 12px; color: var(--dim); text-align: center; }
.fuss a { color: var(--gold); }
.links { margin: 4px 0 0; font-size: 12.5px; text-align: center; } .links a { color: var(--gold); text-decoration: none; white-space: nowrap; }
#ende .links { margin-top: 12px; }
/* Speicher-Hinweis (zentrale Spielhallen-Einstellung "merken") */
.merken-zeile { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: center; margin: 10px 0 2px; padding: 8px 10px;
  border: 1px dashed var(--rand); border-radius: 12px; font-size: 12.5px; color: var(--dim); text-align: center; }
.merken-zeile.an { border-style: solid; color: #9fd89f; }
.knopf.klein { padding: 6px 10px; font-size: 12.5px; border-radius: 10px; }
.ende-merken { margin: 2px 0 8px; font-size: 13px; color: var(--dim); }
.ende-merken .knopf { margin-left: 4px; }
.alias a { color: var(--gold); }
body.rennt button[title="Lokale Spieldaten"] { display: none !important; }   /* Zahnrad (hs-play.js) im Rennen ausblenden: Tippen irgendwo = Schalten */
#ende .karte { width: min(420px, 100%); text-align: center; }
#e-titel { margin: 2px 0 10px; font: italic 900 32px/1.1 system-ui, sans-serif; }
#e-titel.sieg { color: var(--gold); } #e-titel.niederlage { color: #ffae5a; }
#e-werte { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; text-align: left; font-size: 15px; }
#e-werte span { color: var(--dim); } #e-werte b { text-align: right; font-variant-numeric: tabular-nums; }
#e-werte i { font-style: normal; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; margin-left: 4px; vertical-align: 1px; }
#e-werte i.neu { background: var(--gold); color: #2a1206; } #e-werte i.strafe { background: rgba(255,107,97,0.2); color: var(--rot); }
.chips { display: flex; gap: 4px; justify-content: flex-end; }
.chip { width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; font-size: 13px; font-weight: 900; color: #1a1206 !important; }
.chip.perfekt { background: #ffd75a; } .chip.gut { background: #7ee08f; } .chip.frueh { background: #ffae5a; } .chip.spaet { background: #ff6b61; }
#e-tipp { color: var(--dim); font-size: 13px; margin: 12px 0 12px; }
.reihe { display: flex; gap: 8px; } .reihe .knopf { flex: 1; }
.knopf { border: 1px solid rgba(255,255,255,0.16); background: #241a1e; border-radius: 12px; padding: 11px 14px; font-weight: 800; }
.knopf.gold { background: linear-gradient(#f2c24b, #d99a2b); color: #2a1206; border-color: #f2c24b; }
.pause { font-size: 18px; font-weight: 800; border: 0; color: var(--creme); }
@media (max-width: 380px) { .logo { font-size: 32px; } .logo small { letter-spacing: 0.12em; font-size: 11px; } .stufe { font-size: 10px; padding: 1px 6px; letter-spacing: 0.02em; } #autos { gap: 8px; } .auto { padding: 6px 8px 8px; } .auto .zeile { display: none; } }
