/* Public site.
 *
 * One stylesheet, no build step, no web fonts loaded from anyone else's
 * server. The look is meant to feel like the place: limestone, forest and
 * a warm brick accent, with room to breathe.
 */

/* Co má atribut hidden, je schované — bez výjimky.
 *
 * Prohlížeč má vlastní pravidlo [hidden] { display: none }, jenže jakýkoli
 * autorský předpis, který nastaví display, ho přebije. Přesně to dělalo
 * .lightbox { display: grid }: zavření prohlížeče fotek vyprázdnilo obrázek,
 * ale černý překryv zůstal přes celou stránku a nešlo kliknout vůbec nikam.
 * Tohle je to jedno místo, kde má !important smysl: schované musí znamenat
 * schované, ať si ostatní pravidla říkají co chtějí.
 */
[hidden] { display: none !important; }

:root {
  /* Taken from the village flag — green over blue, white charge — but held
     back: the full-strength flag colours are used as accents and structure,
     never as large fields, so the pages stay calm and the text stays
     comfortable to read. */
  --flag-green: #5f9e3f;
  --flag-blue:  #35498f;

  --sand:        #f6f8f4;
  --sand-deep:   #eaeee6;
  --surface:     #ffffff;
  --ink:         #182029;
  --ink-soft:    #48545e;
  --muted:       #6d7982;
  --line:        #dfe4dc;

  /* Blue carries the structure: header accents, links, footer. */
  --forest:      #35498f;
  --forest-deep: #27376f;
  --forest-soft: #eceff8;
  /* Green is the second voice: icons, highlights, hovers. */
  --brick:       #4f8a34;
  --brick-soft:  #edf4e8;

  /* Names the shared content stylesheet reads. */
  --c-text:   var(--ink-soft);
  --c-strong: var(--ink);
  --c-muted:  var(--muted);
  --c-line:   var(--line);
  --c-quiet:  var(--sand-deep);
  --c-surface: var(--surface);
  --c-accent: var(--flag-green);

  /* Barvy, které jde dát textu v editoru. Pevný seznam schválně: web tak drží
     jednu paletu místo pěti skoro stejných zelených. */
  --c-zelena:     #4a7c2d;
  --c-tyrkysova:  #0f6b73;
  --c-modra:      #2f4383;
  --c-fialova:    #6b3fa0;
  --c-ruzova:     #a82a67;
  --c-cervena:    #a33224;
  --c-oranzova:   #a95312;
  --c-okrova:     #7a6212;
  --c-hneda:      #6d4c33;
  --c-seda:       #69747d;

  /* Barvy pro bublinu nad grafem. Ta je vždycky opačná než stránka — na
     světlé stránce tmavá — takže v ní potřebují opačné odstíny než text
     kolem: na tmavém pozadí ty světlé, na světlém ty tmavé. Původní červená
     tam měla kontrast 2,4:1 a nedala se přečíst. */
  --c-zelena-inv:  #8fc46c;
  --c-cervena-inv: #e58a7c;

  --shell:   1160px;
  --prose:   68ch;
  --radius:  14px;
  --radius-s: 9px;

  --shadow-s: 0 1px 2px rgba(24, 32, 41, .05), 0 2px 8px rgba(24, 32, 41, .04);
  --shadow-m: 0 2px 6px rgba(24, 32, 41, .06), 0 12px 28px rgba(24, 32, 41, .08);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
           ui-serif, "Times New Roman", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sand:        #121820;
    --sand-deep:   #0d1219;
    --surface:     #1a212a;
    --ink:         #e6ebf0;
    --ink-soft:    #b6c0c9;
    --muted:       #8a959e;
    --line:        #2a333d;

    /* Both flag colours are lifted so they carry on a dark background. */
    --forest:      #8ba2e0;
    --forest-deep: #a8bbee;
    --forest-soft: #1c2436;
    --brick:       #8fc46c;
    --brick-soft:  #1d2618;

    /* Na tmavém pozadí musí být všechny světlejší, jinak nejsou vidět. */
    --c-zelena:     #8fc46c;
    --c-tyrkysova:  #57c3cc;
    --c-modra:      #8ba2e0;
    --c-fialova:    #b79aec;
    --c-ruzova:     #ef8fba;
    --c-cervena:    #e58a7c;
    --c-oranzova:   #eda269;
    --c-okrova:     #d6bd5c;
    --c-hneda:      #c9a483;
    --c-seda:       #98a3ac;

    /* Bublina se v tmavém režimu obrátí na světlou, takže i tyhle. */
    --c-zelena-inv:  #3d6824;
    --c-cervena-inv: #a33224;

    --shadow-s: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-m: 0 8px 28px rgba(0, 0, 0, .45);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  -webkit-text-size-adjust: 100%;
}

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 22px; }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 12px; top: 12px; z-index: 200;
  background: var(--surface); color: var(--ink);
  padding: 10px 14px; border-radius: var(--radius-s); box-shadow: var(--shadow-m);
}

a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brick); }
:focus-visible { outline: 2px solid var(--brick); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.18; letter-spacing: -.012em; }

/* ---------- emblem ---------- */

.emblem { width: 60px; height: 40px; flex: none; display: block; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
/* A thin band of the flag across the very top of every page. Cheaper than a
   blurred backdrop and far kinder to a slow phone. */
.site-header::before {
  content: ""; display: block; height: 4px;
  background: linear-gradient(to right,
    var(--flag-green) 0%, var(--flag-green) 50%,
    var(--flag-blue) 50%, var(--flag-blue) 100%);
}

.header-inner {
  display: flex; align-items: center; gap: 16px;
  min-height: 74px; flex-wrap: wrap;
  max-width: 1320px;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--forest); text-decoration: none; margin-right: auto;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.16; }
.brand-name {
  font-family: var(--serif); font-size: 25px; font-weight: 700;
  color: var(--ink); letter-spacing: -.02em;
}
.brand-sub { font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }

.mainnav > ul {
  display: flex; flex-wrap: wrap; gap: 2px;
  list-style: none; margin: 0; padding: 0;
}
.mainnav li { position: relative; }
.mainnav a {
  display: block; padding: 8px 12px; border-radius: 8px;
  color: var(--ink-soft); text-decoration: none;
  font-size: 15.5px; font-weight: 500; white-space: nowrap;
}
.mainnav a:hover { background: var(--forest-soft); color: var(--forest); }
.mainnav a[aria-current="page"] { color: var(--forest); background: var(--forest-soft); font-weight: 600; }

/* A parent keeps its own link clickable; the caret opens the submenu. */
.mainnav .has-sub > a { padding-right: 30px; }
.sub-toggle {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 20px; height: 20px; padding: 0;
  display: grid; place-items: center;
  border: 0; border-radius: 5px; background: transparent;
  color: var(--muted); cursor: pointer;
}
.sub-toggle svg { width: 12px; height: 12px; transition: transform .15s ease; }
.sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.has-sub:hover .sub-toggle, .sub-toggle:focus-visible { color: var(--forest); }

.submenu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  min-width: 220px; margin: 0; padding: 7px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-m);
  opacity: 0; visibility: hidden; transform: translateY(-5px);
  transition: opacity .13s ease, transform .13s ease, visibility .13s;
}
/* A green edge ties the submenu to the flag rule above it. */
.submenu::before {
  content: ""; position: absolute; top: 0; left: 14px; right: 14px; height: 3px;
  border-radius: 0 0 3px 3px; background: var(--flag-green);
}
.has-sub:hover > .submenu,
.has-sub:focus-within > .submenu,
.has-sub.open > .submenu { opacity: 1; visibility: visible; transform: translateY(0); }

/* Near the right edge the panel would hang off the page and give the whole
   site a horizontal scrollbar, so the last entries open leftwards. */
.mainnav > ul > li:nth-last-child(-n+3) > .submenu { left: auto; right: 0; }
.submenu a { padding: 9px 12px; font-size: 15px; white-space: normal; }

.nav-toggle {
  display: none; align-items: center; gap: 9px;
  padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 15px;
  font-weight: 550; cursor: pointer;
}
.nav-toggle-bars { display: grid; gap: 4px; }
.nav-toggle-bars i { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }

@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }
  .mainnav { display: none; width: 100%; padding-bottom: 14px; }
  .mainnav.open { display: block; }
  .mainnav > ul { flex-direction: column; gap: 1px; }
  .mainnav a { padding: 12px; font-size: 16.5px; }

  /* On a phone the submenu is a plain indented list that folds open,
     not a floating panel there is no room for. */
  .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    display: none; box-shadow: none; border: 0; border-radius: 0;
    margin: 0 0 4px 14px; padding: 0 0 0 12px;
    border-left: 2px solid var(--line); min-width: 0;
  }
  .submenu::before { display: none; }
  .has-sub.open > .submenu { display: block; }
  .has-sub:hover > .submenu:not(.open) { display: none; }
  .sub-toggle { width: 40px; height: 40px; right: 2px; }
  .sub-toggle svg { width: 15px; height: 15px; }
}

/* ---------- hero ---------- */

.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }

.hero-art { position: absolute; inset: 0; }
.hero-art svg { width: 100%; height: 100%; display: block; }

/* Fotografie za nadpisem.
 *
 * Dřív přes ni šel světlý závoj z barvy stránky a snímek se v něm ztrácel.
 * Teď je to obráceně: fotka zůstane sytá a text se přizpůsobí jí — je bílý
 * a pod ním je jen tolik ztmavení, kolik je potřeba, aby se dal přečíst.
 *
 * Ztmavení je soustředěné pod text a k okrajům rychle mizí, takže obraz
 * kolem zůstane nedotčený.
 *
 * Kolik ho má být, je změřené na těch šesti snímcích, ne odhadnuté. V místě,
 * kde stojí text, mají průměrný jas 0,31 — jsou to lesy, voda a pole. Přes
 * 40 % černé vyjde bílému písmu kontrast kolem 13:1, tedy s velkou rezervou.
 * Jenže tytéž snímky mají ojedinělá skoro bílá místa (0,99): osvětlené střechy
 * a odlesky na hladině. Tam samotné ztmavení nestačí a dělá to stín pod
 * písmem. Ztmavit natolik, aby to vyšlo i nad bílou střechou, znamená 58 %
 * černé — a to už ze snímku nezbude nic, což byl přesně ten původní problém.
 */
.hero-photo .hero-art img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: 50% 45%;
}
.hero-photo .hero-art::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(64% 58% at 50% 46%,
      rgba(8, 12, 18, .44) 0%,
      rgba(8, 12, 18, .36) 62%,
      rgba(8, 12, 18, .04) 100%),
    linear-gradient(to bottom,
      rgba(8, 12, 18, .18),
      transparent 34%,
      rgba(8, 12, 18, .26));
}

/* Nad fotkou je text bílý v obou režimech — snímek je pořád tentýž. Stín mu
   dává obrys i tam, kde pod ním něco světlého prosvítá. */
.hero-photo .hero-title,
.hero-photo .hero-lead {
  color: #fff;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, .55),
    0 2px 6px rgba(0, 0, 0, .45),
    0 4px 26px rgba(0, 0, 0, .55);
}

.hero-photo .btn-quiet {
  background: rgba(255, 255, 255, .92);
  border-color: transparent;
  color: var(--ink);
}
.hero-photo .btn-quiet:hover { background: #fff; color: var(--forest-deep); }

/* Odkud snímek je, potichu — ale čitelně. */
.hero-credit {
  position: absolute; right: 14px; bottom: 10px; margin: 0;
  font-size: 11.5px; letter-spacing: .02em;
  color: rgba(255, 255, 255, .88);
  text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}

.hero-inner {
  position: relative;
  padding: clamp(64px, 11vw, 124px) 22px clamp(60px, 10vw, 108px);
  max-width: 820px; margin: 0 auto; text-align: center;
}
.hero-kicker {
  display: inline-block; margin: 0 0 18px;
  padding: 6px 16px; border-radius: 99px;
  background: var(--flag-green); color: #fff;
  font-size: 12.5px; letter-spacing: .14em;
  text-transform: uppercase; font-weight: 700;
}
.hero-title {
  margin: 0; font-size: clamp(46px, 9vw, 92px); line-height: .98;
  letter-spacing: -.035em; font-weight: 700;
}
.hero-lead {
  margin: 18px auto 0; max-width: 46ch;
  font-size: clamp(17px, 2.1vw, 20px); color: var(--ink-soft);
}
.hero-actions { margin-top: 30px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block; padding: 13px 26px; border-radius: 99px;
  font: inherit; font-size: 16px; font-weight: 650; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--flag-blue); color: #fff; }
.btn-primary:hover { background: #2a3a75; color: #fff; }
.btn-quiet {
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border-color: var(--line); color: var(--ink);
}
.btn-quiet:hover { border-color: var(--forest); color: var(--forest); }

/* ---------- bands and headings ---------- */

.band { padding: clamp(40px, 6vw, 66px) 22px; }
/* An introduction sitting directly above a list of articles: full space above
   it, very little below, so the text and the cards read as one block. */
.band-tight { padding-bottom: 0; }

/* Albums by year.
 *
 * A plain <details> per year: the newest one open, the rest folded. It needs
 * no script, it works with the keyboard, and a browser does not fetch the
 * thumbnails inside a closed year until somebody opens it — which matters
 * once there are fifteen of them. */
.year { border-bottom: 1px solid var(--line); }
.year:first-of-type { border-top: 1px solid var(--line); }

.year-head {
  display: flex; align-items: baseline; gap: 14px;
  padding: 18px 4px; cursor: pointer;
  list-style: none; /* Safari draws its own marker without this. */
}
.year-head::-webkit-details-marker { display: none; }
.year-head:hover .year-name { color: var(--forest); }

.year-name {
  font-size: clamp(24px, 3.2vw, 32px); font-weight: 700;
  letter-spacing: -.02em; color: var(--ink);
}
.year-count { font-size: 14px; color: var(--muted); }

/* The chevron is drawn here rather than in the markup: it is punctuation,
   not content. */
.year-mark {
  margin-left: auto; width: 11px; height: 11px; flex: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform .15s ease;
}
.year[open] .year-mark { transform: rotate(225deg) translate(-3px, -3px); }

.year[open] .album-grid { padding-bottom: 30px; }

@media (prefers-reduced-motion: reduce) {
  .year-mark { transition: none; }
}

.band-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 26px;
}
.band-head h2 {
  margin: 0; font-size: clamp(27px, 3.8vw, 37px);
  font-weight: 700; letter-spacing: -.024em;
  display: flex; align-items: center; gap: 13px;
}
.band-head h2::before {
  content: ""; width: 7px; height: 30px; border-radius: 4px; flex: none;
  background: linear-gradient(to bottom, var(--flag-green) 50%, var(--flag-blue) 50%);
}
.more-link { font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; }

.page-head {
  background: linear-gradient(to bottom, var(--brick-soft) 0%, var(--forest-soft) 100%);
  border-bottom: 1px solid var(--line);
  padding: clamp(32px, 5vw, 56px) 0 clamp(28px, 4vw, 44px);
}
.page-head h1 {
  margin: 8px 0 0; font-size: clamp(34px, 5.6vw, 58px);
  font-weight: 700; letter-spacing: -.028em;
}
.page-lead {
  margin: 14px 0 0; max-width: 60ch;
  font-size: clamp(16.5px, 1.9vw, 19px); color: var(--ink-soft);
}

.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--forest); text-decoration: underline; }

/* ---------- tiles ---------- */

.tiles {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}
.tile {
  display: flex; align-items: center; gap: 15px;
  padding: 18px 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-s); text-decoration: none; color: var(--ink);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.tile:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-m);
  border-color: color-mix(in srgb, var(--forest) 45%, var(--line));
  color: var(--ink);
}
.tile-icon {
  flex: none; width: 48px; height: 48px; display: grid; place-items: center;
  border-radius: 12px; background: var(--brick-soft); color: var(--brick);
  transition: background .14s ease, color .14s ease;
}
/* Alternating the flag colours keeps a row of tiles from going flat. */
.tile:nth-child(even) .tile-icon { background: var(--forest-soft); color: var(--forest); }
.tile:hover .tile-icon { background: var(--flag-green); color: #fff; }
.tile:nth-child(even):hover .tile-icon { background: var(--flag-blue); color: #fff; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7;
        stroke-linecap: round; stroke-linejoin: round; }
.tile-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile-title { font-weight: 650; font-size: 16.5px; }
.tile-note { font-size: 14px; color: var(--muted); }
.tile-arrow { margin-left: auto; color: var(--muted); font-size: 18px; transition: transform .14s ease; }
.tile:hover .tile-arrow { transform: translateX(3px); color: var(--brick); }

/* ---------- cards ---------- */

.cards {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  align-items: start;
}
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-s); overflow: hidden;
  transition: transform .14s ease, box-shadow .14s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); }
/* Article pictures keep their own proportions. Cropping them to a tidy
   rectangle looked neater but cut the titles off posters and invitations,
   which is most of what the village publishes. */
.card-media { display: block; background: var(--sand-deep); }
.card-media img { width: 100%; height: auto; display: block; }
.card-body { padding: 19px 21px 23px; display: flex; flex-direction: column; gap: 9px; }
.card-meta {
  margin: 0; font-size: 13px; color: var(--muted);
  letter-spacing: .02em; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.card-title { margin: 0; font-size: 20.5px; line-height: 1.26; font-weight: 650; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--forest); }
.card-perex { margin: 0; color: var(--ink-soft); font-size: 15.5px; }

.chip {
  display: inline-block; padding: 2px 9px; border-radius: 99px;
  background: var(--brick-soft); color: var(--brick);
  font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase;
}

/* ---------- post list ---------- */

/* ---------- pinned card ---------- */

/* A pinned article is marked with the flag's green along the top rather than
   a different layout, so the grid stays one shape. */
.card.pinned { border-color: color-mix(in srgb, var(--flag-green) 55%, var(--line)); }
.card.pinned .card-body { border-top: 3px solid var(--flag-green); }

/* Článek, který ještě není veřejný. Vidí ho jen přihlášený správce — komu se
   neukazuje, tomu se do stránky ani nedostane — ale ať je na první pohled
   poznat, že tohle návštěvník nevidí. Šrafování proto, že barva sama by se
   dala splést s připnutím. */
.card.nezverejneno {
  border-color: #d9a441;
  background: repeating-linear-gradient(
    135deg, var(--surface), var(--surface) 12px,
    color-mix(in srgb, #d9a441 7%, var(--surface)) 12px,
    color-mix(in srgb, #d9a441 7%, var(--surface)) 24px);
}
/* Na rozdíl od ostatních štítků nese datum, takže je to věta, ne nálepka —
   verzálky by ji dělaly hůř čitelnou. */
.chip-plan {
  display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 99px;
  background: #fdf1dc; color: #8a5300; border: 1px solid #f0d9ae;
  font-size: 12px; font-weight: 650;
  vertical-align: middle; white-space: nowrap;
}

/* Na stránce samotného článku pruh, ne štítek: není tam s čím ho srovnat. */
.pruh-plan {
  margin: 0 0 14px; padding: 10px 14px;
  border-left: 4px solid #d9a441; border-radius: 0 8px 8px 0;
  background: #fdf1dc; color: #6b4200; font-size: 15px;
}

.attachments { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); max-width: var(--prose); }

/* Obal kolem obrázku v článku, aby měla lupa kam sednout. Smršťuje se na
   šířku obrázku, ne odstavce — jinak by tlačítko viselo v prázdnu vpravo. */
.obr-lupa {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
}
.attachments h2 { margin: 0 0 12px; font-size: 20px; }
.attachments ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.attachments a {
  display: block; padding: 12px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-s); text-decoration: none;
}
.attachments a:hover { border-color: var(--forest); }

/* ---------- empty state ---------- */

.empty-state {
  padding: 46px 26px; text-align: center;
  background: var(--surface); border: 1px dashed var(--line);
  border-radius: var(--radius); color: var(--muted);
}
.empty-state.tall { padding: 84px 26px; }
.empty-title { margin: 0 0 6px; font-family: var(--serif); font-size: 22px; color: var(--ink); }
.empty-state p { margin: 0 0 6px; }
.empty-code {
  margin: 0 0 8px; font-family: var(--serif); font-size: 72px; line-height: 1;
  color: var(--forest); opacity: .35;
}

/* ---------- notice ---------- */


/* ---------- footer ---------- */

.site-footer {
  margin-top: auto;
  border-top: 5px solid var(--flag-green);
  background: var(--flag-blue);
  color: color-mix(in srgb, #ffffff 84%, var(--forest-deep));
  padding: 34px 0 22px;
}
@media (prefers-color-scheme: dark) {
  .site-footer { background: var(--sand-deep); border-top: 5px solid var(--flag-green); color: var(--ink-soft); }
}

.footer-grid {
  display: grid; gap: 14px 34px;
  grid-template-columns: 1fr 1fr;
}
.footer-brand { grid-column: 1 / -1; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; gap: 14px; } }

.footer-brand { display: flex; gap: 14px; align-items: flex-start; color: inherit; }
.footer-name { margin: 0; font-family: var(--serif); font-size: 20px; color: #fff; }
@media (prefers-color-scheme: dark) { .footer-name { color: var(--ink); } }
.footer-note { margin: 2px 0 0; font-size: 14px; opacity: .8; }

.site-footer h2 { margin: 0 0 5px; font-size: 14px; letter-spacing: .1em;
                  text-transform: uppercase; font-family: var(--sans); opacity: .7; }
/* Odkazy v patičce na řádku za sebou. Sloupec z nich dělal patičku vysokou
   přes půl obrazovky, a přitom je to jen rozcestník. */
.footer-radka { margin: 0; font-size: 15px; line-height: 1.9; }
.footer-radka a { color: inherit; text-decoration: none; opacity: .9; white-space: nowrap; }
.footer-radka a:hover { color: #fff; text-decoration: underline; opacity: 1; }
@media (prefers-color-scheme: dark) { .footer-radka a:hover { color: var(--forest); } }

.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 24px; padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, #ffffff 16%, transparent);
  font-size: 14px; opacity: .75;
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: inherit; }

html, body { min-height: 100%; }
body { display: flex; flex-direction: column; }
main { flex: 1; }

/* ---------- album listing ---------- */

.album-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.album-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; text-decoration: none;
  color: var(--ink); box-shadow: var(--shadow-s);
  transition: transform .14s ease, box-shadow .14s ease;
}
.album-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); color: var(--ink); }

.album-card-media {
  position: relative; display: block;
  aspect-ratio: 4 / 3; background: var(--sand-deep); overflow: hidden;
}
.album-card-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .4s ease;
}
.album-card:hover .album-card-media img { transform: scale(1.04); }

.album-card-empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--muted); opacity: .5;
}
.album-card-empty .icon { width: 40px; height: 40px; }

.album-card-count {
  position: absolute; right: 10px; bottom: 10px;
  padding: 4px 11px; border-radius: 99px;
  background: var(--flag-blue); color: #fff;
  font-size: 12.5px; font-weight: 650;
}

.album-card-body { padding: 15px 18px 18px; display: flex; flex-direction: column; gap: 3px; }
.album-card-title { font-family: var(--serif); font-size: 20px; font-weight: 650; line-height: 1.24; }
.album-card-date { font-size: 13.5px; color: var(--muted); }

/* ---------- photo grid ---------- */

.photo-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
/* Obal drží lupu; mřížkovou buňkou je teď on. */
.photo-dlazdice { position: relative; }

.photo-cell {
  display: block; aspect-ratio: 1; overflow: hidden;
  border-radius: var(--radius-s); background: var(--sand-deep);
  cursor: zoom-in;
}
.photo-cell img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .3s ease, filter .2s ease;
}
.photo-cell:hover img { transform: scale(1.05); filter: brightness(1.04); }
.photo-dlazdice:hover .photo-zoom,
.photo-dlazdice:focus-within .photo-zoom { opacity: 1; }

.album-nav {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line);
  flex-wrap: wrap; font-size: 15px;
}
.album-nav a { text-decoration: none; font-weight: 600; }
.album-nav-up { color: var(--muted); }

/* ---------- lightbox ---------- */

body.lb-open { overflow: hidden; }

.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 8px; padding: 18px;
  background: rgba(14, 18, 24, .94);
}
.lb-stage {
  margin: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; min-width: 0; height: 100%;
}
.lb-stage img {
  max-width: 100%; max-height: calc(100vh - 130px);
  object-fit: contain; border-radius: 6px;
  transition: opacity .15s ease;
}
.lightbox.loading .lb-stage img { opacity: .55; }
.lb-stage figcaption { color: #e6ebf0; font-size: 15px; text-align: center; max-width: 70ch; }

.lightbox button {
  background: rgba(255, 255, 255, .1); color: #fff;
  border: 0; border-radius: 99px; cursor: pointer;
  width: 52px; height: 52px; font-size: 27px; line-height: 1;
  display: grid; place-items: center;
  transition: background .12s ease;
}
.lightbox button:hover { background: rgba(255, 255, 255, .22); }
.lb-close {
  position: absolute; top: 16px; right: 16px;
  width: 44px !important; height: 44px !important; font-size: 19px !important;
}
.lb-counter {
  position: absolute; left: 0; right: 0; bottom: 14px;
  margin: 0; text-align: center; color: #b9c4cf; font-size: 13.5px;
}

@media (max-width: 640px) {
  .lightbox { grid-template-columns: 1fr; padding: 10px; }
  .lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-stage img { max-height: calc(100vh - 110px); }
}



/* ---------- icons in headings and submenus ---------- */

.head-icon {
  display: inline-grid; place-items: center; vertical-align: -.16em;
  width: 1.05em; height: 1.05em; margin-right: .38em;
  color: var(--flag-green);
}
.head-icon .icon { width: 100%; height: 100%; }

.submenu a { display: flex; align-items: center; gap: 10px; }
.sub-icon {
  flex: none; width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 7px; background: var(--brick-soft); color: var(--brick);
}
.sub-icon .icon { width: 15px; height: 15px; }
.submenu a:hover .sub-icon { background: var(--flag-green); color: #fff; }

@media (max-width: 980px) {
  .sub-icon { width: 24px; height: 24px; }
}

/* A note meant for whoever maintains the site, shown only when they are
   signed in. The dashed amber frame is there so it can never be mistaken
   for something a visitor is supposed to read. */
.empty-state.editor-only {
  border-style: dashed;
  border-color: var(--flag-green);
  background: var(--brick-soft);
}
.empty-state.editor-only .empty-title { color: var(--brick); }

/* A hidden section, seen only by whoever maintains the site. */
.hidden-note {
  margin: 12px 0 0; padding: 9px 14px;
  background: var(--brick-soft); border-left: 3px solid var(--brick);
  border-radius: 0 8px 8px 0;
  font-size: 14.5px; color: var(--ink-soft);
}

/* ---------- rozpočet ---------- */

.roky { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 22px; }
.rok {
  padding: 7px 15px; border-radius: 99px; text-decoration: none;
  border: 1px solid var(--line); color: var(--muted);
  font-size: 14px; font-weight: 600; background: var(--surface);
}
.rok:hover { border-color: var(--forest); color: var(--forest); }
.rok.on { background: var(--forest); border-color: var(--forest); color: #fff; }

.cisla {
  display: grid; gap: 12px; margin: 0 0 30px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.cislo-karta {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--shadow-s);
}
.cislo-karta .cislo-popis {
  display: block; font-size: 12.5px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
  margin-bottom: 6px;
}
.cislo-karta strong {
  font-size: clamp(19px, 2.4vw, 24px); font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.cislo-karta.prijmy strong { color: var(--c-zelena); }
.cislo-karta.vydaje strong { color: var(--c-cervena); }
.cislo-karta.konec { border-color: var(--forest); }

.rozpocet-verejny td { vertical-align: top; }
.rozpocet-verejny tr.prijem td { color: var(--c-zelena); }
.rozpocet-verejny tr.prijem td:first-child { font-weight: 600; }

.graf-obal h2 { margin: 0 0 12px; }

/* Tabulka hospodaření.
 *
 * Vlastní pravidla, ne obecná .table: je to jediná tabulka na webu, kde se
 * čísla čtou shora dolů a porovnávají mezi sebou. Proto mají vlastní kraj
 * vpravo, tabulkové číslice stejné šířky a řádek se pod myší podbarví, aby
 * oko nesjelo o řádek vedle. */

/* Bílá karta pod tabulkou. Na pozadí stránky splývala a podbarvení řádku
   pod myší nebylo vidět — mezi --sand a --sand-deep je šest jednotek. */
.ucty-karta {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-s);
  padding: 2px 22px;
}

.ucty { width: 100%; border-collapse: collapse; }

.ucty thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--surface);
  padding: 10px 14px 10px 0;
  text-align: left; white-space: nowrap;
  font-size: 12px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.ucty thead th.cislo { text-align: right; }
.ucty thead th:last-child { padding-right: 0; }

.ucty td {
  padding: 13px 14px 13px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;
}
.ucty td:last-child { padding-right: 0; }
.ucty tbody tr:last-child td { border-bottom: 0; }

/* Podbarvení pod myší sahá i do okrajů, aby řádek působil jako celek. */
.ucty tbody tr { transition: background .1s ease; }
.ucty tbody tr:hover { background: var(--forest-soft); }
.ucty tbody tr:hover td:first-child { box-shadow: -14px 0 0 var(--forest-soft); }
.ucty tbody tr:hover td:last-child { box-shadow: 14px 0 0 var(--forest-soft); }

/* Název nese váhu, účel je k němu poznámka — proto potichu. Oba mají svůj
   sloupec: vejdou se vedle sebe a tabulka je o polovinu kratší než když
   stály pod sebou. */
.ucty-co { width: 34%; font-weight: 650; color: var(--ink); }
.ucty-ucel-sl { width: 28%; color: var(--muted); font-size: 14px; }

.ucty .cislo {
  text-align: right; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ucty-castka { font-weight: 600; color: var(--ink); }
.ucty-stav { color: var(--muted); }

/* Šipka drží svoje místo, i když tam není — čísla tak zůstanou zarovnaná. */
.smer {
  display: inline-block; width: 1em; margin-right: 4px;
  text-align: center; font-weight: 700; color: var(--c-cervena);
}
.ucty tr.prijem .smer { color: var(--c-zelena); }
.ucty tr.prijem .ucty-castka { color: var(--c-zelena); }

.ucty-kat { width: 1%; white-space: nowrap; }
.znacka {
  display: inline-block; padding: 3px 10px; border-radius: 99px;
  background: var(--sand-deep); color: var(--ink-soft);
  font-size: 12.5px; font-weight: 600;
}
.ucty tr:hover .znacka { background: var(--surface); }
.ucty tr:hover .ucty-stav { color: var(--ink-soft); }

/* Na úzké obrazovce padá nejdřív kategorie, pak účel — v tom pořadí se dají
   nejsnáz postrádat. Název, částka a zůstatek zůstanou vždycky. */
@media (max-width: 760px) {
  .ucty-kat { display: none; }
  .ucty-co { width: auto; }
}
@media (max-width: 560px) {
  .ucty-ucel-sl { display: none; }
}

/* Text jen pro odečítače obrazovky. Šipka u částky je obrázek; „příjem“ nebo
   „výdaj“ je to, co má slyšet někdo, kdo ji nevidí. */
.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Odkaz na zbytek alba pod článkem. */
.album-vic { margin: 16px 0 0; font-size: 15px; }
.album-vic a { font-weight: 600; text-decoration: none; }
.album-vic a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Stránkování výpisu. */
.strany {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; flex-wrap: wrap; margin-top: 34px;
}
.strany-cisla { display: flex; gap: 4px; flex-wrap: wrap; }
.strana {
  display: inline-block; min-width: 38px; padding: 8px 13px;
  border: 1px solid var(--line); border-radius: 99px;
  background: var(--surface); color: var(--ink-soft);
  text-align: center; text-decoration: none; font-size: 14.5px; font-weight: 600;
}
.strana:hover { border-color: var(--forest); color: var(--forest); }
.strana.on { background: var(--forest); border-color: var(--forest); color: #fff; }
.strana.vypnuto { opacity: .4; border-color: transparent; background: none; }
