/* Jižní Čechy a Šumava – nový vzhled (2026) */

:root {
  --brand: #0b4f9c;
  --brand-ink: #083a73;
  --brand-2: #0a86d6;
  --sky: #e3f2fd;
  --sky-2: #cfe7fb;
  --forest: #2e6b4f;
  --gold: #b8862b;
  --ink: #18212c;
  --ink-2: #3a4655;
  --muted: #667285;
  --line: #dfe5ec;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --shadow: 0 1px 2px rgba(16, 32, 56, .06), 0 6px 20px rgba(16, 32, 56, .06);
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1200px;
  --on-brand: #fff;
  color-scheme: light;
}

/* tmavý vzhled: podle systému, pokud si návštěvník nevybral světlý (data-theme na <html>),
   nebo vždy, když si vybral tmavý – přepínač v hlavičce, viz site.js */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #7db8f5;
    --brand-ink: #a9d0fa;
    --brand-2: #5fb0ef;
    --sky: #14263a;
    --sky-2: #1a3150;
    --forest: #7cc4a0;
    --gold: #e2b357;
    --ink: #e8edf3;
    --ink-2: #c3ccd7;
    --muted: #93a0b1;
    --line: #2a3442;
    --bg: #0f141b;
    --surface: #161d27;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    --on-brand: #0f141b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #7db8f5;
  --brand-ink: #a9d0fa;
  --brand-2: #5fb0ef;
  --sky: #14263a;
  --sky-2: #1a3150;
  --forest: #7cc4a0;
  --gold: #e2b357;
  --ink: #e8edf3;
  --ink-2: #c3ccd7;
  --muted: #93a0b1;
  --line: #2a3442;
  --bg: #0f141b;
  --surface: #161d27;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  --on-brand: #0f141b;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }
body {
  margin: 0;
  font: 17px/1.65 var(--sans);
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-2); }
svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: max(16px, env(safe-area-inset-left)); }
.narrow { max-width: 860px; }
.muted { color: var(--muted); font-weight: 400; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--surface); padding: 6px 10px; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; border-radius: 4px; }

/* ---------------------------------------------------------------- hlavička */

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.bar { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand img { width: 30px; height: auto; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand strong { font-family: var(--serif); font-size: 1.2rem; letter-spacing: .01em; color: var(--brand-ink); white-space: nowrap; }
.brand small { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.search { position: relative; margin-left: auto; width: min(340px, 34vw); }
.search input {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
  padding: 9px 14px 9px 38px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg) no-repeat 13px 50% / 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667285' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m16 16 4.5 4.5'/%3E%3C/svg%3E");
}
.search input:focus { outline: none; border-color: var(--brand-2); background-color: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 25%, transparent); }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  list-style: none; margin: 0; padding: 6px; max-height: 60vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.search-results a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.search-results a span { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.search-results a:hover, .search-results a.sel { background: var(--sky); }
.search-results .empty { padding: 8px 10px; color: var(--muted); }

.langs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.langs a { font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-decoration: none; color: var(--muted); padding: 4px 9px; border-radius: 999px; }
.langs a[aria-current] { background: var(--brand); color: #fff; }
.langs a[aria-current] { color: var(--on-brand); }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: 8px; cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }

.theme-toggle { display: inline-flex; align-items: center; justify-content: center; flex: none; background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; width: 36px; height: 36px; padding: 0; cursor: pointer; }
.theme-toggle:hover { color: var(--brand); border-color: var(--brand-2); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .ico-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ico-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .ico-moon { display: none; }
}

.main-nav { border-top: 1px solid var(--line); }
.nav-inner { display: flex; justify-content: space-between; gap: 24px; }
.nav-cats, .nav-util { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.main-nav a {
  display: block; padding: 11px 11px; white-space: nowrap; font-size: .92rem; font-weight: 500;
  color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--brand); }
.main-nav a[aria-current] { color: var(--brand); border-bottom-color: var(--brand); }
.nav-util a { color: var(--muted); font-weight: 400; }


@media (max-width: 860px) {
  .bar { gap: 10px; flex-wrap: wrap; padding-block: 8px; }
  .brand small { display: none; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .search { order: 5; width: 100%; margin: 0; }
  .langs { margin-left: auto; }
  .langs + .nav-toggle, .theme-toggle + .nav-toggle { margin-left: 0; }
  .bar.has-theme .search { width: calc(100% - 50px); }
  .bar.has-theme .search ~ .theme-toggle { order: 6; height: 40px; width: 40px; }
  .main-nav { display: none; }
  .main-nav.open { display: block; max-height: calc(100dvh - 120px); overflow: auto; }
  .nav-inner { flex-direction: column; gap: 0; padding-block: 8px 16px; }
  .nav-cats, .nav-util { flex-direction: column; overflow: visible; mask-image: none; }
  .nav-util { display: flex; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
  .main-nav a { padding: 12px 4px; font-size: 1.02rem; border-bottom: 0; }
  .main-nav a[aria-current] { border-left: 3px solid var(--brand); padding-left: 10px; }
}
@media (max-width: 480px) {
  .bar.has-theme .brand { flex: 1 1 0; }
  .bar.has-theme .brand strong { white-space: normal; }
}

/* ---------------------------------------------------------------- drobečky, nadpisy */

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .85rem; color: var(--muted); padding-top: 22px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }
.kicker { margin: 0; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--gold); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem); margin: .2em 0 .35em; letter-spacing: -.01em; text-wrap: balance; }

/* ---------------------------------------------------------------- detail místa */

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; padding-bottom: 56px; }
.place { min-width: 0; }
.place-head { padding-bottom: 8px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px;
  font-size: .88rem; font-weight: 500; text-decoration: none; color: var(--brand-ink);
  background: var(--sky); border: 1px solid var(--sky-2); transition: background .15s, transform .15s;
}
.chip:hover { background: var(--sky-2); color: var(--brand-ink); transform: translateY(-1px); }

.prose { max-width: 72ch; }
.prose p { margin: 0 0 1.05em; }
.prose p.location { font-size: 1.13rem; line-height: 1.6; color: var(--ink-2); }
.prose p.location::first-line { color: var(--ink); }
.prose a.person, .prose a.term { color: var(--forest); text-decoration: underline dotted; text-underline-offset: .22em; }
.prose .p_title { font-weight: 700; }
/* rámečky (data, přístup) neobtékají plovoucí fotku – jinak jim fotka „ukousne“ okraj a popisek */
.prose p.data, .prose p.access { clear: both; }
.prose p.data { padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: .95rem; }
.prose p.access {
  padding: 14px 18px; border-left: 4px solid var(--forest); background: color-mix(in srgb, var(--forest) 8%, var(--surface));
  border-radius: 0 12px 12px 0; font-size: .96rem;
}
.prose p.access .lbl { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--forest); margin-right: 4px; }
.environ-box { clear: both; margin: 28px 0 8px; padding: 18px 22px 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.environ-box h2, .env-title { font-size: 1.2rem; margin: 0 0 .6em; }
.environ-box p { font-size: .96rem; }

/* fotky v textu */
.fig { margin: .3em 0 1em; max-width: 300px; }
.fig-l { float: left; margin-right: 22px; }
.fig-r { float: right; margin-left: 22px; }
.fig.small { max-width: 150px; }
.fig img, .tile img { display: block; width: 100%; border-radius: 10px; background: var(--sky); }
.fig a, .tile a { display: block; border-radius: 10px; overflow: hidden; }
.fig a img, .tile a img { transition: transform .35s ease; }
.fig a:hover img, .tile a:hover img { transform: scale(1.03); }
figcaption { font-size: .8rem; line-height: 1.4; color: var(--muted); margin-top: 6px; }
.photos { clear: both; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin: 6px 0 1.4em; }
.photos.one { grid-template-columns: minmax(0, 590px); }
.photos.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 440px; }
/* fotky v textu: po třech, neúplný řádek (i samostatná fotka) na střed */
.prose .photos { display: flex; flex-wrap: wrap; justify-content: center; }
.prose .photos > .tile { flex: 0 0 calc((100% - 28px) / 3); min-width: 0; }
.prose .photos.cols-2 { margin-inline: auto; }
.prose .photos.cols-2 > .tile { flex-basis: calc((100% - 14px) / 2); }
.prose .photos.one > .tile { flex: 0 1 590px; }
.prose .photos.one figcaption { text-align: center; }
.tile { margin: 0; }
.tile img { aspect-ratio: 3 / 2; object-fit: cover; }
.photos.one .tile img { aspect-ratio: auto; }
.gallery .tile figcaption small { display: block; opacity: .8; }
.prose::after { content: ""; display: block; clear: both; }

@media (max-width: 640px) {
  .fig, .fig-l, .fig-r { float: none; max-width: none; margin: 0 0 1em; }
  .fig.small { float: right; max-width: 120px; margin: 0 0 8px 14px; }
  .fig.portrait { max-width: 220px; }
  .photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .photos.one { grid-template-columns: 1fr; }
  .prose .photos > .tile, .prose .photos.cols-2 > .tile { flex-basis: calc((100% - 10px) / 2); }
  .prose .photos.one > .tile { flex-basis: 100%; }
  body { font-size: 16.5px; }
}

/* boční seznam */
.side { position: sticky; top: 130px; padding-top: 22px; }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.side-box summary { cursor: pointer; padding: 14px 16px; font-weight: 600; font-size: .92rem; list-style: none; display: flex; justify-content: space-between; gap: 8px; }
.side-box summary::-webkit-details-marker { display: none; }
.count { display: inline-block; font-size: .75rem; font-weight: 600; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 1px 8px; }
.side-filter, .list-filter {
  font: inherit; font-size: .9rem; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; width: 100%;
}
.side-filter { width: calc(100% - 24px); margin: 0 12px 8px; }
.side-box ul { list-style: none; margin: 0; padding: 0 6px 10px; max-height: calc(100vh - 290px); overflow: auto; }
.side-box li a { display: block; padding: 5px 10px; border-radius: 8px; font-size: .9rem; text-decoration: none; color: var(--ink-2); }
.side-box li a:hover { background: var(--sky); color: var(--brand-ink); }
.side-box li a[aria-current] { background: var(--brand); color: #fff; }
.side-box li a[aria-current] { color: var(--on-brand); }

@media (max-width: 1020px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .side { position: static; padding-top: 0; }
  .side-box ul { max-height: 50vh; }
}

/* ---------------------------------------------------------------- seznamy */

.list-head { margin: 4px 0 22px; }
.list-head p { color: var(--muted); margin: 0 0 14px; }
.list-filter { max-width: 360px; }
.cards { list-style: none; padding: 0; margin: 0 0 56px; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.cards a { display: block; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; height: 100%; transition: transform .15s, box-shadow .15s; }
.cards a:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cards .ph { display: block; aspect-ratio: 3 / 2; background: linear-gradient(135deg, var(--sky), var(--sky-2)); }
.cards .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cards .nm { display: block; padding: 9px 12px 11px; font-weight: 600; font-size: .93rem; line-height: 1.3; }
@media (max-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

.pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; }
.pager a { min-width: 38px; text-align: center; padding: 6px 10px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); }
.pager a:hover { border-color: var(--brand-2); color: var(--brand); }
.pager a[aria-current] { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager a[aria-current] { color: var(--on-brand); }

.index-list { list-style: none; padding: 0; margin: 0 0 56px; columns: 3 260px; column-gap: 32px; }
.index-list li { break-inside: avoid; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.index-list a { font-weight: 500; text-decoration: none; }
.index-list a:hover { text-decoration: underline; }
.index-list span { font-size: .8rem; color: var(--muted); text-align: right; }

.entries { margin-bottom: 56px; max-width: none; }
.entry { padding: 18px 0; border-bottom: 1px solid var(--line); }
.entry h2 { font-size: 1.25rem; margin: 0 0 .4em; }
.entry:target { background: var(--sky); border-radius: 12px; padding-inline: 16px; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 10px; }
.tabs a { padding: 6px 12px; border-radius: 999px; text-decoration: none; font-size: .88rem; color: var(--ink-2); border: 1px solid var(--line); background: var(--surface); }
.tabs a[aria-current] { background: var(--brand); color: #fff; border-color: var(--brand); }
.tabs a[aria-current] { color: var(--on-brand); }
.copy { max-width: none; margin-bottom: 56px; }
.copy h2 { font-size: 1.2rem; margin-top: 1.5em; }
.copy .fig img { border-radius: 12px; }

/* ---------------------------------------------------------------- úvod */

.hero { background: linear-gradient(180deg, var(--sky) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: center; padding-block: 56px; }
.hero h1 { font-size: clamp(2.3rem, 1.4rem + 3.6vw, 3.8rem); margin: .15em 0 .3em; color: var(--brand-ink); }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 600; text-decoration: none; }
.btn:hover { background: var(--brand-ink); color: #fff; }
.btn.ghost { background: var(--surface); color: var(--brand-ink); border: 1px solid var(--line); }
.btn, .btn:hover { color: var(--on-brand); }
.hero-grid { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 120px; gap: 10px; }
.h-tile { position: relative; display: block; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.h-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.h-tile:hover img { transform: scale(1.05); }
.h-tile span { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 9px; font-size: .82rem; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.h-tile:nth-child(1) { grid-column: span 4; grid-row: span 2; }
.h-tile:nth-child(2) { grid-column: span 2; grid-row: span 1; }
.h-tile:nth-child(3) { grid-column: span 2; grid-row: span 1; }
.h-tile:nth-child(4) { grid-column: span 3; }
.h-tile:nth-child(5) { grid-column: span 3; }
@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; padding-block: 32px; gap: 28px; }
  .hero-grid { grid-auto-rows: 90px; }
}

.section-title { font-size: 1.6rem; margin: 48px 0 18px; }
.cat-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.cat-cards a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.cat-cards a:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-cards .ph { aspect-ratio: 16 / 9; background: var(--sky); overflow: hidden; }
.cat-cards .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-cards .txt { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.cat-cards strong { font-family: var(--serif); font-size: 1.22rem; }
.cat-cards small { color: var(--muted); font-size: .9rem; }
.cat-cards em { font-style: normal; font-size: .78rem; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }
.tools { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tools a { position: relative; display: flex; flex-direction: column; padding: 16px 44px 16px 18px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; height: 100%; }
.tools a:hover { border-color: var(--brand-2); }
.tools small { color: var(--muted); }
.tools svg { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--brand); }
.sponsor { margin: 48px 0 56px; color: var(--muted); font-size: .85rem; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sponsor img { background: #fff; padding: 6px 10px; border-radius: 8px; vertical-align: middle; }

/* ---------------------------------------------------------------- patička */

.site-footer { border-top: 1px solid var(--line); background: var(--surface); font-size: .88rem; color: var(--muted); padding-bottom: env(safe-area-inset-bottom, 0px); }
.foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-block: 26px; }
.foot strong { color: var(--ink); font-family: var(--serif); font-size: 1.05rem; }
.foot-links { display: flex; flex-direction: column; gap: 4px; text-align: right; }
.foot-links a, .foot a { color: var(--muted); }
.mail { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 640px) { .foot-links { text-align: left; } }

/* ---------------------------------------------------------------- úvodní rozcestník */

.splash { min-height: 100dvh; display: grid; place-items: center; background: radial-gradient(1200px 600px at 50% -10%, var(--sky-2), var(--bg)); }
.splash-in { text-align: center; padding: 40px 20px; max-width: 760px; }
.splash h1 { color: var(--brand-ink); font-size: clamp(2.2rem, 1.4rem + 4vw, 3.6rem); margin: .3em 0 .1em; }
.lang-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 34px 0; }
.lang-card { display: flex; flex-direction: column; gap: 4px; padding: 20px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .15s; }
.lang-card:hover { transform: translateY(-3px); }
.lang-card strong { font-family: var(--serif); font-size: 1.4rem; color: var(--brand-ink); }
.lang-card span { color: var(--muted); font-size: .88rem; }
.small { font-size: .82rem; color: var(--muted); }
.splash .sponsor { justify-content: center; flex-direction: column; margin: 20px 0 0; }

/* ---------------------------------------------------------------- okno (fotky, mapa) */

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: rgba(12, 20, 32, .45); backdrop-filter: blur(2px); animation: fade .15s ease; }
.modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dlg { position: relative; display: flex; flex-direction: column; width: min(940px, 100%); max-height: min(88dvh, 900px);
  background: var(--surface); color: var(--ink); border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35); animation: pop .18s ease; }
.dlg-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; border-bottom: 1px solid var(--line); }
.dlg-title { flex: 1; min-width: 0; font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dlg-count { font-size: .8rem; color: var(--muted); }
.dlg button { font: inherit; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.dlg button:hover { background: var(--sky); }
.dlg-body { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); overflow: auto; }
.dlg-body img { display: block; max-width: 100%; max-height: calc(min(88dvh, 900px) - 150px); width: auto; height: auto; margin: auto; }
.dlg.plan .dlg-body { align-items: flex-start; }
.dlg.plan .dlg-body img { max-height: none; }
.dlg-cap { padding: 10px 18px 14px; font-size: .92rem; border-top: 1px solid var(--line); }
.dlg-cap small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.dlg .nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: color-mix(in srgb, var(--surface) 85%, transparent); box-shadow: var(--shadow); }
.dlg .nav-btn.prev { left: 10px; }
.dlg .nav-btn.next { right: 10px; }
.dlg .nav-btn.prev svg { transform: rotate(180deg); }
.dlg.map { width: min(1000px, 100%); height: min(86dvh, 760px); }
.dlg.map .dlg-body { display: block; background: #fff; }
.dlg.map iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 640px) {
  .modal { padding: 10px; }
  .dlg-body img { max-height: calc(88dvh - 150px); }
  .dlg .nav-btn { top: auto; bottom: 8px; transform: none; }
}

/* ---------------------------------------------------------------- mapy */

.map-page .bar { justify-content: space-between; }
.map-stage { margin: 18px 0 40px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto; -webkit-overflow-scrolling: touch; height: min(78dvh, 560px); }
.map-stage { display: flex; }
.map-canvas { position: relative; margin: auto; flex: none; }
.map-canvas a { font-size: 13px; }

/* doladění */
.side-box summary .count { align-self: flex-start; }
@media (max-width: 860px) {
  .bar { flex-wrap: wrap; }
  .brand strong { font-size: 1.05rem; }
  .langs a { padding: 4px 7px; }
  .langs { margin-left: auto; }
}
@media (max-width: 420px) {
  .brand img { width: 24px; }
  .brand strong { font-size: .98rem; white-space: normal; }
  .h-tile span { font-size: .72rem; padding: 16px 8px 6px; }
}
.main-nav a { padding-inline: 9px; font-size: .9rem; }
.nav-cats { flex: 1; min-width: 0; mask-image: linear-gradient(90deg, #000 92%, transparent); }
.nav-util { flex: none; }

/* abecední seznam kategorie */
.az { columns: 3 240px; column-gap: 40px; margin-bottom: 56px; }
.az-group { break-inside: avoid; margin-bottom: 18px; }
.az-group h2 { font-size: 1.1rem; color: var(--gold); margin: 0 0 4px; padding-bottom: 4px; border-bottom: 2px solid var(--line); }
.az-group ul { list-style: none; margin: 0; padding: 0; }
.az-group li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 4px 0; }
.az-group li a { font-weight: 500; text-decoration: none; }
.az-group li a:hover { text-decoration: underline; }
.az-group li span { font-size: .78rem; color: var(--muted); text-align: right; }
.az-jump { position: sticky; top: 112px; z-index: 5; padding: 8px 0; background: var(--bg); }
.az-jump a { min-width: 34px; padding: 4px 8px; }
@media (max-width: 860px) { .az-jump { top: 118px; } }

/* mapa uvnitř okna */
html.embedded .map-page .site-header { display: none; }
html.embedded .map-page main { max-width: none; padding: 0; }
html.embedded .map-stage { margin: 0; border: 0; border-radius: 0; box-shadow: none; height: 100dvh; }
.dlg [hidden] { display: none !important; }
.az-jump.words a { min-width: 0; font-weight: 500; }
.az-jump { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
@media (min-width: 861px) { .az-jump { flex-wrap: wrap; } }

/* mapa: původní obrázky v plné velikosti */
.map-canvas img { max-width: none; height: auto; }

/* slovníčky: obrázky nepřetékají přes čáru */
.entry { display: flow-root; }
.entry .fig { margin-top: 4px; }

/* plnotextové hledání */
.search-results .fs-link a { color: var(--brand); font-weight: 600; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; }
.fs-form { display: flex; gap: 10px; margin: 0 0 12px; }
.fs-form input { flex: 1; min-width: 0; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.fs-form input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 25%, transparent); }
.fs-form button, .fs-more { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; color: #fff; background: var(--brand); border: 0; border-radius: 12px; padding: 0 20px; cursor: pointer; }
.fs-more { padding: 10px 20px; }
.fs-more[hidden] { display: none; }
.fs-form button:hover, .fs-more:hover { background: var(--brand-ink); }
.fs-form button, .fs-more { color: var(--on-brand); }
.fs-status { color: var(--muted); font-size: .9rem; min-height: 1.4em; }
.fs-results { list-style: none; padding: 0; margin: 0 0 24px; }
.fs-results li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.fs-title { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; text-decoration: none; }
.fs-title:hover { text-decoration: underline; }
.fs-cat { margin-left: 10px; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.fs-results p { margin: 6px 0 0; color: var(--ink-2); font-size: .95rem; }
.fs-results mark { background: color-mix(in srgb, var(--gold) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.fs-more-wrap { margin-bottom: 56px; }
@media (max-width: 640px) { .fs-form button span { display: none; } .fs-form button { padding: 0 14px; } }

/* obrázky nezvětšovat nad skutečnou velikost (max-width je u každého obrázku) */
.fig img, .tile img { margin-inline: auto; }
.fig.portrait img { width: auto; max-width: 100%; }
.photos.one .tile { justify-self: start; }

/* ---------------------------------------------------------------- spolek */
.guide-btn { margin-left: auto; padding: 8px 16px; font-size: .9rem; }
.spolek .nav-toggle { margin-left: 0; }
.spolek-hero .hero-in { grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr); }
.spolek-hero h1 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.2rem); }
.spolek-hero .lead p { margin: 0 0 .7em; }
.hero-cover { justify-self: center; display: block; max-width: 300px; border-radius: 16px; overflow: hidden; box-shadow: 0 18px 50px rgba(16, 32, 56, .22); transform: rotate(2deg); transition: transform .3s; }
.hero-cover:hover { transform: rotate(0); }
.hero-cover img { display: block; }
.spolek-tools { margin: 40px 0 56px; }
.spolek-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: start; padding-block: 24px 56px; }
.spolek-text { max-width: 70ch; }
.spolek-aside { position: sticky; top: 130px; }
.guide-card { display: block; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.guide-card img { display: block; width: 100%; max-width: 300px; }
.guide-card span { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.guide-card strong { font-family: var(--serif); font-size: 1.15rem; }
.guide-card small { color: var(--muted); }
.guide-card em { font-style: normal; font-weight: 600; color: var(--brand); display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }
.board { list-style: none; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.board a { display: flex; flex-direction: column; padding: 14px 18px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.board a:hover { border-color: var(--brand-2); }
.board strong { font-family: var(--serif); font-size: 1.1rem; color: var(--brand-ink); }
.board small { color: var(--gold); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.member-list { list-style: none; padding: 0; margin: 0; columns: 3 180px; column-gap: 24px; }
.member-list li { padding: 5px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.contact-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 10px; }
.contact-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; line-height: 1.5; }
.contact-card svg { width: 26px; height: 26px; color: var(--brand); margin-top: 2px; }
.contact-card strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 2px; }
.stanovy-doc { margin: 24px 0 56px; max-width: 75ch; }
.stanovy-doc h1 { margin-top: .1em; }
ol.stanovy { list-style: upper-roman; padding-left: 1.6em; }
ol.stanovy > li { margin-bottom: 1.6em; }
ol.stanovy > li::marker { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--gold); }
ol.stanovy h2 { font-size: 1.25rem; margin: 0 0 .5em; }
ol.stanovy h3 { font-size: 1.05rem; margin: 1em 0 .3em; }
ol.stanovy ol, ol.stanovy ul { padding-left: 1.5em; margin: .3em 0; }
ol.stanovy li li { margin-bottom: .35em; }
@media (max-width: 900px) {
  .spolek-layout { grid-template-columns: 1fr; gap: 24px; }
  .spolek-aside { position: static; max-width: 320px; }
  .spolek-hero .hero-in { grid-template-columns: 1fr; }
  .hero-cover { max-width: 220px; }
}
@media (max-width: 860px) { .guide-btn { padding: 7px 12px; } .spolek .brand strong { white-space: normal; } }
.home .tools { margin-bottom: 56px; }

/* stránkování galerie */
.gal-pager { flex-direction: column; gap: 10px; }
.gal-pager .steps, .gal-pager .nums { display: flex; flex-wrap: wrap; gap: 6px; }
.gal-pager .step { padding: 6px 14px; border-radius: 8px; font-weight: 600; font-size: .9rem; text-decoration: none; color: var(--brand); background: var(--surface); border: 1px solid var(--line); }
.gal-pager a.step:hover { border-color: var(--brand-2); }
.gal-pager span.step { color: var(--muted); opacity: .5; }
@media (max-width: 640px) {
  .gal-pager .steps { display: grid; grid-template-columns: repeat(4, 1fr); }
  .gal-pager .step { text-align: center; padding: 8px 4px; font-size: .82rem; }
}
.prose h2.sec { font-size: 1.35rem; margin: 1.6em 0 .5em; padding-top: .6em; border-top: 1px solid var(--line); clear: both; }


/* ---------------------------------------------------------------- tisk */
.print-only { display: none; }
@media print {
  :root, :root[data-theme] {
    --brand: #0b4f9c; --brand-ink: #083a73; --ink: #000; --ink-2: #222; --muted: #555;
    --line: #ccc; --bg: #fff; --surface: #fff; --sky: #fff; --forest: #2e6b4f; --gold: #8a6420; --on-brand: #fff;
    color-scheme: light;
  }
  @page { margin: 1.5cm 1.6cm; }
  html { font-size: 10.5pt; }
  body { background: #fff; color: #000; font-size: 10.5pt; line-height: 1.45; }
  .site-header, .site-footer, .side, .chips, .crumbs, .skip, .search-results, .modal,
  .pager, .az-jump, .list-filter, .side-filter, .fs-form, .fs-more-wrap, .hero-cta, .hero-grid,
  .tools, .tabs, .guide-card, .spolek-aside, .hero-cover, .gal-pager, .nav-btn { display: none !important; }
  .print-only { display: block; }
  .print-url { margin-top: 1.2em; padding-top: .5em; border-top: 1px solid #ccc; font-size: 8.5pt; color: #555; }
  .wrap, .narrow { max-width: none; padding: 0; }
  .layout, .spolek-layout { display: block; padding: 0; }
  .prose, .spolek-text, .stanovy-doc { max-width: none; }
  .hero { background: none; border: 0; }
  .hero-in { display: block; padding: 0; }
  h1 { font-size: 20pt; margin: 0 0 .3em; }
  h2, h3 { break-after: avoid; page-break-after: avoid; }
  p { orphans: 3; widows: 3; }
  a { color: #000; text-decoration: none; }
  .prose a.person, .prose a.term { color: #000; text-decoration: none; }
  .place-head { border: 0; margin-bottom: .6em; }
  .kicker { color: #555; }
  .prose p.location { font-size: 11pt; color: #000; }
  .prose p.access, .prose p.data, .environ-box { background: none; border: 1px solid #bbb; box-shadow: none; break-inside: avoid; }
  .prose p.access { border-left: 3pt solid #2e6b4f; }
  figure, .fig, .tile, .entry, .contact-card, .board li { break-inside: avoid; page-break-inside: avoid; }
  .fig { max-width: 6cm; }
  .fig img, .tile img { max-height: 6.5cm; width: auto; border-radius: 0; }
  .tile img { aspect-ratio: auto; object-fit: contain; }
  .photos { grid-template-columns: repeat(3, 1fr); gap: 6pt; }
  .photos.gallery { grid-template-columns: repeat(4, 1fr); }
  figcaption { color: #444; font-size: 8pt; }
  .cards, .cat-cards { display: none; }
  .az { columns: 3; font-size: 9pt; }
  .index-list { columns: 3; font-size: 9pt; }
  .fs-results li { break-inside: avoid; }
  .fs-results mark { background: none; font-weight: 700; }
}
