/* ByteForge Falken Legacy – Dashboard im Legacy-Stil.
   Nachthimmel aus dem Falken-Banner, Gold wie das Emblem, Cyan wie das Leuchten
   der Schwingen. Die Navigation bleibt eine Schildtafel mit Rand – jetzt in Gold.
   Gold heißt "wichtig / Ziel", Cyan heißt "live / unterwegs". */

:root {
  --nacht: #04080f;
  --tiefe: #0a1424;
  --flaeche: rgba(9, 17, 31, 0.86);
  --flaeche-hoch: rgba(14, 26, 46, 0.92);
  --text: #e8eef7;
  --stein: #93a3b8;
  --linie: rgba(255, 255, 255, 0.09);
  --linie-gold: rgba(217, 164, 65, 0.38);
  --gold: #d9a441;
  --gold-hell: #f3cf7a;
  --gold-tief: #8a6420;
  --cyan: #29c6f0;
  --cyan-tief: #0f6f8f;
  --gruen: #3dbe7a;
  --rot: #e2574c;

  --font-sign: "Bahnschrift", "DIN Alternate", "DIN 2014", "Barlow Semi Condensed",
               "DejaVu Sans Condensed", "Arial Narrow", sans-serif;
  --font-text: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Inter", sans-serif;
  --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
  color: var(--text);
  font: 15px/1.5 var(--font-text);
  -webkit-font-smoothing: antialiased;
  background:
    linear-gradient(180deg, rgba(4, 8, 15, 0.45) 0%, rgba(4, 8, 15, 0.82) 55%, rgba(4, 8, 15, 0.94) 100%),
    url("/img/hintergrund.jpg") center 20% / cover fixed,
    var(--nacht);
}

h1, h2, h3, h4 { font-family: var(--font-sign); font-weight: 600; margin: 0; line-height: 1.15; }
h1 {
  font-size: 32px;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #fbe7b0 0%, var(--gold) 55%, #a8741f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2 { font-size: 21px; }
h3 { font-size: 17px; color: var(--gold-hell); }
p { margin: 0; }
a { color: var(--cyan); }
small, .muted { color: var(--stein); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
::selection { background: rgba(217, 164, 65, 0.35); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 3px; }

/* --- Rahmen --------------------------------------------------------------- */

.shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; }

.sign {
  margin: 14px 0 14px 14px;
  background: rgba(5, 10, 19, 0.9);
  border-radius: 14px;
  padding: 5px;
  position: sticky;
  top: 14px;
  height: calc(100vh - 28px);
  box-shadow: 0 0 0 1px rgba(217, 164, 65, 0.25), 0 18px 50px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}
.sign-inner {
  height: 100%;
  border: 2px solid var(--linie-gold);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  padding: 10px 10px 12px;
  overflow-y: auto;
}

.brand { display: block; padding: 0 2px 16px; text-decoration: none; color: inherit; }
.brand img { display: block; width: 100%; max-width: 220px; height: auto; margin: 0 auto; border-radius: 8px;
             box-shadow: 0 0 24px rgba(41, 198, 240, 0.18); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  font-family: var(--font-sign); font-size: 17px; color: #d6deea; text-decoration: none;
  padding: 8px 12px 8px 18px; border-radius: 6px; position: relative;
}
.nav a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.nav a[aria-current="page"] { background: linear-gradient(90deg, rgba(217, 164, 65, 0.2), rgba(217, 164, 65, 0.04)); color: #fff; }
.nav a[aria-current="page"]::before {
  content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 4px; border-radius: 2px;
  background: var(--gold); box-shadow: 0 0 10px rgba(217, 164, 65, 0.8);
}
.nav-badge {
  float: right; margin-left: 6px; min-width: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--gold); color: #1a1205; font-size: 13px; line-height: 22px; text-align: center; margin-top: 1px;
}
.nav-live { float: right; font-size: 13px; color: var(--cyan); margin: 2px 0 0 8px; }

.sign-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--linie); }
.sign-foot .who { font-family: var(--font-sign); font-size: 16px; }
.sign-foot .role { font-size: 13px; color: var(--stein); }
.sign-foot button { margin-top: 10px; }

.main { padding: 30px 36px 60px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin-top: 6px; color: var(--stein); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* --- Flächen ------------------------------------------------------------- */

.panel {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-top-color: var(--linie-gold);
  border-radius: var(--radius);
  padding: 20px 22px;
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
}
.panel + .panel, .section + .section { margin-top: 20px; }
.grid-2 > .panel + .panel { margin-top: 0; }
.form + .panel, .panel + .grid-2, .grid-2 + .panel, .grid-2 + .grid-2 { margin-top: 20px; }
.panel > h2 { margin-bottom: 14px; }
.panel > .tally, .panel > .facts { margin-top: 4px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(290px, 1fr); gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; align-content: start; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 24px; margin: 0; }
.facts div { min-width: 0; }
.facts dt { font-size: 13px; color: var(--stein); }
.facts dd { margin: 2px 0 0; font-family: var(--font-sign); font-size: 19px; }

.tally { display: flex; flex-direction: column; gap: 12px; }
.tally-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
             border-bottom: 1px solid var(--linie); padding-bottom: 10px; }
.tally-row:last-child { border-bottom: 0; padding-bottom: 0; }
.tally-row > span:last-child { font-family: var(--font-sign); font-size: 20px; }

.meter { height: 10px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-top: 8px; }
.meter span { display: block; height: 100%; width: 0; border-radius: 5px;
              background: linear-gradient(90deg, var(--gold-tief), var(--gold), var(--gold-hell)); }
.meter.cyan span { background: linear-gradient(90deg, var(--cyan-tief), var(--cyan)); }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #4b5a6e; margin-right: 6px; vertical-align: 1px; }
.dot.on { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.dot.convoy { background: var(--gold); box-shadow: 0 0 8px var(--gold); }

/* --- Strecke ------------------------------------------------------------- */

.route { list-style: none; margin: 0; padding: 20px 0 4px; display: flex; align-items: flex-start; overflow-x: auto; }
.route-stop { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; width: 84px; text-align: center; }
.route-dot { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--cyan); background: var(--nacht); position: relative; z-index: 1; }
.route-stop.reached .route-dot { background: var(--cyan); box-shadow: 0 0 10px rgba(41, 198, 240, 0.7); }
.route-stop.final .route-dot { border-radius: 3px; width: 20px; height: 20px; border-width: 4px; border-color: var(--gold); transform: rotate(45deg); }
.route-stop.final.reached .route-dot { background: var(--gold); box-shadow: 0 0 12px rgba(217, 164, 65, 0.8); }
.route-city { margin-top: 8px; font-family: var(--font-sign); font-size: 15px; line-height: 1.2; overflow-wrap: anywhere; }
.route-stop.final .route-city { font-weight: 700; color: var(--gold-hell); }
/* Mindestlänge = Breite eines Haltepunkts, damit sich Stadtnamen nie überlappen. */
.route-leg { flex: 1 1 84px; min-width: 84px; height: 18px; display: flex; align-items: center; margin: 0 -42px; position: relative; }
.route-line { width: 100%; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.13); }
.route-leg.done .route-line { background: var(--cyan); box-shadow: 0 0 8px rgba(41, 198, 240, 0.45); }
.route-leg.active .route-line {
  background: repeating-linear-gradient(90deg, var(--gold) 0 14px, transparent 14px 24px), rgba(255, 255, 255, 0.1);
  background-size: 24px 100%, auto;
  animation: fahren 1.2s linear infinite;
}
.route-leg.gap .route-line { height: 0; border-top: 3px dotted var(--stein); background: none; box-shadow: none; }
.route-leg-label { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--stein); white-space: nowrap; }
@keyframes fahren { to { background-position: 24px 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .route-leg.active .route-line { animation: none; } }
.route-big .route-stop { width: 120px; }
.route-big .route-city { font-size: 18px; }
.route-big .route-leg { min-width: 120px; flex-basis: 120px; margin: 0 -60px; }
.route-big + .facts { margin-top: 26px; }

/* --- Listen & Tabellen --------------------------------------------------- */

.tour-list { display: flex; flex-direction: column; }
.tour-row {
  display: grid; grid-template-columns: minmax(170px, 230px) minmax(0, 1fr); gap: 20px;
  padding: 16px 0; border-bottom: 1px solid var(--linie); text-decoration: none; color: inherit;
}
/* In der schmaleren Übersicht steht die Strecke unter dem Text. */
.grid-2 .tour-row { grid-template-columns: 1fr; gap: 6px; }
.tour-row:first-child { padding-top: 4px; }
.tour-row:last-child { border-bottom: 0; }
.tour-row:hover .tour-title { color: var(--gold-hell); }
.tour-code { font-family: var(--font-sign); color: var(--stein); font-size: 14px; }
.tour-title { font-family: var(--font-sign); font-size: 18px; margin: 2px 0 6px; }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-family: var(--font-sign); font-weight: 600; font-size: 14px; color: var(--stein);
            padding: 0 12px 8px 0; border-bottom: 1px solid var(--linie-gold); }
.table td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--linie); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num, .table th.num { text-align: right; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: rgba(41, 198, 240, 0.06); }
.table td .sub { display: block; font-size: 13px; color: var(--stein); }

.chip { display: inline-block; padding: 1px 9px; border-radius: 4px; font-size: 13px; font-family: var(--font-sign);
        background: rgba(255, 255, 255, 0.07); color: #d6deea; border: 1px solid var(--linie); white-space: nowrap; }
.chip.zugewiesen, .chip.freigegeben, .chip.aktiv { background: rgba(41, 198, 240, 0.12); border-color: rgba(41, 198, 240, 0.4); color: #9fe6fb; }
.chip.unterwegs, .chip.entwurf { background: rgba(217, 164, 65, 0.14); border-color: rgba(217, 164, 65, 0.5); color: var(--gold-hell); }
.chip.abgeschlossen, .chip.abgeliefert, .chip.erledigt { background: rgba(61, 190, 122, 0.13); border-color: rgba(61, 190, 122, 0.45); color: #8fe3b6; }
.chip.abgerechnet, .chip.ausgezahlt { background: linear-gradient(180deg, #f0cf7c, var(--gold)); border-color: var(--gold); color: #1a1205; }
.chip.storniert, .chip.abgebrochen { background: rgba(226, 87, 76, 0.13); border-color: rgba(226, 87, 76, 0.45); color: #f3a8a1; }

.flags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.flag { font-size: 12px; padding: 0 7px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); color: var(--stein); }
.flag.warnung { background: rgba(226, 87, 76, 0.16); color: #f3a8a1; }

.empty { border: 1px dashed rgba(217, 164, 65, 0.35); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--stein); }
.empty p + .btn { margin-top: 14px; }

/* --- Rang ------------------------------------------------------------------ */

.rank {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-sign); font-size: 13px;
  padding: 1px 9px 1px 6px; border-radius: 12px; border: 1px solid var(--linie-gold); color: var(--gold-hell);
  background: rgba(217, 164, 65, 0.08); white-space: nowrap;
}
.rank::before { content: ""; width: 9px; height: 9px; transform: rotate(45deg); background: var(--gold); border-radius: 1px; }
.rank.l1::before { background: #7b8797; }
.rank.l2::before { background: #b08a53; }
.rank.l4, .rank.l5 { box-shadow: 0 0 10px rgba(217, 164, 65, 0.3); }
.rank.l6 { background: linear-gradient(90deg, rgba(217, 164, 65, 0.3), rgba(41, 198, 240, 0.25)); color: #fff;
           box-shadow: 0 0 14px rgba(217, 164, 65, 0.55); }

.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; margin-bottom: 20px; }
.podium-place { text-align: center; padding: 18px 14px; border-radius: var(--radius); background: var(--flaeche-hoch);
                border: 1px solid var(--linie); text-decoration: none; color: inherit; }
.podium-place.p1 { order: 2; border-color: var(--gold); padding-top: 30px; box-shadow: 0 0 30px rgba(217, 164, 65, 0.25); }
.podium-place.p2 { order: 1; }
.podium-place.p3 { order: 3; }
.podium-no { font-family: var(--font-sign); font-size: 34px; line-height: 1; color: var(--gold); }
.podium-place.p2 .podium-no { color: #c9d2de; }
.podium-place.p3 .podium-no { color: #c48a52; }
.podium-name { font-family: var(--font-sign); font-size: 19px; margin: 6px 0 4px; }
.podium-value { font-family: var(--font-sign); font-size: 22px; color: var(--gold-hell); }

/* --- Karte ----------------------------------------------------------------- */

.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.map-box { position: relative; height: calc(100vh - 170px); min-height: 460px; border-radius: var(--radius); overflow: hidden;
           border: 1px solid var(--linie-gold); background: #03070d; box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45); }
.map-box canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.map-box canvas.dragging { cursor: grabbing; }
.map-tools { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 6px; }
.map-tools button { width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--linie-gold);
                    background: rgba(5, 10, 19, 0.9); color: var(--gold-hell); font: 600 18px/1 var(--font-sign); cursor: pointer; }
.map-tools button:hover { background: rgba(217, 164, 65, 0.18); }
.map-hint { position: absolute; left: 12px; bottom: 10px; font-size: 12px; color: var(--stein);
            background: rgba(5, 10, 19, 0.75); padding: 4px 8px; border-radius: 4px; }
.map-card { position: absolute; left: 12px; top: 12px; max-width: 280px; background: rgba(5, 10, 19, 0.92);
            border: 1px solid var(--linie-gold); border-radius: 8px; padding: 12px 14px; }
.map-card[hidden] { display: none; }
.driver-list { display: grid; gap: 4px; }
.driver-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 8px; border-radius: 6px;
               border: 1px solid transparent; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.driver-item:hover, .driver-item[aria-pressed="true"] { border-color: var(--linie-gold); background: rgba(217, 164, 65, 0.07); }
.driver-item .muted { grid-column: 1 / -1; font-size: 13px; }

/* --- Formulare ------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px; border-radius: 6px; border: 1px solid #f0cf7c;
  background: linear-gradient(180deg, #f6d98a 0%, var(--gold) 55%, #b5801f 100%); color: #1a1205;
  font: 600 15px/1 var(--font-sign); cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: 0 0 18px rgba(217, 164, 65, 0.2);
}
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: rgba(41, 198, 240, 0.06); color: #bdeefc; border-color: rgba(41, 198, 240, 0.55); box-shadow: none; }
.btn.secondary:hover { background: rgba(41, 198, 240, 0.16); filter: none; }
.btn.danger { background: transparent; color: #f3a8a1; border-color: rgba(226, 87, 76, 0.7); box-shadow: none; }
.btn.danger:hover { background: rgba(226, 87, 76, 0.15); filter: none; }
.btn.small { height: 30px; padding: 0 10px; font-size: 14px; }
.btn.on-sign { background: transparent; border-color: var(--linie-gold); color: var(--gold-hell); width: 100%; box-shadow: none; }
.btn.on-sign:hover { background: rgba(217, 164, 65, 0.12); filter: none; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; filter: none; }
.tabs { display: inline-flex; gap: 4px; padding: 3px; border-radius: 8px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--linie); }
.tabs a { padding: 5px 12px; border-radius: 6px; font-family: var(--font-sign); font-size: 14px; color: #c3cfdd; text-decoration: none; }
.tabs a[aria-current="true"] { background: rgba(217, 164, 65, 0.2); color: var(--gold-hell); }

.form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 14px; font-weight: 600; color: #d6deea; }
.field > small { font-weight: 400; }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], input[type="url"],
input:not([type]), select, textarea {
  height: 40px; padding: 0 11px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 6px;
  font: inherit; color: var(--text); background: rgba(3, 8, 15, 0.7); width: 100%;
}
select option { background: var(--tiefe); }
textarea { height: auto; min-height: 80px; padding: 9px 11px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(41, 198, 240, 0.2); }
input[type="color"] { width: 60px; height: 40px; padding: 2px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.16); background: transparent; }
input::placeholder, textarea::placeholder { color: #66778d; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); }
.form-error { background: rgba(226, 87, 76, 0.15); color: #f6b9b3; padding: 10px 12px; border-radius: 6px; border: 1px solid rgba(226, 87, 76, 0.4); }
.form-error:empty { display: none; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-family: var(--font-sign); font-size: 19px; font-weight: 600; margin-bottom: 12px; padding: 0; color: var(--gold-hell); }

.leg-editor { display: flex; flex-direction: column; gap: 10px; }
.leg-row { display: grid; grid-template-columns: 34px 1fr 1fr 1fr 38px; gap: 10px; align-items: end; }
.leg-no { width: 30px; height: 40px; display: grid; place-items: center; font-family: var(--font-sign); font-size: 17px;
          color: var(--gold); border: 1px solid var(--linie-gold); border-radius: 6px; }
.leg-hint { font-size: 13px; color: var(--stein); grid-column: 2 / -1; margin-top: -4px; }
.icon-btn { width: 38px; height: 40px; border: 1px solid var(--linie); border-radius: 6px; background: transparent;
            cursor: pointer; font-size: 20px; color: var(--stein); }
.icon-btn:hover { color: var(--rot); border-color: var(--rot); }

.key-box { font-family: Consolas, "DejaVu Sans Mono", monospace; font-size: 14px; background: rgba(217, 164, 65, 0.1);
           border: 1px solid var(--linie-gold); padding: 10px 12px; border-radius: 6px; overflow-wrap: anywhere; color: var(--gold-hell); }

/* --- Dialog & Hinweise ----------------------------------------------------- */

dialog { border: 1px solid var(--linie-gold); border-radius: 12px; padding: 0; width: min(560px, calc(100vw - 32px));
         background: #0a1424; color: var(--text); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6); }
dialog::backdrop { background: rgba(2, 5, 10, 0.7); backdrop-filter: blur(3px); }
.dialog-head { padding: 16px 22px; border-bottom: 1px solid var(--linie-gold);
               background: linear-gradient(90deg, rgba(217, 164, 65, 0.16), transparent); }
.dialog-body { padding: 20px 22px; display: grid; gap: 14px; }
.dialog-foot { padding: 0 22px 20px; display: flex; justify-content: flex-end; gap: 8px; }

.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast { background: #0b1626; color: var(--text); padding: 12px 16px; border-radius: 8px; max-width: 380px;
         border: 1px solid var(--linie); border-left: 5px solid var(--gruen); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5); }
.toast.error { border-left-color: var(--rot); }

.notice { padding: 12px 14px; border-radius: 6px; background: rgba(41, 198, 240, 0.08); border: 1px solid rgba(41, 198, 240, 0.25); }
.notice.warn { background: rgba(217, 164, 65, 0.1); border-color: var(--linie-gold); }

/* --- Anmeldung ------------------------------------------------------------- */
/* Das Banner liegt als Kopf über die ganze Breite (Seitenverhältnis 2,81 : 1),
   die Anmeldetafel schiebt sich unter den Schriftzug. */

.gate {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  padding: max(24px, min(31vw, 560px)) 20px 40px;
  background:
    linear-gradient(180deg, rgba(4, 8, 15, 0) 0, rgba(4, 8, 15, 0) min(22vw, 400px), var(--nacht) min(36vw, 650px)),
    url("/img/anmeldung.jpg") center top / min(100vw, 1820px) auto no-repeat,
    var(--nacht);
}
.gate .sign { position: static; height: auto; margin: 0; width: min(440px, 100%); }
.gate .sign-inner { padding: 22px 26px 24px; }
.gate .brand { padding: 0 0 14px; }
.gate .brand img { width: 100%; max-width: 340px; height: auto; margin: 0 auto; box-shadow: none; }
.gate .btn { width: 100%; height: 44px; font-size: 17px; }
.gate .intro { color: #c3cfdd; margin-bottom: 18px; text-align: center; }
.gate-foot { margin-top: 18px; color: var(--stein); font-size: 13px; text-align: center; }

/* --- Schmale Bildschirme ----------------------------------------------------- */

@media (max-width: 1100px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-box { height: 60vh; }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sign { position: static; height: auto; margin: 10px 10px 0; }
  .sign-inner { padding: 10px 8px; }
  .brand { padding-bottom: 12px; }
  .brand img { max-width: 260px; margin: 0; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav a { font-size: 15px; padding: 6px 10px 6px 14px; }
  .sign-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .sign-foot button { margin: 0; width: auto; }
  .main { padding: 22px 14px 48px; }
  .grid-2 { grid-template-columns: 1fr; }
  .tour-row { grid-template-columns: 1fr; gap: 8px; }
  .leg-row { grid-template-columns: 30px 1fr 1fr 38px; }
  .leg-row .leg-cargo { grid-column: 2 / 4; }
  .gate .brand img { margin: 0 auto; }
  .podium { grid-template-columns: 1fr; }
  .podium-place.p1, .podium-place.p2, .podium-place.p3 { order: 0; }
}

/* --- Kleinteile ------------------------------------------------------------- */

.spaced { margin-top: 12px; }
.podium-mini { font-family: var(--font-sign); color: var(--gold); }
code { font-family: Consolas, "DejaVu Sans Mono", monospace; font-size: 13px; color: var(--gold-hell);
       background: rgba(217, 164, 65, 0.1); padding: 1px 6px; border-radius: 4px; }
.page-head .tabs + .tabs { margin-left: 4px; }
.stack > * + * { margin-top: 0 !important; }
a { text-decoration-color: rgba(41, 198, 240, 0.45); text-underline-offset: 3px; }
a[href^="#/fahrer/"] { color: var(--text); text-decoration: none; }
a[href^="#/fahrer/"]:hover { color: var(--gold-hell); }
.tally a strong { font-weight: 600; }
.tally-row > span.muted:last-child { font-family: var(--font-text); font-size: 14px; }
.panel-head > a { font-size: 14px; }
.form > .panel, .form > .grid-2 { margin-top: 0 !important; }
form.form:has(> .panel) { gap: 20px; }
.empty + p, .table-wrap + p { margin-top: 12px; }

.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 20px; align-items: start; }
.event-grid > .panel + .panel { margin-top: 0; }
.event h2 { margin-top: 4px; }
.event .facts { margin: 6px 0 4px; }
.pre { white-space: pre-wrap; }
.mod-state { font-family: var(--font-sign); font-size: 14px !important; color: var(--stein); }
.mod-state.ok { color: #8fe3b6; }
.mod-state.warn { color: var(--gold-hell); }
.btn[aria-pressed="true"] { outline: 2px solid var(--gold); outline-offset: 1px; }
.qr { width: 220px; height: 220px; padding: 10px; background: #fff; border-radius: 8px; display: block; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; font-family: Consolas, "DejaVu Sans Mono", monospace;
         font-size: 15px; color: var(--gold-hell); background: rgba(217, 164, 65, 0.08); border: 1px solid var(--linie-gold);
         padding: 12px 14px; border-radius: 6px; }
@media (max-width: 900px) { .event-grid { grid-template-columns: 1fr; } }
