/* ==========================================================================
   MŠ kpt. Nálepky a Na Bystřičce – styly
   Cíl návrhu: WCAG 2.2 AA. Ověření a jeho rozsah jsou popsané v QA.md.
   ========================================================================== */

/* ---------- Písma (hostovaná lokálně, bez Google Fonts) ---------- */
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-latin-400.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; }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-latin-700.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; }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-latin-ext-700.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 700; font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-700.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; }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 700; font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-ext-700.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 800; font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-800.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; }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 800; font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-ext-800.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Proměnné ---------- */
:root {
  --cream: #FFF7E8;
  --paper: #FFFFFF;
  --ink: #16163F;
  --ink-2: #3B3B63;
  --sun: #FFC940;
  --sun-2: #FFE7A3;
  --red: #D92736;
  --red-soft: #FFE0E4;
  --green: #15703F;
  --green-soft: #D3F0DC;
  --blue: #2454C6;
  --blue-soft: #DCE9FF;
  --lilac-soft: #EAE0FF;

  --focus: var(--blue);
  --accent: var(--ink);
  --soft: var(--sun-2);

  --radius: 1.25rem;
  --line: 1.5px solid var(--ink);
  --shadow: 3px 3px 0 rgba(22, 22, 63, 0.16);
  --shadow-sm: 2px 2px 0 rgba(22, 22, 63, 0.16);

  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Bricolage Grotesque", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 74rem;
}

/* ---------- Základ ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
}
img, svg { max-width: 100%; height: auto; }
img { display: block; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 1.4rem + 4vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 2.75rem); }
h3 { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); font-weight: 700; }
h4 { font-size: 1.2rem; font-weight: 700; }
p, ul, ol, dl, table, figure { margin: 0 0 1rem; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 4px; }
strong, b { font-weight: 700; }
main:focus { outline: none; }

:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 3px;
  border-radius: 0.4rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.prose { max-width: 70ch; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.4rem; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 2rem; }
.muted { color: var(--ink-2); }
.list-reset { list-style: none; padding: 0; margin: 0; }
.mt-lg { margin-top: 2.5rem; }

/* Small visual control with a 44 px touch target, including on phones. */
.back-to-top { position: fixed; right: calc(0.75rem + env(safe-area-inset-right, 0px)); bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px)); z-index: 40; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.back-to-top::before { content: ""; position: absolute; inset: 0; border: var(--line); border-radius: 50%; background: var(--cream); box-shadow: var(--shadow-sm); }
.back-to-top svg { position: relative; }
.back-to-top:hover::before { background: var(--sun); }
.back-to-top[hidden] { display: none; }
.footer__bottom { padding-inline-end: 3.5rem; }
@media (max-width: 40rem) { .back-to-top::before { inset: 4px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Přeskočení na obsah ---------- */
.skip-link {
  position: absolute;
  left: 1rem; top: -10rem;
  z-index: 100;
  padding: 0.9rem 1.4rem;
  background: var(--sun);
  color: var(--ink);
  border: var(--line);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.skip-link:focus { top: 1rem; }

/* ---------- Horní lišta ---------- */
.topbar { background: var(--ink); color: var(--cream); --focus: var(--sun); font-size: 1rem; }
.topbar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding: 0.55rem 0; }
.topbar__list { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.topbar__label { opacity: 0.85; }
@media (max-width: 40rem) {
  .topbar__email { display: none; }
  .topbar__inner { gap: 0.4rem 1rem; }
}
.topbar a { color: var(--cream); font-weight: 700; }
.topbar .topbar__cta {
  display: inline-flex; align-items: center; gap: 0.35rem;
  min-height: 2.75rem;
  padding: 0.35rem 1rem;
  background: var(--sun);
  color: var(--ink);
  border-radius: 999px;
  font-family: var(--font-display);
  text-decoration: none;
}
.topbar .topbar__cta:hover { background: var(--paper); }

/* ---------- Hlavička ---------- */
.site-header { border-bottom: var(--line); background: var(--cream); }
.masthead { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; padding: 1.1rem 0 1.2rem; }
.brand { display: inline-flex; align-items: center; gap: 0.85rem; text-decoration: none; }
.brand__logo { width: 3.5rem; height: 3.5rem; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__small { font-weight: 700; font-size: 0.95rem; color: var(--ink-2); }
.brand__big { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.2rem, 1rem + 0.8vw, 1.55rem); letter-spacing: -0.01em; }
.brand__amp { color: var(--red); }
.brand:hover .brand__big { text-decoration: underline; text-decoration-thickness: 3px; }

/* ---------- Drobečková navigace ---------- */
.crumbs { background: var(--paper); border-bottom: var(--line); font-size: 1rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.25rem 0; list-style: none; margin: 0; padding: 0.7rem 0; }
.crumbs li + li::before { content: "/" / ""; margin: 0 0.6rem; color: var(--ink-2); }
.crumbs [aria-current] { font-weight: 700; }

/* ---------- Tlačítka ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3.1rem;
  padding: 0.7rem 1.5rem;
  background: var(--paper);
  color: var(--ink);
  border: var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  font: 800 1.1rem/1.2 var(--font-display);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 3px 3px 0 rgba(22, 22, 63, 0.2); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn--sun { background: var(--sun); }
.btn--ink { background: var(--ink); color: var(--cream); }
.btn--small { min-height: 2.75rem; padding: 0.45rem 1rem; font-size: 1rem; }
.btn svg { width: 1.2em; height: 1.2em; flex: none; }

/* ---------- Sekce ---------- */
.section { padding: clamp(2.8rem, 2rem + 2.5vw, 4.5rem) 0; }
.section--paper { background: var(--paper); border-block: var(--line); }
.section--sun { background: var(--sun); border-block: var(--line); }
.section--ink { background: var(--ink); color: var(--cream); --focus: var(--sun); border-block: var(--line); }
.section--ink a:not(.btn) { color: var(--cream); }
.section__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.75rem; }
.section__head h2 { margin: 0; }
.section__head p { margin: 0; max-width: 46ch; }
.kicker {
  display: inline-block;
  margin-bottom: 0.9rem;
  padding: 0.25rem 0.9rem;
  background: var(--paper);
  border: var(--line);
  border-radius: 999px;
  font: 700 1rem/1.4 var(--font-display);
}

/* ---------- Hero úvodní stránky ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(2.5rem, 1.5rem + 4vw, 5rem) 0 clamp(3rem, 2rem + 3vw, 4.5rem); }
.hero::before {
  content: ""; position: absolute; z-index: -1;
  width: 34rem; height: 34rem; right: -10rem; top: -12rem;
  background: var(--sun-2); border-radius: 50%;
}
.hero__grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 58rem) { .hero__grid { grid-template-columns: 1.15fr 0.85fr; } }
.hero h1 { margin-bottom: 1.25rem; }
.hl { background: linear-gradient(transparent 58%, var(--sun) 58%, var(--sun) 92%, transparent 92%); padding: 0 0.08em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.lead { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem); line-height: 1.5; max-width: 40ch; color: var(--ink-2); }

.hero__art { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); align-items: start; padding: 1rem 0 2rem; }
.polaroid {
  margin: 0;
  background: var(--paper);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.6rem 0.6rem 0;
}
.polaroid img { border-radius: 0.75rem; border: 2px solid var(--ink); width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
.polaroid figcaption { padding: 0.55rem 0.3rem 0.75rem; font: 700 1.05rem/1.2 var(--font-display); }
.polaroid figcaption::before { content: ""; display: inline-block; width: 0.8rem; height: 0.8rem; margin-right: 0.45rem; border: 2px solid var(--ink); border-radius: 50%; background: var(--accent); vertical-align: -0.05em; }
.hero__art .polaroid:nth-child(1) { grid-column: 1 / 5; grid-row: 1; position: relative; z-index: 1; transform: rotate(-3deg); --accent: var(--red); }
.hero__art .polaroid:nth-child(2) { grid-column: 3 / 7; grid-row: 1; margin-top: 48%; transform: rotate(3deg); --accent: var(--blue); }
.sticker {
  position: absolute; z-index: 2; right: 0; top: 0;
  display: grid; place-items: center; text-align: center;
  width: 7.5rem; height: 7.5rem;
  background: var(--sun);
  border: var(--line);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  font: 800 1.05rem/1.1 var(--font-display);
  transform: rotate(10deg);
}
.sticker strong { display: block; font-size: 1.7rem; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 3rem 0 0; }
.facts li { background: var(--paper); border: var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; box-shadow: var(--shadow-sm); }
.facts strong { display: block; font: 800 clamp(2rem, 1.5rem + 2vw, 2.8rem)/1 var(--font-display); letter-spacing: -0.03em; }
.facts li:nth-child(1) { background: var(--red-soft); }
.facts li:nth-child(2) { background: var(--green-soft); }
.facts li:nth-child(3) { background: var(--blue-soft); }
.facts li:nth-child(4) { background: var(--sun-2); }

/* ---------- Mřížky a karty ---------- */
.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 2rem; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }

.card {
  position: relative;
  background: var(--paper);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}
.card > :last-child { margin-bottom: 0; }
.card h3 { margin-bottom: 0.5rem; }
.card--link { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.card--link:hover { transform: translateY(-2px); box-shadow: 3px 5px 0 rgba(22, 22, 63, 0.2); }
.card--link:focus-within { outline: 4px solid var(--focus); outline-offset: 4px; }
.stretched { text-decoration: none; }
.stretched:focus-visible { outline: none; }
.stretched::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card--link:hover .stretched { text-decoration: underline; }

.icon {
  display: grid; place-items: center;
  width: 3.5rem; height: 3.5rem;
  margin-bottom: 1rem;
  background: var(--soft);
  border: var(--line);
  border-radius: 1rem;
}
.icon svg { width: 1.9rem; height: 1.9rem; }
.tile:nth-child(6n+1) { --soft: var(--red-soft); }
.tile:nth-child(6n+2) { --soft: var(--sun-2); }
.tile:nth-child(6n+3) { --soft: var(--green-soft); }
.tile:nth-child(6n+4) { --soft: var(--blue-soft); }
.tile:nth-child(6n+5) { --soft: var(--lilac-soft); }
.tile:nth-child(6n+6) { --soft: var(--red-soft); }
.tile p { color: var(--ink-2); }

/* ---------- Karty školek ---------- */
.school { --accent: var(--red); --soft: var(--red-soft); padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.school--blue { --accent: var(--blue); --soft: var(--blue-soft); }
.school__head { background: var(--accent); color: var(--paper); padding: 1.25rem 1.5rem; border-bottom: var(--line); }
.school__head h3 { margin: 0; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); font-weight: 800; }
.school__head p { margin: 0.2rem 0 0; font-weight: 700; }
.school img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: var(--line); }
.school__body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; flex: 1; }
.school__body .btn { align-self: flex-start; margin-top: auto; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0 0 1rem; padding: 0; }
.chips li { background: var(--soft); border: 2px solid var(--ink); border-radius: 999px; padding: 0.2rem 0.85rem; font-weight: 700; }

/* Consistent decorative class identities throughout the public website. */
.class-mascot, .school .class-mascot { width: 3.25rem; height: 3.25rem; aspect-ratio: 1; flex: none; object-fit: contain; border: 0; }
.class-heading { display: flex; align-items: center; gap: 0.8rem; }
.class-heading > span, .class-heading > h1 { min-width: 0; }
.class-heading--hero { gap: 1.25rem; margin-bottom: 0.75rem; }
.class-heading--hero h1 { margin: 0; }
.class-mascot--hero { width: 7rem; height: 7rem; }
.chips li.class-chip { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.75rem; }
body:not(.admin-page) a:is([href^="foto-"],[href^="/foto-"]):is([href$=".html"],[href$="/"]) { display: inline-flex; align-items: center; gap: 0.6rem; }
body:not(.admin-page) a:is([href^="foto-"],[href^="/foto-"]):is([href$=".html"],[href$="/"])::before { content: ""; display: block; width: 2.75rem; height: 2.75rem; flex: 0 0 2.75rem; background: var(--class-animal) center / contain no-repeat; }
a:is([href="foto-motylci.html"],[href="/foto-motylci/"],[href="foto-motylci/"]) { --class-animal: url("../img/tridy/motylci.svg"); }
a:is([href="foto-berusky.html"],[href="/foto-berusky/"],[href="foto-berusky/"]) { --class-animal: url("../img/tridy/berusky.svg"); }
a:is([href="foto-mysicky.html"],[href="/foto-mysicky/"],[href="foto-mysicky/"]) { --class-animal: url("../img/tridy/mysicky.svg"); }
a:is([href="foto-krtecci.html"],[href="/foto-krtecci/"],[href="foto-krtecci/"]) { --class-animal: url("../img/tridy/krtecci.svg"); }
a:is([href="foto-zajicci.html"],[href="/foto-zajicci/"],[href="foto-zajicci/"]) { --class-animal: url("../img/tridy/zajicci.svg"); }
a:is([href="foto-jezecci.html"],[href="/foto-jezecci/"],[href="foto-jezecci/"]) { --class-animal: url("../img/tridy/jezecci.svg"); }
@media (max-width: 40rem) { .class-heading--hero { flex-direction: column; align-items: flex-start; } .class-mascot--hero { width: 5.5rem; height: 5.5rem; } }
.chips--animals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
.chips--animals li { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.65rem; border-radius: 1rem; }
.school .chips--animals img { width: 3rem; height: 3rem; flex: none; aspect-ratio: 1; object-fit: contain; border: 0; }
@media (max-width: 30rem) { .chips--animals { grid-template-columns: 1fr; } }
.building-entrance { max-width: 32rem; margin-block: 1.5rem; }
.building-entrance img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 52%; }

.dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.25rem; margin: 0; }
.dl dt { font-weight: 700; }
.dl dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 30rem) { .dl { grid-template-columns: 1fr; } .dl dd { margin-bottom: 0.5rem; } }

/* ---------- Aktuality ---------- */
.news { display: flex; flex-direction: column; }
.news__date { order: -1; margin-bottom: 0.75rem; }
.date {
  display: inline-block;
  padding: 0.15rem 0.7rem;
  background: var(--sun-2);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
}
.article { background: var(--paper); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem); margin-bottom: 2rem; }
.article h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); }
.article > :last-child { margin-bottom: 0; }
.article__meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.tag { display: inline-block; padding: 0.15rem 0.7rem; border: 2px solid var(--ink); border-radius: 999px; font-weight: 700; font-size: 1rem; background: var(--blue-soft); }

/* ---------- Den ve školce ---------- */
.day { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); counter-reset: none; }
.day li { background: var(--paper); color: var(--ink); border: var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: none; }
.day time { display: block; font: 800 1.6rem/1.1 var(--font-display); margin-bottom: 0.35rem; }

/* ---------- Galerie ---------- */
.gallery { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); list-style: none; padding: 0; margin: 0; }
.gallery figure { margin: 0; background: var(--paper); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; height: 100%; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: var(--line); }
.gallery figcaption { padding: 0.75rem 1rem; font-weight: 700; }

/* ---------- Podstránky ---------- */
.page-hero { background: var(--soft); border-bottom: var(--line); padding: clamp(2.5rem, 1.5rem + 3vw, 4.5rem) 0; }
.page-hero h1 { font-size: clamp(2.3rem, 1.4rem + 4vw, 3.75rem); margin-bottom: 1rem; }
.page-hero .lead { margin-bottom: 0; }
.page-hero--red { --soft: var(--red-soft); --accent: var(--red); }
.page-hero--green { --soft: var(--green-soft); --accent: var(--green); }
.page-hero--blue { --soft: var(--blue-soft); --accent: var(--blue); }
.page-hero--lilac { --soft: var(--lilac-soft); }
.page-hero__grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 56rem) { .page-hero__grid { grid-template-columns: 1.2fr 0.8fr; } }
.page-hero .polaroid { transform: rotate(2deg); max-width: 28rem; }

.layout { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
.layout > *, .grid > * { min-width: 0; }
@media (min-width: 62rem) { .layout { grid-template-columns: minmax(0, 1fr) 20rem; align-items: start; } }
.aside { display: grid; gap: 1.5rem; }
.aside .card { box-shadow: var(--shadow-sm); }
.aside h2 { font-size: 1.5rem; }
.aside h2 { font-size: 1.5rem; }

.toc { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
.toc a { display: block; padding: 0.4rem 0; font-weight: 700; }

/* ---------- Tabulky ---------- */
.table-wrap { overflow-x: auto; background: var(--paper); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 1.5rem; }
table { width: 100%; border-collapse: collapse; margin: 0; }
caption { text-align: left; padding: 1rem 1.25rem 0.5rem; font: 800 1.3rem/1.2 var(--font-display); }
th, td { text-align: left; padding: 0.75rem 1.25rem; border-top: 2px solid var(--ink); vertical-align: top; }
thead th { background: var(--sun-2); }
tbody th { font-weight: 700; white-space: nowrap; }
tbody tr:nth-child(even) { background: #FFFBF2; }

/* ---------- Upozornění, platby ---------- */
.notice { background: var(--paper); border: var(--line); border-left: 0.9rem solid var(--red); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; }
.notice--info { border-left-color: var(--blue); }
.notice--ok { border-left-color: var(--green); }
.notice > :last-child { margin-bottom: 0; }
.notice__title { font: 800 1.25rem/1.2 var(--font-display); margin-bottom: 0.4rem; }

.pay { display: grid; gap: 0; margin: 0 0 1.5rem; background: var(--paper); border: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.pay > div { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 0.85rem 1.25rem; }
.pay > div + div { border-top: 2px solid var(--ink); }
.pay dt { font-weight: 700; min-width: 11rem; }
.pay dd { margin: 0; font: 800 1.2rem/1.3 var(--font-display); flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.pay .btn { margin-left: auto; }

.steps { list-style: none; counter-reset: krok; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 1rem; }
.steps > li { counter-increment: krok; position: relative; padding: 1.1rem 1.25rem 1.1rem 4.5rem; background: var(--paper); border: var(--line); border-radius: var(--radius); }
.steps > li::before {
  content: counter(krok);
  position: absolute; left: 1rem; top: 1rem;
  display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem;
  background: var(--sun); border: var(--line); border-radius: 50%;
  font: 800 1.2rem/1 var(--font-display);
}
.steps > li > :last-child { margin-bottom: 0; }

/* ---------- Dokumenty ---------- */
.docs { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: 0.85rem; }
.doc {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem;
  padding: 1rem 1.25rem;
  background: var(--paper);
  border: var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.doc:hover { transform: translateY(-1px); box-shadow: 3px 3px 0 rgba(22, 22, 63, 0.2); }
.doc__name { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.doc__meta { flex: none; padding: 0.1rem 0.7rem; background: var(--blue-soft); border: 2px solid var(--ink); border-radius: 999px; font-size: 1rem; font-weight: 700; }

/* ---------- Kontakty ---------- */
.contact-card { --accent: var(--ink); --soft: var(--sun-2); }
.contact-card--red { --accent: var(--red); --soft: var(--red-soft); }
.contact-card--blue { --accent: var(--blue); --soft: var(--blue-soft); }
.contact-card h2, .contact-card h3 { display: flex; align-items: center; gap: 0.6rem; }
.contact-card h2::before, .contact-card h3::before { content: ""; width: 1rem; height: 1rem; flex: none; background: var(--accent); border: 2px solid var(--ink); border-radius: 50%; }
.contact-card h3.class-heading::before { content: none; }
body:not(.admin-page) .contact-card a:is([href^="foto-"],[href^="/foto-"]):is([href$=".html"],[href$="/"])::before { display: none; }
.contact-card h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.people { list-style: none; margin: 0; padding: 0; }
.people li { padding: 0.55rem 0; border-top: 2px dashed rgba(22, 22, 63, 0.35); }
.people li:first-child { border-top: 0; }
.people span { display: block; color: var(--ink-2); font-size: 1rem; }

/* ---------- Výzva (CTA) ---------- */
.cta { display: grid; gap: 1.5rem 3rem; align-items: center; }
@media (min-width: 56rem) { .cta { grid-template-columns: 1.3fr 1fr; } }
.cta h2 { margin-bottom: 0.75rem; }
.cta__phones { display: grid; gap: 1rem; }
.phone {
  display: flex; flex-direction: column;
  padding: 1rem 1.25rem;
  background: var(--paper);
  color: var(--ink);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.section--ink .phone { color: var(--ink); }
.phone span { font-weight: 700; }
.phone strong { font: 800 clamp(1.5rem, 1.2rem + 1.2vw, 2rem)/1.15 var(--font-display); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.18em; }
.phone:hover { background: var(--sun-2); }

/* ---------- Doplnit (návrh) ---------- */
.todo { background: var(--sun-2); border: 2px dashed var(--ink); border-radius: 0.4rem; padding: 0 0.35rem; font-weight: 700; }

/* ---------- Kontrolní seznam (nabídka) ---------- */
.check { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.75rem; }
.check li { position: relative; padding: 0.9rem 1.1rem 0.9rem 3.4rem; background: var(--paper); border: var(--line); border-radius: 1rem; }
.check li::before {
  content: ""; position: absolute; left: 1rem; top: 1rem;
  width: 1.5rem; height: 1.5rem;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
  border: 2px solid var(--ink); border-radius: 50%;
}
.check--bad li::before {
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 7l10 10M17 7L7 17' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") center / 75% no-repeat;
}
.check small { display: block; color: var(--ink-2); font-size: 1rem; margin-top: 0.2rem; }
.law { border-left: 0.9rem solid var(--blue); }
.law h3 { margin-bottom: 0.25rem; }
.law .tag { margin-bottom: 0.75rem; }

.compare { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); }
.compare figure { margin: 0; }
.compare img { border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.compare figcaption { margin-top: 0.9rem; font: 700 1.1rem/1.3 var(--font-display); }

/* ---------- Patička ---------- */
.site-footer { background: var(--ink); color: var(--cream); --focus: var(--sun); padding: 3.5rem 0 1.5rem; margin-top: 0; }
.site-footer a { color: var(--cream); }
.site-footer .footer-grant { display: block; width: min(100%, 19rem); padding: 0.7rem; margin-top: 1rem; color: var(--ink); background: #fff; border-radius: 0.75rem; }
.footer-grant img { width: 100%; height: auto; }
.footer-grant span { display: block; margin-top: 0.45rem; font-size: 1rem; line-height: 1.4; }
.grant-wide { grid-column: 1 / -1; }
.project-poster { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; gap: 2.5rem; }
.project-poster figure { margin: 0; padding: 1.25rem; background: #fff; border: 1px solid var(--ink); border-radius: 1rem; }
.project-poster img { width: min(100%, 394px); height: auto; margin-inline: auto; }
.project-poster figcaption { margin-top: 1rem; font-size: 1rem; }
@media (max-width: 48rem) { .project-poster { grid-template-columns: 1fr; gap: 1.5rem; } }
.footer__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.footer__title { font-size: 1.2rem; font-weight: 800; margin-bottom: 0.75rem; color: var(--sun); }
.footer__links { list-style: none; padding: 0; margin: 0; }
.footer__links a { display: inline-block; padding: 0.3rem 0; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 2px solid rgba(255, 247, 232, 0.35); font-size: 1rem; }
.footer__bottom p { margin: 0; }

/* ---------- Vysoký kontrast Windows ---------- */
@media (forced-colors: active) {
  .btn, .card, .doc, .main-nav a, .nav-toggle, .polaroid, .facts li, .chips li, .notice { border: 3px solid CanvasText; }
  .hl { background: none; text-decoration: underline; }
  .main-nav a[aria-current="page"] { outline: 3px solid Highlight; }
}

/* ---------- Tisk ---------- */
@media print {
  .topbar, .main-nav, .nav-toggle, .skip-link, .crumbs, .btns, .site-footer nav { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .card, .article, .table-wrap, .doc, .pay { box-shadow: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}

/* Unified navigation and restrained playfulness, WCAG 2.2 AA design target. */
[hidden] { display: none !important; }
body { overflow-wrap: break-word; }
button { color: inherit; }
svg { flex-shrink: 0; }
.masthead { position: relative; gap: 1rem; padding: 1.15rem 0; }
.brand { max-width: 100%; min-width: 0; }
.brand__text { gap: 0.25rem; }
.brand__big { font-size: clamp(1.1rem, 0.8rem + 0.65vw, 1.4rem); }
.brand__logo { width: 3rem; height: 3rem; }
.main-nav { margin-left: auto; }
.main-nav .nav-list { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem; list-style: none; margin: 0; padding: 0; }
.nav-link, .nav-trigger {
  display: inline-flex; gap: 0.4rem; align-items: center; justify-content: center;
  min-height: 2.9rem; padding: 0.5rem 0.75rem;
  border: 1.5px solid transparent; border-radius: 999px;
  font: 700 1rem/1.35 var(--font-display); text-decoration: none;
  background: transparent; cursor: pointer;
}
.nav-link:hover, .nav-trigger:hover { background: var(--sun-2); border-color: var(--ink); }
.nav-link[aria-current], .nav-link.is-active, .nav-trigger.is-active { background: var(--sun-2); border-color: var(--ink); }
.nav-trigger[aria-expanded="true"] { background: var(--ink); color: var(--cream); --focus: var(--sun); }
.nav-trigger svg { transition: transform 0.16s ease; }
.nav-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-enrolment, .nav-enrolment[aria-current] { background: var(--sun); border-color: var(--ink); padding-inline: 1rem; margin-left: 0.5rem; }
.mega-panel {
  position: absolute; top: calc(100% - 0.25rem); left: 0; right: 0; z-index: 50;
  padding: 1.3rem; border: var(--line); border-radius: 1.25rem;
  background: var(--paper); box-shadow: 0 16px 40px rgba(22, 22, 63, 0.14);
  max-height: calc(100dvh - 11rem); overflow-y: auto;
}
.mega-grid { display: grid; grid-template-columns: 1fr 1fr 0.95fr; gap: 1.25rem; }
.mega-grid > * { min-width: 0; padding: 1.25rem; }
.mega-grid h2 { font-size: 1.45rem; line-height: 1.2; margin-bottom: 0.75rem; }
.mega-grid p { font-size: 1rem; line-height: 1.5; }
.mega-grid .mega-label { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.65rem; color: var(--ink-2); }
.mega-school { border-radius: 0.9rem; background: var(--red-soft); border-top: 3px solid var(--red); }
.mega-school--blue { background: var(--blue-soft); border-color: var(--blue); }
.mega-school h2 a { text-decoration: none; }
.mega-school h2 a:hover { text-decoration: underline; }
.mega-classes { min-height: 3rem; }
.mega-links { display: grid; list-style: none; padding: 0; margin: 0; }
.mega-links a { display: flex; align-items: center; min-height: 2.75rem; padding: 0.5rem 0; font-size: 1.05rem; font-weight: 700; }
.mega-overview { display: flex; gap: 0.5rem; align-items: center; min-height: 2.75rem; margin-top: 0.8rem; font-weight: 700; }
.mega-help { border-radius: 0.9rem; background: var(--sun-2); }
.mega-help .btn { margin-top: 0.25rem; }
.mega-phone { display: block; padding-block: 0.75rem; font-size: 1rem; }
.nav-toggle {
  display: inline-flex; margin-left: auto; align-items: center; justify-content: center;
  gap: 0.65rem; min-height: 2.9rem; padding: 0.6rem 1rem;
  background: var(--sun); border: var(--line); border-radius: 999px;
  font: 700 1rem/1.35 var(--font-display); cursor: pointer;
}
.nav-toggle__icon, .nav-toggle__icon::before, .nav-toggle__icon::after { display: block; width: 1.15rem; height: 2px; border-radius: 2px; background: currentColor; }
.nav-toggle__icon { position: relative; }
.nav-toggle__icon::before, .nav-toggle__icon::after { content: ""; position: absolute; left: 0; }
.nav-toggle__icon::before { top: -6px; }
.nav-toggle__icon::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after { transform: translateY(-6px) rotate(-45deg); }
.topbar__list a { display: inline-flex; align-items: center; min-height: 2.25rem; }
.topbar__label { opacity: 1; }
.hero { isolation: isolate; }
.hero::before { z-index: -1; background: var(--sun-2); }
.hero__grid { gap: 3.25rem; }
.hero .kicker { border: none; background: transparent; padding: 0; color: var(--ink-2); font-size: 1rem; }
.hero .lead { max-width: 42ch; font-size: clamp(1.2rem, 1rem + 0.5vw, 1.35rem); }
.hero__art .polaroid { box-shadow: 4px 5px 0 rgba(22, 22, 63, 0.18); }
.polaroid img { border: none; }
.sticker { width: 6rem; height: 6rem; box-shadow: none; font-size: 0.9rem; transform: rotate(7deg); }
.sticker strong { font-size: 1.55rem; }
.facts { margin-top: 2rem; gap: 0; border-top: 1px solid rgba(22,22,63,0.3); padding-top: 1.4rem; }
.facts li, .facts li:nth-child(n) { background: transparent; border: none; border-radius: 0; box-shadow: none; padding: 0.35rem 1rem; }
.facts li + li { border-left: 1px solid rgba(22,22,63,0.3); }
.facts li:first-child { padding-left: 0; }
.facts strong { font-size: 2rem; margin-bottom: 0.35rem; }
.quick-tasks { gap: 1rem; }
.quick-tasks .tile { display: grid; align-content: start; grid-template-columns: 3rem minmax(0, 1fr); column-gap: 1rem; padding: 1.3rem; border-color: rgba(22,22,63,0.6); }
.quick-tasks .tile .icon { grid-row: 1 / 3; width: 3rem; height: 3rem; margin: 0; border-width: 1.5px; border-radius: 0.85rem; }
.quick-tasks .tile .icon svg { width: 1.6rem; height: 1.6rem; }
.quick-tasks .tile h3 { font-size: 1.25rem; margin: 0 0 0.45rem; line-height: 1.3; }
.quick-tasks .tile p { grid-column: 2; font-size: 1rem; line-height: 1.45; margin: 0; }
.quick-tasks .tile:hover { border-color: var(--ink); }
.section--paper, .section--sun, .section--ink { border-block: 1px solid rgba(22,22,63,0.25); }
.school__head { padding: 1.1rem 1.5rem; }
.school__head h3 { font-size: 1.9rem; }
.school__body { gap: 0.8rem; }
.section-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 1.25rem 0; }
.section-nav a { display: flex; align-items: center; min-height: 2.75rem; padding: 0.45rem 1rem; background: var(--paper); border: var(--line); border-radius: 999px; font-weight: 700; font-size: 1rem; }
.event-list { list-style: none; margin: 0; padding: 0; }
.event { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: 1.1rem; padding: 1.25rem 0; border-bottom: 1px solid rgba(22,22,63,0.25); }
.event:first-child { padding-top: 0; }
.event__date { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; min-height: 4rem; background: var(--sun-2); border: var(--line); border-radius: 0.85rem; font-size: 0.85rem; font-weight: 700; }
.event__date strong { font: 800 1.8rem/1.1 var(--font-display); }
.event h3 { font-size: 1.3rem; margin: 0.15rem 0 0.45rem; }
.event p { font-size: 1rem; margin: 0; color: var(--ink-2); }
.event__school { font-size: 0.9rem; font-weight: 700; color: var(--ink-2); }
.events-home { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 4rem; }
.events-home .btns { gap: 0.75rem; }
.events-home .btn { font-size: 1rem; padding-inline: 1.1rem; }
.on-page { padding: 0.25rem 0 1rem; border-bottom: 1px solid rgba(22,22,63,0.25); }
.on-page .toc a, .toc a { min-height: 2.75rem; }
.notice { border-left-width: 0.4rem; }
.prose a { overflow-wrap: anywhere; }
.layout .aside { min-width: 0; }
.pay dd { font-family: var(--font-body); }
.gallery-open { display: block; position: relative; }
.gallery-open::after { content: "↗"; position: absolute; bottom: 0.65rem; right: 0.65rem; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; background: var(--sun); color: var(--ink); border: var(--line); border-radius: 50%; font-weight: 700; }
.photo-dialog { padding: 1.25rem; width: min(92vw, 68rem); max-height: 92dvh; border: var(--line); border-radius: 1.25rem; color: var(--ink); background: var(--cream); overflow: auto; }
.photo-dialog::backdrop { background: rgba(22,22,63,0.82); }
.photo-dialog__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.photo-dialog__top h2 { font-size: 1.5rem; margin: 0; }
.photo-dialog img { width: 100%; max-height: 70dvh; object-fit: contain; }
.photo-dialog figure { margin: 0; }
.photo-dialog figcaption { margin-top: 0.75rem; }
.photo-dialog .btn { flex-shrink: 0; }
.class-albums .doc { min-height: 3.25rem; }
.footer__grid { grid-template-columns: 1.35fr 1fr 1fr 1.1fr; gap: 2rem; }
.site-footer p { font-size: 1rem; overflow-wrap: anywhere; }
.site-footer a { display: inline-flex; align-items: center; min-height: 2.2rem; }
.footer__title { font-size: 1.2rem; line-height: 1.35; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; box-shadow: 0 0 0 4px var(--paper); }
.card--link:focus-within { outline: 3px solid var(--focus); outline-offset: 4px; }
.stretched:focus-visible { box-shadow: none; outline: none; }
.btn--ink { --focus: var(--sun); }
.brand:focus-visible { border-radius: 0.5rem; }
@media (max-width: 70rem) and (min-width: 64.001rem) {
  .masthead { gap: 0.75rem; }
  .brand__big { font-size: 1.15rem; }
  .nav-link, .nav-trigger { padding-inline: 0.5rem; }
}
@media (max-width: 64rem) {
  .main-nav { flex-basis: 100%; margin-left: 0; }
  .main-nav .nav-list { align-items: stretch; flex-direction: column; gap: 0.4rem; padding: 0.75rem 0 0.25rem; }
  .nav-link, .nav-trigger { justify-content: space-between; width: 100%; border-color: rgba(22,22,63,0.35); background: var(--paper); padding: 0.7rem 1rem; border-radius: 0.75rem; font-size: 1.1rem; }
  .nav-enrolment { margin-left: 0; background: var(--sun); }
  .mega-panel { position: static; padding: 0.65rem 0; border: none; border-radius: 0; box-shadow: none; background: transparent; max-height: none; overflow: visible; }
  .mega-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0.75rem; }
  .mega-about, .mega-help { grid-column: 1 / -1; }
  .mega-grid > * { padding: 1rem; }
  .mega-grid h2 { font-size: 1.35rem; }
  .mega-classes { min-height: 0; }
  .footer__grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .events-home { gap: 2.5rem; }
}
@media (max-width: 40rem) {
  .masthead { padding: 1rem 0; gap: 0.75rem; }
  .brand { flex: 1; gap: 0.55rem; }
  .brand__big { font-size: 1.05rem; line-height: 1.25; }
  .brand__small { font-size: 0.85rem; }
  .brand__logo { width: 2.75rem; height: 2.75rem; }
  .nav-toggle { padding-inline: 0.75rem; }
  .wrap { width: calc(100% - 2rem); }
  .topbar { font-size: 0.9rem; }
  .topbar__inner { padding-block: 0.4rem; }
  .topbar__list { gap: 0 1rem; }
  .hero { padding: 2.5rem 0; }
  .hero__grid { gap: 2rem; }
  .hero__art { width: min(100%, 26rem); margin-inline: auto; }
  .hero .btns { gap: 0.75rem; }
  .hero .btn { font-size: 1rem; padding: 0.7rem 1.1rem; }
  .facts { grid-template-columns: repeat(2,minmax(0,1fr)); row-gap: 1rem; }
  .facts li:nth-child(3) { border-left: none; padding-left: 0; }
  .facts strong { font-size: 1.8rem; }
  .mega-grid { grid-template-columns: minmax(0,1fr); }
  .mega-about, .mega-help { grid-column: auto; }
  .quick-tasks .tile { padding: 1.15rem; }
  .events-home { grid-template-columns: minmax(0,1fr); }
  .footer__grid { grid-template-columns: minmax(0,1fr); }
  .page-hero { padding: 2.5rem 0; }
  .page-hero h1 { font-size: clamp(2.2rem, 1.7rem + 2.5vw, 3rem); }
  .pay > div { padding: 1rem; }
  .pay dt { min-width: 0; flex-basis: 100%; }
  .pay dd { font-size: 1.125rem; overflow-wrap: anywhere; }
  .pay .btn { margin-left: 0; }
  .photo-dialog { padding: 1rem; }
  .photo-dialog__top { align-items: flex-start; flex-direction: column; }
  .table-wrap th, .table-wrap td { padding: 0.65rem 0.8rem; }
  .table-wrap tbody th { white-space: normal; }
  .school__head h3 { font-size: 1.7rem; }
}
@media (prefers-reduced-motion: reduce) {
  .btn:hover, .card--link:hover { transform: none; }
}
@media (forced-colors: active) {
  :focus-visible { outline: 3px solid Highlight; box-shadow: none; }
  .nav-link, .nav-trigger, .mega-panel, .nav-toggle, .gallery-open::after, .photo-dialog { border: 2px solid CanvasText; }
  .nav-trigger[aria-expanded="true"], .nav-link[aria-current] { outline: 2px solid Highlight; }
}
@media print {
  .section-nav, .on-page, .photo-dialog { display: none !important; }
  .hero__art .polaroid, .polaroid { transform: none; box-shadow: none; }
  .mega-panel { display: none !important; }
}

@media (min-width: 64.001rem) { .layout .grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.25rem; } }

/* Kratší úvodka se stejným obsahem. Rozložení se při zvětšení textu přizpůsobí. */
.home-page .section { padding-block: 3rem; }
.home-values .card { display: grid; grid-template-columns: 3rem minmax(0, 1fr); column-gap: 1rem; align-content: start; }
.home-values .icon { grid-row: 1 / 3; width: 3rem; height: 3rem; margin: 0; }
.home-values .icon svg { width: 1.6rem; height: 1.6rem; }
.home-values h3 { margin-bottom: 0.5rem; }
.home-values .card p { grid-column: 2; margin: 0; }
.home-page .day { gap: 0.65rem; }
.home-page .day li { display: grid; grid-template-columns: 4.25rem minmax(0, 1fr); align-items: center; gap: 0.6rem; padding: 0.85rem 1rem; }
.home-page .day time { font-size: 1.25rem; margin: 0; }
@media (max-width: 36rem) {
  .home-page .section { padding-block: 2.25rem; }
  .home-page .gallery { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); gap: 1rem; }
  .home-page .gallery figcaption { padding: 0.65rem; font-size: 1rem; }
  .home-page .school img { aspect-ratio: 21 / 9; }
}
@media (min-width: 23rem) and (max-width: 36rem) {
  .home-page .school .dl { grid-template-columns: max-content minmax(0, 1fr); }
  .home-page .school .dl dd { margin-bottom: 0; }
}
@media (max-width: 23rem) {
  .home-values .card { display: block; }
  .home-values .icon { margin-bottom: 0.75rem; }
  .home-page .day li { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
}

/* Průběžně spravovaný obsah */
.cms-filters { display:flex; flex-wrap:wrap; gap:1rem; align-items:end; margin-bottom:2rem; padding:1.25rem; border:var(--line); border-radius:.8rem; background:var(--paper); }
.cms-filters > div { flex:1 1 12rem; max-width:22rem; }
.cms-filters label { display:block; font-weight:700; margin-bottom:.35rem; }
.cms-filters select { width:100%; min-height:2.8rem; border:1.5px solid var(--ink); border-radius:.4rem; background:white; color:var(--ink); font:inherit; padding:.6rem; }
.cms-empty { padding:1.4rem; border:1.5px solid var(--ink); border-radius:.75rem; background:white; margin:1rem 0; }
.cms-cancelled { display:inline-block; background:var(--red-soft); color:#8d240c; font-weight:700; padding:.25rem .65rem; border:1px solid #8d240c; border-radius:.4rem; }
.prose-wide { max-width:64rem; }
.event-time { font-weight:700; }
.class-album-card__link { display:inline-block; margin-top:.5rem; color:var(--blue); font-weight:700; text-decoration:underline; }
.external-album { display:inline-flex; align-items:center; gap:.6rem; }
.external-album svg { flex:none; }
.album-detail h2 { font-size:clamp(1.7rem,1.4rem + 1vw,2.3rem); }
.doc-description { padding:.5rem .8rem; font-size:1rem; }
.cms-unavailable-document { display:block; padding:.6rem 0; }
.mega-class-links { list-style:none; margin:.25rem 0 .4rem; padding-left:1rem; font-size:1rem; display:grid; gap:.15rem; }
.gallery-lock { max-width:42rem; margin-inline:auto; }
.gallery-lock .field { display:grid; gap:.4rem; margin-block:1.4rem; }
.gallery-lock label { font-weight:700; }
.gallery-lock input { width:100%; min-height:2.8rem; padding:.65rem; border:1.5px solid var(--ink); border-radius:.4rem; color:var(--ink); background:#fff; font:inherit; }
.gallery-error { border-left:4px solid #a3260b; padding:.8rem; background:#fff0eb; color:#782009; }
.gallery-parent-note { padding:1rem; border:var(--line); border-radius:.6rem; background:var(--paper); }
.event-archive > summary { cursor:pointer; font-size:1.3rem; font-weight:700; padding:1rem; border:var(--line); border-radius:.6rem; background:var(--paper); }
.event-archive[open] > summary { margin-bottom:1rem; }
.gallery-lock button:disabled { opacity:.65; cursor:default; }
/* Tonal correction only: source pixels, signs and architecture stay untouched. */
.photo-daylight-main { filter:brightness(1.17) saturate(1.07); }
.photo-daylight { filter:brightness(1.08) saturate(1.035); }
.photo-soft-light { filter:brightness(1.07) saturate(1.02); }

/* Mobile navigation stays compact; contacts and meals remain in the menu/footer. */
@media (max-width: 600px) {
  .site-header .topbar { display: none; }
}
.site-notice { background:var(--sun); color:var(--ink); border-bottom:var(--line); }
.site-notice__inner { display:flex; align-items:center; flex-wrap:wrap; gap:.65rem 1.5rem; padding-block:.7rem; }
.site-notice h2 { flex:1 1 15rem; margin:0; font-size:1.1rem; line-height:1.4; }
.site-notice-fallback { flex-basis:100%; }
.site-notice-fallback summary { cursor:pointer; font-weight:700; }
.site-notice-fallback a,.welcome-dialog a { overflow-wrap:anywhere; }
.welcome-dialog { width:min(42rem,calc(100% - 2rem)); max-height:calc(100dvh - 2rem); padding:clamp(1rem,4vw,2rem); overflow:auto; border:2px solid var(--ink); border-radius:1.2rem; color:var(--ink); background:var(--paper); }
.welcome-dialog::backdrop { background:rgba(22,22,63,.65); }
.welcome-dialog__top { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.welcome-dialog__top .kicker { margin:0; }
.welcome-dialog__top .btn { flex:none; }
.welcome-dialog h2 { font-size:clamp(1.65rem,1.3rem + 1.4vw,2.35rem); line-height:1.2; margin:0 0 1.25rem; }
.welcome-dialog p { margin:0 0 1rem; }
.welcome-dialog > .btn { max-width:100%; white-space:normal; }
@media print { .site-notice,.welcome-dialog { display:none !important; } }
