/* FM.lt tema (2026-10-19): stočių spalvos (plytelės, stoties puslapio akcentas) ir tamsus režimas.
   arba poraštės jungiklį (localStorage fm_theme: auto | light | dark). Vienoje vietoje: Tailwind spalvų klasės -> tamsios.
   Paletė: fonas #0F1417, paviršiai #172025 / #1E2A30, linijos #2A363D, tekstas #E9EEF1…#8F9AA1, akcentas #5CC3E0. */
html.dark { color-scheme: dark; }
html.dark body { background: #0F1417; color: #E9EEF1; }

/* paviršiai */
html.dark .bg-white, html.dark .bg-cream, html.dark .bg-white\/90, html.dark .bg-white\/95 { background-color: #172025 !important; }
html.dark .bg-grey-100, html.dark .bg-grey-100\/40, html.dark .bg-grey-100\/50, html.dark .bg-grey-100\/60, html.dark .bg-grey-100\/70, html.dark .bg-grey-50 { background-color: #1E2A30 !important; }
html.dark .bg-grey-200 { background-color: #26333A !important; }
html.dark .hover\:bg-grey-100:hover, html.dark .hover\:bg-grey-50:hover { background-color: #26333A !important; }
html.dark .bg-sage { background-color: #14262F !important; }
html.dark .text-sage-ink, html.dark .bg-sage-ink { color: #A9D6E8; }
html.dark .bg-sage-ink { background-color: #1D7391 !important; color: #fff; }
html.dark .bg-amber-50, html.dark .from-amber-50 { background-color: #2A2213 !important; --tw-gradient-from: #2A2213 !important; }
html.dark .bg-red-50 { background-color: #2D1618 !important; }
/* 2026-10-28: be šių tamsiame režime likdavo šviesus fonas su šviesiu tekstu (kontrastas ~1,5): /naujos-dainos, dainos
   „Atlikėjams: pasidalinkite“, pasiūlymo formos „Vadybininko paskyra“, rėmėjų demo */
html.dark .bg-orange-50\/60, html.dark .bg-amber-50\/60 { background-color: #2A2213 !important; }
html.dark .bg-sage\/60 { background-color: #14262F !important; }
html.dark .bg-green-50 { background-color: #142A1C !important; }
html.dark .text-green-800 { color: #9FE0B4 !important; }
html.dark .border-orange-200 { border-color: #7A5A1F !important; }
html.dark .border-green-200, html.dark .border-green-400, html.dark .border-green-500 { border-color: #2F6B45 !important; }
html.dark .bg-brand\/5, html.dark .bg-brand\/10 { background-color: rgba(92, 195, 224, .10) !important; }
html.dark .to-white { --tw-gradient-to: #172025 !important; }

/* tekstas */
html.dark .text-grey-900 { color: #EEF2F4 !important; }
html.dark .text-grey-800 { color: #DDE3E6 !important; }
html.dark .text-grey-700 { color: #C6CED3 !important; }
html.dark .text-grey-600 { color: #AEB8BE !important; }
html.dark .text-grey-500 { color: #96A1A8 !important; }
html.dark .text-grey-400 { color: #7D8991 !important; }
html.dark .text-brand-ink, html.dark .hover\:text-brand-ink:hover, html.dark .text-mackerel-300 { color: #5CC3E0 !important; }
html.dark .text-red-700, html.dark .text-red-600, html.dark .text-red-800 { color: #F39A9A !important; }
html.dark .text-amber-950, html.dark .text-amber-700 { color: #F3D9A4 !important; }

/* linijos ir šešėliai */
html.dark .border-grey-200, html.dark .border-grey-100, html.dark .border-grey-300, html.dark .divide-grey-100 > * + * { border-color: #2A363D !important; }
html.dark .border-red-200 { border-color: #5A2A2D !important; }
html.dark .border-amber-300, html.dark .border-amber-400 { border-color: #7A5A1F !important; }
html.dark .shadow-sm, html.dark .shadow, html.dark .shadow-md, html.dark .shadow-lg, html.dark .shadow-xl, html.dark .shadow-2xl { --tw-shadow-color: rgba(0, 0, 0, .5); }
html.dark #radio-player { box-shadow: 0 -5px 35px rgba(0, 0, 0, .55); }

/* formos */
html.dark input, html.dark textarea, html.dark select { color: #EEF2F4; }
html.dark input::placeholder, html.dark textarea::placeholder { color: #8F9AA1; }

/* stočių logotipai: šviesios „plytelės“, kad tamsūs logotipai išliktų matomi */
html.dark #radio-player-logo { background-color: #F4F6F7; }

/* senos šablono dark: klasės – neutralizuojamos (antraštė ir logotipas – žr. žemiau) */
html.dark header.dark\:bg-mackerel-400 { background-color: #172025 !important; }
html.dark #header-logo img.fm-logo-light { display: none; }
html.dark #header-logo img.fm-logo-dark { display: block !important; }
html.dark .rich-text, html.dark .prose { color: #D3DADE; }
html.dark .prose :where(h2, h3, strong, a) { color: #EEF2F4; }
/* 2026-10-28: naujienų tekste (.fm-story) spalvos įdėtos per @apply – .text-grey-900 taisyklė jų nepasiekia (H2 buvo tamsiai mėlyna ant juodo) */
html.dark .fm-story :where(h2, h3), html.dark .rich-text :where(h2, h3), html.dark .fm-story ol li strong { color: #EEF2F4; }
html.dark .fm-story ol { background: #18212A; border-color: #2A3640; }
html.dark .fm-story ol li { border-color: #2A3640; }
html.dark .fm-story ol li::before { background: #2A3640; color: #DDE3E6; }
html.dark .fm-story ol li:first-child::before { background: #FBBF24; color: #451A03; }
html.dark .fm-story em { color: #A9B4BB; }

/* poraštės jungiklis */
.fm-theme button { min-height: 24px; }  /* Lighthouse target-size: ≥24 px paspaudimo plotas telefone */
.fm-theme button[aria-pressed="true"] { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

/* pusiau permatomi fonai (lipni žanrų juosta, kortelių mygtukai) */
html.dark .bg-cream\/95 { background-color: rgba(15, 20, 23, .95) !important; }
html.dark .bg-white\/50 { background-color: rgba(23, 32, 37, .6) !important; }
/* „Rekomenduojama“ ženklelis – geltonas su tamsiu tekstu (kaip šviesiame) */
html.dark .bg-amber-400.text-amber-950 { color: #451A03 !important; }

/* === Stočių spalvos iš logotipų (station/logo_colors.py) === */
/* baltos plytelės baltoje kortelėje – plona linija, kad matytųsi riba */
.fm-tile--light { box-shadow: inset 0 0 0 1px #E6E6E6; }
html.dark .fm-tile--light { box-shadow: none; }
/* stoties puslapio viršus – švelnus stoties spalvos fonas (kaip Apple Music / Spotify) */
/* @supports: senuose TV (Chromium < 111) color-mix su var() tampa „unset“ – juodas rėmelis, permatomas fonas */
@supports (color: color-mix(in srgb, red 50%, white)) {
.fm-accent-hero { background: linear-gradient(155deg, color-mix(in srgb, var(--accent) 16%, #FFFFFF) 0%, #FFFFFF 62%) !important;
                  border-color: color-mix(in srgb, var(--accent) 22%, #E6E6E6) !important; }
html.dark .fm-accent-hero { background: linear-gradient(155deg, color-mix(in srgb, var(--accent) 24%, #172025) 0%, #172025 65%) !important;
                            border-color: color-mix(in srgb, var(--accent) 30%, #2A363D) !important; }
}

/* antraštės spalvų mygtukas: saulė šviesiame, mėnulis tamsiame; pasirinktas meniu punktas – pažymėtas */
html.dark #fm-theme-btn .fm-ico-sun { display: none; }
html.dark #fm-theme-btn .fm-ico-moon { display: block; }
#fm-theme-menu [aria-checked="true"] { color: #1D7391; background: rgba(58, 166, 200, .10); }
html.dark #fm-theme-menu [aria-checked="true"] { color: #5CC3E0; background: rgba(92, 195, 224, .12); }

/* === Televizoriai ir senos naršyklės (base.html: html.fm-tv, html.fm-legacy) === */
/* pultelis: aiškiai matomas pasirinktas elementas (senuose TV :focus-visible nėra – naudojamas :focus) */
html.fm-tv a:focus, html.fm-tv button:focus, html.fm-tv input:focus, html.fm-tv select:focus, html.fm-tv [tabindex]:not([tabindex="-1"]):focus {
  outline: 4px solid #3AA6C8 !important; outline-offset: 3px; }
html.fm-tv [data-genre-chip]:focus { outline-offset: -4px; }  /* žanrų juosta slenka – išorinis rėmelis nusikirptų */
html.fm-tv ::-webkit-scrollbar { width: 14px; height: 14px; }
html.fm-tv ::-webkit-scrollbar-thumb { background: #96A1A8; border-radius: 7px; }
/* Chromium < 84: Manrope (kintamo storio šriftas) piešiamas su išsibarsčiusiomis raidėmis – sisteminis šriftas */
html.fm-legacy, html.fm-legacy * { font-family: Roboto, "Samsung One", "SamsungOne", "LG Smart UI", Arial, Helvetica, sans-serif !important; }

/* 2026-10-29 žaidimai (kryžiažodis, ketvertai, žodžių paieška): šviesūs spalvoti langeliai – tamsus tekstas ir tamsiame režime */
html.dark :is(.bg-sky-100, .bg-sky-200, .bg-sky-300, .bg-amber-100, .bg-green-100, .bg-amber-200, .bg-amber-300, .bg-green-200, .bg-green-300, .bg-violet-200, .bg-violet-300,
  .bg-rose-200, .bg-lime-200, .bg-orange-200, .bg-teal-200, .bg-fuchsia-200, .bg-cyan-200),
html.dark :is(.bg-sky-100, .bg-sky-200, .bg-sky-300, .bg-amber-100, .bg-green-100, .bg-amber-200, .bg-amber-300, .bg-green-200, .bg-green-300, .bg-violet-200, .bg-violet-300,
  .bg-rose-200, .bg-lime-200, .bg-orange-200, .bg-teal-200, .bg-fuchsia-200, .bg-cyan-200) * { color: #0F1417 !important; }
/* 2026-10-29: tamsiame režime kryžiažodis išnykdavo (balti langeliai tapdavo tamsiai mėlyni kaip ir juodi) – lentelė lieka „popierinė“;
   tamsūs mygtukai (bg-grey-900) – šviesūs, kad matytųsi ant tamsaus fono */
html.dark .fm-paper .bg-white { background-color: #F4F6F7 !important; }
html.dark .fm-paper .text-grey-900, html.dark .fm-paper [data-l] { color: #14243A !important; }
html.dark .bg-grey-900 { background-color: #E9EEF1 !important; }
html.dark .bg-grey-900, html.dark .bg-grey-900 * { color: #0F1417 !important; }
html.dark .hover\:bg-grey-800:hover { background-color: #FFFFFF !important; }
/* viktorinos „Ar žinojote?“ langelis (bg-white/70 ant žalio / raudono fono) */
html.dark .bg-white\/70 { background-color: rgba(15, 20, 23, .55) !important; }
html.dark .bg-white\/25 { background-color: rgba(255, 255, 255, .25) !important; }
