@font-face { font-family: Bricolage; src: url(fonts/bricolage-latin-ext.woff2) format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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; src: url(fonts/bricolage-latin.woff2) format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Figtree; src: url(fonts/figtree-latin-ext.woff2) format("woff2"); font-weight: 300 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: Figtree; src: url(fonts/figtree-latin.woff2) format("woff2"); font-weight: 300 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --paper: #fbf5e9;
  --paper-2: #f3e8d2;
  --card: #fffdf8;
  --ink: #1e332b;
  --ink-2: #47584f;
  --pine: #1f4a3c;
  --pine-2: #2b5e4d;
  --coral: #bf3a18;
  --logo: #ee5336;
  --sun: #f2b23a;
  --line: #e0d3b8;
  --r: 18px;
  --head: Bricolage, "Trebuchet MS", sans-serif;
  --body: Figtree, "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--head); line-height: 1.12; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.012em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 6.2vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.15rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
a { color: var(--coral); text-underline-offset: .16em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--pine); outline-offset: 2px; border-radius: 4px; }
.board :focus-visible, .foot :focus-visible { outline-color: var(--sun); }

.wrap { width: min(1140px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 20; }
.skip:focus { top: 8px; color: #fff; }
.ico { display: inline-block; width: 1em; height: 1em; line-height: 0; }
.ico svg { width: 100%; height: 100%; }

.demo-bar { margin: 0; padding: 6px 16px; background: var(--sun); color: var(--ink); font-size: .9rem; text-align: center; }

/* Hlavička */
.top { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: none; }
.brand-marks { display: flex; font-size: 22px; }
.brand-marks .ico + .ico { margin-left: -5px; }
.brand-name { font: 800 1.2rem/1 var(--head); letter-spacing: -.012em; }
.menu { display: flex; gap: 2px; }
.menu a { padding: 9px 11px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1rem; white-space: nowrap; }
.menu a:hover { background: var(--paper-2); }
.menu a[aria-current] { background: var(--pine); color: #fff; }
.menu-btn { display: none; font: 700 1rem var(--body); color: #fff; background: var(--pine); border: 0; border-radius: 10px; padding: 10px 16px; cursor: pointer; }

/* Úvod */
.hero { padding: clamp(28px, 5vw, 56px) 0 clamp(28px, 4vw, 48px); }
.hero-in { display: grid; gap: clamp(36px, 5vw, 56px); }
.hero-text { max-width: 760px; }
.poem { font: 500 clamp(1.1rem, 2.2vw, 1.35rem)/1.3 var(--head); color: var(--coral); margin-bottom: .8em; }
.lead { font-size: clamp(1.1rem, 2vw, 1.25rem); color: var(--ink-2); max-width: 62ch; margin: 0; }
.hero-photo { position: relative; margin: 0; }
.hero-photo img { width: 100%; aspect-ratio: 5 / 2; object-fit: cover; border-radius: var(--r); }
.peek { position: absolute; top: 0; right: 4%; display: flex; gap: clamp(4px, 1.4vw, 14px); font-size: clamp(38px, 7vw, 76px); transform: translateY(-58%); }
.peek .ico:nth-child(odd) { transform: translateY(8%) rotate(-5deg); }
.peek .ico:nth-child(even) { transform: rotate(5deg); }

/* Nástěnka */
.board { background: var(--pine); color: #f8f2e4; padding: clamp(36px, 5vw, 60px) 0; }
.board h2, .board h3 { color: #fff; }
.board-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; margin-bottom: 18px; }
.board-head h2, .board-head p { margin: 0; }
.board-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(24px, 4vw, 48px); margin-top: 26px; }

.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 7px 15px 7px 10px; font: 600 1rem var(--body); color: var(--ink); background: var(--card); border: 2px solid var(--line); border-radius: 999px; cursor: pointer; }
.pick button .ico { font-size: 25px; }
.pick button[aria-pressed="true"] { background: var(--sun); border-color: var(--ink); }
.pick button.all { padding-left: 15px; }
.board .pick button { border-color: transparent; }
.board .pick button[aria-pressed="true"] { border-color: #fff; }

.week { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.week li { background: #fbf5e9; color: var(--ink); border-radius: 12px; padding: 10px 11px 12px; min-height: 142px; display: flex; flex-direction: column; gap: 6px; }
.week li.today { box-shadow: 0 0 0 3px var(--sun); }
.week li.off { background: #2b5e4d; color: #f8f2e4; }
.week .d { font: 700 .95rem/1.1 var(--head); }
.week .d small { display: block; font: 500 .85rem var(--body); color: var(--ink-2); margin-top: 2px; }
.week .off .d small { color: #e5dcc7; }
.week .it { font-size: .92rem; line-height: 1.25; font-weight: 600; }
.week .it small { display: block; font-weight: 400; font-size: .84rem; color: var(--ink-2); }
.week .off .it, .week .off .it small { color: #f8f2e4; }
.week .none { font-size: .88rem; color: var(--ink-2); }

.quick { display: flex; flex-direction: column; }
.quick a { display: block; padding: 12px 0; color: #fff; text-decoration: none; border-top: 1px solid #ffffff38; }
.quick a strong { display: block; font-size: 1.08rem; text-decoration: underline; text-decoration-color: var(--sun); text-underline-offset: .2em; }
.quick a span { font-size: .95rem; color: #e5dcc7; }
.quick a:hover strong { color: var(--sun); }

/* Sekce */
.sec { padding: clamp(44px, 6vw, 76px) 0; }
.sec-tint { background: var(--paper-2); }
.sec-s { margin-top: clamp(36px, 5vw, 56px); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); }
.two-photo { grid-template-columns: 1.15fr 1fr; align-items: center; }
.two-top { margin-top: clamp(28px, 4vw, 44px); align-items: start; }
.round { border-radius: var(--r); width: 100%; }
.more { font-weight: 700; }
.more::after { content: " →"; }

.agenda li { display: flex; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); align-items: baseline; }
.ag-date { flex: none; width: 92px; font: 700 1rem/1.25 var(--head); color: var(--coral); }
.ag-when { color: var(--ink-2); font-weight: 600; }
.ag-main { min-width: 0; }
.ag-main strong { display: block; line-height: 1.3; }
.ag-main span { display: block; font-size: .95rem; color: var(--ink-2); }
.ag-tags { display: inline-flex !important; gap: 2px; font-size: 22px !important; vertical-align: -5px; margin-left: 2px; }
.agenda li.op strong { color: var(--pine); }
.agenda li.op .ag-date { color: var(--pine); }
.agenda li.closed { background: var(--paper-2); margin-inline: -10px; padding-inline: 10px; border-radius: 8px; border-top-color: transparent; }

.news { padding: 14px 0 4px; border-top: 1px solid var(--line); }
.news-date { font-size: .92rem; font-weight: 700; color: var(--coral); margin-bottom: .25em; }

.class-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 8px; }
.class-strip a { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; height: 100%; padding: 16px; background: var(--t); color: var(--ink); text-decoration: none; border-radius: var(--r); border: 2px solid transparent; }
.class-strip a:hover { border-color: var(--c); }
.class-strip .ico { font-size: 54px; margin-bottom: 6px; }
.class-strip strong { font: 700 1.2rem var(--head); }
.class-strip span:last-child { font-size: .95rem; color: var(--ink-2); }

/* Vnitřní stránky */
.page-head { background: var(--paper-2); padding: clamp(32px, 5vw, 56px) 0 clamp(26px, 4vw, 40px); }
.page-head h1 { margin-bottom: .25em; font-size: clamp(2.1rem, 5vw, 3.2rem); }

.with-toc { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); padding-top: clamp(28px, 4vw, 44px); padding-bottom: 24px; }
.toc { position: sticky; top: 92px; align-self: start; display: flex; flex-direction: column; }
.toc a { padding: 8px 0 8px 12px; border-left: 3px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
.toc a:hover { border-left-color: var(--coral); }
.prose { max-width: 760px; }
.prose section { padding-bottom: clamp(32px, 5vw, 52px); }
.prose h3 { margin-top: 1.4em; }
.prose-wide { padding-bottom: 8px; }
main > .wrap:last-child { padding-bottom: clamp(44px, 6vw, 76px); }

.callout { background: #fdeadf; border-left: 5px solid var(--logo); padding: 13px 16px; border-radius: 0 12px 12px 0; }
.callout-todo { background: #fbeccb; border-left-color: var(--sun); }
.todo { display: inline-block; background: #fbeccb; border: 1px dashed #99690a; color: #5f4105; font-size: .88rem; font-weight: 600; line-height: 1.3; padding: 1px 8px; border-radius: 6px; }
.small { font-size: .93rem; color: var(--ink-2); }

.rows > div { display: grid; grid-template-columns: minmax(120px, 13em) 1fr; gap: 4px 20px; padding: 11px 0; border-top: 1px solid var(--line); }
.rows dt { font-weight: 700; }
.rows dd { min-width: 0; overflow-wrap: anywhere; }
.rows { margin-bottom: 1.2em; }
.rows-tight > div { grid-template-columns: 7.2em 1fr; padding: 7px 0; }

.btn { display: inline-block; padding: 12px 20px; background: var(--pine); color: #fff; border: 2px solid var(--pine); border-radius: 12px; font: 700 1rem var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--pine); }

.timeline li { display: grid; grid-template-columns: 8em 1fr; gap: 16px; padding: 8px 0 8px 18px; border-left: 3px dotted var(--coral); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 16px; width: 11px; height: 11px; background: var(--coral); border-radius: 50%; }
.timeline time { font-weight: 700; font-variant-numeric: tabular-nums; }
.timeline { margin-bottom: 1em; }

/* Kalkulačka */
.calc { display: grid; grid-template-columns: 1.2fr 1fr; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 1.2em 0 .8em; }
.calc-in { padding: 20px 22px; }
.calc fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.calc legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
.calc fieldset label { display: flex; align-items: center; gap: 9px; min-height: 36px; line-height: 1.25; cursor: pointer; }
.calc input[type=radio] { width: 19px; height: 19px; accent-color: var(--pine); flex: none; margin: 0; }
.field { display: block; font-weight: 700; margin-bottom: 12px; }
.hint { display: block; font-weight: 400; font-size: .9rem; color: var(--ink-2); }
.field input { display: block; width: 100%; margin-top: 5px; padding: 10px 12px; font: 400 1.0625rem var(--body); color: var(--ink); background: #fff; border: 2px solid #8b8370; border-radius: 10px; }
.calc-out { background: var(--paper-2); padding: 20px 22px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.calc-label { margin: 0; font-weight: 600; }
.calc-sum { font: 800 2.6rem/1.1 var(--head); margin: 0; }
.calc-split { font-size: .93rem; color: var(--ink-2); margin: 2px 0 12px; }
.qr { width: 190px; min-height: 190px; display: grid; place-items: center; background: #fff; border-radius: 12px; padding: 8px; font-size: .92rem; color: var(--ink-2); }
.qr svg { display: block; width: 100%; height: auto; }
.calc-acc { margin: 12px 0 0; font-size: .93rem; }

/* Třídy */
.class-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; padding-top: clamp(28px, 4vw, 44px); }
.class-card { background: var(--card); border: 1px solid var(--line); border-top: 7px solid var(--c); border-radius: var(--r); padding: 20px 22px 8px; scroll-margin-top: 90px; }
.class-id { display: flex; align-items: center; gap: 14px; }
.class-id .ico { font-size: 58px; flex: none; }
.class-id h2 { margin: 0; }
.class-prog { font-style: italic; color: var(--ink-2); margin: 10px 0 12px; }

/* Kalendář */
.cal-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 18px 0 8px; }
.cal-tools p { margin: 0; flex: 1 1 280px; }
.cal-month { margin-top: 30px; }
.cal-month h2 { font-size: 1.45rem; text-transform: capitalize; margin-bottom: .35em; }
.undated { margin-top: 44px; }

/* Jídelna */
.menu-week li { display: grid; grid-template-columns: 6em 1fr; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 520px; background: var(--card); border-radius: 12px; overflow: hidden; }
caption { text-align: left; color: var(--ink-2); font-size: .95rem; padding-bottom: 8px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
thead th { background: var(--pine); color: #fff; font-weight: 600; }
tbody th { font-weight: 600; }
.table-wrap + p { margin-top: 1em; }
.ticks li { padding: 6px 0 6px 26px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 3px; top: 15px; width: 10px; height: 10px; background: var(--sun); border-radius: 50%; }

/* Zápis */
.steps { counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; padding-bottom: 20px; }
.steps li::before { content: counter(s); grid-row: span 2; width: 42px; height: 42px; display: grid; place-items: center; background: var(--logo); color: #1e1208; font: 800 1.25rem var(--head); border-radius: 50%; }
.steps strong { font: 700 1.15rem/1.3 var(--head); }

/* O školce */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 6px 14px; background: var(--paper-2); border-radius: 999px; font-weight: 600; font-size: .98rem; }
.staff { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px clamp(24px, 4vw, 48px); }
.staff div:nth-child(2) { grid-row: span 2; }
.staff h3 { padding-bottom: 6px; border-bottom: 2px solid var(--line); margin-bottom: 8px; }

/* Galerie */
.gate { max-width: 620px; margin: clamp(32px, 5vw, 56px) auto 0; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(24px, 4vw, 40px); }
.gate-ico { font-size: 72px; margin-bottom: 8px; }
.gate .small { margin: 14px 0 0; }
.albums section { margin-top: 36px; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.album-grid li { display: flex; flex-direction: column; gap: 8px; font-weight: 600; line-height: 1.3; }
.album-cover { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--t); border-radius: 14px; font-size: 60px; }

/* Dokumenty */
.docs a { display: grid; grid-template-columns: 1fr auto; column-gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.docs strong { color: var(--coral); text-decoration: underline; text-underline-offset: .16em; }
.docs span { grid-column: 1; font-size: .95rem; color: var(--ink-2); }
.docs em { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; font-size: .85rem; font-weight: 700; background: var(--paper-2); padding: 2px 8px; border-radius: 6px; }

/* Kontakt */
.contact-classes li { display: flex; gap: 14px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.contact-classes .ico { font-size: 46px; flex: none; }
.contact-classes div { min-width: 0; overflow-wrap: anywhere; }
.contact-classes strong, .contact-classes a { display: block; }
.contact-classes strong { font: 700 1.12rem var(--head); }

/* Patička */
.foot { background: var(--ink); color: #e9e2d2; padding: 40px 0 18px; }
.foot a { color: #fff; }
.foot a:hover { color: var(--sun); }
.foot-in { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.foot-name, .foot-h { font: 700 1.08rem var(--head); color: #fff; margin-bottom: .5em; }
.foot-note { font-size: .9rem; color: #cfc7b5; margin-top: 16px; padding-top: 14px; border-top: 1px solid #ffffff30; }

@media (max-width: 1040px) {
  .menu-btn { display: block; }
  .menu { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 16px 14px; gap: 0; max-height: calc(100dvh - 110px); overflow-y: auto; }
  .menu.open { display: flex; }
  .menu a { padding: 12px; font-size: 1.1rem; }
}

@media (max-width: 860px) {
  .board-grid, .two, .two-photo, .calc, .with-toc, .class-list { grid-template-columns: minmax(0, 1fr); }
  .class-strip { grid-template-columns: repeat(2, 1fr); }
  .toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .toc a { border: 0; background: var(--paper-2); border-radius: 999px; padding: 6px 13px; font-size: .95rem; }
  .staff { grid-template-columns: repeat(2, 1fr); }
  .staff div:nth-child(2) { grid-row: auto; }
}

@media (max-width: 640px) {
  .week { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .week li { min-height: 0; display: grid; grid-template-columns: 5.2em 1fr; gap: 2px 10px; padding: 9px 12px; align-items: baseline; }
  .week .d { grid-row: span 9; }
  .week .it, .week .none { grid-column: 2; }
  .hero-photo img { aspect-ratio: 16 / 9; }
  .rows > div { grid-template-columns: minmax(0, 1fr); }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .foot-in { grid-template-columns: minmax(0, 1fr); }
  .staff { grid-template-columns: minmax(0, 1fr); }
  .ag-date { width: 76px; }
  .brand-marks { display: none; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media print {
  .demo-bar, .top, .foot, .toc, .pick, .btn { display: none; }
  body { background: #fff; }
}
