:root {
  /* Diginauts Simracing: Anthrazit, Neon-Lime aus dem Logo */
  --bg: #0a0b0c;
  --panel: #141617;
  --panel-2: #1d2022;
  --line: #2a2e31;
  --text: #f2f4f0;
  --muted: #9ba39a;
  --accent: #cfee00;
  --accent-2: #e2ff3d;
  --on-accent: #0a0b0c;
  --glow: 0 0 12px rgba(207, 238, 0, .35);
  --ok: #3fb950;
  --warn: #d29922;
  --bad: #f85149;
  --radius: 8px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: inherit; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 0 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
p.muted, .muted { color: var(--muted); }
.small { font-size: 12px; }

.topbar[hidden] { display: none; }
.topbar { display: flex; align-items: center; gap: 24px; padding: 0 20px; height: 56px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; font-size: 16px; white-space: nowrap; }
.flag { width: 30px; height: 24px; flex: none; background: url(../img/logo-mark.webp) center / contain no-repeat; }
nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
nav a { text-decoration: none; padding: 8px 12px; border-radius: 6px; color: var(--muted); white-space: nowrap; }
nav a:hover { background: var(--panel-2); color: var(--text); }
nav a.active { color: var(--text); background: var(--panel-2); box-shadow: inset 0 -2px 0 var(--accent); }
.user { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.user a { text-decoration: none; color: var(--muted); }

main { max-width: 1400px; margin: 0 auto; padding: 24px 20px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.form { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }

label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
input, select, textarea { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font: inherit; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
textarea { min-height: 70px; resize: vertical; }

button, .btn { background: var(--accent); color: var(--on-accent); border: 0; border-radius: 6px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
button:hover, .btn:hover { background: var(--accent-2); }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.ghost:hover { background: var(--panel-2); }
button.danger { background: transparent; color: var(--bad); border: 1px solid #5a2a2a; }
button.danger:hover { background: #2a1515; }
button.small { padding: 4px 10px; font-size: 12px; }
button:disabled { opacity: .5; cursor: default; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr:hover { background: #1b1f27; }
.table-wrap { overflow-x: auto; }
td input, td select { padding: 4px 6px; }
td input.laps { width: 64px; }

.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--panel-2); border: 1px solid var(--line); }
.cls { border-left: 3px solid var(--c, var(--muted)); padding-left: 8px; }
.tag-warn { color: var(--warn); }
.tag-bad { color: var(--bad); }
.tag-ok { color: var(--ok); }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.stat .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 12px; }

.warnings { border-left: 3px solid var(--warn); background: #241e0f; padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; }
.warnings li { margin: 2px 0; }
.empty { color: var(--muted); padding: 24px; text-align: center; }

.driver-row { display: grid; grid-template-columns: 24px 1fr 120px auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.driver-row .handle { color: var(--muted); text-align: center; }

.timeline { display: flex; height: 26px; border-radius: 6px; overflow: hidden; margin: 6px 0 16px; border: 1px solid var(--line); }
.timeline div { height: 100%; font-size: 11px; display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap; color: #fff; border-right: 1px solid rgba(0,0,0,.4); }

.login-wrap { min-height: 80vh; display: grid; place-items: center; }
.login { width: 100%; max-width: 380px; }
.login h1 { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.login form { display: grid; gap: 12px; }
.login > .card + .card { margin-top: 4px; }
.login h2 { margin: 0 0 12px; font-size: 18px; }
.code-input { text-transform: uppercase; letter-spacing: .12em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.share-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: -6px 0 16px; }
.share-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 18px; font-weight: 700; letter-spacing: .12em; padding: 3px 10px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); user-select: all; }
.error { color: var(--bad); min-height: 1.2em; }

dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 0; width: min(640px, 94vw); }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog form { padding: 20px; display: grid; gap: 14px; }
dialog .foot { display: flex; justify-content: flex-end; gap: 8px; }

#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 100; }
#toast.show { opacity: 1; }
#toast.bad { border-color: var(--bad); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.filters select, .filters input { min-width: 180px; }

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 8px; }
  nav { order: 3; width: 100%; }
  main { padding: 16px 16px 60px; }
}


/* Kalender */
.cal-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-nav h2 { margin: 0; min-width: 170px; text-align: center; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head { font-size: 12px; color: var(--muted); text-transform: uppercase; padding: 2px 6px; }
.cal-day { min-height: 92px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day.other { opacity: .45; }
.cal-day.today { border-color: var(--accent); }
.cal-day { cursor: pointer; }
.cal-day:hover { border-color: var(--muted, #888); }
.cal-day.today:hover { border-color: var(--accent); }
.day-choice { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.day-choice button { flex: 1; justify-content: center; }
.cal-date { font-size: 12px; color: var(--muted); font-weight: 600; }
.cal-date .wd { display: none; }
.cal-event { display: block; background: var(--ec, var(--accent)); color: var(--on-accent); border-radius: 4px; padding: 2px 5px; font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event:hover, .cal-event:focus-visible { filter: brightness(1.15); }
.cal-avail { font-size: 11px; border-left: 3px solid var(--c); padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); background: color-mix(in srgb, var(--c) 14%, transparent); border-radius: 0 3px 3px 0; }
@media (max-width: 720px) {
  .cal-grid { grid-template-columns: 1fr; }
  .cal-head, .cal-day.empty { display: none; }
  .cal-day { min-height: 0; }
  .cal-date .wd { display: inline; }
}

/* Verfügbarkeit pro Event */
.av { display: grid; gap: 6px; overflow-x: auto; }
.av-row { display: grid; grid-template-columns: 190px minmax(420px, 1fr); gap: 4px 12px; align-items: center; }
.av-name { display: flex; flex-direction: column; min-width: 0; }
.av-track { position: relative; height: 22px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.av-track.ticks { background: none; border: 0; height: 18px; overflow: visible; }
.av-track .tick { position: absolute; top: 0; transform: translateX(-50%); font-size: 11px; color: var(--muted); }
.av-track .seg { position: absolute; top: 2px; bottom: 2px; border-radius: 3px; opacity: .85; }
.av-track.sessions .seg.sess { background: var(--line); color: var(--muted); font-size: 11px; padding: 0 6px; white-space: nowrap; overflow: hidden; line-height: 16px; }
.av-track.sessions .seg.race { background: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--text); }
.av-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
@media (max-width: 720px) { .av-row { grid-template-columns: 110px minmax(420px, 1fr); } }
/* Tagesansicht */
.av.dv { overflow-x: auto; display: grid; gap: 6px; }
.dv-track { height: 28px; overflow: hidden; }
.dv-track .seg { z-index: 1; }
.av-track.sessions.dv-track .seg.sess { background: color-mix(in srgb, var(--ec, var(--accent)) 30%, transparent); color: var(--text); line-height: 22px; text-decoration: none; }
.av-track.sessions.dv-track .seg.race { background: var(--ec, var(--accent)); color: #0a0b0c; font-weight: 600; }
.dv-line { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.dv-line.day { background: var(--muted); width: 2px; }
.dv-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--bad); z-index: 2; }
.av-track .tick.day { color: var(--text); font-weight: 600; }
.dv-label { margin: 10px 0 2px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
a.cal-date { text-decoration: none; align-self: flex-start; }
a.cal-date:hover { color: var(--accent); text-decoration: underline; }

/* Reifenmischung */
.tyre { display: inline-block; padding: 0 7px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 2px solid var(--tc); color: var(--text); line-height: 18px; }
.tyre-soft { --tc: #e10600; }
.tyre-medium { --tc: #f5c400; }
.tyre-hard { --tc: #e8eaee; }
.tyre-wet { --tc: #1e88e5; }

/* Namenswahl über den Team-Link */
.pick-list { display: grid; gap: 8px; }
.pick-list button { text-align: left; padding: 12px 14px; font-size: 16px; }
.pick-list button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.pick-list .pick-sub { font-size: 13px; font-weight: 400; color: var(--muted); }

/* QR-Code */
.qr svg { display: block; width: 100%; height: auto; }
.qr-big { width: min(280px, 70vw); margin: 8px auto; border-radius: 8px; overflow: hidden; }
.qr-dialog { max-width: 380px; }
.qr-dialog > div.qr-body { padding: 20px; display: grid; gap: 10px; }
.qr-dialog h2 { margin: 0; }
.qr-link { word-break: break-all; text-align: center; }
.print-only { display: none; }

/* Leseansicht: Stints als Karten auf dem Handy */
.stint-cards { display: none; list-style: none; margin: 0; padding: 0; }
.stint-card { border: 1px solid var(--line); border-left: 4px solid var(--c, var(--muted)); border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; background: var(--panel-2); }
.sc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.sc-no { font-size: 12px; color: var(--muted); }
.sc-time { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.sc-line { font-size: 13px; color: var(--muted); margin-top: 3px; }
.dim { opacity: .35; }
@media (max-width: 720px) {
  .stint-cards { display: block; }
  .stint-table { display: none; }
}

@media print {
  .print-only { display: block; }
  .print-qr { width: 110px; text-align: center; }
  .stint-cards { display: none !important; }
  .stint-table { display: block !important; }
  .dim { opacity: 1; }
  .topbar, .no-print, button { display: none !important; }
  body, .card, .stat { background: #fff; color: #000; border-color: #ccc; }
  main { max-width: none; padding: 0; }
}

.site-footer { display: flex; gap: 16px; justify-content: center; padding: 16px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
.site-footer a { color: var(--muted); }
.legal { max-width: 760px; }
.legal h2 { margin-top: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.backup-codes { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem; line-height: 1.7; columns: 2; padding: 12px 16px; border-radius: 8px; background: var(--bg, #0f1115); border: 1px solid var(--line, #2a2f3a); user-select: all; }

/* Symbole (Lucide) */
.icon { width: 1.05em; height: 1.05em; flex: none; vertical-align: -0.15em; }
.icon.big { width: 40px; height: 40px; opacity: .45; display: block; margin: 0 auto 8px; }
nav a { display: inline-flex; align-items: center; gap: 6px; }
.stat .l { display: flex; align-items: center; gap: 6px; }
.warnings strong { display: inline-flex; align-items: center; gap: 6px; }
.empty p { margin: 0; }

/* Eingabeprüfung */
.field-error { color: var(--bad); font-size: 12px; min-height: 0; }
.field-error:empty { display: none; }
[aria-invalid="true"] { border-color: var(--bad) !important; box-shadow: 0 0 0 1px var(--bad); }

/* Runden pro Stint: −/+ */
.stepper { display: inline-flex; align-items: stretch; gap: 0; justify-content: flex-end; }
.stepper .step { min-width: 32px; min-height: 32px; justify-content: center; padding: 0; font-size: 16px; border-radius: 6px 0 0 6px; }
.stepper .step:last-child { border-radius: 0 6px 6px 0; }
.stepper input.laps { width: 52px; text-align: center; border-radius: 0; margin: 0; border-left: 0; border-right: 0; -moz-appearance: textfield; }
.stepper input.laps::-webkit-inner-spin-button, .stepper input.laps::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper.changed input.laps { color: var(--warn); font-weight: 700; }
tr.overridden td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
tr.flash, li.flash { animation: flash 1.4s ease-out; }
@keyframes flash { from { background: rgba(57, 135, 229, .35); } to { background: transparent; } }

/* Rennverlauf */
.rc { position: relative; display: grid; gap: 6px; }
.rc-row { display: grid; grid-template-columns: 86px 1fr; align-items: center; gap: 8px; }
.rc-label { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.rc-track { position: relative; height: 30px; background: var(--panel-2); border-radius: 6px; }
.rc-track.rc-thin { height: 20px; }
.rc-block { position: absolute; top: 0; bottom: 0; padding: 0 4px; margin: 0; border: 0; border-right: 2px solid var(--panel); border-radius: 4px; color: #fff; font-size: 11px; font-weight: 600; overflow: hidden; white-space: nowrap; justify-content: center; min-width: 0; }
.rc-block:hover, .rc-block:focus-visible { filter: brightness(1.2); outline: 2px solid var(--text); outline-offset: 1px; z-index: 2; }
.rc-tyre { background: var(--panel); border: 2px solid var(--tc); color: var(--text); font-size: 10px; }
.rc-stops { height: 18px; background: transparent; }
.rc-stop { position: absolute; top: 2px; width: 14px; height: 14px; margin-left: -7px; padding: 0; border-radius: 50%; background: var(--muted); border: 2px solid var(--panel); }
.rc-stop.tyres { background: var(--text); }
.rc-stop:hover, .rc-stop:focus-visible { outline: 2px solid var(--text); }
.rc-axis { position: relative; height: 16px; border-top: 1px solid var(--line); }
.rc-tick { position: absolute; top: 2px; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.rc-tick:first-child { transform: none; }
.rc-legend { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); }
.rc-key { display: inline-flex; align-items: center; gap: 5px; }
.rc-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.rc-tip { position: absolute; top: -8px; transform: translateY(-100%); width: 200px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 12px; pointer-events: none; z-index: 5; box-shadow: 0 4px 16px rgba(0,0,0,.4); }
@media (max-width: 640px) { .rc-row { grid-template-columns: 1fr; gap: 2px; } }
@media print { .rc-tip { display: none; } .stepper { display: none; } }

/* automatisch ergänzte Symbole an Überschriften, Spalten, Feldern und Hinweisen */
.ilabel { display: inline-flex; align-items: center; gap: 6px; }
th .ilabel { gap: 4px; }
th .ilabel .icon { width: 13px; height: 13px; opacity: .8; }
label .ilabel .icon { width: 14px; height: 14px; opacity: .85; }
h2 .ilabel .icon, h3 .ilabel .icon { color: var(--accent, currentColor); }
.icon.status { margin-right: 5px; }
@media (max-width: 600px) { th .ilabel .icon { display: none; } }

/* ---------- Diginauts-Look ---------- */
h1, h2 { font-weight: 800; letter-spacing: -.01em; color: #fff; }
h1 { text-transform: uppercase; letter-spacing: .01em; }
.topbar { background: rgba(10, 11, 12, .92); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(207, 238, 0, .35); box-shadow: 0 1px 18px rgba(207, 238, 0, .08); }
.brand { gap: 12px; }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-sub { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); border-left: 1px solid var(--line); padding-left: 12px; }
nav a.active { box-shadow: inset 0 -2px 0 var(--accent), 0 6px 12px -8px rgba(207, 238, 0, .6); }
button:not(.ghost):not(.danger):not(.rc-block):hover, .btn:hover { box-shadow: var(--glow); }
button.ghost:hover { border-color: rgba(207, 238, 0, .5); }
.card { border-color: #24282b; }
.card:hover { border-color: #30353a; }
a:not(.btn):hover { color: var(--accent); }
.stat .icon, .empty .icon { color: var(--accent); }

/* Anmeldeseiten mit Teambild im Hintergrund */
.login-wrap { position: relative; isolation: isolate; }
.login-wrap::before {
  content: ''; position: fixed; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(10, 11, 12, .55) 0%, rgba(10, 11, 12, .35) 40%, rgba(10, 11, 12, .92) 100%),
    url(../img/hero-wide.webp) center / cover no-repeat;
}
@media (max-aspect-ratio: 4/3) { .login-wrap::before { background-image: linear-gradient(180deg, rgba(10, 11, 12, .55) 0%, rgba(10, 11, 12, .35) 40%, rgba(10, 11, 12, .92) 100%), url(../img/hero.webp); } }
@media (max-aspect-ratio: 3/4) { .login-wrap::before { background-image: linear-gradient(180deg, rgba(10, 11, 12, .45) 0%, rgba(10, 11, 12, .25) 35%, rgba(10, 11, 12, .9) 100%), url(../img/hero-tall.webp); background-position: center 30%; } }
.login::before { content: ''; display: block; height: 70px; margin: 0 auto 18px; background: url(../img/logo-wordmark.webp) center / contain no-repeat; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .6)); }
.login .card { background: rgba(20, 22, 23, .82); backdrop-filter: blur(10px); border-color: rgba(207, 238, 0, .25); box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.login h1 { font-size: 20px; }
body:has(.login-wrap) .site-footer { background: transparent; border: 0; }
@media (max-width: 640px) {
  .brand-sub { display: none; }
  .brand-logo { height: 26px; }
}
@media print { h1, h2 { color: #000; } .login-wrap::before { display: none; } }

/* Rennverlauf: eine Spur pro Fahrer */
.rc { gap: 4px; }
.rc-row { grid-template-columns: 170px 1fr; }
.rc-driver { display: flex; flex-direction: column; gap: 1px; min-width: 0; color: var(--text); font-size: 13px; }
.rc-driver .drv { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-label-in { display: inline-flex; align-items: center; gap: 6px; }
.rc-track { overflow: hidden; }
.rc-lane { height: 34px; }
.rc-grid { position: absolute; inset: 0; pointer-events: none; }
.rc-grid i { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, .06); }
.rc-grid i.finish { background: rgba(207, 238, 0, .55); width: 2px; }
.rc-block { font-size: 12px; justify-content: flex-start; gap: 0; padding: 0 6px; text-shadow: none; border-right: 2px solid var(--panel-2); }
.rc-block b { font-weight: 800; }
.rc-block span { font-weight: 600; opacity: .85; margin-left: 5px; }
.rc-tyre { border: 0; border-top: 3px solid var(--tc); background: color-mix(in srgb, var(--tc) 14%, var(--panel)); color: var(--text); font-size: 11px; }
.rc-tyre.new { border-left: 2px solid var(--tc); }
.rc-stops { height: 22px; background: transparent; overflow: visible; }
.rc-stop { top: 3px; width: 16px; height: 16px; margin-left: -8px; background: var(--muted); }
.rc-stop.tyres { background: var(--accent); }
.rc-key i.stop { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.rc-key i.stop.tyres { background: var(--accent); }
.rc-finish { color: var(--accent); font-weight: 700; transform: translateX(-100%) !important; display: inline-flex; align-items: center; gap: 3px; }
.rc-axis { height: 20px; }

/* Fahrer mit Farbpunkt */
.drv { display: inline-flex; align-items: center; gap: 7px; }
.drv i { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--c, #888) 30%, transparent); }

/* Stintplan: Reifenrest und VE-Grenze */
.tyre-rest { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-top: 3px; white-space: nowrap; }
.tyre-rest .bar { width: 46px; height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.tyre-rest .bar i { display: block; height: 100%; background: var(--ok); }
.tyre-rest.warn .bar i { background: var(--warn); } .tyre-rest.warn { color: var(--warn); }
.tyre-rest.bad .bar i { background: var(--bad); } .tyre-rest.bad { color: var(--bad); }
.ve-max { color: var(--accent); font-weight: 600; white-space: nowrap; }
@media (max-width: 640px) { .rc-row { grid-template-columns: 1fr; } }
@media print { .ve-max { color: #000; } }

.dt-field { display: grid; grid-template-columns: 1fr 120px; gap: 8px; }
.dt-field input[type=date] { min-width: 0; }

input[type=color] { padding: 2px; height: 34px; width: 56px; cursor: pointer; }
input.swatch { width: 38px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; }
input.swatch::-webkit-color-swatch-wrapper { padding: 2px; }
input.swatch::-webkit-color-swatch { border: 0; border-radius: 4px; }

/* Miniaturen */
.with-mini { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mini-track { width: 46px; height: 46px; flex: none; }
.mini-track.s { width: 30px; height: 30px; }
.mini-track.l { width: 84px; height: 84px; }
.mini-track .trk { fill: none; stroke: var(--accent); stroke-width: 3.2; stroke-linejoin: round; stroke-linecap: round; }
.mini-track .trk-bg { fill: none; stroke: rgba(207, 238, 0, .14); stroke-width: 9; stroke-linejoin: round; }
.mini-track.s .trk { stroke-width: 5; }
.mini-track.unknown .trk { stroke: var(--muted); stroke-dasharray: 6 5; opacity: .6; }
@media print { .mini-track .trk { stroke: #000; } .mini-track .trk-bg { display: none; } }

.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--panel-2); box-shadow: none; }

/* ---------- UX-Feinschliff ---------- */
.nowrap { white-space: nowrap; }
/* Strecken: breitere Kacheln, keine leeren Flächen durch gleich hohe Zeilen */
.grid.tracks { grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); align-items: start; }
.track-card table.layouts { width: 100%; }
.track-card table.layouts td { padding-top: 6px; padding-bottom: 6px; }
.track-card table.layouts td:first-child { width: 100%; }
.track-card .page-head { flex-wrap: wrap; gap: 10px; }
/* Zeilen-Aktionen nur als Symbol */
button.icon-btn { padding: 0; width: 32px; height: 32px; justify-content: center; flex: none; }
button.icon-btn .icon { width: 16px; height: 16px; }
td .actions { flex-wrap: nowrap; }

/* Handy und Tablet: Navigation als Leiste unten, immer erreichbar */
@media (max-width: 1023px) {
  .topbar { flex-wrap: nowrap; height: 56px; padding: 0 16px; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg, #0a0b0c); }
  .topbar .brand-sub { display: none; }
  .topbar .user { margin-left: auto; }
  nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; width: auto; order: 0; gap: 0; overflow: visible;
    background: rgba(10, 11, 12, .96); backdrop-filter: blur(8px); border-top: 1px solid rgba(207, 238, 0, .35);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  nav a { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 2px; padding: 6px 2px; font-size: 10.5px; text-align: center; overflow: hidden; text-overflow: ellipsis; }
  nav a .icon { width: 20px; height: 20px; }
  nav a.active { box-shadow: inset 0 2px 0 var(--accent); color: var(--accent); }
  main { padding-bottom: 96px; }
  .site-footer { padding-bottom: 84px; }
  #toast { bottom: 84px; }
}

/* Handy: Tabellen als Karten statt Querscrollen */
@media (max-width: 640px) {
  table.stack, table.stack tbody { display: block; width: 100%; }
  table.stack thead { display: none; }
  table.stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.stack td { display: block; border: 0; padding: 0; text-align: left; min-width: 0; }
  table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
  table.stack td:first-child, table.stack td.td-actions { grid-column: 1 / -1; }
  table.stack td:first-child::before { display: none; }
  table.stack td.td-actions::before { display: none; }
  table.stack td.td-actions .actions { justify-content: flex-start; flex-wrap: wrap; }
  table.stack td:empty { display: none; }
  .table-wrap:has(> table.stack) { overflow: visible; }
}

/* Touch: größere Trefferflächen */
@media (pointer: coarse) {
  button, .btn { min-height: 40px; }
  button.small { min-height: 36px; }
  button.icon-btn { width: 40px; height: 40px; }
  input, select { min-height: 40px; }
}

/* Kalender: Event läuft über Mitternacht weiter */
@media (min-width: 721px) {
  .cal-event.cont-next { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: -7px; }
  .cal-event.cont-prev { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -7px; padding-left: 12px; }
}
.cal-event.cont-next::after { content: ' →'; }

/* ausgeblendete Tabs (Team-Link) wirklich verstecken, auch gegen display: inline-flex */
nav a[hidden] { display: none !important; }
/* Versionsanzeige oben rechts */
.app-version { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.app-version span { display: inline-block; }
@media (max-width: 560px) {
  .app-version { font-size: 9.5px; line-height: 1.2; text-align: right; }
  .app-version span { display: block; }
  .topbar .lbl-long { display: none; }
  .topbar .user { gap: 8px; min-width: 0; }
  #user-name { overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
}

/* Schnellwahl Einzel-/Doppel-/Dreifachstints */
.seg-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 12px; }
.seg-buttons button.active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* Live im Rennen: Vorfälle und Rennstand */
.incidents { border: 2px solid var(--accent); background: linear-gradient(135deg, rgba(207, 238, 0, .10), var(--panel) 55%); box-shadow: var(--glow); }
.incidents.is-live { border-color: var(--bad); background: linear-gradient(135deg, rgba(248, 81, 73, .16), var(--panel) 55%); box-shadow: 0 0 16px rgba(248, 81, 73, .35); }
.live-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.live-head h2 { margin: 0; font-size: 1.35rem; display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .04em; }
.live-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); display: inline-block; }
.incidents.is-live .live-dot { background: var(--bad); animation: live-pulse 1.2s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(248, 81, 73, .7); } 50% { box-shadow: 0 0 0 7px rgba(248, 81, 73, 0); } }
@media (prefers-reduced-motion: reduce) { .incidents.is-live .live-dot { animation: none; } }
.live-badge { font-weight: 700; font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--bad); color: #fff; letter-spacing: .05em; }
.live-badge.off { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); font-weight: 600; }
.live-count { font-size: 13px; color: var(--warn); font-weight: 600; }
.live-buttons { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 12px 0; }
.live-btn { justify-content: center; padding: 10px 12px; font-weight: 700; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.live-btn:hover { border-color: var(--accent); }
.live-btn.crash { background: var(--bad); color: #fff; border-color: var(--bad); }
.live-btn.caution { background: var(--warn); color: #111; border-color: var(--warn); }
.incidents .live-state { max-width: 420px; font-weight: 600; }
.incident-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.incident-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }
tr.done td { opacity: 0.55; }
tr.live td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

/* Rennklassen in offiziellen Farben */
.class-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }
.class-chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; letter-spacing: .03em; }
.class-picker { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.class-toggle { background: transparent; color: var(--text); border: 2px solid var(--line); border-radius: 6px; padding: 5px 12px; font-weight: 700; font-size: 13px; }
.class-toggle:not(.on) { opacity: .75; }
.class-toggle:not(.on):hover { opacity: 1; }
.event-classes { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-size: 12px; color: var(--muted); }
.class-toggle:hover, .class-toggle:focus-visible { background: var(--panel-2); color: var(--text); box-shadow: none; }

/* kleine Klassensymbole und Ansichts-Umschalter */
.cls-minis { display: inline-flex; gap: 2px; margin-left: 4px; vertical-align: middle; }
.cls-mini { display: inline-block; font-size: 9px; font-weight: 800; line-height: 13px; padding: 0 3px; border-radius: 3px; letter-spacing: .02em; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4); }
.cal-event .cls-minis { margin: 0 2px 0 4px; }
h1 .cls-minis { gap: 4px; }
h1 .cls-mini { font-size: 12px; line-height: 18px; padding: 0 6px; }
.cal-switch { margin: 0 0 0 auto; }
.cal-switch .btn { text-decoration: none; }
.cal-switch .btn.active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* Zoom im Zeitraster (Tag, 2 Tage, Woche) */
.dv-zoom { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.dv-zoom button { min-width: 34px; justify-content: center; font-size: 16px; font-weight: 700; }
.dv-zoom button:last-of-type { font-size: 13px; font-weight: 600; }
.dv-zoom-level { min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.av.dv { touch-action: pan-x pan-y; overscroll-behavior-x: contain; }
.av.dv .av-row { grid-template-columns: 190px var(--tw, minmax(420px, 1fr)); }
.av.dv .av-name { position: sticky; left: 0; z-index: 4; background: var(--panel); align-self: stretch; justify-content: center; }
.dv-line.minor { background: color-mix(in srgb, var(--line) 55%, transparent); }
@media (max-width: 720px) { .av.dv .av-row { grid-template-columns: 110px var(--tw, minmax(420px, 1fr)); } .dv-zoom-hint { display: none; } }
.av.dv .dv-label, .av.dv > p { position: sticky; left: 0; width: max-content; }

/* Team- oder Single-Driver-Event */
.ev-type { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; font-size: 12px; font-weight: 600; color: var(--text); }
.ev-type .icon { width: 13px; height: 13px; }
.cal-event .ev-type { margin-left: 4px; color: inherit; }
.cal-event .ev-type .icon { width: 11px; height: 11px; }
h1 .ev-type .icon { width: 20px; height: 20px; }
.event-classes .ev-type { padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; }

/* Kalenderfilter */
.cal-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.cal-filter-drivers { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: 10px; }
.filter-toggle { background: transparent; color: var(--muted); border: 1px solid var(--line); text-decoration: line-through; }
.filter-toggle.on { background: var(--panel-2); color: var(--text); border-color: var(--c, var(--accent)); text-decoration: none; box-shadow: inset 3px 0 0 var(--c, var(--accent)); }
.filter-toggle:hover { background: var(--panel-2); color: var(--text); }

/* Serien */
.series { display: grid; gap: 8px; }
.series-body { display: grid; gap: 8px; }
.series-body:empty { display: none; }
.series-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.series-preview { padding: 8px 10px; border: 1px dashed var(--line); border-radius: 6px; }
.class-toggle.day-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); opacity: 1; }
.series-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; font-size: 13px; }
.series-nav .icon, .ev-series .icon { width: 14px; height: 14px; }
.cal-event .ev-series { margin-left: 4px; display: inline-flex; vertical-align: middle; }
.cal-event .ev-series .icon { width: 11px; height: 11px; }

/* Fair Share Rule */
.fair-share { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); font-size: 13px; }
.fair-share.bad { border-color: var(--bad); }
.fair-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fair-chip { padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; font-size: 12px; white-space: nowrap; }

/* Schieberegler (Mindest-Rest Reifen) */
.range-row { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.range-row input[type=range] { flex: 1; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px; padding: 0; border: 0;
  background: linear-gradient(to right, var(--accent) var(--p, 33%), var(--panel-2) var(--p, 33%)); cursor: pointer; }
.range-row input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); box-shadow: 0 0 0 1px var(--accent); }
.range-row input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.range-val { min-width: 48px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Optimale Strategie */
.opt-btn { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.opt-info { margin: 10px 0 14px; padding: 12px 14px; border: 1px solid var(--accent); border-radius: 10px; background: var(--panel-2); }
.opt-info p { margin: 6px 0; }
.opt-rows { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.opt-row { padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; white-space: nowrap; }
.opt-row.best { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.opt-row.bad { color: var(--muted); text-decoration: line-through; }
.opt-info strong { display: inline-flex; align-items: center; gap: 6px; }

/* Planung: nummerierte Schritte und Strategie-Kasten */
h2[data-step]::before { content: attr(data-step); display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 800; flex: none; }
h2[data-step] { display: flex; align-items: center; }
.strategy-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.strategy-head h2 { margin: 0; }
.strategy-sliders { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 12px; }
.strategy-sliders .range-field { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.strategy-sliders .range-val { font-size: 20px; font-weight: 800; min-width: 52px; text-align: right; color: var(--accent); }
@media (max-width: 980px) { .strategy-sliders { grid-template-columns: 1fr; } }
.opt-why { margin: 6px 0; padding-left: 18px; }
.opt-why li { margin: 3px 0; }
.more-settings { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.more-settings summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.more-settings[open] summary { margin-bottom: 10px; }

/* Stintplan kompakter, Regler-Felder, Hinweise einklappbar, Rennverlauf ohne abgeschnittenen Text */
.lap-range { color: var(--text); font-weight: 600; }
.stepper.over input.laps { color: var(--warn); font-weight: 800; }
td.tyre-cell { min-width: 220px; }
.tyre-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tyre-edit { display: flex; gap: 6px; margin-top: 6px; }
.tyre-edit select { font-size: 12px; padding: 3px 6px; min-height: 28px; flex: 1; min-width: 0; }
td select[aria-label^="Fahrer Stint"] { font-size: 12px; padding: 3px 6px; min-height: 28px; margin-top: 4px; }
.slider-combo { gap: 10px; min-height: 0; }
.slider-combo input.range-num { width: 76px; flex: none; text-align: right; }
details.warnings summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 6px; list-style: none; }
details.warnings summary::-webkit-details-marker { display: none; }
details.warnings summary::after { content: '▾'; margin-left: auto; color: var(--muted); transition: transform .15s; }
details.warnings:not([open]) summary::after { transform: rotate(-90deg); }
details.warnings[open] summary { margin-bottom: 6px; }
.rc-block [class^="fit-"] { display: none; }
.rc-block[data-fit="long"] .fit-long, .rc-block[data-fit="mid"] .fit-mid, .rc-block[data-fit="short"] .fit-short { display: inline; }
.rc-block .fit-long, .rc-block .fit-mid, .rc-block .fit-short { margin-left: 0; opacity: 1; font-weight: 600; }
.rc-track.rc-thin { height: 24px; }
.rc-tyre { display: flex; align-items: center; }
.tyre-edit { flex-wrap: wrap; }
.tyre-edit select { min-width: 120px; }
td.tyre-cell { min-width: 0; }
.tyre-line .small { white-space: nowrap; }
.table-wrap table td, .table-wrap table th { padding-left: 8px; padding-right: 8px; }
.incident-note > div { display: flex; gap: 4px; align-items: flex-start; }
.tyre-edit { flex-direction: column; gap: 4px; }
.tyre-edit select { width: 100%; min-width: 170px; }
/* Reifen-Rest im Rennverlauf: Säule je Stint mit Wert */
.rc-track.rc-rest { height: 36px; }
.rc-restbar { background: transparent; padding: 0; border-right: 2px solid var(--panel-2); }
.rc-restbar .fill { position: absolute; left: 2px; right: 2px; bottom: 0; border-radius: 3px 3px 0 0; background: color-mix(in srgb, var(--ok) 55%, transparent); }
.rc-restbar.warn .fill { background: color-mix(in srgb, var(--warn) 65%, transparent); }
.rc-restbar.bad .fill { background: color-mix(in srgb, var(--bad) 70%, transparent); }
.rc-restbar .val { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap; font-size: 11px; font-weight: 700; color: var(--text); text-shadow: 0 1px 2px rgba(0, 0, 0, .85); }
[data-fit] > [class^="fit-"] { display: none; }
[data-fit="long"] > .fit-long, [data-fit="mid"] > .fit-mid, [data-fit="short"] > .fit-short { display: inline; margin-left: 0; opacity: 1; }
.rc-key i.rest { width: 10px; height: 10px; border-radius: 2px; background: color-mix(in srgb, var(--ok) 55%, transparent); }
/* Qualifying-Zeile im Stintplan */
.quali-row td { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.cls.q { border-left-color: var(--accent); color: var(--accent); font-weight: 800; }
.stint-card.quali { border-style: dashed; }
td select[aria-label="Fahrer Qualifying"] { font-size: 12px; padding: 3px 6px; min-height: 28px; margin-top: 4px; }
/* Rennverlauf: kleinste Beschriftung, Mindestbreite mit seitlichem Scrollen */
[data-fit="tiny"] > .fit-tiny { display: inline; font-size: 10px; letter-spacing: -.02em; }
.rc-block { padding: 0 3px; justify-content: center; }
.rc-block[data-fit="long"], .rc-block[data-fit="mid"] { justify-content: flex-start; padding: 0 6px; }
.rc-scroll { overflow-x: auto; }
.rc-tip { position: fixed !important; transform: translateY(-100%); }
@media (max-width: 900px) { .rc-scroll .rc { min-width: 760px; } }
@media (max-width: 640px) { .rc-scroll .rc { min-width: 640px; } .rc-scroll .rc-row { grid-template-columns: 110px 1fr; gap: 6px; } }

/* Rennverlauf: zweite Achse mit Rundennummern */
.rc-axis-label { font-size: 11px; }
.rc-axis.rc-laps { border-top: 1px dashed var(--line); }

/* Ingame-Uhrzeit */
.ingame { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.ingame svg { width: 12px; height: 12px; }
.stint-card .ingame { margin: 2px 0; }
.rc-axis.rc-ingame { border-top: 1px dashed var(--line); }
.rc-ingame .rc-night { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, #2b3a67 45%, transparent); border-radius: 3px; }
.rc-ingame .rc-tick { display: inline-flex; align-items: center; gap: 3px; z-index: 1; }
.rc-ingame .rc-tick svg { width: 11px; height: 11px; }
.rc-ingame .rc-finish { color: var(--muted); font-weight: 600; }
.brake-edit { margin-top: 6px; }
.brake-edit select { font-size: 12px; padding: 3px 6px; min-height: 28px; width: 100%; min-width: 150px; }
/* Stopp mit geänderten Bremskanälen: Pille mit V / H / V+H */
.rc-stop.brakes { width: auto; min-width: 16px; margin-left: 0; transform: translateX(-50%); border-radius: 9px; border: 2px solid var(--warn); padding: 0 4px; height: 18px; top: 2px;
  font-size: 10px; font-weight: 800; line-height: 14px; color: #111; background: var(--warn); white-space: nowrap; z-index: 1; }
.rc-stop.brakes.tyres { background: var(--accent); color: var(--on-accent); }
.rc-key-bk { font-size: 10px; font-weight: 800; padding: 0 4px; border-radius: 9px; border: 2px solid var(--warn); background: var(--warn); color: #111; line-height: 12px; }
/* Rennstand: laufender Stint auf einen Blick */
.incidents .live-state { max-width: 640px; }
.live-info { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 4px; padding: 8px 12px; border: 1px solid var(--line); border-left: 3px solid var(--ok); border-radius: 8px; background: var(--panel-2); font-size: 13px; }
.live-info-item strong { font-variant-numeric: tabular-nums; }
/* Rennverlauf: Uhrzeit oben, Maus-Linie mit Quicktip */
.rc-axis.rc-axis-top { border-top: 0; border-bottom: 1px solid var(--line); }
.rc-cursor { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--text); opacity: .7; pointer-events: none; z-index: 4; }
.rc-tip.follow { transform: none; width: auto; min-width: 200px; max-width: 320px; }
@media (hover: none) { .rc-cursor { display: none; } }

/* gesperrte Grundeinstellungen: lesbar, aber nicht änderbar */
.ro input:disabled, .ro select:disabled, .ro textarea:disabled { opacity: 1; color: var(--text); background: transparent; border-style: dashed; cursor: default; }
.ro input[type=range]:disabled { display: none; }
.ro .slider-combo input.range-num { width: 100%; flex: 1; text-align: left; }
.ro button:disabled { opacity: .75; cursor: default; }
.ro.check { opacity: .8; }
.lock-hint { display: flex; align-items: center; gap: 6px; margin: 0; }
.lock-hint svg { width: 13px; height: 13px; }
/* Verfügbarkeit im Rennen in der Fahrer-Rotation */
.av-mini-wrap { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; vertical-align: middle; }
.av-mini { position: relative; display: inline-block; width: 140px; height: 10px; border-radius: 5px; background: color-mix(in srgb, var(--bad) 30%, var(--panel-2)); overflow: hidden; }
.av-mini i { position: absolute; top: 0; bottom: 0; background: var(--ok); }
.drv-cell { display: inline-grid; grid-template-columns: minmax(150px, max-content) auto; align-items: center; gap: 8px; }
.drv-cell .av-mini-wrap { margin-left: 0; }
.av-mini { width: 200px; }
@media (max-width: 640px) { .drv-cell { grid-template-columns: 1fr; gap: 2px; } .av-mini { width: 140px; } }
/* Fahrer-Rotation als Tabelle mit Überschriften */
.driver-row { grid-template-columns: 24px 1fr 130px 130px; }
.drv-cell { grid-template-columns: 170px auto; }
.driver-head { padding: 0 0 4px; font-weight: 600; }
.driver-row > .actions { justify-content: flex-start; }
@media (max-width: 640px) { .driver-row { grid-template-columns: 20px 1fr auto; } .driver-row > .actions { grid-column: 2 / -1; } .driver-head > :last-child { display: none; } .drv-cell { grid-template-columns: 1fr; } }
.av-mini-wrap > span:last-child { white-space: nowrap; }
@media (max-width: 640px) { .driver-row input[aria-label="Stints am Stück"] { width: 60px; } .driver-row > label { min-width: 0; } .av-mini { width: 110px; } }
