/* Neutron Sbike – Oberfläche: Titel über dem Intro-Video, Menüs, Werkstatt, HUD (E-Bike-Display), Touch */
:root {
  --blau: #1f5fbf; --blau2: #3d8bff; --rot: #e8262e; --rot2: #ff5a3c; --gelb: #ffd34a; --gruen: #3fcf7a;
  --dunkel: #08142a; --panel: rgba(9, 20, 42, 0.84); --panel2: rgba(255, 255, 255, 0.06); --rand: rgba(255, 255, 255, 0.13);
  --text: #f2f5fb; --leise: #a9b6cc; --r: 14px;
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--dunkel); color: var(--text); font-family: var(--font); overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
input, textarea { -webkit-user-select: text; user-select: text; font-family: inherit; }
a { color: #8fc0ff; }
#app { position: fixed; inset: 0; }
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- Laden */
#boot { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 35%, #173a78 0%, #0b1a33 55%, #050c1a 100%); z-index: 50; padding: 20px; text-align: center; }
.boot-logo { font: 900 clamp(44px, 10vw, 104px)/1 var(--font); letter-spacing: -2px; text-transform: lowercase; }
.boot-logo span { color: var(--rot); font-style: italic; margin: 0 2px; }
.boot-bar { width: min(420px, 72vw); height: 8px; background: #ffffff1f; border-radius: 4px; margin: 26px auto 10px; overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--rot), var(--gelb)); transition: width .25s; border-radius: 4px; }
#boot-msg { opacity: .8; font-size: 15px; max-width: 560px; }

/* ---------------------------------------------------------------- Intro-Video hinter den Menüs */
#intro { position: absolute; inset: 0; z-index: 8; overflow: hidden; background: #0b1a33 center/cover no-repeat; }
#intro video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#intro::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 12, 26, 0.86) 0%, rgba(5, 12, 26, 0.55) 34%, rgba(5, 12, 26, 0.05) 62%), linear-gradient(0deg, rgba(5, 12, 26, 0.6) 0%, rgba(5, 12, 26, 0) 30%); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { #intro video { display: none; } }

/* ---------------------------------------------------------------- Menüs allgemein */
.ui { position: absolute; inset: 0; z-index: 10; overflow-y: auto; overflow-x: hidden; display: flex; align-items: flex-start; justify-content: center; padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); touch-action: pan-y; }
.ui.overlay { background: rgba(4, 10, 22, 0.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.ui > .panel, .ui > .loading { margin: auto; }
.panel { background: var(--panel); border: 1px solid var(--rand); border-radius: var(--r); padding: 22px 24px; width: min(640px, 100%); max-height: 100%; overflow-y: auto; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); margin: auto; }
.panel.wide { width: min(1200px, 100%); }
h2 { margin: 0 0 12px; font-size: 26px; font-weight: 800; letter-spacing: -0.3px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
h3 { margin: 18px 0 8px; font-size: 15px; text-transform: uppercase; letter-spacing: .6px; color: var(--leise); font-weight: 700; display: flex; align-items: center; gap: 8px; }
h4 { margin: 14px 0 6px; font-size: 14px; color: var(--leise); }
.col > h3:first-child { margin-top: 0; }
p { line-height: 1.5; margin: 8px 0; }
.lead { font-size: 16px; color: #dfe7f5; }
.muted { color: var(--leise); }
.small { font-size: 13px; }
.warn { color: #ffb648; }
.good { color: var(--gruen); font-weight: 600; }
.bad { color: #ff6b6b; font-weight: 600; }
.cols { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 26px; }
.col { min-width: 0; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; gap: 10px; } .panel { padding: 18px 16px; } h2 { font-size: 22px; } }

/* Knöpfe */
.mi { font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--rand); border-radius: 10px; padding: 11px 16px; cursor: pointer; text-align: left; transition: background .12s, border-color .12s, transform .08s; font-size: 15px; font-weight: 600; touch-action: manipulation; }
.mi:hover:not([disabled]) { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.28); }
.mi:active:not([disabled]) { transform: translateY(1px); }
.mi.kf { outline: 2px solid var(--gelb); outline-offset: 2px; }
.mi:focus-visible { outline: 2px solid var(--gelb); outline-offset: 2px; }
.mi[disabled] { opacity: .45; cursor: not-allowed; }
.mi.on { background: rgba(61, 139, 255, 0.25); border-color: var(--blau2); }
.mi.go { background: linear-gradient(135deg, var(--rot), var(--rot2)); border-color: transparent; color: #fff; text-align: center; box-shadow: 0 4px 16px rgba(232, 38, 46, 0.35); }
.mi.go:hover:not([disabled]) { background: linear-gradient(135deg, #f43a42, #ff7350); }
.mi.accent { background: linear-gradient(135deg, #1f5fbf, #2f86e8); border-color: transparent; }
.mi.accent:hover:not([disabled]) { background: linear-gradient(135deg, #2a6fd6, #4096f5); }
.mi.big { font-size: 19px; padding: 15px 20px; }
.mi.small { font-size: 13px; padding: 7px 12px; }
.mi.tiny { font-size: 12px; padding: 3px 9px; border-radius: 7px; margin-left: 6px; }
.mi.chip { padding: 7px 12px; font-size: 14px; border-radius: 999px; text-align: center; }
.btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.btns.col { flex-direction: column; align-items: stretch; }
.btns.col .mi { text-align: center; }
.opt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.opt > span { min-width: 92px; color: var(--leise); font-size: 14px; }
.opt input[type=range] { flex: 1; min-width: 140px; accent-color: var(--rot); }
.opt input[type=text], .share input, input.bname { flex: 1; min-width: 160px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--rand); color: var(--text); border-radius: 9px; padding: 9px 12px; font-size: 15px; }
.opt input[type=text]:focus, input.bname:focus { outline: 2px solid var(--blau2); }

/* ---------------------------------------------------------------- Titel */
.ui.title { justify-content: flex-start; align-items: stretch; }
.title-wrap { margin: auto 0; width: min(470px, 100%); display: flex; flex-direction: column; justify-content: center; padding: 10px 0 10px clamp(0px, 3vw, 40px); }
.logo { font: 900 clamp(50px, 8.4vw, 96px)/0.92 var(--font); letter-spacing: -3px; text-transform: lowercase; display: flex; align-items: baseline; text-shadow: 0 6px 30px rgba(0, 0, 0, 0.55); white-space: nowrap; }
.logo .l1 { color: #fff; }
.logo .l2 { color: var(--rot); font-style: italic; font-size: 1.28em; margin: 0 1px 0 4px; text-transform: none; text-shadow: 0 0 26px rgba(232, 38, 46, 0.55); }
.logo .l3 { color: #fff; }
.tag { margin: 10px 0 18px; color: #d7e0f0; font-size: 16px; text-shadow: 0 1px 8px #000; }
.menu { display: flex; flex-direction: column; gap: 8px; }
.title-box { background: rgba(6, 14, 30, 0.55); border: 1px solid var(--rand); border-radius: var(--r); padding: 14px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.title-box .mi { background: rgba(255, 255, 255, 0.07); }
.title-box .mi.big { background: linear-gradient(135deg, var(--rot), var(--rot2)); border-color: transparent; text-align: center; box-shadow: 0 6px 22px rgba(232, 38, 46, 0.4); }
.title-box .mi.accent { background: linear-gradient(135deg, #1f5fbf, #2f86e8); }
.row2 { display: flex; gap: 8px; }
.row2 .mi { flex: 1; text-align: center; padding: 9px 6px; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.credit { position: absolute; right: 18px; bottom: 12px; font-size: 12px; color: #c8d3e6; opacity: .75; text-shadow: 0 1px 4px #000; max-width: 50%; text-align: right; }
.dock-here:empty { display: none; }
.dock-here { margin-top: 10px; }
@media (max-width: 640px) { .credit { display: none; } .title-wrap { padding: 0; } .tag { font-size: 14px; } #intro::after { background: rgba(5, 12, 26, 0.5); } }
@media (max-height: 860px) and (min-height: 561px) {
  .logo { font-size: clamp(50px, 7vw, 76px); } .tag { margin: 6px 0 12px; font-size: 15px; }
  .title-box { padding: 12px; } .menu { gap: 6px; } .title-box .mi { padding: 9px 14px; } .title-box .mi.big { padding: 12px 18px; font-size: 18px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .logo { font-size: 40px; } .tag { margin: 2px 0 8px; font-size: 13px; } .menu { gap: 5px; } .mi { padding: 7px 11px; font-size: 14px; } .mi.big { padding: 9px 14px; font-size: 16px; }
  .title-wrap { width: min(600px, 100%); }
  .title-box { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; }
  .title-box .mi.big, .title-box .row2, .title-box .dock-here { grid-column: 1 / -1; }
  .credit { display: none; }
  h2 { font-size: 20px; } .panel { padding: 14px 16px; }
}

/* ---------------------------------------------------------------- Strecken, Räder, Kennwerte */
.tracks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tcard { position: relative; min-height: 124px; padding: 38px 12px 10px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; background-color: #1a2a48; background-size: cover; background-position: center; overflow: hidden; }
.tcard::before { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4, 10, 22, 0.92) 0%, rgba(4, 10, 22, 0.25) 70%); z-index: 0; }
.tcard > * { position: relative; z-index: 1; }
.tcard b { font-size: 15px; }
.tcard small { font-size: 12px; color: #cdd7e8; font-weight: 500; line-height: 1.3; }
.tcard em { font-size: 12px; font-style: normal; color: var(--gelb); }
.tcard.on { border-color: var(--gelb); box-shadow: 0 0 0 2px var(--gelb) inset; background-color: #1a2a48; }
.tk { position: absolute !important; top: 8px; left: 8px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: #3d8bff; text-transform: uppercase; letter-spacing: .4px; }
.tk.k-off { background: #8a5a2b; } .tk.k-mix { background: #2f8f4a; } .tk.k-road { background: #3d6fbf; }
.bikes { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; padding-right: 2px; }
.bcard { display: grid; grid-template-columns: 22px 1fr; column-gap: 10px; align-items: center; padding: 8px 12px; }
.bcard i { grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff6; }
.bcard b { font-size: 14px; } .bcard small { font-size: 12px; color: var(--leise); font-weight: 500; }
.bstat { margin-top: 10px; }
.bars { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.bar { display: grid; grid-template-columns: 112px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; font-size: 13px; }
.bar span { color: var(--leise); grid-row: span 2; }
.bar i { display: block; height: 8px; background: #ffffff18; border-radius: 4px; overflow: hidden; }
.bar i b { display: block; height: 100%; background: linear-gradient(90deg, var(--blau2), #6fe0ff); border-radius: 4px; }
.bar em { font-style: normal; font-size: 12px; color: #c7d2e5; }
.story { font-size: 13px; color: #c7d2e5; font-style: italic; }
.cls { color: var(--gelb); font-weight: 600; margin: 4px 0; }
.money { font-size: 15px; font-weight: 700; background: rgba(255, 211, 74, 0.15); color: var(--gelb); padding: 4px 10px; border-radius: 8px; }
.money.free { background: rgba(61, 139, 255, 0.2); color: #9cc6ff; }

/* Karriere */
.cup { border: 1px solid var(--rand); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; background: rgba(255, 255, 255, 0.03); }
.cup h3 { margin: 0 0 4px; color: #fff; text-transform: none; letter-spacing: 0; font-size: 17px; }
.cup p { margin: 4px 0; font-size: 14px; }
.cup ol { margin: 6px 0; padding-left: 22px; font-size: 14px; }
.cup li.ok { color: var(--gruen); }
.cup.locked { opacity: .6; }
.cup.done { border-color: rgba(255, 211, 74, 0.5); }
.cup .lock { color: #ffb648; font-size: 13px; }
.cup .pts { color: var(--gelb); font-weight: 600; }

/* Staffel */
.stages { display: flex; flex-direction: column; gap: 6px; }
.stage { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 12px; padding: 9px 12px; }
.stage b { grid-row: span 2; width: 36px; height: 36px; border-radius: 50%; background: var(--rot); display: flex; align-items: center; justify-content: center; font-size: 17px; }
.stage span { font-size: 15px; } .stage em { font-style: normal; font-size: 12px; color: var(--leise); }

/* Wissen */
.klist { display: flex; flex-direction: column; gap: 5px; }
.klist .mi { font-size: 14px; padding: 9px 12px; }
.know h3 { color: #fff; text-transform: none; font-size: 20px; letter-spacing: 0; margin-top: 0; }
.know p { color: #dfe6f2; }
.know .src { font-size: 13px; color: var(--leise); }
.links { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
a.ext { display: block; padding: 10px 14px; border-radius: 10px; background: rgba(61, 139, 255, 0.14); border: 1px solid rgba(61, 139, 255, 0.4); color: #cfe2ff; text-decoration: none; font-weight: 600; font-size: 14px; }
a.ext:hover { background: rgba(61, 139, 255, 0.25); }

/* Tabellen */
table.res, table.keys { width: 100%; border-collapse: collapse; font-size: 14px; }
table.res td, table.keys td, table.keys th { padding: 7px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); text-align: left; vertical-align: middle; }
table.res tr.me td { background: rgba(255, 211, 74, 0.13); color: #fff; font-weight: 700; }
table.res td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
table.res.small { font-size: 13px; }
table.res td.ok { color: var(--gruen); } table.res td.muted { color: var(--leise); }
table.keys th { color: var(--gelb); white-space: nowrap; width: 40%; font-weight: 600; }
.board { margin: 10px 0; padding: 10px 12px; background: rgba(0, 0, 0, 0.22); border-radius: 10px; }
.board h3 { margin-top: 0; }
.tag-ghost { font-size: 10px; background: #5fa8ff; color: #04122a; padding: 1px 6px; border-radius: 5px; font-weight: 800; vertical-align: middle; }

/* Laden */
.ui.loading-screen { background: transparent; }
.loading { text-align: center; background: rgba(5, 12, 26, 0.7); border-radius: var(--r); padding: 26px 30px; width: min(560px, 100%); border: 1px solid var(--rand); }
.loading h2 { justify-content: center; }
.loading .tip { font-size: 14px; color: #dbe4f3; margin-top: 16px; }

/* Pause / Ergebnis */
.pause-box { width: min(440px, 100%); }
.pause-box .menu .mi { text-align: center; }
.end-box { width: min(940px, 100%); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.facts div { background: rgba(255, 255, 255, 0.05); border-radius: 10px; padding: 9px 12px; }
.facts b { display: block; font-size: 19px; font-variant-numeric: tabular-nums; }
.facts span { font-size: 12px; color: var(--leise); }
.submit { margin-top: 12px; }

/* Dialog */
.modal { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(3, 8, 18, 0.6); padding: 16px; pointer-events: auto; }
.modal .panel { width: min(560px, 100%); }
.modal.side { background: transparent; justify-content: flex-end; align-items: flex-end; pointer-events: none; }
.modal.side .panel { pointer-events: auto; width: min(430px, 100%); margin: 0 0 4px; max-height: 60vh; }
.modal ul { padding-left: 20px; }
ul.check { list-style: none; padding: 0; }
ul.check li { padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: space-between; }
ul.check li small { flex-basis: 100%; color: var(--leise); }
.src { font-size: 13px; color: var(--leise); }

/* Online */
.rooms { display: flex; flex-direction: column; gap: 8px; }
.room { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 10px 14px; border: 1px solid var(--rand); border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.room div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.room small { font-size: 12px; color: var(--leise); }
.room .mi { flex-shrink: 0; }
.tlist { display: flex; flex-wrap: wrap; gap: 6px; }
.share { display: flex; gap: 8px; }
.share input { font-size: 13px; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff6; vertical-align: middle; }
.players td small { color: var(--leise); font-size: 12px; }
.flash { min-height: 22px; color: var(--gelb); font-size: 14px; opacity: 0; transition: opacity .3s; }
.flash.show { opacity: 1; }

/* ---------------------------------------------------------------- Werkstatt */
.ui.workshop { display: block; padding: 12px; pointer-events: none; overflow: hidden; }
.ui.workshop > .panel { pointer-events: auto; position: absolute; top: 12px; bottom: 12px; margin: 0; padding: 16px 18px; }
.ws-left { left: 12px; width: min(400px, 36vw); display: flex; flex-direction: column; }
.ws-right { right: 12px; width: min(340px, 30vw); }
.ws-left h2 { font-size: 22px; }
.tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.tab { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.parts { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 6px; padding-right: 4px; }
.part { display: block; width: 100%; }
.part b { display: block; font-size: 14px; }
.part span { font-size: 12px; color: var(--leise); font-weight: 500; }
.part span em { color: var(--gelb); font-style: normal; }
.part p { font-size: 13px; font-weight: 400; margin: 6px 0 0; color: #d6deeb; }
.swatches, .presets { display: flex; flex-wrap: wrap; gap: 6px; }
.sw { width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 2px solid #ffffff40; }
.sw.on { border-color: var(--gelb); box-shadow: 0 0 0 2px var(--gelb); }
input.bname { width: 100%; font-size: 18px; font-weight: 700; margin-bottom: 4px; }
ul.legal { list-style: none; padding: 0; margin: 6px 0; font-size: 13px; max-height: 30vh; overflow-y: auto; }
ul.legal li { padding: 4px 0; }
ul.legal li.ok { color: #9fe3b8; } ul.legal li.no { color: #ffc0a0; }
.ws-hint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); font-size: 13px; color: #fff; opacity: .7; text-shadow: 0 1px 4px #000; pointer-events: none; }
@media (max-width: 900px) {
  .ui.workshop { overflow-y: auto; pointer-events: auto; padding-top: 42vh; }
  .ui.workshop > .panel { position: static; width: 100%; margin-bottom: 10px; }
  .ws-left { max-height: none; }
  .parts { max-height: 46vh; }
  .ws-hint { top: 8px; bottom: auto; }
}

/* ---------------------------------------------------------------- HUD */
#hud { position: absolute; inset: 0; pointer-events: none; z-index: 5; font-weight: 600; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); font-variant-numeric: tabular-nums; }
#hud.dim { opacity: 0; transition: opacity .4s; }
.h-top { position: absolute; left: max(18px, env(safe-area-inset-left)); top: 14px; display: flex; flex-direction: column; gap: 2px; }
.h-pos b { font-size: 46px; line-height: 1; font-weight: 900; }
.h-pos span { font-size: 22px; opacity: .8; margin-left: 2px; }
.h-lap { font-size: 17px; color: #dfe7f5; }
.h-time { font-size: 24px; font-weight: 800; }
.h-time small { color: #ffb648; font-size: 15px; }
.h-gap { font-size: 14px; color: #cfe0ff; max-width: 46vw; }
#h-map { position: absolute; right: max(14px, env(safe-area-inset-right)); top: 14px; width: 176px; height: 176px; background: rgba(5, 12, 26, 0.45); border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.12); }
.h-display { position: absolute; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); width: 236px; padding: 12px 14px 10px; border-radius: 16px; background: linear-gradient(160deg, rgba(20, 28, 40, 0.92), rgba(8, 12, 20, 0.92)); border: 2px solid #3a4658; box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08); text-shadow: none; color: #e9f6ff; }
.h-display::before { content: 'PEDELEC 25'; position: absolute; top: -9px; left: 14px; font-size: 10px; letter-spacing: 1.2px; background: #3a4658; color: #cfe3ff; padding: 1px 7px; border-radius: 5px; }
.h-display.s45 { border-color: var(--rot); }
.h-display.s45::before { content: 'S-PEDELEC 45'; background: var(--rot); color: #fff; }
.d-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.d-speed b { font-size: 52px; line-height: .95; font-weight: 800; color: #fff; letter-spacing: -1px; }
.d-speed span { font-size: 13px; margin-left: 4px; color: #9fb4cc; }
.d-assist { text-align: right; font-size: 13px; color: #cfe3ff; }
.d-assist em { color: #ffb648; font-style: normal; }
.d-lv { display: flex; gap: 3px; justify-content: flex-end; margin-bottom: 4px; }
.d-lv i { width: 9px; height: 18px; border-radius: 2px; background: #2a3546; }
.d-lv i:nth-child(1) { height: 9px; } .d-lv i:nth-child(2) { height: 12px; } .d-lv i:nth-child(3) { height: 15px; }
.d-lv i { align-self: flex-end; }
.d-lv i.on { background: linear-gradient(0deg, #2fb36a, #7ff0a8); }
.d-bat { position: relative; flex: 1; height: 16px; border: 2px solid #9fb4cc; border-radius: 4px; margin: 8px 6px 2px 0; }
.d-bat::after { content: ''; position: absolute; right: -6px; top: 3px; width: 3px; height: 6px; background: #9fb4cc; border-radius: 0 2px 2px 0; }
.d-bat i { position: absolute; left: 1px; top: 1px; bottom: 1px; background: linear-gradient(90deg, #2fb36a, #7ff0a8); border-radius: 2px; max-width: calc(100% - 2px); }
.d-bat i.low { background: linear-gradient(90deg, #e8262e, #ff7a5c); }
.d-bat span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; text-shadow: 0 0 3px #000; }
.d-range { font-size: 13px; color: #cfe3ff; white-space: nowrap; padding-bottom: 2px; }
.d-puste { display: flex; align-items: center; gap: 8px; margin: 7px 0 2px; }
.d-puste span { font-size: 11px; color: #9fb4cc; width: 38px; }
.d-puste b { position: relative; flex: 1; height: 8px; background: #2a3546; border-radius: 4px; overflow: hidden; }
.d-puste i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #e8a030, #ffd34a); border-radius: 4px; }
.d-puste i.low { background: linear-gradient(90deg, #e8262e, #ff7a5c); }
.d-info { font-size: 12px; color: #9fb4cc; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-count { position: absolute; left: 0; right: 0; top: 30%; text-align: center; }
.h-count b { display: inline-block; font-size: 120px; font-weight: 900; color: #fff; text-shadow: 0 6px 30px rgba(0, 0, 0, 0.6); animation: pop .9s ease-out; }
.h-count b.go { color: var(--gelb); }
.h-count b.wait { font-size: 26px; animation: none; background: rgba(5, 12, 26, 0.7); padding: 12px 20px; border-radius: 12px; }
@keyframes pop { 0% { transform: scale(1.8); opacity: 0; } 30% { transform: scale(1); opacity: 1; } 100% { transform: scale(.92); opacity: .9; } }
.h-toasts { position: absolute; left: 50%; top: 16%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; width: min(90vw, 620px); }
.toast { background: rgba(5, 12, 26, 0.78); padding: 8px 16px; border-radius: 10px; font-size: 17px; text-align: center; border: 1px solid rgba(255, 255, 255, 0.12); }
.toast.warn { border-color: #ff9b3c; color: #ffd0a0; }
.toast.good { border-color: var(--gruen); color: #c4ffd9; }
.h-sub { position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%); background: rgba(0, 0, 0, 0.62); padding: 7px 14px; border-radius: 8px; font-size: 16px; max-width: min(80vw, 640px); text-align: center; font-weight: 500; }
.h-stage { position: absolute; left: 50%; top: 9%; transform: translate(-50%, -20px); background: linear-gradient(135deg, rgba(232, 38, 46, 0.92), rgba(255, 90, 60, 0.92)); padding: 10px 20px; border-radius: 12px; font-size: 18px; opacity: 0; transition: opacity .5s, transform .5s; white-space: nowrap; }
.h-stage b { margin-right: 8px; }
.h-stage.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 720px), (max-height: 520px) {
  #h-map { width: 120px; height: 120px; }
  .h-pos b { font-size: 34px; } .h-time { font-size: 19px; } .h-lap { font-size: 14px; } .h-gap { font-size: 12px; }
  .h-display { width: 196px; padding: 9px 11px 8px; }
  .d-speed b { font-size: 40px; }
  .h-count b { font-size: 84px; }
  .toast { font-size: 14px; }
}

/* ---------------------------------------------------------------- Touch */
#touch { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
#touch button { pointer-events: auto; font: 700 15px var(--font); color: #fff; background: rgba(10, 20, 40, 0.42); border: 2px solid rgba(255, 255, 255, 0.35); border-radius: 16px; touch-action: none; -webkit-user-select: none; user-select: none; }
#touch button.on, #touch button:active { background: rgba(255, 255, 255, 0.3); }
.t-left { position: absolute; left: max(14px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); display: flex; gap: 12px; }
.t-left button { width: 84px; height: 84px; font-size: 28px !important; border-radius: 50% !important; }
.t-right { position: absolute; right: max(14px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: 84px 92px; grid-template-rows: 64px 84px; gap: 10px; }
.t-right .t-pedal { grid-column: 2; grid-row: 1 / span 2; background: rgba(47, 179, 106, 0.42) !important; }
.t-right .t-sprint { grid-column: 1; grid-row: 1; }
.t-right .t-brake { grid-column: 1; grid-row: 2; background: rgba(232, 38, 46, 0.4) !important; }
.t-right .t-jump { position: absolute; right: 0; bottom: 186px; width: 92px; height: 56px; }
.t-top { position: absolute; left: 50%; top: max(8px, env(safe-area-inset-top)); transform: translateX(-50%); display: flex; gap: 6px; }
.t-top button { padding: 7px 11px; border-radius: 10px !important; font-size: 13px !important; }
@media (pointer: coarse) {
  /* Display rutscht auf Touch-Geräten nach oben, damit die Tasten Platz haben */
  .h-display { bottom: auto; top: 54px; right: auto; left: 50%; transform: translateX(-50%) scale(.82); transform-origin: top center; }
  #h-map { top: 10px; width: 110px; height: 110px; }
}
/* spiele.0o5.de: Navigation nur in Menüs */
.s05-dock-hidden { display: none !important; }
