@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

:root {
    /* Decentní temně modrá paleta (Slate/Navy) */
    --bg: #0b1121; /* Hluboká temná břidlicová modř pro pozadí */
    --surface: #141d33; /* Jemně světlejší modrá pro panely a karty */
    --border: rgba(125, 211, 252, 0.12); /* Poloprůhledný namodralý okraj */
    --text: #f1f5f9; /* Chladnější (namodralá) bílá pro hlavní text */
    --muted: #94a3b8; /* Šedomodrá pro vedlejší texty a popisky */
    --accent: #38bdf8; /* Jasně modrá pro zvýraznění */
    /* Sjednocené proměnné pro zaoblení */
    --radius-lg: 1.25rem;
    --radius-md: 0.75rem;
    --radius-sm: 0.5rem;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

html, body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
}

/* Některé (hlavně "chytré") TV prohlížeče automaticky přidají výchozí
   focus obrys prvnímu prvku, na který dálkové ovládání/D-pad navigace
   "přistane" při načtení stránky – i když v appce nic není interaktivní.
   Displej v .kiosk-shell nemá žádné focusovatelné prvky (kromě odkazu
   Nastavení/Přihlásit se dole), takže rámeček je jen vizuální artefakt. */
.kiosk-shell * {
    outline: none;
}

.kiosk-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
}

/* Spořicí režim proti vypálení displeje – appka nemá jak fyzicky vypnout
   obrazovku, tak mimo provozní dobu aspoň skryje hlavičku i moduly a necha
   uprostřed pulzovat text místo statického obrazu. Pozadí zůstává normální
   (ne černé). */
.kiosk-rest-screen {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kiosk-rest-text {
    max-width: 40rem;
    text-align: center;
    font-size: 1.75rem;
    font-weight: 300;
    color: var(--muted);
    letter-spacing: 0.02em;
    animation: kiosk-rest-pulse 3s ease-in-out infinite;
}

@keyframes kiosk-rest-pulse {
    0%, 100% {
        opacity: 0.2;
    }

    50% {
        opacity: 0.85;
    }
}

.kiosk-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 3rem;
    background: transparent;
    border-bottom: 1px solid var(--border);
    /* Jemný, pomalý posun statické hlavičky – prevence vypálení pixelů. */
    animation: kiosk-pixel-shift 180s ease-in-out infinite;
}

@keyframes kiosk-pixel-shift {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(2px, 1px); }
    50% { transform: translate(0, 2px); }
    75% { transform: translate(-2px, 1px); }
}

.kiosk-title-group {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.kiosk-logo {
    height: 128px;
    width: 128px;
    object-fit: contain;
    flex-shrink: 0;
}

.kiosk-title {
    font-size: 2.25rem;
    font-weight: 500;
    margin: 0;
    letter-spacing: -0.02em;
}

.kiosk-status {
    font-size: 1rem;
    font-weight: 500;
    color: var(--muted);
    margin-top: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.kiosk-datetime {
    text-align: right;
}

.kiosk-date {
    font-size: 1.2rem;
    color: var(--muted);
    font-weight: 400;
}

.kiosk-nameday {
    font-size: 0.95rem;
    color: var(--muted);
}

/* Velké jen první písmeno ("Pondělí 26. října") – capitalize dával "Října". */
.kiosk-date::first-letter {
    text-transform: uppercase;
}

.kiosk-clock {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}

.kiosk-body {
    flex: 1;
    padding: 2.5rem 3rem;
    overflow: hidden;
}

/* === Uzamčení webu (super admin pracuje na obsahu, veřejnost vidí zprávu) === */
.kiosk-lock-screen {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kiosk-lock-card {
    max-width: 42rem;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 4px solid var(--accent);
    border-radius: var(--radius-lg);
    padding: 3rem 3.5rem;
    box-shadow: 0 25px 50px -12px rgba(2, 6, 23, 0.6);
}

.kiosk-lock-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.kiosk-lock-text {
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--text);
    white-space: pre-wrap;
    margin: 0;
}

.carousel-host {
    position: relative;
    height: 100%;
}

.carousel-empty {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 1.4rem;
    text-align: center;
}

.carousel-indicators {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
}

.indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.3); /* Šedomodrá průhlednost */
    transition: all 0.4s ease;
}

    .indicator.active {
        background: var(--accent);
        width: 24px;
        border-radius: 10px;
    }

/* === Stránky === */
.page {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.page-heading {
    font-size: 1.75rem;
    font-weight: 400;
    margin: 0 0 2.5rem;
    color: var(--text);
    letter-spacing: -0.01em;
}

.view-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* === Počasí === */
.weather-status {
    font-size: 1.5rem;
    color: var(--muted);
    margin-top: 3rem;
    font-weight: 300;
}

.weather-error {
    color: #f87171;
}

.weather-current {
    display: flex;
    align-items: center;
    gap: 3rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    margin-bottom: 2.5rem;
}

.weather-icon-lg {
    font-size: 6rem;
    line-height: 1;
    opacity: 0.9;
}

.weather-temp {
    font-size: 5rem;
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.04em;
}

.weather-desc {
    font-size: 1.5rem;
    color: var(--muted);
    margin-top: 0.75rem;
    font-weight: 400;
}

.weather-details {
    margin-left: auto;
    font-size: 1.25rem;
    color: var(--muted);
    line-height: 2;
    text-align: right;
}

.weather-forecast {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.forecast-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem;
    text-align: center;
}

.forecast-day {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 1rem;
}

.forecast-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.forecast-temps {
    font-size: 1.5rem;
}

.t-max {
    font-weight: 500;
    color: var(--text);
}

.t-min {
    color: var(--muted);
    margin-left: 0.75rem;
    font-weight: 400;
}

/* === Suplování === */
.page-subs {
    overflow: hidden;
}

.subs-header {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
}

.subs-date {
    font-size: 1.4rem;
    color: var(--muted);
    font-weight: 400;
}

.subs-notice {
    background: rgba(56, 189, 248, 0.05); /* Velmi jemně podbarvené */
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--accent);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    font-size: 1.2rem;
    font-weight: 500;
}

.subs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Stejný důvod jako u .menu-cards – třída s víc řádky změn by jinak
       nafoukla svůj řádek karet a další řádek by se vytlačil mimo displej. */
    grid-auto-rows: minmax(0, 1fr);
    gap: 1.5rem;
    flex: 1;
    min-height: 0;
}

.subs-class {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.subs-class-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

.subs-absent {
    font-size: 1.2rem;
    color: #f87171;
    font-weight: 400;
}

.subs-row {
    display: grid;
    /* "auto" sloupce (bez minmax) se v CSS Grid nikdy nezmenší pod přirozenou
       šířku obsahu – u delšího předmětu/poznámky to řádek roztáhne přes okraj
       karty, a protože .subs-class má overflow:hidden, text se pak vpravo
       jen usekne uprostřed slova. minmax(0, ...) dovolí sloupci se zmenšit,
       zbytek řeší ellipsis níž u jednotlivých textů. */
    grid-template-columns: 2.5rem minmax(0, 1.1fr) auto minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    font-size: 1.25rem;
    padding: 0.5rem 0;
}

.subs-hour {
    color: var(--muted);
    font-weight: 500;
}

.subs-subject {
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.subs-type {
    font-size: 0.9rem;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.subs-detail {
    color: var(--muted);
    font-size: 1.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Typy změn suplování */
.chg-odpada .subs-type {
    border: 1px solid rgba(248,113,113,0.4);
    color: #f87171;
}

.chg-navic .subs-type {
    border: 1px solid rgba(74,222,128,0.4);
    color: #4ade80;
}

.chg-zmena .subs-type {
    border: 1px solid rgba(250,204,21,0.4);
    color: #facc15;
}

.chg-presun .subs-type {
    border: 1px solid rgba(192,132,252,0.4);
    color: #c084fc;
}

.chg-vymena .subs-type {
    border: 1px solid rgba(56,189,248,0.4);
    color: #38bdf8;
}

.chg-supluje .subs-type {
    border: 1px solid rgba(251,146,60,0.4);
    color: #fb923c;
}

.chg-jine .subs-type {
    border: 1px solid rgba(148,163,184,0.4);
    color: #94a3b8;
}

.subs-pager {
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 1.5rem;
    letter-spacing: 0.05em;
}

/* === Jídelníček === */
.menu-header {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
}

.menu-range {
    font-size: 1.4rem;
    color: var(--muted);
    font-weight: 300;
}

.menu-day-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.menu-day-tab {
    font-size: 1.1rem;
    padding: 0.6rem 1.25rem;
    border-radius: 2rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

    .menu-day-tab.active {
        background: var(--accent);
        color: #040810; /* Velmi tmavý text na modrém pozadí pro kontrast */
        border-color: var(--accent);
        font-weight: 600;
    }

.today-badge {
    font-size: 0.75rem;
    background: var(--surface);
    color: var(--text);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-transform: uppercase;
}

.menu-day-tab.active .today-badge {
    background: #040810;
    color: var(--accent);
}

.menu-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Bez tohohle by řádek s delším obsahem (např. bohatší snídaně) nafoukl
       svou výšku nad podíl 1fr a druhý řádek karet by se vytlačil mimo
       viditelnou plochu (.kiosk-body ho pak kvůli overflow:hidden usekne). */
    grid-auto-rows: minmax(0, 1fr);
    gap: 1.5rem;
    flex: 1;
    min-height: 0;
}

.menu-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    /* Nižší padding než dřív (bývalo 2rem) – u dne s víc položkami (5+) je
       na kartu jen pár desítek pixelů výšky (viz .menu-cards), a 2rem
       (64px) samotný padding spolu s hlavičkou a alergeny spolehlivě
       vytlačil popis jídla na doslova nulovou výšku, takže úplně zmizel. */
    padding: 1.25rem 1.5rem;
    position: relative;
    overflow: hidden;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

    .menu-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
    }

.menu-snidane::before {
    background-color: #fbbf24;
}

.menu-polevka::before {
    background-color: #fb923c;
}

.menu-obed1::before {
    background-color: #38bdf8;
}

.menu-obed2::before {
    background-color: #818cf8;
}

.menu-vecere::before {
    background-color: #a78bfa;
}

.menu-card-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.menu-icon {
    font-size: 1.5rem;
    opacity: 0.8;
}

.menu-cat {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.menu-desc {
    font-size: 1.3rem;
    line-height: 1.4;
    font-weight: 400;
    color: var(--text);
    /* SKUTEČNÁ příčina zmizelého popisu jídla na reálné televizi: karta má
       jen malý podíl výšky mřížky (grid-auto-rows: minmax(0, 1fr)) a
       hlavička + alergeny + starý (2rem) padding karty spolehlivě sežraly
       úplně celou dostupnou výšku, takže .menu-desc s "flex:1; min-height:0"
       vyšel doslova na 0px – nešlo o -webkit-line-clamp ani o konkrétní
       prohlížeč, prokázáno přímým měřením clientHeight/scrollHeight.
       flex-basis:0 (flex:1 1 0%) je záměrně místo "auto" – "auto" nechá
       popis růst podle DÉLKY textu, což u delšího popisu vytlačilo alergeny
       (flex-shrink:0 níž) mimo kartu. S basis:0 dostane popis vždy přesně
       svůj pevný podíl místa (zbytek po hlavičce a alergenech), nikdy víc,
       takže alergeny zůstanou vždy celé vidět – jen velmi dlouhý popis se
       ořízne (overflow:hidden), ale nikdy nezmizí úplně. */
    flex: 1 1 0%;
    min-height: 0;
    overflow: hidden;
}

.menu-allergens {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.allergen {
    font-size: 0.85rem;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-weight: 400;
}

/* === Utility & Iframe === */
.weather-container {
    position: relative;
    overflow: hidden;
}

.fade-in {
    animation: fadeInAnimation 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInAnimation {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.iframe-wrapper {
    width: 100%;
    height: 70vh;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    /* Jemnější, studený stín pro modré téma */
    box-shadow: 0 25px 50px -12px rgba(2, 6, 23, 0.6);
}

    .iframe-wrapper iframe {
        width: 100%;
        height: 100%;
        border: none;
        display: block;
    }

/* === Fotky (modul "foto") === */
.page-foto {
    height: 100%;
}

.foto-frame {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(2, 6, 23, 0.6);
    overflow: hidden;
    position: relative;
}

    .foto-frame img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        display: block;
    }

.foto-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.75), transparent);
    color: var(--text);
    font-size: 1.2rem;
    text-align: center;
}

/* === Zprávy (modul "zpravy") – víc zpráv (naléhavé oznámení, novinky,
   obecná zpráva) může být aktivních najednou, zobrazí se pod sebou. === */
.page-announcement {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    overflow: hidden;
}

.announcement-frame {
    max-width: 62rem;
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-lg);
    padding: 3rem 3.5rem;
    box-shadow: 0 25px 50px -12px rgba(2, 6, 23, 0.6);
    min-height: 0;
    overflow: hidden;
}

.announcement-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
}

.announcement-text {
    font-size: 2rem;
    line-height: 1.55;
    color: var(--text);
    font-weight: 400;
    white-space: pre-wrap;
}

.announcement-frame--urgent {
    border-left-color: #f87171;
    box-shadow: 0 25px 50px -12px rgba(2, 6, 23, 0.6), 0 0 0 1px rgba(248, 113, 113, 0.25);
}

    .announcement-frame--urgent .announcement-label {
        color: #f87171;
    }

/* === QR kód v rohu stránky === */
.qr-corner {
    position: absolute;
    right: 2rem;
    bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.6rem;
}

    .qr-corner img {
        width: 5.5rem;
        height: 5.5rem;
        border-radius: var(--radius-sm);
        display: block;
    }

    .qr-corner span {
        font-size: 0.75rem;
        color: var(--muted);
        text-align: center;
        max-width: 6rem;
    }

/* === Odjezdy spojů (modul "odjezdy") === */
.page-departures {
    overflow: hidden;
}

.departures-header-row,
.departure-row {
    display: grid;
    grid-template-columns: 4.5rem 2.5rem 5rem 1fr 4rem;
    align-items: center;
    gap: 1rem;
}

.departures-header-row {
    padding: 0 1.25rem 0.75rem;
    font-size: 0.9rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.75rem;
}

.departures-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.departure-row {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

.departure-time {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.departure-vehicle {
    font-size: 1.3rem;
    line-height: 1;
    text-align: center;
}

    .departure-vehicle.veh-train::before {
        content: "🚆";
    }

    .departure-vehicle.veh-bus::before {
        content: "🚌";
    }

    .departure-vehicle.veh-other::before {
        content: "🚏";
    }

.departure-line {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
}

.departure-destination {
    font-size: 1.2rem;
    color: var(--text);
}

.departure-platform {
    font-size: 1.1rem;
    color: var(--muted);
    text-align: right;
}

.departure-row--delayed {
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(248, 113, 113, 0.08);
}

.departure-delay {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #f87171;
    vertical-align: middle;
}

/* === Odpočet (modul "countdown") === */
.countdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    gap: 1.5rem;
    flex: 1;
    min-height: 0;
}

.countdown-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 1.5rem;
    text-align: center;
    min-height: 0;
    overflow: hidden;
}

.countdown-days {
    font-size: 3rem;
    font-weight: 600;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.countdown-label {
    font-size: 1.3rem;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.countdown-date {
    font-size: 1rem;
    color: var(--muted);
}

/* === Blazor chybová hláška (skrytá, dokud JS boot skript sám nenastaví display:block) === */
#blazor-error-ui {
    display: none;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 1000;
    background: lightyellow;
    color: #1f2937;
    padding: 0.6rem 1.25rem 0.7rem;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* === Odkaz na přihlášení / nastavení (nenápadný roh displeje) === */
.kiosk-admin-link {
    position: fixed;
    right: 1.25rem;
    bottom: 1rem;
    font-size: 0.85rem;
    color: var(--muted);
    opacity: 0.35;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: opacity 0.2s ease, color 0.2s ease;
    z-index: 10;
}

    .kiosk-admin-link:hover {
        opacity: 1;
        color: var(--accent);
    }

.kiosk-school-link {
    position: fixed;
    left: 1.25rem;
    bottom: 1rem;
    font-size: 0.85rem;
    color: var(--muted);
    opacity: 0.35;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: opacity 0.2s ease, color 0.2s ease;
    z-index: 10;
}

    .kiosk-school-link:hover {
        opacity: 1;
        color: var(--accent);
    }

/* === Admin plocha (přihlášení, nastavení) – vlastní, klidnější vzhled,
   nemusí kopírovat velký "TV" vzhled kioskových stránek. === */
.admin-shell {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    /* html/body mají globálně overflow: hidden (kvůli kioskovému displeji) –
       admin plocha proto musí scrollovat sama v sobě, jinak je obsah delší
       než viewport (např. dole "Odhlásit se") fyzicky nedosažitelný. */
    overflow-y: auto;
}

.admin-header {
    padding: 1.5rem 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.admin-body {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem;
}

.admin-page {
    width: 100%;
    display: flex;
    justify-content: center;
}

.admin-card {
    width: 100%;
    max-width: 26rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(2, 6, 23, 0.6);
}

    .admin-card--wide {
        max-width: 52rem;
    }

.admin-card-title {
    font-size: 1.6rem;
    font-weight: 500;
    margin: 0 0 0.5rem;
    color: var(--text);
}

.admin-card-subtitle {
    font-size: 0.95rem;
    color: var(--muted);
    margin: 0 0 2rem;
}

    .admin-card-subtitle strong {
        color: var(--text);
    }

.admin-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.admin-footer-link {
    font-size: 0.9rem;
    color: var(--muted);
    text-decoration: none;
}

    .admin-footer-link:hover {
        color: var(--accent);
    }

    .admin-footer-logout:hover {
        color: #f87171;
    }

/* === Přihlašovací formulář === */
.login-field {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .login-field label {
        font-size: 0.9rem;
        color: var(--muted);
    }

    .login-field input {
        font-family: var(--font-main);
        font-size: 1rem;
        color: var(--text);
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        padding: 0.75rem 1rem;
    }

        .login-field input:focus {
            outline: none;
            border-color: var(--accent);
        }

.login-error {
    color: #f87171;
    font-size: 0.9rem;
    margin: 0 0 1.25rem;
}

.login-submit {
    width: 100%;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 500;
    color: #040810;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

    .login-submit:disabled {
        opacity: 0.6;
        cursor: default;
    }

/* === Výběr školy === */
.school-picker-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.school-picker-item {
    font-family: var(--font-main);
    font-size: 1.05rem;
    font-weight: 500;
    text-align: left;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .school-picker-item:hover {
        border-color: var(--accent);
        color: var(--accent);
    }

/* === Nastavení – záložky === */
.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.75rem 0 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.25rem;
}

.settings-tab {
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1.1rem;
    border-radius: 2rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .settings-tab.active {
        background: var(--accent);
        color: #040810;
        border-color: var(--accent);
        font-weight: 600;
    }

    .settings-tab:not(.active):hover {
        border-color: var(--accent);
        color: var(--text);
    }

/* === Nastavení – moduly === */
.settings-section h3 {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text);
    margin: 0 0 0.75rem;
}

.settings-hint {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
}

.modules-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    max-height: 22rem;
    overflow-y: auto;
    padding-right: 0.4rem;
}

.module-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.1rem;
}

.module-reorder {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

    .module-reorder button {
        width: 1.7rem;
        height: 1.3rem;
        font-size: 0.65rem;
        line-height: 1;
        font-family: var(--font-main);
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 0.25rem;
        color: var(--muted);
        cursor: pointer;
        transition: all 0.2s ease;
    }

        .module-reorder button:hover:not(:disabled) {
            border-color: var(--accent);
            color: var(--accent);
        }

        .module-reorder button:disabled {
            opacity: 0.3;
            cursor: default;
        }

.module-toggle {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
    color: var(--text);
    cursor: pointer;
}

    .module-toggle input {
        width: 1.1rem;
        height: 1.1rem;
        accent-color: var(--accent);
        cursor: pointer;
    }

.module-duration {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .module-duration input {
        width: 4.5rem;
        font-family: var(--font-main);
        font-size: 1rem;
        color: var(--text);
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        padding: 0.5rem 0.6rem;
    }

        .module-duration input:focus {
            outline: none;
            border-color: var(--accent);
        }

    .module-duration span {
        color: var(--muted);
        font-size: 0.9rem;
    }

.settings-save {
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 500;
    color: #040810;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.7rem 1.3rem;
    margin-top: 1.25rem;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

    .settings-save:disabled {
        opacity: 0.6;
        cursor: default;
    }

    .settings-save--inline {
        margin-top: 0;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

/* === Nastavení – oznámení === */
.announcement-textarea {
    display: block;
    width: 100%;
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    margin: 1rem 0;
    resize: vertical;
}

    .announcement-textarea:focus {
        outline: none;
        border-color: var(--accent);
    }

.announcement-urgent-toggle {
    margin-bottom: 1rem;
}

/* === Nastavení – stav zdrojů === */
.status-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 1rem 0;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.7rem 1rem;
}

.status-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-ok .status-dot {
    background: #4ade80;
}

.status-error .status-dot {
    background: #f87171;
}

.status-unknown .status-dot {
    background: var(--muted);
}

.status-source {
    flex: 1;
    font-size: 1rem;
    color: var(--text);
}

.status-time {
    font-size: 0.9rem;
    color: var(--muted);
}

.status-error-text {
    font-size: 0.8rem;
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.4);
    border-radius: var(--radius-sm);
    padding: 0.1rem 0.5rem;
    cursor: help;
}

/* === Nastavení – náhled === */
/* === Nastavení – účet === */
.account-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin: 1rem 0;
}

    .account-form input {
        font-family: var(--font-main);
        font-size: 1rem;
        color: var(--text);
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        padding: 0.6rem 0.8rem;
        flex: 1;
        min-width: 10rem;
    }

        .account-form input:focus {
            outline: none;
            border-color: var(--accent);
        }

/* Vlastní vzhled <select> – bez tohohle prohlížeč kreslí holý systémový
   combobox (bílý na Windows), který vůbec nesedí k tmavému vzhledu appky.
   Platí globálně pro všechny selecty v Nastavení (druh zprávy, výběr školy,
   typ zastávky, ...). */
select {
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--text);
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 2.25rem 0.6rem 0.8rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1rem;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

select:hover {
    border-color: rgba(125, 211, 252, 0.35);
}

select:focus {
    outline: none;
    border-color: var(--accent);
}

select option {
    background: var(--surface);
    color: var(--text);
}

.account-panel {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

    .account-panel h4 {
        font-size: 1rem;
        font-weight: 600;
        color: var(--text);
        margin: 0 0 0.6rem;
    }

    .account-panel .settings-hint {
        margin-bottom: 0.85rem;
    }

.account-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .account-list li {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        padding: 0.6rem 0.9rem;
        color: var(--text);
    }

/* === Nastavení – fotky === */
.photo-interval {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--muted);
}

    .photo-interval input {
        width: 4rem;
        font-family: var(--font-main);
        font-size: 1rem;
        color: var(--text);
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        padding: 0.5rem 0.6rem;
    }

        .photo-interval input:focus {
            outline: none;
            border-color: var(--accent);
        }

    .photo-interval input[type="date"] {
        width: auto;
        color-scheme: dark;
    }

.photo-upload-input {
    display: block;
    width: 100%;
    margin-top: 1rem;
    font-family: var(--font-main);
    font-size: 0.9rem;
    color: var(--muted);
}

    .photo-upload-input::file-selector-button {
        font-family: var(--font-main);
        font-size: 0.9rem;
        font-weight: 500;
        color: #040810;
        background: var(--accent);
        border: none;
        border-radius: var(--radius-sm);
        padding: 0.55rem 1rem;
        margin-right: 0.85rem;
        cursor: pointer;
        transition: opacity 0.2s ease;
    }

        .photo-upload-input::file-selector-button:hover {
            opacity: 0.9;
        }

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.photo-thumb {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

    .photo-thumb img {
        width: 100%;
        height: 6rem;
        object-fit: cover;
        display: block;
    }

.photo-thumb-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
}

.photo-visible-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--muted);
    cursor: pointer;
}

    .photo-visible-toggle input {
        accent-color: var(--accent);
        cursor: pointer;
    }

.photo-delete {
    font-family: var(--font-main);
    font-size: 0.8rem;
    color: var(--muted);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

    .photo-delete:hover {
        color: #f87171;
    }

/* === Mobilní úvodní obrazovka (místo karuselu, viz Components/MobileLanding.razor) === */
.mobile-landing {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
}

.mobile-landing-card {
    width: 100%;
    max-width: 24rem;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: 0 25px 50px -12px rgba(2, 6, 23, 0.6);
}

.mobile-landing-title {
    font-size: 1.4rem;
    font-weight: 500;
    margin: 0 0 0.75rem;
    color: var(--text);
}

.mobile-landing-hint {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.6;
    margin: 0 0 2rem;
}

.mobile-landing-button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 500;
    color: #040810;
    background: var(--accent);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1rem;
    text-decoration: none;
}

/* === Nastavení na malých obrazovkách – ať se to dá pohodlně vyplnit
   telefonem, klidně stojíc přímo před televizí. === */
@media (max-width: 640px) {
    .admin-body {
        padding: 1rem;
        align-items: flex-start;
    }

    .admin-card,
    .admin-card--wide {
        max-width: 100%;
        padding: 1.5rem;
    }

    .settings-tabs {
        gap: 0.4rem;
        margin: 1.25rem 0 1.25rem;
    }

    .settings-tab {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }

    .account-form {
        flex-direction: column;
        align-items: stretch;
    }

        .account-form input,
        .account-form select,
        .account-form button {
            width: 100%;
            min-width: 0;
        }

    .module-row {
        flex-wrap: wrap;
        row-gap: 0.6rem;
    }

    .module-duration {
        margin-left: auto;
    }

    .photo-interval {
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
    }

    .admin-footer {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
}

/* === Verze appky a přehled novinek (patička Nastavení) === */
.version-footer {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.version-toggle {
    font-family: var(--font-main);
    font-size: 0.8rem;
    color: var(--muted);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

    .version-toggle:hover {
        color: var(--accent);
    }

.changelog-list {
    list-style: none;
    margin: 0.85rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .changelog-list li {
        font-size: 0.85rem;
        color: var(--muted);
        line-height: 1.5;
    }

    .changelog-list strong {
        color: var(--text);
    }

.changelog-date {
    color: var(--muted);
    opacity: 0.75;
}

/* === Sezónní vzhledy (viz wwwroot/data/seasons.json, Services/SeasonService.cs) ===
   Téma mění jen akcent a okraje – pozadí, text a kontrast zůstávají stejné,
   aby byl displej z dálky pořád stejně čitelný. */
.kiosk-shell {
    /* Vlastní stacking context: dekorace se z-index:-1 pak kreslí nad
       pozadím, ale pod veškerým obsahem (a neblokují kliknutí). */
    isolation: isolate;
    background: var(--bg);
    /* body bere barvu z :root – sem znovu, aby šla přepnout tématem/režimem. */
    color: var(--text);
}

.kiosk-shell[data-theme="christmas"] {
    --accent: #f87171;
    --border: rgba(248, 113, 113, 0.18);
}

.kiosk-shell[data-theme="halloween"] {
    --accent: #fb923c;
    --border: rgba(251, 146, 60, 0.18);
}

.kiosk-shell[data-theme="easter"] {
    --accent: #a3e635;
    --border: rgba(163, 230, 53, 0.16);
}

.kiosk-shell[data-theme="winter"] {
    --accent: #bae6fd;
}

.kiosk-shell[data-theme="school-start"] {
    --accent: #4ade80;
}

.kiosk-shell[data-theme="school-end"] {
    --accent: #facc15;
    --border: rgba(250, 204, 21, 0.16);
}

.kiosk-season-icon {
    font-size: 0.8em;
    margin-left: 0.35rem;
}

.kiosk-season-banner {
    margin-top: 0.35rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.02em;
}

/* Padající sníh – jen 2 pseudo-elementy s dlaždicovým pozadím (2 kompozitní
   vrstvy, žádný JS ani stovky elementů – šetrné k slabým TV prohlížečům).
   Posun přesně o násobek velikosti dlaždice (600 = 3×200 = 2×300) dává
   bezešvou smyčku. Karty mají vlastní pozadí, takže sníh nejde přes text. */
.fx-snow {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

    .fx-snow::before,
    .fx-snow::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: -600px;
        bottom: 0;
        will-change: transform;
    }

    .fx-snow::before {
        background-image:
            radial-gradient(2px 2px at 30px 40px, #fff, transparent),
            radial-gradient(3px 3px at 140px 120px, #fff, transparent),
            radial-gradient(2px 2px at 90px 170px, #fff, transparent);
        background-size: 200px 200px;
        opacity: 0.35;
        animation: fx-snow-fall 40s linear infinite;
    }

    .fx-snow::after {
        background-image:
            radial-gradient(4px 4px at 80px 200px, #fff, transparent),
            radial-gradient(3px 3px at 230px 60px, #fff, transparent);
        background-size: 300px 300px;
        opacity: 0.2;
        animation: fx-snow-fall 70s linear infinite;
    }

    /* Zima po Vánocích – jen řidší, pomalejší vrstva. */
    .fx-snow--light::before {
        opacity: 0.2;
        animation-duration: 60s;
    }

    .fx-snow--light::after {
        display: none;
    }

@keyframes fx-snow-fall {
    to { transform: translateY(600px); }
}

@media (prefers-reduced-motion: reduce) {
    .fx-snow {
        display: none;
    }
}

/* === Easter eggy (viz Services/FunEffectsService.cs) === */

/* Konfety – vkládají se jen na pár sekund (Components/Confetti.razor). */
.fx-confetti {
    position: fixed;
    inset: 0;
    z-index: 50;
    overflow: hidden;
    pointer-events: none;
}

    .fx-confetti i {
        position: absolute;
        top: -2rem;
        width: 0.6rem;
        height: 1rem;
        border-radius: 2px;
        opacity: 0.9;
        will-change: transform;
        animation: fx-confetti-fall 5s ease-in forwards;
    }

@keyframes fx-confetti-fall {
    to {
        transform: translateY(110vh) rotate(720deg);
        opacity: 0;
    }
}

/* Terminal a Retro mód = jen přepnutí proměnných + statické scanlines,
   žádná animace navíc (čitelnost i výkon zůstávají). Font se musí nastavit
   přímo na .kiosk-shell, body dědí --font-main z :root. */
.kiosk-shell[data-mode] {
    font-family: var(--font-main);
}

    .kiosk-shell[data-mode]::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 40;
        pointer-events: none;
        background: repeating-linear-gradient(transparent 0 2px, rgba(0, 0, 0, 0.18) 2px 4px);
    }

.kiosk-shell[data-mode="terminal"] {
    --bg: #020a02;
    --surface: #04140a;
    --border: rgba(74, 222, 128, 0.25);
    --text: #4ade80;
    --muted: #22c55e;
    --accent: #86efac;
    --font-main: 'Courier New', ui-monospace, monospace;
}

.kiosk-shell[data-mode="retro"] {
    --bg: #140b00;
    --surface: #1f1300;
    --border: rgba(255, 176, 0, 0.25);
    --text: #ffb000;
    --muted: #cc8a00;
    --accent: #ffd166;
    --font-main: 'Courier New', ui-monospace, monospace;
    text-shadow: 0 0 6px rgba(255, 176, 0, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    .fx-confetti {
        display: none;
    }
}

/* === Úloha týdne (modul "puzzle") === */
.puzzle-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
    flex: 1;
    min-height: 0;
}

.puzzle-card,
.puzzle-side {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    min-height: 0;
    overflow: hidden;
}

.puzzle-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-top: 4px solid var(--accent);
}

.puzzle-meta {
    font-size: 1rem;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.puzzle-difficulty {
    color: var(--accent);
    letter-spacing: 0.15em;
}

.puzzle-title {
    font-size: 2.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.puzzle-body {
    font-size: 1.6rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.puzzle-solution {
    color: var(--accent);
    font-weight: 500;
}

.puzzle-image {
    flex: 1;
    min-height: 0;
    max-width: 100%;
    object-fit: contain;
    object-position: left top;
    border-radius: var(--radius-md);
}

.puzzle-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Velký QR přímo v panelu (ne v rohu stránky). */
.qr-corner--large {
    position: static;
    padding: 1rem;
    gap: 0.75rem;
    background: #fff;
}

    .qr-corner--large img {
        width: 16rem;
        height: 16rem;
    }

    .qr-corner--large span {
        max-width: 16rem;
        font-size: 1rem;
        font-weight: 500;
        color: #0b1121;
    }

.puzzle-solvers {
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1rem;
    min-width: 22rem;
}

    .puzzle-solvers ul {
        margin: 0;
        padding: 0;
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
        font-size: 1.4rem;
    }

    .puzzle-solvers p {
        margin: 0;
        font-size: 1.2rem;
        color: var(--muted);
    }

/* Nastavení – Úloha týdne */
.photo-interval input.puzzle-admin-date {
    width: auto;
}

.puzzle-admin-thumb {
    height: 3rem;
    border-radius: var(--radius-sm);
}

/* === Sezónní motivy v pozadí (wwwroot/img/themes/*.svg) ===
   Dlaždice s motivy (dýně, stromky, vajíčka, ...) + jemný barevný nádech
   v rozích. Leží pod obsahem (z-index:-1 v izolovaném .kiosk-shell), karty
   mají vlastní pozadí, takže text modulů zůstává stejně čitelný – motivy
   prosvítají jen mezi kartami a za hlavičkou. Vrstva se velmi pomalu
   posouvá (jen transform = kompozitor, bez překreslování), ať se statický
   vzor nevypálí do displeje. Na spořiči/zámku (--calm) a ve skrytých
   režimech se nezobrazuje. */
.kiosk-shell[data-theme]::before {
    content: "";
    position: absolute;
    inset: -60px;
    z-index: -1;
    pointer-events: none;
    background-repeat: repeat;
    background-size: 480px 480px;
    opacity: var(--theme-motif-opacity, 0.1);
    will-change: transform;
    animation: theme-motif-drift 600s ease-in-out infinite alternate;
}

.kiosk-shell[data-theme="normal"]::before,
.kiosk-shell--calm::before,
.kiosk-shell[data-mode]::before {
    display: none;
}

@keyframes theme-motif-drift {
    from { transform: translate(0, 0); }
    to { transform: translate(48px, 36px); }
}

.kiosk-shell[data-theme="halloween"] {
    background:
        radial-gradient(ellipse at 0% 100%, rgba(251, 146, 60, 0.14), transparent 55%),
        radial-gradient(ellipse at 100% 0%, rgba(139, 92, 246, 0.14), transparent 50%),
        var(--bg);
}

    .kiosk-shell[data-theme="halloween"]::before {
        background-image: url("../img/themes/halloween.svg");
        --theme-motif-opacity: 0.14;
    }

.kiosk-shell[data-theme="christmas"] {
    background:
        radial-gradient(ellipse at 0% 100%, rgba(74, 222, 128, 0.1), transparent 55%),
        radial-gradient(ellipse at 100% 0%, rgba(248, 113, 113, 0.12), transparent 50%),
        var(--bg);
}

    .kiosk-shell[data-theme="christmas"]::before {
        background-image: url("../img/themes/christmas.svg");
        --theme-motif-opacity: 0.13;
    }

.kiosk-shell[data-theme="winter"] {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(186, 230, 253, 0.1), transparent 60%),
        var(--bg);
}

    .kiosk-shell[data-theme="winter"]::before {
        background-image: url("../img/themes/winter.svg");
        --theme-motif-opacity: 0.1;
    }

.kiosk-shell[data-theme="easter"] {
    background:
        radial-gradient(ellipse at 0% 100%, rgba(163, 230, 53, 0.1), transparent 55%),
        radial-gradient(ellipse at 100% 0%, rgba(249, 168, 212, 0.12), transparent 50%),
        var(--bg);
}

    .kiosk-shell[data-theme="easter"]::before {
        background-image: url("../img/themes/easter.svg");
        --theme-motif-opacity: 0.13;
    }

.kiosk-shell[data-theme="school-start"] {
    background:
        radial-gradient(ellipse at 100% 0%, rgba(74, 222, 128, 0.1), transparent 55%),
        var(--bg);
}

    .kiosk-shell[data-theme="school-start"]::before {
        background-image: url("../img/themes/school-start.svg");
        --theme-motif-opacity: 0.12;
    }

.kiosk-shell[data-theme="school-end"] {
    background:
        radial-gradient(ellipse at 100% 0%, rgba(250, 204, 21, 0.12), transparent 55%),
        radial-gradient(ellipse at 0% 100%, rgba(125, 211, 252, 0.1), transparent 55%),
        var(--bg);
}

    .kiosk-shell[data-theme="school-end"]::before {
        background-image: url("../img/themes/school-end.svg");
        --theme-motif-opacity: 0.13;
    }

@media (prefers-reduced-motion: reduce) {
    .kiosk-shell[data-theme]::before {
        animation: none;
    }
}

/* Skryté režimy mají vlastní pozadí – sezónní nádech by je jen kalil. */
.kiosk-shell[data-mode] {
    background: var(--bg);
}

/* === Úloha týdne – stránka pro žáky (/uloha, QR kód z TV) === */
.admin-card.student-puzzle {
    max-width: 36rem;
}

.student-puzzle .puzzle-meta {
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
}

.student-puzzle-body {
    font-size: 1.1rem;
    line-height: 1.55;
    white-space: pre-wrap;
    margin: 0.75rem 0 1.25rem;
}

.student-puzzle-image {
    display: block;
    max-width: 100%;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
}

.student-puzzle-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

    .student-puzzle-form input:not([type="checkbox"]) {
        font-family: var(--font-main);
        font-size: 1rem;
        color: var(--text);
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        padding: 0.75rem 0.9rem;
    }

        .student-puzzle-form input:not([type="checkbox"]):focus {
            outline: none;
            border-color: var(--accent);
        }

    .student-puzzle-form input,
    .student-puzzle-form .announcement-textarea {
        box-sizing: border-box;
        width: 100%;
    }

    .student-puzzle-form .announcement-textarea {
        margin: 0;
    }

    .student-puzzle-form input[type="checkbox"] {
        width: auto;
    }

.student-puzzle-sent {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.35);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
}

.student-puzzle-solution {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--accent);
    background: var(--bg);
    border-radius: var(--radius-md);
    padding: 1rem 1.2rem;
    white-space: pre-wrap;
}

.student-puzzle-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 1.75rem 0 0.5rem;
}

.puzzle-bank-list {
    max-height: 20rem;
    overflow-y: auto;
}

.puzzle-bank-meta {
    color: var(--muted);
    font-size: 0.85rem;
}

/* Textová pole uvnitř panelů (Úloha týdne) – bez tohohle přetečou o padding. */
.account-panel .announcement-textarea {
    box-sizing: border-box;
}

.puzzle-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

/* === Nastavení – Plánování (Components/Admin/SchedulePanel.razor) === */
.schedule-now {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin: 0.5rem 0 0;
}

.schedule-chip {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0b1121;
    background: var(--chip, var(--accent));
    white-space: nowrap;
}

.schedule-plan {
    list-style: none;
    margin: 1rem 0 0.5rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

    .schedule-plan li {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.6rem;
    }

    .schedule-plan .settings-hint {
        margin: 0;
    }

.schedule-plan-time {
    font-variant-numeric: tabular-nums;
    min-width: 6.5rem;
    color: var(--muted);
}

.schedule-mode-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.schedule-modules li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.schedule-rule {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.25rem 1rem 0.5rem;
    margin-bottom: 0.75rem;
}

.schedule-rule--off {
    opacity: 0.55;
}

.schedule-day {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text);
}

/* Řádky s více poli v panelech Nastavení se na užším okně zalomí, místo
   aby přetekly ven (např. nová událost v Plánování). */
.account-panel .photo-interval {
    flex-wrap: wrap;
}

/* === Rozvržení obrazovky (Models/KioskLayouts.cs, Components/KioskScreen.razor) ===
   Pevné šablony slotů: hlavní plocha (main), boční sloupec (side, ~30 %)
   a spodní lišta (strip). Každý slot střídá své moduly (SlotRotator). */
.kiosk-layout {
    display: grid;
    gap: 1.75rem;
}

.kiosk-layout--full {
    grid-template-areas: "main";
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
}

.kiosk-layout--hero-side {
    grid-template-areas: "main side";
    grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
    grid-template-rows: minmax(0, 1fr);
}

.kiosk-layout--hero-strip {
    grid-template-areas: "main" "strip";
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
}

.kiosk-layout--hero-side-strip {
    grid-template-areas: "main side" "strip strip";
    grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
    grid-template-rows: minmax(0, 1fr) auto;
}

.kiosk-slot {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.kiosk-slot--main { grid-area: main; }
.kiosk-slot--side { grid-area: side; }
.kiosk-slot--strip { grid-area: strip; }

/* --- Kompaktní varianty modulů v bočním sloupci (.slot--compact) ---
   Záměrně potomkové selektory, ne container queries – starší vestavěné
   prohlížeče v TV je nemusí umět. */
.slot--compact .page-heading {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
}

.slot--compact .weather-current {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.75rem;
    margin-bottom: 1.25rem;
}

.slot--compact .weather-icon-lg {
    font-size: 3.5rem;
}

.slot--compact .weather-temp {
    font-size: 3.5rem;
}

.slot--compact .weather-desc {
    font-size: 1.2rem;
}

.slot--compact .weather-details {
    display: none;
}

.slot--compact .weather-forecast {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.slot--compact .forecast-card {
    padding: 1rem 0.75rem;
}

    /* Do úzkého sloupce se vejdou jen 2 dny předpovědi. */
    .slot--compact .forecast-card:nth-child(n + 3) {
        display: none;
    }

.slot--compact .forecast-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.slot--compact .forecast-day {
    margin-bottom: 0.5rem;
}

.slot--compact .forecast-temps {
    font-size: 1.2rem;
}

.slot--compact .page-announcement {
    justify-content: flex-start;
    gap: 1rem;
}

.slot--compact .announcement-frame {
    box-sizing: border-box;
    padding: 1.5rem 1.75rem;
}

.slot--compact .announcement-label {
    margin-bottom: 0.75rem;
}

.slot--compact .announcement-text {
    font-size: 1.35rem;
    line-height: 1.5;
}

.slot--compact .countdown-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.slot--compact .countdown-card {
    padding: 1.25rem 1rem;
}

.slot--compact .countdown-days {
    font-size: 2.25rem;
}

/* --- Widget: Odpočet do zvonění (bell-countdown) --- */
.bell-countdown {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-lg);
    color: var(--text);
}

.bell-countdown--break {
    border-left-color: #facc15;
}

.bell-countdown-label {
    color: var(--muted);
    font-weight: 500;
}

.bell-countdown-time {
    font-weight: 300;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.bell-countdown-next {
    color: var(--muted);
}

/* Lišta: vše na jednom řádku. */
.bell-countdown--strip {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    padding: 1rem 2rem;
}

    .bell-countdown--strip .bell-countdown-label {
        font-size: 1.4rem;
    }

    .bell-countdown--strip .bell-countdown-time {
        font-size: 2.4rem;
    }

    .bell-countdown--strip .bell-countdown-next {
        margin-left: auto;
        font-size: 1.2rem;
    }

/* Boční sloupec: pod sebou, velké číslo. */
.bell-countdown--compact {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    box-sizing: border-box;
}

    .bell-countdown--compact .bell-countdown-label {
        font-size: 1.3rem;
    }

    .bell-countdown--compact .bell-countdown-time {
        font-size: 4rem;
    }

/* --- Widget: Kroužky a akce (activities) --- */
.activities-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
}

.activities-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 1.25rem;
    row-gap: 0.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
}

.activities-time {
    grid-row: span 2;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.activities-title {
    font-size: 1.5rem;
}

.activities-place {
    font-size: 1.1rem;
    color: var(--muted);
}

.slot--compact .activities-item {
    grid-template-columns: minmax(0, 1fr);
    padding: 1rem 1.25rem;
}

.slot--compact .activities-time {
    grid-row: auto;
    font-size: 1.15rem;
}

.slot--compact .activities-title {
    font-size: 1.25rem;
}

/* Nastavení – náhled rozvržení režimu (stejné grid šablony jako TV, zmenšené). */
.layout-preview {
    aspect-ratio: 16 / 9;
    max-width: 28rem;
    gap: 0.4rem;
    margin: 1rem 0;
    padding: 0.4rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.layout-preview-slot {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.5rem 0.6rem;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px dashed var(--border);
    font-size: 0.75rem;
    color: var(--muted);
    overflow: hidden;
}

    .layout-preview-slot strong {
        color: var(--text);
        font-size: 0.8rem;
    }

.schedule-slot-title {
    margin: 1.25rem 0 0.25rem;
    font-size: 0.9rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* === Obrazovky pro návštěvníky (Den otevřených dveří, třídní schůzky…) === */

/* Uvítání */
.page-welcome {
    align-items: center;
    justify-content: center;
}

.welcome-card {
    max-width: 60rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.welcome-school {
    font-size: 1.4rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.welcome-title {
    margin: 0;
    font-size: 3.75rem;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text);
}

.welcome-when {
    font-size: 1.75rem;
    color: var(--accent);
    font-weight: 500;
}

.welcome-text {
    margin: 0.5rem 0 0;
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--text);
    white-space: pre-wrap;
}

/* Program */
.program-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    overflow: hidden;
}

.program-item {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    column-gap: 1.5rem;
    row-gap: 0.25rem;
    align-items: baseline;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.5rem;
}

.program-item--done {
    opacity: 0.45;
}

.program-item--now {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.program-time {
    grid-row: span 2;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.program-title {
    font-size: 1.6rem;
}

.program-place {
    font-size: 1.15rem;
    color: var(--muted);
}

.program-badge {
    display: inline-block;
    margin-left: 0.75rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    vertical-align: middle;
    color: #0b1121;
    background: var(--accent);
}

.program-badge--next {
    color: var(--accent);
    background: transparent;
    border: 1px solid var(--accent);
}

.slot--compact .program-item {
    grid-template-columns: minmax(0, 1fr);
    padding: 0.9rem 1.1rem;
}

.slot--compact .program-time {
    grid-row: auto;
    font-size: 1.2rem;
}

.slot--compact .program-title {
    font-size: 1.25rem;
}

.slot--compact .program-badge {
    display: block;
    width: fit-content;
    margin: 0.35rem 0 0;
}

/* Mapa budovy */
.map-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
}

.map-layout--legend {
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
}

.map-frame {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1rem;
    overflow: hidden;
}

    .map-frame img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

.map-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: hidden;
}

    .map-legend li {
        background: var(--surface);
        border: 1px solid var(--border);
        border-left: 4px solid var(--accent);
        border-radius: var(--radius-md);
        padding: 0.9rem 1.1rem;
        font-size: 1.3rem;
    }

/* Orientační pokyny */
.directions-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

    .directions-list li {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        padding: 1rem 1.25rem;
        font-size: 1.35rem;
        line-height: 1.4;
    }

.directions-strip {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    padding: 1rem 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-lg);
}

.directions-strip-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.directions-strip-text {
    font-size: 1.6rem;
}

/* Nastavení – editor události */
.event-editor {
    margin-top: 1rem;
}

.event-program-row .event-program-time {
    flex: 0 0 5rem;
    min-width: 0;
}

.welcome-qr {
    margin-top: 0.5rem;
}

    .welcome-qr .qr-corner {
        position: static;
    }

/* =====================================================================
   Administrace (Layout/AdminShell.razor, Components/Admin/*)
   Desktop: pevný postranní sloupec s menu + obsah. Pod 900 px se menu
   schová za tlačítko ☰ v horní liště (správa z mobilu před TV).
   ===================================================================== */
.ad-shell {
    height: 100vh;
    display: grid;
    grid-template-columns: 16rem minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "sidebar main";
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
}

.ad-topbar {
    display: none;
}

.ad-sidebar {
    grid-area: sidebar;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem 0.9rem;
    background: var(--surface);
    border-right: 1px solid var(--border);
    overflow-y: auto;
}

.ad-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.5rem 0.5rem;
}

    .ad-brand img {
        width: 2.75rem;
        height: 2.75rem;
        object-fit: contain;
    }

.ad-brand-name {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.25;
}

.ad-brand-sub {
    font-size: 0.75rem;
    color: var(--muted);
}

.ad-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.ad-nav-group {
    margin: 1rem 0.6rem 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.ad-nav-link {
    display: block;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    font-size: 0.92rem;
    transition: background 0.15s ease;
}

    .ad-nav-link:hover {
        background: rgba(148, 163, 184, 0.1);
    }

    .ad-nav-link.active {
        background: rgba(56, 189, 248, 0.15);
        color: var(--accent);
        font-weight: 600;
    }

.ad-sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1rem 0.6rem 0;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
}

.ad-user {
    color: var(--muted);
}

    .ad-user strong {
        color: var(--text);
    }

.ad-footer-link {
    color: var(--muted);
    text-decoration: none;
}

    .ad-footer-link:hover {
        color: var(--accent);
    }

.ad-version {
    color: var(--muted);
    opacity: 0.7;
    font-size: 0.75rem;
}

.ad-main {
    grid-area: main;
    overflow-y: auto;
    padding: 2rem 2.5rem 3rem;
}

/* --- Stránka --- */
.ad-page {
    max-width: 68rem;
}

.ad-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.ad-page-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.ad-page-description {
    margin: 0.4rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.ad-page-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Obsah stránek převzatý ze starého Nastavení – panely jako karty. */
.ad-page-body .account-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin: 0 0 1.25rem;
}

/* --- Přehled: mřížka karet --- */
.ad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
    gap: 1.25rem;
}

.ad-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.4rem;
    min-width: 0;
}

.ad-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.ad-card-title {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ad-card-link {
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}

.ad-now {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.ad-muted {
    color: var(--muted);
    font-size: 0.9rem;
}

.ad-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

    .ad-list li {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        font-size: 0.95rem;
    }

    .ad-list a {
        color: var(--text);
        text-decoration: none;
    }

        .ad-list a:hover {
            color: var(--accent);
        }

.ad-list-time {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    min-width: 3.5rem;
}

.ad-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

    .ad-actions a {
        text-decoration: none;
    }

/* --- Štítek stavu (StatusPill) --- */
.ad-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    background: rgba(148, 163, 184, 0.12);
    color: var(--text);
    white-space: nowrap;
}

.ad-pill-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--muted);
}

.ad-pill--ok .ad-pill-dot { background: #4ade80; }
.ad-pill--warn .ad-pill-dot { background: #facc15; }
.ad-pill--error .ad-pill-dot { background: #f87171; }
.ad-pill--ok { background: rgba(74, 222, 128, 0.12); }
.ad-pill--warn { background: rgba(250, 204, 21, 0.12); }
.ad-pill--error { background: rgba(248, 113, 113, 0.14); }

/* --- Přepínače: zapínací checkboxy vypadají jako switch (jen CSS, beze změny
   značek – <label class="module-toggle"><input type="checkbox">…). --- */
.ad-shell .module-toggle input[type="checkbox"],
.ad-shell .photo-visible-toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    flex: 0 0 auto;
    width: 2.4rem;
    height: 1.35rem;
    margin: 0 0.6rem 0 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
    cursor: pointer;
    transition: background 0.15s ease;
    vertical-align: middle;
}

    .ad-shell .module-toggle input[type="checkbox"]::after,
    .ad-shell .photo-visible-toggle input[type="checkbox"]::after {
        content: "";
        position: absolute;
        top: 0.15rem;
        left: 0.15rem;
        width: 1.05rem;
        height: 1.05rem;
        border-radius: 50%;
        background: #fff;
        transition: transform 0.15s ease;
    }

    .ad-shell .module-toggle input[type="checkbox"]:checked,
    .ad-shell .photo-visible-toggle input[type="checkbox"]:checked {
        background: var(--accent);
    }

        .ad-shell .module-toggle input[type="checkbox"]:checked::after,
        .ad-shell .photo-visible-toggle input[type="checkbox"]:checked::after {
            transform: translateX(1.05rem);
        }

    .ad-shell .module-toggle input[type="checkbox"]:focus-visible,
    .ad-shell .photo-visible-toggle input[type="checkbox"]:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }

.ad-shell .module-toggle {
    display: inline-flex;
    align-items: center;
}

/* --- Úzké okno / mobil --- */
@media (max-width: 900px) {
    .ad-shell {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        grid-template-areas: "topbar" "main";
    }

    .ad-topbar {
        grid-area: topbar;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
    }

    .ad-menu-toggle {
        font-size: 1.4rem;
        line-height: 1;
        padding: 0.25rem 0.55rem;
        color: var(--text);
        background: transparent;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        cursor: pointer;
    }

    .ad-topbar-title {
        font-weight: 600;
    }

    .ad-sidebar {
        display: none;
    }

    .ad-shell--nav-open .ad-sidebar {
        display: flex;
        position: fixed;
        top: 3.4rem;
        left: 0;
        bottom: 0;
        width: min(18rem, 85vw);
        z-index: 20;
        box-shadow: 0 25px 50px -12px rgba(2, 6, 23, 0.8);
    }

    .ad-main {
        padding: 1.25rem 1rem 2.5rem;
    }

    .ad-page-header {
        flex-direction: column;
    }
}

/* Blazor po navigaci dává fokus na <h1> (FocusOnNavigate) – kvůli čtečkám
   obrazovky ano, rámeček kolem nadpisu ne. */
.ad-page-title:focus {
    outline: none;
}

/* Na samostatné stránce se posouvá celá stránka – vnitřní posuvník seznamu
   modulů (z doby úzké karty Nastavení) už není potřeba. */
.ad-page-body .modules-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.ad-page-body > .settings-hint:first-child {
    margin: 0 0 1.25rem;
}

/* === Náhled TV v administraci (Components/Admin/PreviewCanvas.razor) ===
   Iframe má pevných 1920×1080 a zmenšuje se přes --preview-scale (počítá
   ResizeObserver v index.html podle šířky rámečku). */
.preview-canvas {
    position: relative;
    width: 100%;
    max-width: 56rem;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg);
    margin-top: 0.75rem;
}

    .preview-canvas iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 1920px;
        height: 1080px;
        border: 0;
        transform-origin: 0 0;
        transform: scale(var(--preview-scale, 0.3));
        pointer-events: none;
    }

.preview-caption {
    max-width: 56rem;
    margin-top: 0.4rem;
    color: var(--muted);
    font-size: 0.8rem;
}

/* === Časová osa (Components/Admin/ScheduleTimeline.razor) === */
.tl {
    margin: 1rem 0 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.tl-row {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    align-items: center;
    gap: 0.6rem;
}

.tl-label {
    font: inherit;
    font-size: 0.82rem;
    color: var(--muted);
    background: none;
    border: none;
    padding: 0;
    text-align: left;
    cursor: pointer;
}

.tl-row--current .tl-label {
    color: var(--accent);
    font-weight: 600;
}

.tl-track {
    position: relative;
    height: 2.6rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.tl-track--hours {
    height: 1.2rem;
    background: none;
    border: none;
    overflow: visible;
}

.tl-hour {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--muted);
}

.tl-lesson {
    position: absolute;
    bottom: 0;
    height: 0.35rem;
    background: rgba(148, 163, 184, 0.45);
}

.tl-seg {
    position: absolute;
    top: 0;
    bottom: 0.35rem;
    margin: 0;
    padding: 0 0.35rem;
    border: none;
    border-right: 1px solid var(--bg);
    background: var(--seg);
    color: #0b1121;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    text-align: left;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    cursor: pointer;
    opacity: 0.85;
}

    .tl-seg:hover {
        opacity: 1;
    }

    .tl-seg span {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.tl-now,
.tl-selected {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    transform: translateX(-1px);
    pointer-events: none;
}

.tl-now {
    background: #f87171;
}

.tl-selected {
    background: #fff;
    box-shadow: 0 0 0 1px #0b1121;
}

.tl-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.tl-swatch {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 3px;
    margin-right: 0.35rem;
    vertical-align: -1px;
}

.tl-swatch--lesson {
    background: rgba(148, 163, 184, 0.45);
}

/* === Editor režimu – drag & drop (SchedulePanel) === */
.mode-editor {
    display: grid;
    grid-template-columns: 13rem minmax(0, 1fr);
    gap: 1.25rem;
    margin-top: 1rem;
}

.mode-palette {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

    .mode-palette .settings-hint {
        font-size: 0.8rem;
        margin: 0 0 0.25rem;
    }

.mode-palette-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.mode-chip {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.85rem;
    text-align: left;
    cursor: grab;
    user-select: none;
}

    .mode-chip:hover {
        border-color: var(--accent);
    }

.mode-chip--off {
    opacity: 0.5;
}

.mode-chip--picked {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35);
}

.mode-chip--placed {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.4);
}

    .mode-chip--placed button {
        font: inherit;
        font-size: 0.8rem;
        line-height: 1;
        padding: 0.15rem 0.35rem;
        border: 1px solid var(--border);
        border-radius: 4px;
        background: var(--bg);
        color: var(--text);
        cursor: pointer;
    }

.mode-chip-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mode-weight {
    font-variant-numeric: tabular-nums;
    color: var(--accent);
    font-weight: 600;
    min-width: 1.6rem;
    text-align: center;
}

.mode-canvas {
    aspect-ratio: 16 / 9;
    gap: 0.6rem;
    padding: 0.6rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

    /* Lišta v editoru potřebuje místo na čipy (na TV má výšku podle obsahu). */
    .mode-canvas.kiosk-layout--hero-strip,
    .mode-canvas.kiosk-layout--hero-side-strip {
        grid-template-rows: minmax(0, 1fr) minmax(5.5rem, auto);
    }

.mode-drop {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.6rem;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
}

.mode-drop--armed {
    border-color: rgba(56, 189, 248, 0.6);
    cursor: copy;
}

.mode-drop-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.mode-drop-warning {
    margin: auto;
    font-size: 0.8rem;
    color: #fbbf24;
    text-align: center;
}

.mode-drop-empty {
    margin: auto;
    font-size: 0.8rem;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 1100px) {
    .mode-editor {
        grid-template-columns: minmax(0, 1fr);
    }

    .mode-palette {
        flex-direction: row;
        flex-wrap: wrap;
    }

        .mode-palette .settings-hint,
        .mode-palette-title {
            flex-basis: 100%;
        }
}

/* ===== Vlastní moduly (Pages/Carousel/CustomModulePage.razor) ===== */
.page-custom-text,
.page-custom-list {
    --custom-accent: var(--accent);
}

.page-custom-text {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.custom-text-card {
    max-width: 70rem;
    padding: 3rem 4rem;
    border-left: 0.5rem solid var(--custom-accent);
    background: var(--surface);
    border-radius: 1rem;
    text-align: left;
}

.custom-text-icon {
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 1.5rem;
}

.custom-text-title {
    font-size: 3.5rem;
    font-weight: 600;
    margin: 0 0 1.5rem;
    color: var(--custom-accent);
    line-height: 1.15;
}

.custom-text-body {
    font-size: 2rem;
    line-height: 1.5;
    margin: 0;
    white-space: pre-line;
    color: var(--text);
}

.page-custom-text {
    overflow: hidden;
}

/* S QR kódem: text vlevo, kód vpravo (v bočním sloupci pod textem). */
.custom-text-card--qr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3rem;
    align-items: center;
}

.custom-text-qr .qr-corner {
    position: static;
}

.slot--compact .custom-text-card--qr {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.slot--compact .custom-text-qr {
    justify-self: start;
}

.slot--compact .custom-text-card {
    padding: 1.5rem 1.75rem;
    border-left-width: 0.35rem;
}

.slot--compact .custom-text-icon {
    font-size: 2.75rem;
    margin-bottom: 0.75rem;
}

.slot--compact .custom-text-title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.slot--compact .custom-text-body {
    font-size: 1.15rem;
}

.custom-strip {
    --custom-accent: var(--accent);
    display: flex;
    align-items: baseline;
    gap: 1.25rem;
    padding: 1rem 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 0.35rem solid var(--custom-accent);
    border-radius: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
}

.custom-strip-icon {
    font-size: 1.6rem;
}

.custom-strip-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--custom-accent);
}

.custom-strip-text {
    font-size: 1.6rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-custom-poster {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.custom-poster-image {
    width: 100%;
    height: 100%;
    border-radius: 0.75rem;
}

.custom-poster-image--contain {
    object-fit: contain;
}

.custom-poster-image--cover {
    object-fit: cover;
}

.page-custom-list .page-heading {
    color: var(--custom-accent);
}

.custom-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 2rem;
    line-height: 1.4;
}

.custom-list li {
    padding: 0.6rem 0 0.6rem 2.25rem;
    position: relative;
    break-inside: avoid;
}

.custom-list li::before {
    content: "";
    position: absolute;
    left: 0.25rem;
    top: 1.25rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: var(--custom-accent);
}

.custom-list--columns {
    columns: 2;
    column-gap: 4rem;
}

.slot--compact .custom-list {
    font-size: 1.2rem;
}

.slot--compact .custom-list li {
    padding: 0.4rem 0 0.4rem 1.5rem;
}

.slot--compact .custom-list li::before {
    top: 0.85rem;
    width: 0.55rem;
    height: 0.55rem;
}

.page-custom-web {
    height: 100%;
    padding: 0;
}

.custom-web-frame {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0.75rem;
    background: #fff;
}

/* Administrace – Vlastní moduly a nadpisy */
.custom-kind-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 0.75rem;
}

.custom-kind {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 1rem;
    text-align: left;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    cursor: pointer;
}

.custom-kind:hover {
    border-color: var(--accent);
}

.custom-kind span:last-child {
    font-size: 0.85rem;
    color: var(--muted);
}

.custom-kind-icon {
    font-size: 1.75rem;
}

.custom-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 1.5rem;
    align-items: start;
}

.custom-editor-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.custom-icon-input {
    width: 4rem;
    text-align: center;
    font-size: 1.2rem;
}

.custom-color-input {
    width: 3rem;
    height: 2.25rem;
    padding: 0.1rem;
}

.custom-duration-input {
    width: 5rem;
}

.custom-mode-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

.heading-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.heading-row {
    display: grid;
    grid-template-columns: 12rem minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
}

@media (max-width: 1100px) {
    .custom-editor {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .heading-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}

.heading-row input,
.custom-icon-input,
.custom-duration-input {
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
}

.heading-row input:focus,
.custom-icon-input:focus,
.custom-duration-input:focus {
    outline: none;
    border-color: var(--accent);
}

.custom-color-input {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

/* Odkazy v nápovědách administrace (výchozí modrá na tmavém pozadí nejde přečíst). */
.settings-hint a {
    color: var(--accent);
}

.custom-icon-input {
    font-size: 1.2rem;
    text-align: center;
}

/* === Halloween – jump scare (Components/JumpScare.razor) === */
.jumpscare {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #000;
    pointer-events: none;
    animation: jumpscare-flash 2.6s ease-out forwards, jumpscare-shake 0.12s linear 0.35s 6;
}

.jumpscare-face {
    width: 34vh;
    height: auto;
    filter: drop-shadow(0 0 3rem rgba(239, 68, 68, 0.55));
    animation: jumpscare-face 2.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes jumpscare-flash {
    0% { opacity: 0; }
    6% { opacity: 1; background: #fff; }
    12% { background: #000; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes jumpscare-face {
    0% { transform: scale(0.1); opacity: 0; }
    14% { transform: scale(1.6); opacity: 1; }
    22% { transform: scale(1.35); }
    80% { transform: scale(1.5); opacity: 1; }
    100% { transform: scale(2.4); opacity: 0; }
}

@keyframes jumpscare-shake {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-1.2rem, 0.6rem); }
    75% { transform: translate(1.2rem, -0.6rem); }
}

/* Kdo má v systému vypnuté animace, dostane jen klidné, krátké zobrazení. */
@media (prefers-reduced-motion: reduce) {
    .jumpscare,
    .jumpscare-face {
        animation: none;
    }
}

/* === Nouzové hlášení (MainLayout, Administrace → Nouzové hlášení) === */
.emergency {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    padding: 4rem 6rem;
    text-align: center;
    color: #fff;
    background: #7f1d1d;
    animation: emergency-pulse 1.6s ease-in-out infinite;
}

.emergency-icon {
    font-size: 9rem;
    line-height: 1;
}

.emergency-text {
    max-width: 80rem;
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.2;
    text-wrap: balance;
}

.emergency-since {
    font-size: 1.75rem;
    opacity: 0.85;
}

@keyframes emergency-pulse {
    0%, 100% { background: #7f1d1d; }
    50% { background: #dc2626; }
}

@media (prefers-reduced-motion: reduce) {
    .emergency {
        animation: none;
        background: #b91c1c;
    }
}

/* Administrace – nouzové hlášení a displeje */
.emergency-admin-active {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    background: rgba(220, 38, 38, 0.18);
    border: 1px solid #dc2626;
    color: var(--text);
}

.emergency-admin-active strong {
    color: #f87171;
}

.emergency-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.settings-save--danger {
    background: #dc2626;
    color: #fff;
}

.device-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.device-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg);
}

.device-dot {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background: #ef4444;
}

.device-dot--online {
    background: #22c55e;
}

.device-name-input {
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--text);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.4rem;
    width: 100%;
    max-width: 28rem;
}

.device-name-input:hover,
.device-name-input:focus {
    outline: none;
    border-color: var(--border);
    background: var(--surface);
}

.device-meta {
    font-size: 0.85rem;
    color: var(--muted);
    padding-left: 0.4rem;
}

.device-meta--warn {
    color: #fbbf24;
}

.device-actions {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 640px) {
    .device-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .device-actions {
        grid-column: 1 / -1;
    }
}

.message-day {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* === Anketa (Pages/Carousel/PollPage.razor, Pages/StudentPoll.razor) === */
.poll-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3rem;
    align-items: center;
}

.poll-question {
    font-size: 2.6rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 2rem;
}

.poll-results {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.poll-option-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
}

.poll-option-value {
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
}

.poll-option-value small {
    font-weight: 400;
    color: var(--muted);
}

.poll-bar {
    height: 1.1rem;
    border-radius: 999px;
    background: var(--surface);
    overflow: hidden;
}

.poll-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--accent);
    transition: width 0.8s ease;
}

.poll-total {
    margin-top: 1.5rem;
    font-size: 1.2rem;
    color: var(--muted);
}

.slot--compact .poll-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.slot--compact .poll-question {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.slot--compact .poll-option-head {
    font-size: 1.05rem;
}

.slot--compact .poll-bar {
    height: 0.7rem;
}

.slot--compact .poll-qr .qr-corner {
    position: static;
}

.student-poll-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 1rem 0;
}

.student-poll-option {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    font-family: var(--font-main);
    font-size: 1.05rem;
    text-align: left;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    overflow: hidden;
}

.student-poll-option > span {
    position: relative;
    z-index: 1;
}

.student-poll-option--mine {
    border-color: var(--accent);
    font-weight: 600;
}

.student-poll-share {
    color: var(--accent);
}

.student-poll-bar {
    position: absolute;
    inset: 0 auto 0 0;
    background: rgba(56, 189, 248, 0.15);
}

.poll-admin {
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg);
    margin-bottom: 0.75rem;
}

.poll-admin-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

/* Administrace – ovladač a statistiky */
.remote-durations {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.remote-chip {
    font-family: var(--font-main);
    font-size: 0.95rem;
    padding: 0.45rem 0.9rem;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
}

.remote-chip--on {
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

.remote-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: 0.6rem;
}

.remote-button {
    min-height: 3.5rem;
    padding: 0.75rem;
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
}

.remote-button:hover,
.remote-button:focus-visible {
    border-color: var(--accent);
    outline: none;
}

.stats-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.stats-row {
    display: grid;
    grid-template-columns: 12rem minmax(0, 1fr) 9rem;
    gap: 1rem;
    align-items: center;
}

.stats-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stats-track {
    height: 0.9rem;
}

.stats-fill {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: 0 4px 4px 0;
    background: var(--accent);
}

.stats-value {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.stats-value small {
    color: var(--muted);
    margin-left: 0.25rem;
}

@media (max-width: 640px) {
    .stats-row {
        grid-template-columns: 1fr auto;
    }

    .stats-track {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

/* === Volné učebny (Pages/Carousel/FreeRoomsPage.razor, Pages/Admin/FreeRooms.razor) === */
.free-rooms-status {
    font-size: 1.4rem;
    color: var(--muted);
}

.free-rooms-grid {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 3rem;
}

.free-rooms-when {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.free-rooms-when span {
    display: block;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--muted);
    margin-top: 0.2rem;
}

.free-rooms-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.free-rooms-list li {
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--accent);
}

.free-rooms-none {
    font-size: 1.3rem;
    color: var(--muted);
}

.slot--compact .free-rooms-when {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.slot--compact .free-rooms-list {
    gap: 0.5rem;
}

.slot--compact .free-rooms-list li {
    font-size: 1.05rem;
    padding: 0.35rem 0.7rem;
}

.free-rooms-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin: 1rem 0;
}

/* === Ovzduší a UV (Pages/Carousel/AirQualityPage.razor, řádek v počasí) === */
.page-air {
    --air-good: #4ade80;
    --air-fair: #a3e635;
    --air-moderate: #facc15;
    --air-poor: #fb923c;
    --air-bad: #f87171;
    --air-extreme: #c084fc;
}

.air-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.5rem;
}

.air-card {
    --air-color: var(--accent);
    padding: 1.75rem 2rem;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 0.5rem solid var(--air-color);
}

.air-card--good, .air-card--uv-low { --air-color: var(--air-good); }
.air-card--fair { --air-color: var(--air-fair); }
.air-card--moderate, .air-card--uv-moderate { --air-color: var(--air-moderate); }
.air-card--poor, .air-card--uv-high { --air-color: var(--air-poor); }
.air-card--verypoor, .air-card--uv-veryhigh { --air-color: var(--air-bad); }
.air-card--extremelypoor, .air-card--uv-extreme { --air-color: var(--air-extreme); }

.air-card-label {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.air-card-value {
    font-size: 2.6rem;
    font-weight: 700;
    margin: 0.35rem 0;
}

.air-card-detail {
    font-size: 1.15rem;
    color: var(--muted);
}

.air-card-advice {
    margin-top: 1rem;
    font-size: 1.35rem;
    line-height: 1.35;
}

.air-source {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: var(--muted);
}

.slot--compact .air-cards {
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.slot--compact .air-card {
    padding: 1rem 1.25rem;
}

.slot--compact .air-card-value {
    font-size: 1.5rem;
}

.slot--compact .air-card-advice {
    font-size: 1rem;
    margin-top: 0.5rem;
}

.weather-air {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    margin: 1.25rem 0;
    font-size: 1.25rem;
    color: var(--muted);
}

.weather-air strong {
    color: var(--text);
}

.weather-air--warning {
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-md);
    background: rgba(251, 146, 60, 0.12);
    border: 1px solid rgba(251, 146, 60, 0.45);
    color: var(--text);
}

.weather-air-advice {
    font-weight: 600;
}

.slot--compact .weather-air {
    font-size: 0.95rem;
    gap: 0.25rem 1rem;
}
