/* Startnummer — Palette C. Schrift lokal, kein weiteres Google-Fonts-Laden. */
@font-face {
    font-family: "Barlow Condensed";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/barlow-condensed-700.woff2") format("woff2");
}

:root {
    --c-field: #9E0F18;
    --c-header: #6E0B12;
    --c-card: #FFF8F0;
    --c-ink: #1A1A1A;
    --c-signal: #FFE14A;
}

html, body {
    background: var(--c-field) !important;
    color: var(--c-card) !important;
}

h1, h2, h3, #topbar h1, #screen-title {
    font-family: "Barlow Condensed", "Arial Narrow", sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: .03em;
}

#topbar {
    background: var(--c-header) !important;
    color: var(--c-card) !important;
    border-bottom: 4px solid var(--c-signal) !important;
}
#topbar, #topbar h1, #topbar button, #topbar i { color: var(--c-card) !important; }
#topbar h1 { text-transform: uppercase; letter-spacing: .06em !important; }
#topbar button { min-width: 48px; min-height: 48px; }

/* Feld-Text bleibt hell. Markenrot wird Signalgelb. */
.text-\[\#E30613\] { color: var(--c-signal) !important; }
.bg-\[\#E30613\] {
    background-color: var(--c-signal) !important;
    color: var(--c-ink) !important;
}
.bg-\[\#E30613\][class*="text-white"],
button.bg-\[\#E30613\],
a.bg-\[\#E30613\] { color: var(--c-ink) !important; }

.bg-\[\#1E1E1E\],
.bg-\[\#1e1e1e\],
.bg-\[\#1E2937\],
.bg-\[\#1e2937\],
.card,
.select-trigger,
.select-options {
    background-color: var(--c-card) !important;
    color: var(--c-ink) !important;
}
.bg-\[\#1E1E1E\] [class*="text-white"],
.bg-\[\#1e1e1e\] [class*="text-white"],
.bg-\[\#1E2937\] [class*="text-white"],
.bg-\[\#1e2937\] [class*="text-white"],
.card [class*="text-white"] {
    color: var(--c-ink) !important;
}
.bg-\[\#1E1E1E\] .text-\[\#E30613\],
.card .text-\[\#E30613\],
#modal-time { color: var(--c-header) !important; }

input, select, textarea {
    background: var(--c-card) !important;
    color: var(--c-ink) !important;
    border-color: rgba(26, 26, 26, .22) !important;
    min-height: 48px;
}
input::placeholder, textarea::placeholder { color: rgba(26, 26, 26, .45) !important; }

button { min-height: 48px; }
#topbar button, button.text-2xl, button.text-3xl { min-height: 48px; }

/* Startseite */
#screen-home .logo-container {
    background: var(--c-card) !important;
    border: 4px solid var(--c-signal) !important;
    border-radius: 20px !important;
    box-shadow: 0 0 0 4px var(--c-header) !important;
}
#screen-home .logo-container::before { content: none !important; }
#screen-home .logo-container img { filter: none !important; }
#screen-home .best-chip {
    background: var(--c-header) !important;
    color: var(--c-signal) !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    font-family: "Barlow Condensed", "Arial Narrow", sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
    min-height: 48px !important;
}
#screen-home .home-tile,
#screen-home .home-stack > button.home-tile {
    background: var(--c-card) !important;
    color: var(--c-ink) !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    min-height: 96px !important;
    overflow: visible !important;
    text-shadow: none !important;
    background-image: none !important;
}
#screen-home .home-tile::before,
#screen-home .home-stack > button.home-tile::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important; right: 0 !important; top: 0 !important; bottom: auto !important;
    width: auto !important; height: 6px !important;
    background: var(--c-field) !important;
}
#screen-home .home-stack > button.home-tile i {
    color: var(--c-field) !important;
    font-size: 22px !important;
}
#screen-home .home-stack > button.home-tile span {
    color: var(--c-ink) !important;
    font-family: "Barlow Condensed", "Arial Narrow", sans-serif !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-shadow: none !important;
    white-space: normal !important;
}
#screen-home #btn-tools {
    background: var(--c-signal) !important;
    border-color: var(--c-signal) !important;
    box-shadow: none !important;
}
#screen-home #btn-tools::before { background: var(--c-ink) !important; }
#screen-home #btn-tools i,
#screen-home #btn-tools span { color: var(--c-ink) !important; }
#screen-home .home-stack > div button {
    color: var(--c-signal) !important;
    border-color: rgba(255, 225, 74, .55) !important;
    min-height: 48px;
}

/* Stoppuhr: Klassenwahl sportlich, Zeitnahme auf ruhiger heller Fläche */
#screen-stoppuhr #mode-selection h2 {
    color: var(--c-signal) !important;
    text-transform: uppercase;
    letter-spacing: .06em !important;
}
#screen-stoppuhr #mode-selection .modern-button {
    background: var(--c-signal) !important;
    color: var(--c-ink) !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    font-family: "Barlow Condensed", "Arial Narrow", sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase;
    min-height: 72px;
}
#screen-stoppuhr:has(#stopwatch-content:not(.hidden)) {
    background: var(--c-card) !important;
    color: var(--c-ink) !important;
    border-radius: 28px;
    padding: 12px 10px 18px;
}
#screen-stoppuhr:has(#stopwatch-content:not(.hidden)) .stopwatch-time,
#screen-stoppuhr:has(#stopwatch-content:not(.hidden)) #current-mode,
#screen-stoppuhr:has(#stopwatch-content:not(.hidden)) .sw-status,
#screen-stoppuhr:has(#stopwatch-content:not(.hidden)) p,
#screen-stoppuhr:has(#stopwatch-content:not(.hidden)) [class*="text-white"] {
    color: var(--c-ink) !important;
}
#screen-stoppuhr:has(#stopwatch-content:not(.hidden)) .sw-status.live {
    background: var(--c-header) !important;
    color: var(--c-card) !important;
}
#screen-stoppuhr #stopwatch-content .text-\[\#E30613\] {
    color: var(--c-header) !important;
}
#screen-stoppuhr #stopwatch-content .modern-button {
    background: var(--c-signal) !important;
    color: var(--c-ink) !important;
    border: none !important;
    box-shadow: none !important;
}
#screen-stoppuhr #stopwatch-content .bg-\[\#E30613\] {
    background: var(--c-header) !important;
    color: var(--c-card) !important;
}
#screen-stoppuhr #stopwatch-content #stations-grid button,
#screen-stoppuhr #stopwatch-content #split-buttons button,
#screen-stoppuhr #stopwatch-content .split-button {
    background: var(--c-card) !important;
    color: var(--c-ink) !important;
    border: 1px solid rgba(26, 26, 26, .22) !important;
    border-radius: 14px !important;
    min-height: 48px;
}
#screen-stoppuhr #stopwatch-content #split-buttons button,
#screen-stoppuhr #stopwatch-content #split-buttons [class*="text-"] {
    color: var(--c-ink) !important;
}
#screen-punkte .text-\[\#00C853\],
.card .text-\[\#00C853\],
.bg-\[\#1E1E1E\] .text-\[\#00C853\] {
    color: #0B6B32 !important;
}

/* Unterseiten als helle Arbeitsflächen auf dem roten Feld */
#screen-historie,
#screen-punkte,
#screen-live,
#screen-bewerb,
#screen-termine,
#screen-auslosung {
    background: var(--c-card);
    color: var(--c-ink);
    border-radius: 24px;
    padding: 14px 12px 18px;
}
#screen-historie [class*="text-white"],
#screen-punkte [class*="text-white"],
#screen-live [class*="text-white"],
#screen-bewerb [class*="text-white"],
#screen-termine [class*="text-white"],
#screen-auslosung [class*="text-white"] {
    color: var(--c-ink) !important;
}
#screen-historie h2, #screen-punkte h2, #screen-live h2,
#screen-bewerb h2, #screen-termine h2, #screen-auslosung h2,
#screen-flammenjagd > .p-4 > .flex h2 {
    color: var(--c-header) !important;
}
#screen-historie button[id^="tab-"],
#screen-historie #tab-analyse {
    background: transparent !important;
    color: var(--c-ink) !important;
    border: 1px solid rgba(26, 26, 26, .18) !important;
    min-height: 48px;
}
#screen-historie #tab-alle,
#screen-historie #tab-analyse {
    background: var(--c-signal) !important;
    border-color: var(--c-signal) !important;
    color: var(--c-ink) !important;
}
#gesamt-punkte { color: var(--c-header) !important; }

#screen-flammenjagd > .p-4 > .flex h2 { color: var(--c-signal) !important; }

.from-amber-500.to-yellow-600 {
    background-image: none !important;
    background-color: var(--c-signal) !important;
}

/* Ergebnislisten */
body > header {
    background: var(--c-header) !important;
    background-image: none !important;
    color: var(--c-card) !important;
}
body > header, body > header h1, body > header a, body > header p { color: var(--c-card) !important; }
body > header h1 { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.bg-\[\#1e293b\] {
    background-color: var(--c-card) !important;
    color: var(--c-ink) !important;
}
.bg-\[\#1e293b\] [class*="text-white"],
main, main table, main td { color: var(--c-ink) !important; }
main .text-sky-300,
main .text-white\/60,
main .text-white\/70,
main [class*="text-white"],
main .text-emerald-400 { color: var(--c-ink) !important; }
main .text-emerald-400 { color: #0B6B32 !important; }
#lm-meta, #lm-ort, main > p { color: var(--c-card) !important; }
div.relative > .fa-magnifying-glass { color: rgba(26, 26, 26, .55) !important; }
main thead, main thead th {
    background: var(--c-header) !important;
    color: var(--c-card) !important;
}
main .rounded-2xl { background: var(--c-card); }
