/* Smooth page transitions in modern browsers without SPA overhead. */
@view-transition { navigation: auto; }

/* Self-hosted fonts (SIL OFL 1.1): Fraunces + Plus Jakarta Sans, latin + latin-ext. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("fonts/fraunces-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #182620;
  --muted: #66736d;
  --paper: #f6f3ec;
  --surface: #fffdf8;
  --weekend: #faf5e8;
  --line: #d9ddd7;
  --green: #166447;
  --green-dark: #0d4933;
  --lime: #d8ee78;
  --orange: #d66b3d;
  --radius: 18px;
  --font-sans: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  color-scheme: light;
  font-family: var(--font-sans);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.55; }
a { color: var(--green-dark); text-underline-offset: .18em; }
a:hover { color: var(--orange); }
.shell { width: min(1320px, calc(100% - 32px)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 20; background: white; padding: 10px 14px; }
.skip-link:focus { top: 12px; }

.site-header { background: var(--green-dark); color: white; border-bottom: 4px solid var(--lime); }
.header-row { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: white; text-decoration: none; }
.brand:hover { color: white; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px 13px 13px 4px; background: var(--lime); color: var(--green-dark); font: 700 23px/1 var(--font-serif); }
.brand strong { display: block; font: 700 21px/1 var(--font-serif); font-variation-settings: "SOFT" 40; }
.brand small { display: block; margin-top: 4px; color: #dce9e2; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
nav { display: flex; gap: 8px; flex-wrap: wrap; }
.site-header nav a { display: inline-flex; align-items: center; color: white; text-decoration: none; padding: 8px 13px; border-radius: 999px; font-weight: 550; }
.site-header nav a:hover { background: rgb(255 255 255 / .12); }
.site-header nav a.is-active { background: rgb(255 255 255 / .18); box-shadow: inset 0 0 0 1px var(--lime); font-weight: 700; }
.nav-count { display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 19px; margin-left: 6px; padding: 0 5px; border-radius: 999px; background: var(--lime); color: var(--green-dark); font-size: 11px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
/* Přihlášení a účet sdílí jedno místo stejné šířky: když skript po načtení
   zjistí přihlášení, ostatní položky menu neposkočí. */
.account-slot { position: relative; display: flex; min-width: 7.5rem; }
.site-header nav .account-login,
.account-menu .account-link,
.account-options summary { box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 12px; border: 1px solid rgb(255 255 255 / .45); color: white; text-decoration: none; }
.account-menu .account-link { flex: 1; border-right: 0; border-radius: 999px 0 0 999px; }
.account-options { display: flex; }
.account-options summary { width: 36px; padding: 8px; border-left: 0; border-radius: 0 999px 999px 0; list-style: none; cursor: pointer; user-select: none; }
.site-header nav .account-login:hover,
.account-menu .account-link:hover,
.account-options summary:hover,
.account-options[open] summary { background: rgb(255 255 255 / .12); }
.account-menu { position: relative; display: flex; flex: 1; min-width: 0; }
.account-menu[hidden], .account-login[hidden] { display: none !important; }
.account-options summary::-webkit-details-marker { display: none; }
.account-options summary::after { content: ""; width: 6px; height: 6px; margin: -3px 0 0 2px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.account-options[open] summary::after { margin-top: 3px; transform: rotate(-135deg); }
.account-label-short { display: none; }
.site-header :focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.account-avatar { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--green-dark); background: var(--lime); font-size: 13px; font-weight: 800; line-height: 1; text-transform: uppercase; }
.account-panel { position: absolute; top: 100%; right: 0; z-index: 30; box-sizing: border-box; width: max-content; min-width: 240px; max-width: min(340px, calc(100vw - 32px)); padding: 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: white; box-shadow: 0 16px 40px rgb(24 38 32 / .18); }
.account-panel-label { margin: 0; color: var(--muted); font-size: 12px; }
.account-email { margin: 2px 0 14px; font-weight: 700; overflow-wrap: anywhere; }
.account-logout { width: 100%; }
.auth-status { margin: 0; color: #dce9e2; font-size: 13px; }
.auth-status:empty { display: none; }
.main-content { min-height: 70vh; padding-block: 24px 64px; }

.page-heading { max-width: 780px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 6px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2 { font-family: var(--font-serif); font-variation-settings: "SOFT" 40; line-height: 1.14; }
h1 { margin: 0 0 12px; font-size: clamp(26px, 3.6vw, 40px); letter-spacing: -.02em; }
h2 { font-size: clamp(21px, 2.8vw, 29px); }
.page-heading > p:last-child { margin: 0; color: var(--muted); font-size: 16px; }
.page-heading-compact { margin-bottom: 14px; }
.page-heading-compact h1 { font-size: clamp(22px, 3vw, 31px); margin-bottom: 4px; }
.calendar-heading { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; }
.calendar-heading-main { min-width: 0; }
.calendar-heading-main h1 { margin-bottom: 0; }
.calendar-heading-main > p:last-child { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.view-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.view-tabs > a, .view-tabs > span { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 13px; border-radius: 9px; font-size: 14px; font-weight: 700; text-decoration: none; }
.view-tabs > a { color: var(--green-dark); }
.view-tabs > a:hover, .view-tabs > a:focus-visible { color: var(--orange); background: #f2f5ee; }
.view-tabs > .is-active { color: white; background: var(--green); }

.filters { display: grid; gap: 12px; padding: 14px 16px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 24px rgb(24 38 32 / .045); }
.filters-top { display: flex; align-items: stretch; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.filters-triggers { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.filter-trigger { gap: 6px; white-space: nowrap; background: white; }
.filter-trigger.is-on { color: white; border-color: var(--green); background: var(--green); }
.filter-trigger.is-on:hover { color: white; border-color: var(--green-dark); background: var(--green-dark); }
.filters-active-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding-top: 2px; }
.filter-search { flex: 1 1 320px; display: flex; }
.search-box { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 3px 4px 3px 12px; border: 1px solid #c5cdc7; border-radius: 11px; background: white; transition: border-color .15s, box-shadow .15s; }
.search-box:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgb(216 238 120 / .65); }
.search-box-icon { flex: none; color: var(--muted); }
.search-box .field { flex: 1; min-width: 0; }
.search-box input[type="search"] { min-height: 36px; padding: 6px 10px; border: 0; border-radius: 0; background: transparent; outline: none; }
.search-box input[type="search"]:focus { outline: none; border-color: transparent; }
.search-box-submit { flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 14px; border: 0; border-radius: 8px; color: var(--green-dark); background: #eaf0e7; font: 700 14px/1 inherit; cursor: pointer; transition: background-color .15s, color .15s; }
.search-box-submit:hover, .search-box-submit:focus-visible { color: white; background: var(--green); }
.filter-municipality-form { display: flex; align-items: stretch; gap: 8px; margin-bottom: 12px; }
.field { display: grid; gap: 6px; min-width: 145px; font-size: 13px; font-weight: 700; }
.field-grow { flex: 1 1 200px; min-width: 0; }
.facet-bar-quick { gap: 6px; }
.facet-bar-quick .facet-labelled { min-height: 36px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; transition: border-color .15s, color .15s, background-color .15s; }
.facet-bar-quick .facet-my-place { border-color: #b7d4be; background: #eef6ec; color: var(--green-dark); cursor: pointer; font-weight: 700; }
.facet-bar-quick .facet-my-place:hover, .facet-bar-quick .facet-my-place:focus-visible { border-color: var(--green); background: #e1efe0; color: var(--green-dark); }
.filter-save-my-inline { padding: 4px 6px; font-size: 13px; font-weight: 600; }
.facet-bar-quick .facet-more { border-style: dashed; background: transparent; color: var(--muted); }
.facet-bar-quick .facet-more:hover { color: var(--orange); border-color: var(--orange); }
.facet-count { margin-left: 2px; font-size: 12px; font-weight: 500; opacity: .7; }
.filter-backdrop { position: fixed; inset: 0; z-index: 45; background: rgb(24 38 32 / .42); backdrop-filter: blur(2px); }
.filter-sheet { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; overflow-y: auto; padding: 18px 16px 0; background: var(--surface); visibility: hidden; opacity: 0; pointer-events: none; transform: translateX(100%); transition: transform .22s cubic-bezier(.22, 1, .36, 1), opacity .18s ease, visibility 0s linear .22s; }
.filters:not(.js) .filter-sheet:target,
.filters:not(.js) .filter-sheet:has(:target),
.filter-sheet.is-open { visibility: visible; opacity: 1; pointer-events: auto; transform: translateX(0); transition: transform .24s cubic-bezier(.22, 1, .36, 1), opacity .18s ease, visibility 0s; }
.filter-sheet .places-sheet-foot { margin-top: auto; }
body.filter-sheet-open { overflow: hidden; }
@media (min-width: 900px) {
  .filter-sheet { inset: 0 0 0 auto; width: min(460px, 100vw); padding: 22px 22px 0; box-shadow: -12px 0 40px rgb(24 38 32 / .2); }
  .filter-sheet .places-sheet-foot { margin: auto -22px 0; padding: 14px 22px; }
  .filter-sheet .places-sheet-close { display: inline-grid; }
  .filter-sheet .places-sheet-foot .button { display: inline-flex; }
}
input, textarea, select { width: 100%; min-height: 44px; padding: 9px 11px; color: var(--ink); background: white; border: 1px solid #bcc5bf; border-radius: 9px; font: inherit; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgb(216 238 120 / .75); border-color: var(--green); }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 9px 18px; border: 0; border-radius: 10px; color: white; background: var(--green); font: 750 15px/1 inherit; text-decoration: none; cursor: pointer; }
.button:hover { color: white; background: var(--green-dark); }
.button-secondary { background: var(--ink); }
.check { display: flex; gap: 8px; align-items: center; min-height: 44px; font-size: 14px; }
.check input { width: 20px; min-height: 20px; }
.clear-filters { justify-self: start; font-size: 14px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.public-form { max-width: 760px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 12px 30px rgb(24 38 32 / .06); }
.public-form label { display: block; margin: 20px 0 7px; font-size: 14px; font-weight: 700; }
.public-form > label:first-child { margin-top: 0; }
.public-form textarea { resize: vertical; min-height: 120px; }
.public-form .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.public-form .hint { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.public-form .optional { margin-left: 5px; color: var(--muted); font-size: 13px; font-weight: 400; }
.public-form .required { color: var(--green); }
.public-form .trap { position: absolute; left: -9999px; visibility: hidden; }
.public-form .privacy { color: var(--muted); font-size: 12px; }
.public-form #result { padding: 14px; border-radius: 9px; background: #e8f2e9; overflow-wrap: anywhere; }
.public-form #result.error { color: #883e24; background: #fff0e9; }
.public-form button { width: 100%; margin-top: 10px; }
.auth-panel { max-width: 560px; }
.auth-form { max-width: none; }
.auth-form-status { min-height: 1.55em; margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.auth-google { margin: 16px 0 0; }
.auth-google .button { width: 100%; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 0; color: var(--muted); font-size: 14px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.auth-sent { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.auth-sent h2 { margin: 0 0 8px; font-size: 22px; }
.auth-sent p { margin: 0 0 12px; }
.auth-sent .hint { color: var(--muted); font-size: 14px; }
.auth-sent-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.auth-form-status.is-error, .favorites-account.is-error { color: #9b2c1c; }
.favorites-account { margin: 0 0 18px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.favorites-account p { margin: 0; }
.button:disabled { cursor: wait; opacity: .65; }

.facet-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.facet { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 11px; color: var(--green-dark); background: white; }
.facet svg { width: 20px; height: 20px; }
.facet:hover, .facet:focus-visible { color: var(--orange); border-color: var(--orange); }
.facet.is-on { color: white; background: var(--green); border-color: var(--green); }
.facet.is-on:hover { color: var(--lime); }
.facet.is-empty { opacity: .35; }
.facet-divider { width: 1px; height: 28px; margin-inline: 4px; background: var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips a { display: inline-flex; gap: 6px; padding: 4px 11px; border-radius: 999px; background: #e7ece8; color: var(--green-dark); font-size: 13px; font-weight: 750; text-decoration: none; }
.chips a:hover { background: #f4d8cb; color: #7b2713; }

.map-filter { margin: 0; }
.map-filter svg { display: block; width: 100%; height: auto; }
.district { stroke: var(--surface); stroke-width: .6; stroke-linejoin: round; }
.district-pardubicky-kraj { fill: #e3ead9; }
.district-kralovehradecky-kraj { fill: #d6e2d6; }
.district-link { cursor: pointer; }
.district-link:hover .district, .district-link:focus-visible .district { fill: #c9d9b8; }
.district-link.is-on .district { fill: #cfe58a; }
.district-link.is-on:hover .district { fill: #c2dc70; }
.dot { cursor: pointer; }
.dot-hit { fill: transparent; }
.dot-mark { fill: var(--orange); fill-opacity: .8; stroke: white; stroke-width: .5; }
.dot:hover .dot-mark, .dot:focus-visible .dot-mark { fill: var(--green-dark); fill-opacity: 1; }
.dot.is-on .dot-mark { fill: var(--green); fill-opacity: 1; stroke: var(--ink); stroke-width: .7; }
.dot text, .map-label { fill: var(--ink); font-size: 3.8px; font-weight: 700; paint-order: stroke; stroke: var(--surface); stroke-width: 1.2px; stroke-linejoin: round; pointer-events: none; }
.dot.is-on text, .map-label.is-on { fill: var(--green-dark); font-weight: 800; }
.map-filter figcaption { margin-top: 6px; color: var(--muted); font-size: 12px; }
.map-list { margin-top: 8px; font-size: 13px; }
.map-list summary { cursor: pointer; color: var(--green-dark); font-weight: 700; }
.map-list ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 2px 10px; max-height: 240px; overflow-y: auto; margin: 8px 0 0; padding: 0; list-style: none; }
.map-list a { text-decoration: none; }
.map-list a.is-on { font-weight: 800; color: var(--green); }
.map-list small { color: var(--muted); }

.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; padding: 4px 9px; border-radius: 999px; background: #e7ece8; color: var(--green-dark); font-size: 12px; font-weight: 750; text-decoration: none; }
.badge-danger { background: #f4c8bb; color: #7b2713; }
.error-page { padding: 40px; border-radius: var(--radius); background: var(--surface); text-align: center; }

.parent-link { margin: 0 0 24px; }
.event-detail { max-width: 850px; }
.event-detail header { padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.event-detail h1 { margin-top: 14px; }
.detail-lead { color: var(--green); font: 600 clamp(18px, 2.4vw, 24px)/1.3 var(--font-serif); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 24px 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.facts-two { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.facts div { padding: 18px 20px; background: var(--surface); }
.facts dt { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.facts dd { margin: 8px 0 0; font-weight: 650; }
.fact-map-link { display: inline-block; margin-top: 6px; font-size: 14px; font-weight: 700; }
.prose { max-width: 720px; font-size: 18px; overflow-wrap: anywhere; }
.prose p, .prose ul { margin: 0 0 1em; }
.prose ul { padding-left: 1.4em; }
.prose li + li { margin-top: .3em; }
.prose strong { font-weight: 750; }
.source-box { padding: 24px; margin-top: 35px; border-radius: var(--radius); background: #e9efdf; overflow-wrap: anywhere; }
.event-tools { margin-top: 35px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.event-tools h2 { margin: 0 0 14px; font-size: 22px; }
.event-tools-row, .report-options { display: flex; flex-wrap: wrap; gap: 10px; }
.button-quiet { color: var(--green-dark); background: transparent; border: 1px solid var(--line); }
.button-quiet:hover { color: var(--orange); background: white; }
.event-report-dialog { width: min(460px, calc(100% - 32px)); padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: var(--surface); box-shadow: 0 24px 80px rgb(24 38 32 / .25); }
.event-report-dialog::backdrop { background: rgb(24 38 32 / .55); }
.event-report-dialog h2 { margin: 0 30px 8px 0; font-size: 25px; }
.event-report-dialog p { margin: 0 0 20px; color: var(--muted); }
.dialog-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; color: var(--ink); background: #e7ece8; font-size: 24px; line-height: 1; cursor: pointer; }
.report-options .button { flex: 1 1 180px; }

/* Přepínač týdnů je jedna řada; co se nevejde, jde posunout (i tažením myší nebo šipkami, drag-scroll.js). */
.week-switcher-wrap { position: relative; display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.week-scroll { flex: none; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--green-dark); background: var(--surface); font: 700 20px/1 system-ui, sans-serif; cursor: pointer; }
.week-scroll:hover:not(:disabled) { color: white; background: var(--green); border-color: var(--green); }
.week-scroll:disabled { opacity: .35; cursor: default; }
.week-switcher { position: relative; flex: 1; min-width: 0; display: flex; flex-wrap: nowrap; gap: 8px; padding-bottom: 4px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: thin; -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 28px), transparent 100%); }
.week-switcher a { flex: 0 0 auto; min-width: 128px; display: flex; flex-direction: column; justify-content: center; padding: 7px 12px; font-size: 14px; font-weight: 700; line-height: 1.25; white-space: nowrap; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); text-decoration: none; scroll-snap-align: start; transition: border-color .15s, background-color .15s, transform .12s; }
.week-switcher a:hover:not(.active) { border-color: var(--green); background: white; }
.week-switcher a.active { color: white; background: var(--green); border-color: var(--green); }
.week-switcher small { display: block; margin-top: 2px; font-size: 11px; font-weight: 500; opacity: .78; }
@media (pointer: fine) { .week-switcher { cursor: grab; } }
.week-switcher.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.week-switcher.is-dragging a { pointer-events: none; }
.calendar-view-link { margin: 0 0 18px; }
.long-term-heading h1 { white-space: normal; }
.long-term-events { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.long-term-event { padding: 10px 14px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.long-term-event-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--orange); font-size: 13px; font-weight: 800; }
.long-term-event :is(h2, h3) { margin: 4px 0; font-size: 18px; }
.long-term-event :is(h2, h3) a { color: var(--ink); }
.long-term-event p { margin: 0; color: var(--muted); font-size: 14px; }
/* Žádný předek kalendáře nesmí mít overflow, jinak nadpisy dnů přestanou být sticky. */
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.calendar-day { min-width: 0; min-height: 220px; padding: 0 12px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); scroll-margin-top: 64px; }
.calendar-day.is-weekend { background: var(--weekend); border-color: #dfd7c4; }
.calendar-day.is-today { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.calendar-day.is-past { opacity: .72; }
.calendar-day.is-past:hover, .calendar-day.is-past:focus-within { opacity: 1; }
.calendar-day :is(h2, h3, h4) { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 0 0 4px; padding: 12px 0 8px; font: 600 15px/1.2 var(--font-serif); white-space: nowrap; background: var(--surface); }
.calendar-day.is-weekend :is(h2, h3, h4) { background: var(--weekend); }
.calendar-day.is-today :is(h2, h3, h4) { color: var(--green-dark); }
.day-today-badge { flex: none; display: inline-block; padding: 2px 6px; border-radius: 999px; color: var(--green-dark); background: var(--lime); font: 800 9.5px/1.15 var(--font-sans); letter-spacing: .05em; text-transform: uppercase; }
.day-count { margin: -2px 0 8px; color: var(--muted); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.past-days-toggle { display: none; }
.calendar-day article { display: grid; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); }
.calendar-day article.is-continuing { padding: 6px 0; opacity: .76; }
.calendar-day article time { color: var(--orange); font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }
.calendar-day article.is-continuing time { color: var(--muted); font-weight: 600; }
.calendar-day article .event-when { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.calendar-day article .event-when-meta { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.calendar-day article .event-when-meta .category-icon { width: 14px; height: 14px; opacity: .82; }
.calendar-day article a { color: var(--ink); font-size: 13.5px; font-weight: 650; letter-spacing: -.005em; text-decoration: none; line-height: 1.32; }
.calendar-day article a:hover { color: var(--green-dark); text-decoration: underline; }
.calendar-day article small, .muted { color: var(--muted); font-size: 12.5px; }
.calendar-day :is(h2, h3, h4):has(+ .holiday-note) { margin-bottom: 0; padding-bottom: 2px; }
.holiday-note { display: block; margin: 0 0 10px; color: var(--orange); font-size: 12px; font-weight: 700; line-height: 1.3; text-decoration: none; }
.holiday-note:hover, .holiday-note:focus-visible { text-decoration: underline; }
.holiday-detail { max-width: 780px; font-size: 17px; }
.holiday-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 20px 0; }
.holiday-facts dt { color: var(--muted); font-weight: 700; }
.holiday-facts dd { margin: 0; }
.holiday-events ul, .holiday-year ul { padding: 0; list-style: none; }
.holiday-events li, .holiday-year li { padding: 8px 0; border-top: 1px solid var(--line); }
.holiday-events ul { max-width: 780px; }
.holiday-events li { display: grid; grid-template-columns: 9em minmax(0, 1fr) 18px; column-gap: 12px; align-items: start; }
.holiday-events li .category-icon { grid-column: 3; margin-top: 3px; }
.holiday-events time, .holiday-year time { color: var(--orange); font-weight: 800; }
.holiday-year time { display: inline-block; min-width: 9em; }
.holiday-events small, .holiday-year small { color: var(--muted); }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.category-icon { flex: none; width: 16px; height: 16px; color: var(--green); opacity: .72; }
.category-icon:has(use[href="#category-hudba"]),
.category-icon:has(use[href="#category-divadlo"]),
.category-icon:has(use[href="#category-tanec"]),
.category-icon:has(use[href="#category-film"]),
.category-icon:has(use[href="#category-vystavy"]),
.category-icon:has(use[href="#category-pamatky"]) { color: #9e4b3a; }
.category-icon:has(use[href="#category-deti"]),
.category-icon:has(use[href="#category-rodiny"]),
.category-icon:has(use[href="#category-workshopy"]),
.category-icon:has(use[href="#category-zabava"]) { color: #1d757a; }
.category-icon:has(use[href="#category-trhy"]),
.category-icon:has(use[href="#category-gastro"]),
.category-icon:has(use[href="#category-festivaly"]),
.category-icon:has(use[href="#category-slavnosti"]),
.category-icon:has(use[href="#category-komunitni"]) { color: #b5681d; }
.category-icon:has(use[href="#place-voda"]) { color: #1d6f8a; }
.holiday-events .category-icon { width: 18px; height: 18px; }

[hidden] { display: none !important; }
.event-favorite { flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid transparent; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; }
.event-favorite:hover, .event-favorite:focus-visible { color: var(--orange); border-color: #efd3c4; background: #fff0e9; }
.event-favorite[aria-pressed="true"] { color: var(--orange); border-color: #efd3c4; background: #fff0e9; }
.favorite-star-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: fill .12s; }
.event-favorite[aria-pressed="true"] .favorite-star-icon { fill: currentColor; }
.event-favorite.event-favorite-detail { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; height: auto; min-height: 44px; max-width: 100%; padding: 10px 14px; border-color: var(--line); color: var(--green-dark); background: var(--surface); line-height: 1.25; text-align: center; white-space: normal; }
.event-favorite-detail[aria-pressed="true"] { color: #7b2713; border-color: #efd3c4; background: #fff0e9; }
.event-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.event-detail-heading h1 { flex: 1; min-width: 0; }
.favorites-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; max-width: 780px; margin-bottom: 20px; }
.favorites-toolbar .favorites-filter { margin-bottom: 0; }
.favorites-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.favorites-actions .button { min-height: 38px; padding: 7px 13px; font-size: 13.5px; background: var(--surface); }
.favorites-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.favorites-list { max-width: 780px; margin: 0; padding: 0; list-style: none; }
.favorite-item { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.favorite-item time { flex: 0 0 9em; color: var(--orange); font-weight: 800; }
.favorite-item-details { display: grid; flex: 1; min-width: 0; gap: 2px; }
.favorite-item-details a { color: var(--ink); font-weight: 700; text-decoration: none; }
.favorite-item-details small { color: var(--muted); }
.favorite-remove { flex: none; min-height: 36px; padding-inline: 12px; font-size: 13px; }
.favorites-empty, .favorites-error { max-width: 780px; padding: 18px; border-radius: 12px; background: var(--surface); }
.favorites-empty a { margin-left: 6px; font-weight: 700; }
.favorites-error { color: #7b2713; background: #fff0e9; }
.favorites-sync-status { max-width: 780px; margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.favorites-sync-status.is-error { color: #7b2713; }
.favorite-toast { position: fixed; z-index: 30; inset: auto 16px 20px; width: fit-content; max-width: min(520px, calc(100% - 32px)); margin-inline: auto; padding: 12px 18px; border: 1px solid var(--lime); border-radius: 12px; color: white; background: var(--green-dark); box-shadow: 0 10px 28px rgb(24 38 32 / .2); font-weight: 700; }
.back-to-top { position: fixed; z-index: 20; right: calc(16px + env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid var(--lime); border-radius: 50%; color: white; background: var(--green-dark); box-shadow: 0 8px 24px rgb(24 38 32 / .22); font: 750 24px/1 system-ui, sans-serif; cursor: pointer; }
.back-to-top:hover { background: var(--green); }
.back-to-top:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.back-to-top[hidden] { display: none; }
.calendar-day-shortcuts { display: none; }
.calendar-day-shortcuts button { display: grid; place-items: center; min-height: 42px; padding: 4px 2px; border: 1px solid transparent; border-radius: 10px; color: var(--green-dark); background: transparent; cursor: pointer; }
.calendar-day-shortcuts button span:first-child { font-size: 10px; font-weight: 700; line-height: 1.1; opacity: .8; }
.calendar-day-shortcuts button span:nth-of-type(2) { font-size: 13px; font-weight: 800; line-height: 1.1; }
.day-shortcut-count { font-size: 9px; font-weight: 600; line-height: 1; opacity: .65; font-variant-numeric: tabular-nums; }
.calendar-day-shortcuts button.is-past { opacity: .52; }
.calendar-day-shortcuts button.is-past.is-current { opacity: 1; }
.calendar-day-shortcuts button.is-today { border-color: var(--green); background: #eef6df; }
.calendar-day-shortcuts button:hover, .calendar-day-shortcuts button:focus-visible, .calendar-day-shortcuts button.is-current { color: white; background: var(--green-dark); border-color: var(--green-dark); }
.calendar-day-shortcuts button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.monitor-panel { margin-top: 32px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 12px 30px rgb(24 38 32 / .04); }
.monitor-panel h2 { margin: 0 0 12px; font-size: clamp(21px, 3vw, 28px); }
.monitor-note { max-width: 820px; margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.monitor-charts { position: relative; display: grid; gap: 12px; }
.monitor-chart { margin: 0; }
.monitor-chart-items_found { --monitor-color: var(--green); }
.monitor-chart-candidates_created { --monitor-color: var(--orange); }
.monitor-chart-candidates_updated { --monitor-color: #829b42; }
.monitor-chart figcaption { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.monitor-chart figcaption span { color: var(--muted); }
.monitor-chart svg { display: block; width: 100%; height: auto; border-radius: 4px; }
.monitor-chart svg:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.monitor-chart rect { fill: var(--monitor-color); transition: filter .12s; }
.monitor-chart rect.is-active { filter: brightness(.78); stroke: var(--ink); stroke-width: 2; }
.monitor-crosshair { visibility: hidden; stroke: var(--ink); stroke-dasharray: 3 3; opacity: .65; pointer-events: none; }
.monitor-crosshair.is-active { visibility: visible; }
.monitor-chart text { fill: var(--muted); font: 10px/1 system-ui, sans-serif; }
.monitor-interaction-hint { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.monitor-tooltip { width: max-content; min-width: 190px; max-width: 100%; margin: 4px 0 0 auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); box-shadow: 0 12px 32px rgb(24 38 32 / .18); pointer-events: none; }
.monitor-tooltip[hidden] { display: none; }
.monitor-tooltip > strong { display: block; margin-bottom: 6px; text-transform: capitalize; }
.monitor-tooltip-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.monitor-tooltip-row + .monitor-tooltip-row { margin-top: 3px; }
.monitor-tooltip-row b { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.monitor-tooltip-swatch { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--monitor-color); }
.monitor-table-wrap { overflow-x: auto; }
.monitor-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.monitor-table th, .monitor-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.monitor-table th { color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.monitor-table td:first-child { white-space: nowrap; }
.monitor-table td small { display: block; margin-top: 3px; color: var(--muted); }
.monitor-load-more { margin-top: 16px; }
.monitor-event-table td:nth-child(2) { min-width: 220px; }
.monitor-event-table td:nth-child(3) { min-width: 170px; overflow-wrap: anywhere; }

.site-footer { padding-block: 28px; color: #dce9e2; background: var(--green-dark); font-size: 13px; }
.footer-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer .footer-tip { color: var(--green-dark); background: var(--lime); }
.site-footer .footer-tip:hover { color: var(--green-dark); background: #edf8ad; }
.site-footer a:not(.button) { color: #dce9e2; }

.search-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: -6px 0 18px; }
.search-past-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.search-past-check { min-height: 36px; font-weight: 600; cursor: pointer; }
.search-past-submit { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.search-places-strip { margin: 0 0 20px; }
.search-empty { padding: 18px; border: 1px dashed #bcc5bf; border-radius: 14px; background: var(--surface); }
.search-empty p:first-child { margin-top: 0; }
.search-empty p:last-child { margin-bottom: 0; }
.search-ongoing { margin-bottom: 28px; }
.search-ongoing > h2 { margin: 0 0 10px; font-size: 22px; }
.search-section-heading { margin: 32px 0 14px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 22px; }
.calendar-grid-search { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.calendar-grid-search .calendar-day { min-height: 0; }
.search-week { margin-bottom: 28px; }
.search-week > :is(h2, h3) { margin: 0 0 10px; font-family: var(--font-serif); font-size: 22px; line-height: 1.14; }
.search-week > :is(h2, h3) a { color: inherit; text-decoration: none; }
.search-week > :is(h2, h3) small { color: var(--muted); font: 400 12px/1 system-ui, sans-serif; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 28px; }
.pagination-pages { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.pagination-link, .pagination-page { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--green-dark); background: var(--surface); font-size: 14px; font-weight: 700; text-decoration: none; }
.pagination-link:hover, .pagination-link:focus-visible, .pagination-page:hover, .pagination-page:focus-visible { border-color: var(--green); color: var(--green-dark); background: white; }
.pagination-page.is-current { color: white; border-color: var(--green); background: var(--green); }
.pagination-link.is-disabled { color: var(--muted); opacity: .5; cursor: default; }
.pagination-ellipsis { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 44px; color: var(--muted); font-weight: 700; }

@media (max-width: 1040px) {
  /* Sedm sloupců se nevejde: dny pod sebou, nahoře kompaktní přilepená lišta dnů. */
  .calendar-grid { grid-template-columns: 1fr; }
  .calendar-grid.hide-past-days .calendar-day.is-past { display: none; }
  .past-days-toggle { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 7px 14px; border: 1px dashed #bcc5bf; border-radius: 999px; color: var(--muted); background: var(--surface); font: 600 13px/1.2 inherit; cursor: pointer; }
  .past-days-toggle:hover, .past-days-toggle:focus-visible { color: var(--green-dark); border-color: var(--green); }
  .calendar-day { min-height: 0; scroll-margin-top: 72px; }
  .calendar-day :is(h2, h3, h4) { top: 64px; }
  .calendar-day-shortcuts { position: sticky; top: 6px; z-index: 15; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 0 0 12px; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: rgb(255 253 248 / .96); backdrop-filter: blur(8px); box-shadow: 0 4px 14px rgb(24 38 32 / .08); }
}

@media (max-width: 720px) {
  .header-row { align-items: flex-start; flex-direction: column; gap: 10px; padding-block: 12px; }
  .site-header nav { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; align-items: stretch; }
  .site-header nav > a { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 6px 4px; text-align: center; font-size: 13px; line-height: 1.15; }
  .nav-count { min-width: 16px; height: 16px; margin-left: 3px; padding: 0 4px; font-size: 10px; }
  .account-slot { min-width: 0; }
  .site-header nav .account-login { flex: 1; min-height: 40px; }
  .site-header nav .account-login, .account-menu .account-link { gap: 4px; padding: 6px 4px; font-size: 12px; }
  .account-menu .account-avatar, .account-label-wide { display: none; }
  .account-label-short { display: inline; }
  .account-options summary { width: 28px; min-height: 40px; padding: 6px 4px; }
  .auth-status { margin-top: -6px; }
  .main-content { padding-top: 18px; }
  .week-scroll { display: none; }
  .filters { padding: 12px; }
  .filter-search { flex: 1 1 100%; }
  .filters-triggers { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .facet-bar-quick { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 2px; padding-right: 24px; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 28px), transparent 100%); }
  .facet-bar-quick::-webkit-scrollbar { display: none; }
  .facet-bar-quick .facet-labelled { flex: 0 0 auto; white-space: nowrap; }
  .map-filter { max-width: 420px; }
  .facts, .facts-two { grid-template-columns: 1fr; }
  .public-form { padding: 18px; }
  .public-form .fields { grid-template-columns: 1fr; }
  .event-tools-row { display: grid; }
  .event-detail-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .favorite-item { flex-wrap: wrap; }
  .favorite-item time { flex-basis: 100%; }
  .favorite-remove { margin-left: auto; }
  .monitor-chart text { font-size: 27px; }
  .holiday-events li { grid-template-columns: minmax(0, 1fr) 18px; }
  .holiday-events li > time, .holiday-events .event-title { grid-column: 1; }
  .holiday-events li .category-icon { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin-top: 0; }
}

.statistics-intro { margin-bottom: 24px; }
.statistics-intro > p:last-child { max-width: 600px; }
.statistics-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 760px; gap: 24px; margin: 0 0 32px; }
.statistics-summary > div { display: flex; flex-direction: column; padding-left: 20px; border-left: 2px solid #dbe4d3; }
.statistics-summary dt { order: 2; color: var(--muted); font-size: 13px; }
.statistics-summary dd { margin: 0 0 3px; color: var(--green-dark); font: 700 42px/1.15 var(--font-serif); font-variant-numeric: lining-nums tabular-nums; }
.statistics-coverage { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: -12px 0 28px; color: var(--muted); font-size: 12px; }
.statistics-coverage strong { color: var(--ink); font-weight: 500; }
.statistics-panel { margin: 24px 0; padding: 28px; border: 1px solid #dce3d8; border-radius: 20px; background: var(--surface); }
.statistics-visual { position: relative; box-shadow: 0 8px 32px rgb(24 38 32 / .035); }
.statistics-tooltip { position: absolute; z-index: 5; width: max-content; max-width: min(280px, calc(100vw - 24px)); padding: 10px 14px; border-radius: 10px; color: white; background: var(--green-dark); box-shadow: 0 6px 20px rgb(24 38 32 / .18); font-size: 12px; line-height: 1.6; }
.statistics-tooltip::first-letter { text-transform: uppercase; }
.statistics-panel h2 { margin: 0 0 16px; font-size: clamp(22px, 3vw, 28px); }
.statistics-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 8px; }
.statistics-heading h2 { margin: 0; }
.statistics-picker { display: flex; align-items: center; gap: 8px; }
.statistics-heading .statistics-picker { padding: 5px; border: 1px solid #e1e7dc; border-radius: 13px; background: #f5f7f1; }
.statistics-heading .statistics-picker label { padding-inline: 7px; }
.statistics-heading .statistics-picker select, .statistics-heading .statistics-picker .button { min-height: 38px; }
.statistics-picker label { color: var(--muted); font-size: 13px; }
.statistics-picker select { width: auto; min-width: 88px; }
.statistics-note { color: var(--muted); font-size: 13px; }
.statistics-note:last-child { margin-bottom: 0; }
.statistics-scroll { overflow-x: auto; padding: 8px 0; margin-top: 20px; }
.statistics-scroll:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.statistics-heatmap { width: 100%; min-width: 1100px; table-layout: fixed; border-spacing: 3px 7px; font-size: 11px; }
.statistics-month-column { width: 100px; }
.statistics-heatmap th { padding: 0; text-align: left; color: var(--muted); font-weight: 500; }
.statistics-heatmap thead th { padding-block: 2px 7px; text-align: center; font-size: 10px; }
.statistics-heatmap thead tr:first-child th { color: var(--green-dark); font-size: 11px; }
.statistics-heatmap thead th[colspan] { padding: 7px; border-radius: 6px; background: #f0f4eb; }
.statistics-heatmap thead tr:last-child > :nth-child(7n + 5), .statistics-heatmap thead tr:last-child > :nth-child(7n + 6) { color: var(--green-dark); font-weight: 700; }
.statistics-heatmap thead th[rowspan], .statistics-heatmap tbody th { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; font-size: 12px; }
.statistics-heatmap tbody th { color: var(--ink); font-weight: 600; }
.statistics-month-number { display: inline-block; width: 22px; color: #86918a; font-size: 10px; font-weight: 400; font-variant-numeric: tabular-nums; }
.statistics-heatmap td { padding: 0; }
.statistics-heatmap tbody td:nth-child(7n + 8):not(:last-child) { position: relative; }
.statistics-heatmap tbody td:nth-child(7n + 8):not(:last-child)::after { content: ''; position: absolute; right: -2px; top: -4px; bottom: -4px; width: 1px; background: #e9ede4; pointer-events: none; }
.statistics-heatmap .statistics-cell { height: 27px; aspect-ratio: auto; border-radius: 5px; font-family: Arial, sans-serif; font-size: 11px; }
.statistics-cell { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1; min-height: 25px; border-radius: 6px; color: var(--heat-ink); background: var(--heat-fill); font-size: clamp(11px, 1vw, 13px); font-variant-numeric: tabular-nums; font-weight: 600; text-decoration: none; transition: box-shadow .12s, transform .12s; }
.statistics-cell:hover { color: var(--heat-ink); transform: translateY(-1px); box-shadow: 0 3px 8px rgb(24 38 32 / .16), inset 0 0 0 1px rgb(24 38 32 / .2); }
.statistics-cell:focus-visible { z-index: 2; outline: 2px solid var(--green); outline-offset: 2px; }
.statistics-cell.is-today::after { content: ''; position: absolute; bottom: 3px; left: calc(50% - 2px); width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.statistics-cell.is-selected { outline: 2px solid var(--green-dark); outline-offset: 1px; box-shadow: inset 0 0 0 2px var(--surface); }
.statistics-cell-date { display: none; }
.heat-level-0 { --heat-fill: #edf0eb; --heat-ink: #4d5b52; }
.heat-level-1 { --heat-fill: #e2efe5; --heat-ink: #203f2d; }
.heat-level-2 { --heat-fill: #c2ddc4; --heat-ink: #203f2d; }
.heat-level-3 { --heat-fill: #8dbe94; --heat-ink: #102d1c; }
.heat-level-4 { --heat-fill: #3d805c; --heat-ink: #ffffff; }
.heat-level-5 { --heat-fill: #0d4933; --heat-ink: #ffffff; }
.statistics-cell.is-unknown, .statistics-swatch.is-unknown { --heat-fill: #f8f9f5; --heat-ink: #66736d; background-image: radial-gradient(#d8dfd1 .6px, transparent .6px); background-size: 7px 7px; box-shadow: inset 0 0 0 1px #edf0e8; }
.statistics-cell.is-unknown .statistics-cell-count { visibility: hidden; }
.statistics-chart-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.statistics-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0; padding: 11px 14px; border: 1px solid #e5eadd; border-radius: 12px; background: #fafbf7; list-style: none; font-size: 12px; }
.statistics-legend li { display: inline-flex; align-items: center; gap: 6px; }
.statistics-swatch { display: inline-block; flex: none; width: 18px; height: 14px; border-radius: 4px; background: var(--heat-fill); }
.statistics-scale-note { margin: 0; color: var(--muted); font-size: 11px; }
.statistics-inspector { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px 24px; margin-top: 20px; padding: 18px 22px; border: 1px solid #e0e8d7; border-radius: 14px; background: linear-gradient(110deg, #eef3e7, #f8faf4); }
.statistics-inspector-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.statistics-inspector [data-statistics-date] { display: block; font-size: 16px; font-weight: 600; }
.statistics-inspector [data-statistics-date]::first-letter { text-transform: uppercase; }
.statistics-inspector p { grid-column: 2; grid-row: 1 / 3; display: flex; align-items: baseline; gap: 10px; margin: 0; }
.statistics-inspector [data-statistics-count] { color: var(--green-dark); font: 700 38px/1 var(--font-serif); font-variant-numeric: tabular-nums; }
.statistics-inspector [data-statistics-unit], .statistics-inspector-hint { color: var(--muted); font-size: 12px; }
.statistics-inspector-hint { grid-column: 1; font-size: 11px; }
.statistics-method { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.statistics-method summary { width: fit-content; color: var(--green-dark); font-size: 13px; cursor: pointer; }
.statistics-method .statistics-note { max-width: 860px; line-height: 1.7; }
.statistics-month-view { display: none; }
.statistics-month { width: 100%; table-layout: fixed; border-spacing: 4px; }
.statistics-month caption { margin: 20px 0 12px; text-align: left; font: 700 20px/1.3 var(--font-serif); }
.statistics-month th { padding-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 500; }
.statistics-month td { padding: 0; }
.statistics-month .statistics-cell { min-height: 62px; aspect-ratio: auto; flex-direction: column; gap: 3px; font-size: clamp(14px, 4vw, 18px); }
.statistics-month .statistics-cell-date { display: block; font-size: 11px; font-weight: 400; }
.statistics-years td { padding: 15px 12px; text-align: right; font-size: 15px; font-variant-numeric: tabular-nums; }
.statistics-years thead th:not(:first-child) { text-align: right; }
.statistics-years tbody th { padding: 12px; border-bottom: 1px solid var(--line); font-size: 17px; letter-spacing: normal; text-transform: none; }
.statistics-years tbody small { display: inline-block; margin-left: 10px; color: var(--muted); font-size: 11px; font-weight: 400; }
.statistics-years .is-current { background: #f0f4eb; }
.statistics-years a { display: inline-block; padding: 7px 0; }
.statistics-selected-day { scroll-margin-top: 20px; }
.statistics-selected-day .calendar-day { min-height: 0; padding: 0; border: 0; border-radius: 0; }
.statistics-events summary { width: fit-content; padding: 8px 0; color: var(--green-dark); font-size: 14px; cursor: pointer; }
.statistics-events[open] summary { margin-bottom: 12px; }
@media (max-width: 760px) {
  .statistics-summary { gap: 12px; margin-bottom: 24px; }
  .statistics-summary > div { padding-left: 10px; }
  .statistics-summary dd { font-size: clamp(24px, 6vw, 34px); }
  .statistics-summary dt { font-size: 11px; }
  .statistics-panel { padding: 20px 12px; border-radius: 16px; }
  .statistics-year-view { display: none; }
  .statistics-month-view { display: block; }
  .statistics-heading { align-items: flex-start; flex-direction: column; }
  .statistics-picker { flex-wrap: wrap; }
  .statistics-inspector { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 14px; }
  .statistics-inspector p { grid-column: 1; grid-row: auto; flex-wrap: wrap; }
  .statistics-inspector-hint { display: none; }
  .statistics-years th, .statistics-years td, .statistics-years tbody th { padding: 10px 5px; }
  .statistics-years thead th { white-space: normal; }
  .statistics-years tbody small { display: block; margin-left: 0; }
}

@media print {
  .site-header nav, .filters, .site-footer { display: none; }
  body { background: white; }
  .main-content { padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .statistics-cell, .filter-sheet, .place-card, .week-switcher a { transition: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* Kam vyrazit: seznam a detail míst */
.places-page { display: block; }
.places-main { min-width: 0; }
.places-search { margin: 0 0 12px; }
.places-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.places-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--green-dark); background: white; font-weight: 750; text-decoration: none; }
.places-chip:hover, .places-chip:focus-visible { color: var(--orange); border-color: var(--orange); }
.places-chip.is-on { color: white; background: var(--green); border-color: var(--green); }
.places-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.places-filter-button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 10px; color: white; background: var(--ink); font-weight: 750; text-decoration: none; }
.places-filter-button:hover { color: white; background: var(--green-dark); }
.places-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin: 0 0 12px; }
.places-meta .places-count, .places-meta .places-order { margin: 0; }
.places-order { margin: 0; color: var(--muted); font-size: 14px; }
.places-active { margin: 0 0 12px; }
.places-active .clear-filters { background: transparent; text-decoration: underline; }
.places-count { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.places-count strong { color: var(--ink); }
.place-list { display: grid; gap: 12px; }
.place-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .15s, box-shadow .18s, transform .15s; }
.place-card:hover { border-color: #bcc6be; box-shadow: 0 8px 22px rgb(24 38 32 / .06); transform: translateY(-1px); }
.place-card-head { display: grid; gap: 4px; }
.place-card h3 { margin: 0; font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
.place-card h3 a { color: var(--ink); text-decoration: none; }
.place-card h3 a:hover, .place-card h3 a:focus-visible { color: var(--orange); text-decoration: underline; }
.place-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.place-kinds { flex: none; display: inline-flex; gap: 6px; align-self: center; }
.place-label { color: var(--muted); font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.place-where { margin: 2px 0 6px; color: var(--muted); font-size: 14px; }
.place-status { margin: 0 0 4px; font-weight: 700; }
.place-status-large { margin-top: 10px; font-size: 20px; }
.place-symbol { display: inline-block; width: 1.1em; text-align: center; }
.place-status-open .place-symbol, .place-status-session .place-symbol { color: var(--green); }
.place-status-later .place-symbol { color: #8aa51a; }
.place-status-closed { color: var(--muted); }
.place-status-exception { color: #9a3f19; }
.place-status-exception .place-symbol { color: var(--orange); }
.place-note { margin: 0 0 4px; color: var(--muted); font-size: 14px; }
.place-note-closure { color: #9a3f19; }
.place-description { margin: 0 0 6px; }
.place-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.place-action { margin: 6px 0 0; font-weight: 750; }
.place-action a { display: inline-flex; align-items: center; min-height: 44px; }
.places-empty { padding: 18px; border: 1px dashed #bcc5bf; border-radius: 14px; background: var(--surface); }
.places-empty .place-list { margin: 12px 0; }
.places-hint { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.places-error:empty { display: none; }

.facet-labelled { display: inline-flex; width: auto; height: auto; min-height: 44px; gap: 7px; padding: 8px 13px; font-size: 14px; font-weight: 700; text-decoration: none; }
.facet-labelled svg { flex: none; }
.facet-bar-labelled { gap: 8px; }
.places-axis { margin: 0 0 20px; }
.places-axis h3 { margin: 0 0 8px; font-size: 15px; }
.places-origin-line { margin: 0; }
.places-link-button { padding: 8px; border: 0; color: var(--green-dark); background: none; font: inherit; text-decoration: underline; cursor: pointer; }
.places-sheet-foot { display: flex; align-items: center; gap: 16px; }
.places-clear { font-size: 14px; }
.map-list ul { columns: 2; margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
.map-list a.is-on { font-weight: 800; }

/* The sheet: a full-screen panel on a phone, a left column on a desktop. */
.places-sheet { display: none; }
.places-page:not(.js) .places-sheet:target, .places-sheet.is-open { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; overflow-y: auto; padding: 18px 16px 0; background: var(--surface); }
.places-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.places-sheet-head h2 { margin: 0; }
.places-sheet-close { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); text-decoration: none; font-size: 18px; }
.places-sheet-foot { position: sticky; bottom: 0; margin: auto -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); box-shadow: 0 -6px 18px rgb(24 38 32 / .06); }
body.places-sheet-open { overflow: hidden; }

@media (min-width: 900px) {
  .places-page { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
  .places-sheet, .places-page:not(.js) .places-sheet:target, .places-sheet.is-open { position: static; display: block; z-index: auto; overflow: visible; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .places-sheet-close, .places-filter-button, .places-sheet-foot .button, .places-toolbar { display: none; }
  .places-sheet-head h2 { font-size: 22px; }
  .places-sheet-foot { position: static; margin: 12px 0 0; padding: 0; border: 0; box-shadow: none; }
  .place-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .map-filter { max-width: none; }
}

.place-detail { max-width: 850px; }
.place-detail header { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.place-detail h1 { margin-bottom: 6px; }
.place-detail-heading { margin-bottom: 6px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.place-detail-heading h1 { flex: 1; min-width: 0; margin-bottom: 0; }
.place-detail-heading .category-icon { width: 20px; height: 20px; }
.place-banner { margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; color: #7b2713; background: #f9e1d6; font-weight: 700; }
.place-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.place-description-large { margin: 22px 0 0; font-size: 18px; }
.place-hours-section { margin-top: 28px; }
.place-block { margin: 0 0 22px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.place-block.is-match { border-color: var(--green); box-shadow: 0 0 0 2px rgb(216 238 120 / .6); }
.place-block h3 { margin: 0 0 2px; font-size: 18px; }
.place-block h4 { margin: 12px 0 4px; font-size: 14px; color: var(--muted); }
.place-block-meta { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.badge-match { color: var(--green-dark); background: var(--lime); }
.place-hours { width: 100%; border-collapse: collapse; font-size: 15px; }
.place-hours th, .place-hours td { padding: 7px 8px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.place-hours thead th { border-top: 0; color: var(--muted); font-size: 12px; text-transform: uppercase; }
.place-hours tbody th { width: 5.5em; font-weight: 800; }
.place-hours .place-time { white-space: nowrap; }
.place-hours abbr { text-decoration: none; }
.place-hours tr.is-today th, .place-hours tr.is-today td { background: #eef6c9; }
.place-today { margin-left: 4px; padding: 1px 6px; border-radius: 999px; color: var(--green-dark); background: var(--lime); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.place-facts { margin-top: 22px; }
.place-facts p { margin: 0 0 8px; }
.place-source p { margin: 0 0 10px; }
.place-report summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 750; }
.place-report ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.place-events { margin-top: 30px; }
.place-events ul { margin: 0; padding-left: 0; list-style: none; }
.place-events li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.place-events time { display: inline-block; min-width: 4.5em; color: var(--muted); font-weight: 700; }
.footer-tip-link { margin-left: 10px; }

/* Kam vyrazit: vstupy z kalendáře, box v obci a vstupní stránky obcí */
.places-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 24px 0 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.places-strip strong { color: var(--green-dark); }
.places-strip a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--green-dark); font-weight: 750; text-decoration: none; }
.places-strip a:hover, .places-strip a:focus-visible { color: var(--orange); border-color: var(--orange); }
.places-strip .places-strip-all { border-color: transparent; background: transparent; text-decoration: underline; }
.places-empty-note { margin: 0 0 18px; padding: 12px 14px; border: 1px dashed #bcc5bf; border-radius: 14px; background: var(--surface); }
.places-box { margin: 30px 0 0; }
.places-box h2 { margin: 0 0 12px; }
.place-link { margin: 0 0 18px; font-weight: 700; }
.quiz-day { margin: 0 0 18px; }
.quiz-day h2 { margin: 0 0 6px; font-size: 18px; }
.quiz-sessions { display: grid; margin: 0; padding: 0; list-style: none; }
.quiz-sessions li { display: grid; grid-template-columns: 3.4rem 1fr auto; align-items: baseline; gap: 2px 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.quiz-sessions time { color: var(--orange); font-size: 13px; font-weight: 800; }
.quiz-sessions a { color: var(--ink); font-weight: 700; text-decoration: none; }
.quiz-sessions a:hover, .quiz-sessions a:focus-visible { color: var(--orange); text-decoration: underline; }
.quiz-municipality { grid-column: 2; color: var(--muted); font-size: 14px; }
.quiz-sessions .quiz-source { grid-column: 3; grid-row: 1 / span 2; align-self: center; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: underline; }
.places-landing .places-related { margin: 26px 0 0; }
.places-landing .places-related h2 { margin: 0 0 10px; font-size: 18px; }
