/* Tým Restartujem: obal appky (přihlášení, levé menu, účet, stránky Rozcestník, Návody,
   Nastavení a Přístupy). Vývěska má vlastní vzhled ve vyveska.css (vše pod .vyveska).

   Tokeny vychází z appky podpora (stejné české názvy), se třemi změnami:
   - Montserrat jen na nadpisy (i záhlaví tabulky jako v podpoře), text systémovým písmem jako Web SDK,
     14 px jako ostatní interní appky,
   - primární tlačítko je zelená plocha s tmavým textem (7 : 1; bílá na #5fbd22 má jen 2,4 : 1),
   - zelený text je tmavší #376f12 (5,5 : 1 i na světle zeleném pozadí aktivní položky).
   Tmavý režim: automaticky podle systému, ruční volba přes data-theme na <html>
   (Nastavení → Vzhled). Písma jsou vlastní (fonts/, licence OFL), nic se nestahuje z Googlu. */

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("fonts/montserrat-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("fonts/montserrat-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Caveat: ručně psané poznámky na Vývěsce. Stáhne se, až ho Vývěska použije. */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("fonts/caveat-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("fonts/caveat-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --zelena: #5fbd22;
  --zelena-svetla: #6cc52f;
  --na-zelene: #14210a;
  --zelena-text: #376f12;
  --fokus: #3d7f13;
  --text: #2b2b2b;
  --text-slaby: #6b6b6b;
  --linka: #e7e7e4;
  --linka-hover: #d2d2cd;
  --plocha: #f7f7f5;
  --bila: #fff;
  --bila-hover: #f2f2ef;
  --radek-vybrany: #eef7e8;
  --ikona-plocha: #eef7e8;
  --cip: #f2f2ef;
  --cip-text: #555;
  --cervena: #b8332f;
  --hl-chyba: #fbe9e7;
  --hl-ok: #eaf6e2;
  --hl-varovani: #fdf3dc;
  --hl-varovani-t: #7a5600;
  --tip-plocha: #2b2b2b;
  --tip-text: #fff;
  --stin: rgba(0, 0, 0, .08);
  --clona: rgba(0, 0, 0, .3);
  --logo-filtr: none;
  --nadpis: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --text-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --menu-s: 232px;
  --prepinac-okraj: transparent;
  --vyveska-okoli: #F3F2EF; /* stejné jako --vy-wall ve vyveska.css: kolem nástěnky žádný druhý šedý rám */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --zelena-text: #8fd65c;
    --fokus: #8fd65c;
    --text: #e6e6e6;
    --text-slaby: #a0a0a0;
    --linka: #2f2f2f;
    --linka-hover: #474747;
    --plocha: #121212;
    --bila: #1b1b1b;
    --bila-hover: #252525;
    --radek-vybrany: #243320;
    --ikona-plocha: #22301c;
    --cip: #262626;
    --cip-text: #c4c4c4;
    --cervena: #ef6b67;
    --hl-chyba: #3d1b1a;
    --hl-ok: #1f3315;
    --hl-varovani: #3a2c10;
    --hl-varovani-t: #f3c366;
    --tip-plocha: #e6e6e6;
    --tip-text: #121212;
    --stin: rgba(0, 0, 0, .5);
    --clona: rgba(0, 0, 0, .6);
    --logo-filtr: invert(.9) hue-rotate(180deg);
    --prepinac-okraj: #474747;
    --vyveska-okoli: transparent;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --zelena-text: #8fd65c;
  --fokus: #8fd65c;
  --text: #e6e6e6;
  --text-slaby: #a0a0a0;
  --linka: #2f2f2f;
  --linka-hover: #474747;
  --plocha: #121212;
  --bila: #1b1b1b;
  --bila-hover: #252525;
  --radek-vybrany: #243320;
  --ikona-plocha: #22301c;
  --cip: #262626;
  --cip-text: #c4c4c4;
  --cervena: #ef6b67;
  --hl-chyba: #3d1b1a;
  --hl-ok: #1f3315;
  --hl-varovani: #3a2c10;
  --hl-varovani-t: #f3c366;
  --tip-plocha: #e6e6e6;
  --tip-text: #121212;
  --stin: rgba(0, 0, 0, .5);
  --clona: rgba(0, 0, 0, .6);
  --logo-filtr: invert(.9) hue-rotate(180deg);
  --prepinac-okraj: #474747;
  --vyveska-okoli: transparent;
}

/* ── základ ── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font-family: var(--text-font); font-size: 14px; line-height: 1.5;
  background: var(--plocha); color: var(--text);
}
h1, h2, h3 { font-family: var(--nadpis); margin: 0; line-height: 1.3; }
p { margin: 0; }
a { color: inherit; }
.potichu { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
svg.ik { width: 16px; height: 16px; flex: 0 0 16px; display: block; }

button {
  font: inherit; font-size: 13px; line-height: 1.3; cursor: pointer;
  border: 1px solid var(--linka); background: var(--bila); color: var(--text);
  padding: 7px 12px; border-radius: 8px;
}
button:hover { border-color: var(--linka-hover); background: var(--bila-hover); }
button:disabled { opacity: .5; cursor: default; }
button.hlavni { background: var(--zelena); border-color: var(--zelena); color: var(--na-zelene); font-weight: 600; }
button.hlavni:hover:not(:disabled) { background: var(--zelena-svetla); border-color: var(--zelena-svetla); }
button.nebezpecne { color: var(--cervena); }
button.siroke { width: 100%; padding: 10px 14px; font-size: 14px; }
input, select, textarea {
  font: inherit; font-size: 14px; padding: 7px 10px; min-width: 0;
  border: 1px solid var(--linka); border-radius: 8px; background: var(--bila); color: var(--text);
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--fokus); outline-offset: -1px; border-color: transparent; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }
.obsah:focus { outline: none; }

.hlaska { padding: 10px 12px; border-radius: 8px; font-size: 13px; display: none; }
.hlaska.chyba { background: var(--hl-chyba); color: var(--cervena); display: block; }
.hlaska.ok { background: var(--hl-ok); color: var(--zelena-text); display: block; }
.hlaska.varovani { background: var(--hl-varovani); color: var(--hl-varovani-t); display: block; }

/* ── přihlášení ── */
.prihlaseni { min-height: 100vh; display: flex; justify-content: center; align-items: flex-start; padding: 14vh 16px 24px; }
.prihlaseni-karta {
  width: 100%; max-width: 380px; background: var(--bila); border: 1px solid var(--linka);
  border-radius: 14px; padding: 30px 28px 22px; box-shadow: 0 12px 40px var(--stin);
}
.prihlaseni-logo { display: block; height: 20px; width: auto; margin-bottom: 22px; filter: var(--logo-filtr); }
.prihlaseni h1 { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; margin-bottom: 6px; }
.prihlaseni-karta > p { color: var(--text-slaby); margin-bottom: 20px; }
.prihlaseni .hlaska { margin-bottom: 14px; }
.prihlaseni .poznamka { margin: 14px 0 0; font-size: 12px; color: var(--text-slaby); text-align: center; }

/* ── rozvržení ── */
.app { position: fixed; inset: 0; display: grid; grid-template-columns: var(--menu-s) minmax(0, 1fr); }
.menu {
  position: relative; background: var(--bila); border-right: 1px solid var(--linka);
  display: flex; flex-direction: column; min-height: 0; min-width: 0;
}
.menu-hlava { display: flex; align-items: center; justify-content: flex-start; gap: 6px; height: 56px; padding: 0 12px; flex: none; }
.znacka { display: flex; align-items: center; gap: 9px; min-width: 0; text-decoration: none; color: var(--text); border-radius: 6px; }
.znacka img { display: block; height: 16px; width: auto; filter: var(--logo-filtr); }
.znacka-tym {
  font-family: var(--nadpis); font-weight: 800; font-size: 14px; letter-spacing: -0.1px;
  color: var(--zelena-text); padding-left: 9px; border-left: 1px solid var(--linka); line-height: 18px;
}
.ikona-tl {
  position: relative; flex: none; width: 32px; height: 32px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--text-slaby); border-radius: 8px;
}
.ikona-tl:hover { background: var(--bila-hover); color: var(--text); }

.menu-polozky { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; }
.polozka {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: 14px; line-height: 20px; white-space: nowrap;
}
.polozka svg.ik { color: var(--text-slaby); }
.polozka:hover { background: var(--bila-hover); }
.polozka.akt { background: var(--radek-vybrany); color: var(--zelena-text); font-weight: 600; }
.polozka.akt svg.ik { color: currentColor; }
.polozka .text { overflow: hidden; text-overflow: ellipsis; }

/* účet vlevo dole: tlačítko a nahoru otevřené menu */
.ucet { position: relative; flex: none; padding: 8px; border-top: 1px solid var(--linka); }
.ucet-tl {
  position: relative; width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px;
  border: 0; background: transparent; border-radius: 8px; text-align: left; color: var(--text);
}
.ucet-tl:hover, .ucet-tl[aria-expanded="true"] { background: var(--bila-hover); }
.avatar {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--zelena); color: var(--na-zelene);
  font: 700 12px/30px var(--nadpis); text-align: center; letter-spacing: .02em;
}
.avatar.velky { flex-basis: 48px; width: 48px; height: 48px; font-size: 17px; line-height: 48px; }
.ucet-text { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.ucet-jmeno, .ucet-email { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ucet-jmeno { font-weight: 600; font-size: 13px; }
.ucet-email { font-size: 12px; color: var(--text-slaby); }
.ucet-sipka { color: var(--text-slaby); display: flex; }

.ucet-menu {
  position: absolute; left: 8px; bottom: calc(100% - 4px); z-index: 40; width: 256px; max-width: calc(100vw - 16px);
  background: var(--bila); border: 1px solid var(--linka); border-radius: 12px;
  box-shadow: 0 12px 40px var(--stin); padding: 6px;
}
.ucet-menu .hlavicka-menu { padding: 8px 10px 10px; border-bottom: 1px solid var(--linka); margin-bottom: 4px; }
.ucet-menu .hlavicka-menu strong { display: block; font-size: 13px; }
.ucet-menu .hlavicka-menu span { display: block; font-size: 12px; color: var(--text-slaby); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.volba {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 0; background: transparent; border-radius: 8px; text-align: left; font-size: 13.5px; color: var(--text);
}
.volba:hover, .volba:focus-visible { background: var(--bila-hover); }
.volba svg.ik { color: var(--text-slaby); }
.ucet-menu hr { border: 0; border-top: 1px solid var(--linka); margin: 4px 0; }
.vzhled-radek { padding: 6px 10px 8px; }
.vzhled-radek .popisek { display: block; font-size: 12px; color: var(--text-slaby); margin-bottom: 6px; }
.prepinac { display: flex; gap: 2px; padding: 2px; background: var(--plocha); border: 1px solid var(--linka); border-radius: 9px; }
.prepinac button { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; padding: 6px 8px; font-size: 12.5px; border-radius: 7px; color: var(--text-slaby); white-space: nowrap; }
.prepinac button:hover { background: transparent; color: var(--text); }
.prepinac button[aria-checked="true"] { background: var(--bila); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px var(--stin), 0 0 0 1px var(--prepinac-okraj); }

.menu-clona { position: fixed; inset: 0; background: var(--clona); z-index: 19; }

/* ── plocha a stránky ── */
.plocha { min-width: 0; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.horni-lista { display: none; }
.obsah { flex: 1; padding: 32px 36px 56px; }
.obsah.na-sirku { padding: 16px 16px 40px; background: var(--vyveska-okoli); }
.stranka { max-width: 1040px; margin: 0 auto; }
/* varování serveru nad stránkou (snímek skupin nejde ověřit) */
.obsah > .hlaska.varovani { max-width: 1040px; margin: 0 auto 20px; }
.obsah.na-sirku > .hlaska.varovani { max-width: none; margin: 0 0 12px; }
.stranka-hlava { margin-bottom: 26px; }
.stranka-hlava h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.4px; margin-bottom: 4px; }
.stranka-hlava p { color: var(--text-slaby); max-width: 64ch; }

.nacitani { color: var(--text-slaby); padding: 40px 0; text-align: center; }
.prazdno { max-width: 440px; margin: 9vh auto 0; text-align: center; }
.prazdno-ikona {
  width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--ikona-plocha); color: var(--zelena-text);
}
.prazdno-ikona svg.ik { width: 22px; height: 22px; flex-basis: 22px; }
.prazdno h2 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.prazdno p { color: var(--text-slaby); }
.prazdno button { margin-top: 16px; }

/* Rozcestník a Návody: klidná mřížka odkazů po skupinách */
.odkazy-skupina + .odkazy-skupina { margin-top: 30px; }
.odkazy-skupina h2 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.odkazy-skupina > p { color: var(--text-slaby); margin-bottom: 12px; font-size: 13px; }
.odkazy-skupina h2 + ul { margin-top: 12px; }
.mrizka { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mrizka li { display: flex; min-width: 0; }
.odkaz {
  flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 14px 13px;
  background: var(--bila); border: 1px solid var(--linka); border-radius: 12px; text-decoration: none; color: var(--text);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.odkaz:hover { border-color: var(--linka-hover); box-shadow: 0 3px 14px var(--stin); }
.odkaz-ikona {
  flex: 0 0 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  background: var(--ikona-plocha); color: var(--zelena-text);
}
.odkaz-ikona svg.ik { width: 18px; height: 18px; flex-basis: 18px; }
.odkaz-text { flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; }
.odkaz-nazev { display: block; font-weight: 600; font-size: 14px; line-height: 1.35; }
.odkaz-popis { margin-top: 3px; font-size: 13px; line-height: 1.45; color: var(--text-slaby); }
.odkaz-pro { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding-top: 8px; }
.cip { display: inline-block; font-size: 11.5px; line-height: 18px; padding: 0 8px; border-radius: 999px; background: var(--cip); color: var(--cip-text); white-space: nowrap; }
.cip.zelena { background: var(--radek-vybrany); color: var(--zelena-text); }
/* komu se odkaz ukazuje (jen správci): tichý řádek dole v kartě, ne štítek */
.odkaz-pro .cip { background: none; padding: 0; border-radius: 0; color: var(--text-slaby); font-size: 12px; line-height: 1.4; white-space: normal; }

/* Nastavení */
.karty { display: grid; gap: 16px; max-width: 760px; }
.karta { background: var(--bila); border: 1px solid var(--linka); border-radius: 12px; padding: 18px 20px; }
.karta h2 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.karta > p { color: var(--text-slaby); }
.karta .hlaska { margin-top: 12px; }
.profil { display: flex; align-items: center; gap: 14px; }
.profil strong { display: block; font-size: 16px; }
.profil > div > span { color: var(--text-slaby); }
.cipy { display: flex; flex-wrap: wrap; gap: 6px; }
.seznam-sekci { list-style: none; margin: 0; padding: 0; }
.seznam-sekci li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--linka); }
.seznam-sekci li:first-child { border-top: 0; padding-top: 0; }
.seznam-sekci li svg.ik { color: var(--text-slaby); }
.seznam-sekci .cip { margin-left: auto; }
.drobne { font-size: 12.5px; color: var(--text-slaby); margin-top: 10px; }
.karta .prepinac { max-width: 360px; }
.karta .pod-textem { margin-top: 12px; }
.nadpis-tabulky { font-size: 16px; font-weight: 700; margin: 28px 0 10px; }

/* Přístupy */
.formular { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 12px; align-items: end; }
.formular label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-slaby); min-width: 0; }
.formular .pole-2 { grid-column: span 2; }
.formular .pole-3 { grid-column: span 3; }
.formular .pole-6 { grid-column: 1 / -1; }
.formular label.zaskrt { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 13.5px; padding-bottom: 8px; }
.formular .tlacitka { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.formular .hlaska { grid-column: 1 / -1; }
.tabulka-obal { overflow-x: auto; border: 1px solid var(--linka); border-radius: 12px; background: var(--bila); container-type: inline-size; }
table.tabulka { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tabulka th {
  font-family: var(--nadpis); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-slaby); text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--linka); white-space: nowrap;
}
.tabulka td { padding: 10px 12px; border-top: 1px solid var(--linka); vertical-align: top; }
.tabulka tr:first-child td { border-top: 0; }
.tabulka td.akce { white-space: nowrap; text-align: right; }
.tabulka td.akce button { padding: 4px 9px; font-size: 12.5px; }
.tabulka td.akce button + button { margin-left: 4px; }
.tabulka .komu { font-weight: 600; word-break: normal; overflow-wrap: break-word; }
.tabulka .mensi { display: block; font-size: 12px; color: var(--text-slaby); font-weight: 400; }
.cip.zakaz { background: var(--hl-chyba); color: var(--cervena); }
/* Úzký obal tabulky (telefon, ale i 1024 px s rozbaleným menu): řádky jako karty pod sebou. */
@container (max-width: 960px) {
  .tabulka thead { display: none; }
  .tabulka, .tabulka tbody, .tabulka tr, .tabulka td { display: block; width: 100%; }
  .tabulka tr { padding: 10px 12px; border-top: 1px solid var(--linka); }
  .tabulka tr:first-child { border-top: 0; }
  .tabulka td { border: 0; padding: 2px 0; }
  .tabulka td.akce { text-align: left; padding-top: 8px; }
}

dialog {
  border: 1px solid var(--linka); border-radius: 14px; padding: 20px; max-width: min(420px, calc(100vw - 32px));
  background: var(--bila); color: var(--text); box-shadow: 0 12px 40px var(--stin);
}
dialog::backdrop { background: var(--clona); }
dialog h2 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
dialog p { color: var(--text-slaby); }
dialog .tlacitka { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* toasty */
.toasty { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; max-width: calc(100vw - 32px); }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 420px;
  background: var(--bila); border: 1px solid var(--linka); border-radius: 12px; padding: 10px 14px;
  box-shadow: 0 12px 40px var(--stin); font-size: 13.5px; animation: pop .18s ease;
}
.toast.chyba { color: var(--cervena); }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } }

/* ── široká obrazovka: menu jde sbalit na lištu s ikonami ── */
@media (min-width: 761px) {
  .app { transition: grid-template-columns .18s ease; }
  .app.lista { --menu-s: 56px; }
  .app.lista .menu, .app.lista .menu-polozky { overflow: visible; }
  .app.lista .znacka { display: none; }
  .app.lista .menu-polozky { padding: 6px 8px; }
  .app.lista .polozka { justify-content: center; padding: 8px 0; }
  .app.lista .polozka .text { display: none; }
  .app.lista .ucet-tl { justify-content: center; padding: 6px 0; }
  .app.lista .ucet-text, .app.lista .ucet-sipka { display: none; }
  .app.lista .ucet-menu { left: calc(100% - 2px); bottom: 8px; }
  /* Popisek vedle ikony: na liště je jméno sekce jen tady (a v aria-label). */
  .app.lista [data-tip]:hover::after, .app.lista [data-tip]:focus-visible::after {
    content: attr(data-tip); position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
    background: var(--tip-plocha); color: var(--tip-text); font: 500 12px/1.3 var(--text-font);
    padding: 5px 9px; border-radius: 6px; white-space: nowrap; z-index: 50; pointer-events: none;
  }
  .app.lista .ucet-tl[aria-expanded="true"]::after { display: none; }
  /* Tlačítko sbalení má popisek i v rozbaleném menu, pod sebou (ne vedle, tam je logo). */
  .app:not(.lista) #sbalit[data-tip]:hover::after, .app:not(.lista) #sbalit[data-tip]:focus-visible::after {
    content: attr(data-tip); position: absolute; top: calc(100% + 6px); left: 0;
    background: var(--tip-plocha); color: var(--tip-text); font: 500 12px/1.3 var(--text-font);
    padding: 5px 9px; border-radius: 6px; white-space: nowrap; z-index: 50; pointer-events: none;
  }
  #otevrit-menu { display: none; }
}

/* ── úzká obrazovka: menu se vysouvá zleva přes obsah ── */
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .menu {
    position: fixed; top: 0; bottom: 0; left: 0; width: 280px; max-width: 86vw; z-index: 20;
    transform: translateX(-100%); visibility: hidden; box-shadow: 0 0 40px var(--stin);
    transition: transform .2s ease, visibility 0s linear .2s;
  }
  .app.menu-otevrene .menu { transform: none; visibility: visible; transition: transform .2s ease; }
  #sbalit { display: none; }
  .menu-hlava { padding: 0 10px 0 16px; }
  .horni-lista {
    display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 5; flex: none;
    height: 52px; padding: 0 12px 0 8px; background: var(--bila); border-bottom: 1px solid var(--linka);
  }
  .horni-titulek { font-family: var(--nadpis); font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .obsah { padding: 20px 16px 40px; }
  .obsah.na-sirku { padding: 12px 10px 32px; }
  .stranka-hlava { margin-bottom: 20px; }
  .stranka-hlava h1 { font-size: 21px; }
  .mrizka { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .formular { grid-template-columns: minmax(0, 1fr); }
  .formular .pole-2, .formular .pole-3 { grid-column: auto; }
  .karta { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .app, .menu, .odkaz { transition: none !important; }
  .toast { animation: none; }
}
