:root {
  --canvas: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f1f4fa;
  --ink: #172033;
  --muted: #667085;
  --line: #e5e9f2;
  --brand: #1859c9;
  --brand-dark: #123f92;
  --brand-soft: #eaf1ff;
  --signal: #bf4600;
  --signal-bright: #ff6508;
  --signal-soft: #fff1e8;
  --water: #dde9ee;
  --danger: #b3261e;
  --warning: #9a6400;
  --success: #137a3f;
  --placeholder: #5f687a;
  --nav-muted: #667085;
  --focus: #0b57d0;
  --shadow-sm: 0 3px 12px rgba(25, 45, 86, .10);
  --shadow-panel: 0 12px 32px rgba(25, 45, 86, .14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --font-ui: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, monospace;
  --content: 1040px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { min-width: 280px; min-height: 100%; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.5;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}
body.is-home { height: 100%; overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
img { max-width: 100%; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid white;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--focus);
}
[hidden] { display: none !important; }

h1, h2, h3 { line-height: 1.15; text-wrap: balance; }
h1 { margin: .2em 0 .45em; font-size: 1.75rem; letter-spacing: -.035em; }
h2 { margin: 1.5em 0 .55em; font-size: 1.25rem; letter-spacing: -.015em; }
h3 { margin: 1.25em 0 .4em; font-size: 1.05rem; }
p { text-wrap: pretty; }
time, .data, .hh, .count, .count-line, .ev-date, .big, .mono, .q-meta, .q-conf {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
}
.muted, .lead { color: var(--muted); }
.lead { margin: .25rem 0 1.25rem; font-size: 1.05rem; }
.center { text-align: center; }
.narrow { max-width: 560px; margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; clip: rect(0,0,0,0); overflow: hidden; }
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2000;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  transform: translateY(calc(-100% - 16px));
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: white;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.025em;
}
.brand span { color: var(--brand); }

.control {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 180ms cubic-bezier(.22,1,.36,1), background 180ms cubic-bezier(.22,1,.36,1), color 180ms cubic-bezier(.22,1,.36,1);
}
.control:hover { border-color: color-mix(in srgb, var(--brand) 42%, var(--line)); }
.control[aria-pressed="true"], .control.is-active { border-color: var(--brand); background: var(--brand); color: white; }
.control--primary { border-color: var(--brand); background: var(--brand); color: white; font-weight: 600; }
.control--primary:hover { border-color: var(--brand-dark); background: var(--brand-dark); }
.control--signal { border-color: var(--signal); background: var(--signal); color: white; font-weight: 600; }
.control--quiet { border-color: transparent; background: transparent; }
.control--icon { width: 44px; padding: 0; }
.control--small { min-height: 36px; padding-inline: 10px; font-size: .875rem; }

/* Standard pages */
.site-head {
  position: sticky;
  top: 0;
  z-index: 500;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(20px, calc((100vw - var(--content)) / 2));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
}
.site-head .brand { white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav a.on { color: var(--brand-dark); }
.wrap { width: min(100% - 32px, var(--content)); min-height: calc(100vh - 190px); margin: 0 auto; padding: 34px 0 72px; }
.site-foot { width: min(100% - 32px, var(--content)); margin: 0 auto; padding: 28px 0 42px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.site-foot p { margin: .3em 0; }
.site-foot a { color: var(--muted); }
.crumbs { margin: 0 0 18px; color: var(--muted); font-size: .875rem; }
.crumbs a { color: var(--muted); }
.home-main { min-height: 0; }

/* Atlas shell */
.atlas-shell {
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-columns: 232px minmax(440px, 1fr) 390px;
}
.atlas-shell > * { min-height: 0; }
.app-rail {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 16px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  z-index: 700;
}
.app-rail .brand { padding: 0 8px; }
.rail-nav { display: grid; gap: 4px; margin: 34px 0 28px; }
.rail-link {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  text-align: left;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}
.rail-link:hover { background: var(--canvas); color: var(--ink); }
.rail-link.is-active { background: var(--brand-soft); color: var(--brand-dark); }
.nav-count { min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px; background: var(--canvas); font-size: .75rem; }
.location-block { padding: 22px 8px 18px; border-top: 1px solid var(--line); }
.location-block h2 { margin: 0 0 14px; color: var(--muted); font-size: .875rem; font-weight: 500; }
.location-button {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.location-button strong, .location-button small { display: block; }
.location-button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.location-button small { margin-top: 2px; color: var(--muted); font-size: .75rem; }
.radius-wrap { display: block; }
.radius { width: 100%; margin: 18px 0 4px; accent-color: var(--brand); }
.radius:disabled { cursor: not-allowed; opacity: .45; }
.radius-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: .75rem; }
.radius-labels strong { color: var(--brand-dark); }
.alert-prompt { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; padding: 16px 8px; border-top: 1px solid var(--line); }
.alert-prompt strong { font-size: .875rem; }
.alert-prompt p { margin: 3px 0 12px; color: var(--muted); font-size: .75rem; line-height: 1.4; }
.alert-prompt .control { grid-column: 2; justify-self: start; }
.source-note { display: grid; grid-template-columns: 10px minmax(0, 1fr); align-items: start; gap: 9px; margin-top: auto; padding: 16px 8px 4px; border-top: 1px solid var(--line); }
.source-note .status-dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 14%, white); }
.source-note strong, .source-note small { display: block; }
.source-note strong { font-size: .75rem; }
.source-note small { margin-top: 3px; color: var(--muted); font-size: .75rem; line-height: 1.35; }

.map-stage { position: relative; min-width: 0; overflow: hidden; isolation: isolate; }
.map-canvas { width: 100%; height: 100%; background: var(--water); }
.map-toolbar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 600;
  display: flex;
  gap: 8px;
  pointer-events: none;
}
.map-toolbar > * { pointer-events: auto; box-shadow: var(--shadow-sm); }
.toolbar-location { min-width: 220px; justify-content: flex-start; }
.toolbar-location > span:nth-child(2) { display: grid; min-width: 0; text-align: left; }
.toolbar-location strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toolbar-location small { color: var(--muted); font-size: .75rem; }
.date-switch { display: flex; }
.date-switch .control { margin-left: -1px; border-radius: 0; box-shadow: none; }
.date-switch .control:first-child { margin-left: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.date-switch .control:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.filter-button { margin-left: auto; }
.filter-count { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-dark); color: white; font-size: .75rem; }
.locate-button { position: absolute; left: 16px; bottom: 16px; z-index: 900; box-shadow: var(--shadow-sm); }
.map-status { position: absolute; top: 76px; left: 50%; z-index: 750; max-width: min(420px, calc(100% - 32px)); transform: translateX(-50%); padding: 7px 10px; border-radius: var(--radius-sm); background: var(--ink); color: white; font-size: .75rem; opacity: 0; pointer-events: none; transition: opacity 160ms ease; }
.map-status:not(:empty) { opacity: 1; }
.map-error { position: absolute; top: 76px; left: 50%; z-index: 800; width: min(380px, calc(100% - 32px)); transform: translateX(-50%); padding: 14px; border: 1px solid color-mix(in srgb, var(--danger) 28%, var(--line)); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-sm); }
.map-error strong, .map-error span { display: block; }
.map-error span { margin: 3px 0 11px; color: var(--muted); font-size: .8125rem; }

.leaflet-container { font-family: var(--font-ui); color: var(--ink); }
.leaflet-control-zoom a { color: var(--ink); }
.leaflet-control-attribution { font-size: .75rem; }
.leaflet-popup-content-wrapper { border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.leaflet-popup-content { min-width: 210px; margin: 12px 14px; }
.pin-pop b { display: block; margin-bottom: 3px; font-size: .95rem; line-height: 1.3; }
.pin-pop .pp-date, .pin-pop .pp-badge { color: var(--muted); font-family: var(--font-data); font-size: .75rem; }
.pin-pop .pp-geo { margin: 4px 0; color: var(--muted); font-size: .72rem; line-height: 1.35; }
.pin-pop a { color: var(--brand-dark); font-weight: 600; text-decoration: none; }
.gz-pin-wrap { border: 0; background: transparent; }
.gz-pin {
  --pin-color: var(--brand);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  transform: rotate(-45deg);
  border: 3px solid white;
  border-radius: 50% 50% 50% 12%;
  background: var(--pin-color);
  color: white;
  box-shadow: 0 2px 8px rgba(16, 35, 28, .22);
  font: 700 .75rem/1 var(--font-ui);
}
.gz-pin > span { transform: rotate(45deg); }
.gz-pin.is-selected { --pin-color: var(--signal); width: 40px; height: 40px; }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: rgba(14, 107, 87, .22); }
.marker-cluster div { background: var(--brand-dark); color: white; font-family: var(--font-data); font-weight: 600; }
.map-legend {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 900;
  max-width: calc(100% - 140px);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  transform: translateX(-50%);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-color: var(--brand) var(--surface-2);
  scrollbar-width: thin;
}
.map-legend::-webkit-scrollbar { height: 5px; }
.map-legend::-webkit-scrollbar-track { background: var(--surface-2); }
.map-legend::-webkit-scrollbar-thumb { border-radius: 999px; background: var(--brand); }
.legend-item { flex: none; border-color: transparent; }
.legend-item[aria-pressed="false"] { background: transparent; color: var(--muted); opacity: .7; }
.legend-symbol { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--cat); color: white; font: 700 .75rem var(--font-ui); }

.feed-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; border-left: 1px solid var(--line); background: var(--surface); z-index: 700; }
.feed-header { min-height: 118px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 24px 20px 18px; border-bottom: 1px solid var(--line); }
.feed-header h1 { max-width: 285px; margin: 0; font-size: 1.42rem; line-height: 1.17; letter-spacing: -.028em; }
.feed-header p { margin: 8px 0 0; color: var(--muted); font-size: .875rem; }
.feed-scroll { min-height: 0; overflow-y: auto; scrollbar-gutter: stable; }
.sheet-handle { display: none; }
.events, .event-list { list-style: none; margin: 0; padding: 0; }
.timeline-list { position: relative; padding-bottom: 24px; }
.timeline-list::before { content: ""; position: absolute; top: 24px; bottom: 28px; left: 55px; width: 1px; background: var(--line); }
.event-row { position: relative; min-width: 0; display: grid; border-bottom: 1px solid var(--line); transition: background 180ms cubic-bezier(.22,1,.36,1); }
.event-row:hover { background: color-mix(in srgb, var(--brand-soft) 55%, white); }
.event-row.is-selected { background: var(--signal-soft); }
.timeline-row { min-height: 148px; grid-template-columns: 54px 42px minmax(0, 1fr) 54px; align-items: center; padding: 16px 8px 16px 0; }
.timeline-distance { position: relative; z-index: 1; display: grid; justify-items: center; color: var(--brand-dark); font-size: .75rem; }
.timeline-distance small { color: var(--muted); font-size: .75rem; }
.timeline-distance.is-unknown small { display: none; }
.timeline-node { position: relative; z-index: 2; width: 32px; height: 32px; display: grid; place-items: center; border: 3px solid white; border-radius: 50%; background: var(--cat); color: white; font-size: .75rem; font-weight: 700; }
.event-row__select { width: 100%; min-width: 0; padding: 0 7px 0 2px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.event-row__time, .event-row__title, .event-row__place { display: block; }
.event-row__time { color: var(--muted); font-size: .75rem; }
.event-row__title { margin: 4px 0 2px; font-size: 1rem; line-height: 1.25; font-weight: 600; text-wrap: pretty; }
.event-row__place { color: var(--muted); font-size: .8125rem; }
.event-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; color: var(--muted); font-size: .75rem; }
.category-label { display: inline-flex; align-items: center; gap: 5px; color: var(--cat); font-weight: 600; }
.category-label::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--cat); }
.entry-label { color: var(--entry); font-weight: 600; }
.source-fresh { display: inline-flex; align-items: center; gap: 4px; }
.source-fresh::before { content: "✓"; width: 15px; height: 15px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 9px; }
.row-actions .source-link { display: inline-flex; color: #137a3f; font-size: .65rem; }
.row-actions { align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.save-button { color: var(--muted); }
.save-button[aria-pressed="true"] { border-color: color-mix(in srgb, var(--signal) 32%, var(--line)); background: var(--signal-soft); color: var(--signal); }
.detail-link { min-height: 32px; display: inline-flex; align-items: center; color: var(--brand-dark); font-size: .75rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.empty-state, .error-state { margin: 24px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); text-align: center; }
.empty-state h2, .empty-state h3, .error-state h3 { margin: 0 0 6px; font-size: 1.125rem; }
.empty-state p, .error-state p { margin: 0 0 16px; color: var(--muted); }
.mobile-nav { display: none; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 1400; transform: translate(-50%, 20px); padding: 11px 16px; border-radius: var(--radius-sm); background: var(--ink); color: white; opacity: 0; pointer-events: none; transition: opacity 180ms ease, transform 180ms cubic-bezier(.22,1,.36,1); }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.info-dialog { width: min(460px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); }
.info-dialog::backdrop { background: rgba(16, 35, 28, .42); }
.info-dialog form { position: relative; padding: 26px; }
.info-dialog h2 { margin: 0 44px 10px 0; }
.info-dialog p { margin: 0 0 22px; color: var(--muted); }
.dialog-close { position: absolute; top: 12px; right: 12px; }
.alert-form { max-height: min(82vh, 720px); overflow-y: auto; }
.alert-form > label { display: grid; gap: 5px; margin: 12px 0; color: var(--muted); font-size: .82rem; }
.alert-form input, .alert-form select { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: white; color: var(--ink); }
.alert-categories { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.alert-categories legend { padding: 0 5px; color: var(--muted); font-size: .82rem; }
.alert-categories label { display: flex; align-items: center; gap: 7px; font-size: .82rem; cursor: pointer; }
.alert-categories input { width: 16px; min-height: 16px; margin: 0; }
.legend-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--cat); }
.alert-privacy { display: block; margin-top: 11px; color: var(--muted); line-height: 1.45; }
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* List, event and editorial data views */
.controls { margin: 20px 0; }
.days, .kats, .f-kats, .f-row { display: flex; flex-wrap: wrap; gap: 8px; }
.days { margin-bottom: 10px; }
.day { min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); cursor: pointer; font-family: var(--font-data); font-size: .8rem; }
.day.on { border-color: var(--brand); background: var(--brand); color: white; }
.kat { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-size: .875rem; cursor: pointer; }
.kat input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.kat .dot { width: 11px; height: 11px; flex: none; border-radius: 50%; background: var(--kc, #777); outline: 2px solid transparent; }
.kat input:not(:checked) ~ .dot { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.kat input:not(:checked) ~ * { opacity: .55; }
/* Uwaga: NIE dodawaj tu reguły `.map` z własną wysokością. Mapa jest powierzchnią
   główną w `.map-stage` (grid `.atlas-shell`), a nie sekcją w przewijanej stronie.
   Stary układ ze stosowaną mapą `52vh` należy do wersji sprzed Atlasu V3. */
.map-noscript { padding: 16px; color: var(--muted); }
.list h2, .wystepy h2 { display: flex; align-items: baseline; gap: 8px; }
.count, .count-line { color: var(--muted); font-size: .85rem; }
.list .events { border-top: 1px solid var(--line); }
.ev { display: flex; align-items: stretch; justify-content: space-between; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.ev-main { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 2px; text-decoration: none; }
.ev-title-link { min-width: 0; display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; }
.ev-title-link:hover .ev-name { color: var(--brand-dark); }
.ev-date { color: var(--muted); font-size: .78rem; }
.ev-date .hh { color: var(--ink); }
.ev-name { font-size: 1.05rem; font-weight: 600; line-height: 1.25; }
.ev-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 3px; color: var(--muted); font-size: .85rem; }
.ev-gmina, .ev-region { color: var(--brand-dark); text-decoration: none; }
.ev-gmina:hover, .ev-region:hover { text-decoration: underline; }
.ev-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 5px; }
.source-link { color: var(--brand-dark); font-size: .72rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.source-link:hover { text-decoration: underline; }
.chip { padding: 2px 7px; border-radius: 999px; background: var(--kc, #777); color: white; font-size: .75rem; white-space: nowrap; }
.badge { align-self: center; height: fit-content; padding: 4px 8px; border: 1px solid color-mix(in srgb, var(--bc) 35%, var(--line)); border-radius: 6px; background: color-mix(in srgb, var(--bc) 8%, white); color: var(--bc, var(--ink)); font-size: .75rem; font-weight: 600; white-space: nowrap; }
.badge.sm { padding: 3px 6px; font-size: .75rem; }
/* „Wstęp wolny" to dobra wiadomość — mocny zielony. Brak ceny to nie alarm:
   neutralny, drobniejszy tekst zamiast krzyczącego „CENA NIEPODANA". */
.badge--free { border-color: color-mix(in srgb, var(--bc) 55%, var(--line)); background: color-mix(in srgb, var(--bc) 14%, white); font-weight: 700; }
.badge--neutral { border-color: color-mix(in srgb, var(--bc) 22%, var(--line)); background: transparent; color: var(--muted); font-weight: 500; }
.empty { padding: 18px 0; color: var(--muted); }
.list-empty {
  margin: 16px 0;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--brand) 32%, var(--line));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--brand-soft) 55%, white);
}
.list-empty:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.list-empty h2 { margin: 0 0 6px; font-size: 1.125rem; }
.list-empty p { margin: 0 0 14px; color: var(--muted); }
.list-more, .back { margin-top: 18px; }
.list-more a, .back a, .src a, .src-min, .rodo-note a, .obserwuj a, .q-src a { color: var(--brand-dark); font-weight: 600; text-decoration: none; }
.province-directory, .province-municipalities { margin: 24px 0; }
.province-directory h2, .province-municipalities h2, .region-events h2 { margin-bottom: 10px; font-size: 1.125rem; }
.province-directory ul, .province-municipalities ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0 22px;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.province-directory li, .province-municipalities li {
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
}
.province-directory a, .province-municipalities a { min-width: 0; color: var(--brand-dark); font-weight: 600; text-decoration: none; overflow-wrap: normal; word-break: normal; hyphens: manual; }
.province-directory a:hover, .province-municipalities a:hover { text-decoration: underline; }
.province-directory li span, .province-municipalities li span { color: var(--muted); font-size: .78rem; text-align: right; }
.province-directory--feed { margin: 16px 4px 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.province-directory--feed h2 { font-size: .9rem; }
.province-directory--feed ul { grid-template-columns: 1fr 1fr; gap: 0 12px; border-top: 0; }
.province-directory--feed li { min-height: 36px; padding-block: 5px; font-size: .78rem; }
.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  color: var(--muted);
  font-size: .875rem;
  text-align: center;
}
.pagination a { min-height: 44px; display: inline-flex; align-items: center; color: var(--brand-dark); font-weight: 600; text-decoration: none; }
.pagination a[rel="next"] { justify-self: end; }

.edycja, .obserwuj, .filters, .q-item, .stat { margin: 16px 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.edycja.next { border-color: color-mix(in srgb, var(--success) 32%, var(--line)); background: color-mix(in srgb, var(--brand-soft) 28%, white); }
.edycja-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.tag { color: var(--muted); font-size: .75rem; letter-spacing: .07em; text-transform: uppercase; }
.edycja-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.big { font-size: 1.25rem; font-weight: 600; }
.edycja .hh { color: var(--muted); font-size: .875rem; }
.miejsce { margin: 9px 0 3px; }
.program, .wyk-l { color: var(--muted); }
.wyk { margin: 8px 0; font-size: .95rem; }
.wyk a.gwiazda { font-weight: 700; }
.warn-inline { color: var(--warning); }
.src { margin-top: 10px; font-size: .85rem; overflow-wrap: anywhere; }
.src-attribution { color: var(--muted); line-height: 1.55; }
.src-attribution strong { color: var(--ink); }
.src-attribution .license-note { display: block; }
.src-min.attribution { flex-basis: 100%; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.src-min.attribution a { color: var(--brand-dark); font-weight: 600; }
.event-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.event-actions .control { text-decoration: none; }
.event-actions [aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.edycje-min { list-style: none; margin: 5px 0; padding: 0; border-top: 1px solid var(--line); }
.edycje-min li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.edycje-min time { color: var(--muted); }
.past { opacity: .82; }
.warn { margin: 16px 0; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--warning) 35%, var(--line)); border-radius: var(--radius-md); background: #fff8e8; color: #704b00; font-size: .95rem; }
.obs-form { display: flex; flex-direction: column; gap: 11px; margin-top: 10px; }
.obs-form label, .filters label { min-width: 0; display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: .85rem; }
.filters label.kat {
  flex-direction: row;
  align-items: center;
  width: auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0 4px;
  color: var(--ink);
}
.filters label.kat:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }
.obs-form input, .obs-form select, .filters input[type="search"], .filters select, .admin-form input, .admin-form select, .admin-form textarea {
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--ink);
}
.filters input[type="search"], .filters select { width: 100%; min-width: 0; max-width: 100%; }
.wrap button:not(.day):not(.control), .obs-form button {
  min-height: 44px;
  padding: 9px 15px;
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: white;
  font-weight: 600;
  cursor: pointer;
}
.wrap button.ghost, .consent .ghost { border-color: var(--line); background: transparent; color: var(--ink); }
.rodo-note { color: var(--muted); font-size: .75rem; }
.form-err { padding: 10px 12px; border: 1px solid #efb5af; border-radius: var(--radius-sm); background: #fdecea; color: #8e211a; font-size: .9rem; }
.f-search { margin-bottom: 13px; }
.f-kats { margin-bottom: 13px; }
.f-row { align-items: end; }
.clear { align-self: center; color: var(--muted); font-size: .9rem; text-decoration: none; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.5em; }
.prose ul { padding-left: 1.25em; }
.prose li { margin: .35em 0; }
.big-emoji { margin: .5em 0; font-size: 3rem; }
.event .art-hero { margin: 0 0 18px; }
.event .art-hero img { width: 100%; height: auto; aspect-ratio: 5 / 2; display: block; border-radius: var(--radius-md); object-fit: cover; object-position: var(--event-focal-x, 50%) var(--event-focal-y, 50%); }
.event .art-hero img.event-poster-original { width: auto; max-width: 100%; max-height: min(78vh, 980px); margin-inline: auto; aspect-ratio: auto; object-fit: contain; background: #eef1f5; }
.event .art-hero figcaption { margin-top: 4px; color: var(--muted); font-size: .75rem; text-align: right; }
.event .art-hero figcaption a,
.description-attribution a { color: var(--brand-dark); }
.event-description { max-width: 75ch; text-wrap: pretty; }
.description-attribution { margin: -8px 0 18px; color: var(--muted); font-size: .8125rem; }
.event-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 12px 0 18px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--line); }
.event-facts > div { min-width: 0; padding: 12px 14px; background: var(--surface); }
.event-facts dt { margin-bottom: 3px; color: var(--muted); font: 600 .72rem/1.2 var(--font-data); letter-spacing: .04em; text-transform: uppercase; }
.event-facts dd { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.related-events { margin-top: 28px; }

@media (max-width: 520px) {
  .event-facts { grid-template-columns: 1fr; }
}

/* Consent */
.consent { position: fixed; right: 16px; bottom: 16px; z-index: 1300; width: min(420px, calc(100% - 32px)); padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); font-size: .875rem; }
.consent p { margin: 0 0 11px; }
.consent-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.consent button { min-height: 44px; padding: 8px 14px; border: 1px solid var(--brand); border-radius: var(--radius-sm); background: var(--brand); color: white; font-weight: 600; cursor: pointer; }

/* Admin */
.admin-bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.admin-nav a { margin-left: 14px; color: var(--muted); font-size: .9rem; text-decoration: none; }
.admin-nav a.on, .admin-nav a:hover { color: var(--brand-dark); }
.q-list { list-style: none; margin: 0; padding: 0; }
.q-item { margin-bottom: 12px; }
.q-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 5px; }
.q-conf { padding: 2px 8px; border-radius: 999px; background: var(--ink); color: white; font-size: .75rem; }
.q-name { font-size: 1.05rem; font-weight: 600; }
.q-meta { margin: 4px 0; color: var(--muted); font-size: .8rem; }
.q-art { margin: 4px 0; font-size: .9rem; }
.q-src { margin: 4px 0; font-size: .8rem; overflow-wrap: anywhere; }
.q-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 11px; }
.q-actions form { margin: 0; }
.q-actions .ok { border-color: var(--success) !important; background: var(--success) !important; color: white; }
.q-actions .btn { min-height: 44px; display: inline-flex; align-items: center; padding: 9px 15px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); font-weight: 600; text-decoration: none; }
.admin-form label.checkbox { flex-direction: row; align-items: center; gap: 7px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.stat.q { border-color: color-mix(in srgb, var(--warning) 32%, var(--line)); background: #fffaf0; }
.stat .num { display: block; font-family: var(--font-data); font-size: 1.9rem; font-weight: 600; line-height: 1; }
.stat .lbl { display: block; margin-top: 5px; color: var(--muted); font-size: .8rem; }

@media (min-width: 760px) {
  .obs-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; }
  .obs-form button { grid-column: 1 / -1; justify-self: start; padding-inline: 25px; }
  .rodo-note { grid-column: 1 / -1; }
}

@media (max-width: 1220px) {
  .atlas-shell { grid-template-columns: 82px minmax(420px, 1fr) 360px; }
  .app-rail { align-items: center; padding-inline: 10px; }
  .app-rail .brand { font-size: 0; }
  .app-rail .brand::before { content: "gz"; color: var(--brand-dark); font: 700 1.25rem var(--font-ui); }
  .rail-link { width: 52px; grid-template-columns: 24px; justify-content: center; padding: 0; }
  .rail-link > span { display: none; }
  .location-block, .alert-prompt, .source-note { display: none; }
  .toolbar-location { min-width: 0; }
  .toolbar-location small { display: none; }
}

@media (max-width: 840px) {
  body.is-home { overflow: hidden; }
  /* higiena (audyt 2026-07-19): .site-head jest sticky (zajmuje miejsce w potoku,
     nie fixed), wiec 100dvh na .atlas-shell przepelnialo strone o wysokosc
     naglowka (~58px na mobile) - stad scroll tam, gdzie mial byc pelnoekranowy atlas. */
  .atlas-shell { height: calc(100dvh - 58px); display: block; }
  .app-rail { position: fixed; top: 0; right: 0; left: 0; height: 64px; flex-direction: row; justify-content: space-between; padding: 0 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .app-rail .brand { padding: 0; font-size: 1.125rem; }
  .app-rail .brand::before { display: none; }
  .rail-nav, .location-block, .alert-prompt, .source-note { display: none; }
  .map-stage { position: fixed; inset: 64px 0 68px; }
  .map-toolbar { top: 10px; right: 10px; left: 10px; display: grid; grid-template-columns: minmax(0, 1fr) 48px; }
  .toolbar-location { width: 100%; min-width: 0; overflow: hidden; }
  .toolbar-location > span:nth-child(2) { min-width: 0; }
  .date-switch { display: none; }
  .filter-button { width: 48px; margin: 0; padding: 0; font-size: 0; }
  .filter-button .icon, .filter-button .filter-count { font-size: initial; }
  .map-legend { display: none; }
  body.filters-open .map-legend { top: 66px; right: 10px; bottom: auto; left: 10px; max-width: none; display: flex; transform: none; flex-wrap: wrap; white-space: normal; }
  .locate-button { left: 10px; bottom: 112px; }
  .map-status, .map-error { top: 68px; }
  body.filters-open .map-status, body.filters-open .map-error { top: 150px; }
  .feed-panel { position: fixed; right: 8px; bottom: 66px; left: 8px; height: 220px; overflow: hidden; border: 0; border-radius: var(--radius-md) var(--radius-md) 0 0; background: var(--surface); box-shadow: 0 -2px 8px rgba(16, 35, 28, .13); transition: none; }
  body.sheet-expanded .feed-panel { top: 64px; height: auto; }
  .feed-header { display: none; }
  .sheet-handle { position: relative; min-height: 58px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 14px 16px 8px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
  .sheet-handle > span { position: absolute; top: 7px; left: 50%; width: 36px; height: 4px; transform: translateX(-50%); border-radius: 999px; background: var(--line); }
  .sheet-handle strong { margin-top: 3px; }
  .sheet-handle small { margin-top: 3px; color: var(--muted); }
  .timeline-row { min-height: 124px; grid-template-columns: 48px 36px minmax(0, 1fr) 48px; padding-right: 4px; }
  .timeline-list::before { left: 49px; }
  .detail-link { display: none; }
  .mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 1100; min-height: 68px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: var(--surface); }
  .mobile-nav a, .mobile-nav button { min-width: 0; min-height: 60px; display: grid; place-items: center; align-content: center; gap: 2px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: .75rem; text-decoration: none; cursor: pointer; }
  .mobile-nav a.is-active, .mobile-nav button[aria-pressed="true"] { color: var(--brand-dark); }
  .mobile-nav .icon { width: 21px; height: 21px; }
  .toast { bottom: 148px; }
  .consent { right: 8px; bottom: 76px; width: calc(100% - 16px); }
  .site-head { min-height: 58px; padding: 0 16px; }
  .site-head .brand { font-size: 1.05rem; }
  .nav { gap: 12px; }
  .nav a { font-size: .85rem; }
  .wrap { width: min(100% - 24px, var(--content)); padding-top: 24px; }
}

@media (max-width: 390px) {
  .app-rail { height: 60px; }
  .map-stage { inset-block-start: 60px; }
  .feed-panel { height: 248px; }
  .toolbar-location > span[aria-hidden="true"] { display: none; }
  .timeline-row { padding-right: 2px; }
  .event-row__title { font-size: .9375rem; }
  .event-row__meta .source-fresh { display: none; }
  .site-head .brand span { display: none; }
  body.sheet-expanded .feed-panel { top: 60px; }
}

@media (max-width: 320px) {
  .map-toolbar { grid-template-columns: minmax(0, 1fr) 48px; }
  .toolbar-location { padding-inline: 10px; }
  .timeline-row { grid-template-columns: 42px 34px minmax(0, 1fr) 44px; }
  .timeline-list::before { left: 43px; }
  .timeline-distance { font-size: .75rem; }
}

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

/* Cele dotykowe 44×44.
   Warunkujemy je szerokością ORAZ typem wskaźnika: samo `pointer: coarse` pomija
   laptopy z ekranem dotykowym i telefony w trybie desktop, a samo `max-width`
   nie objęłoby tabletu w orientacji poziomej. */
@media (pointer: coarse), (max-width: 760px) {
  .control--small { min-width: 44px; min-height: 44px; }
  /* Suwak promienia jest głównym sterowaniem „blisko Ciebie" na telefonie,
     a domyślny uchwyt ma ok. 16 px — za mało, żeby trafić go palcem. */
  .radius { height: 44px; }
  .radius::-webkit-slider-thumb { width: 28px; height: 28px; }
  .radius::-moz-range-thumb { width: 28px; height: 28px; }
}

/* Błędy walidacji formularza panelu (np. zła data edycji). */
.form-errors { margin: 0 0 16px; padding: 12px 16px; border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--line)); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--danger) 6%, var(--surface)); color: var(--ink); }
.form-errors p { margin: 0 0 6px; }
.form-errors ul { margin: 0; padding-left: 20px; }
.form-errors li { margin: 2px 0; }

/* Przycisk wyglądający jak link (ustawienia cookies w stopce). */
.linklike { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.linklike:hover { color: var(--brand-dark); }
.site-foot--home { position: fixed; right: 12px; bottom: 12px; z-index: 1200; width: auto; margin: 0; padding: 7px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-sm); text-align: center; }
.site-foot--home p { margin: 0; }
@media (max-width: 840px) {
  .site-foot--home { right: 8px; bottom: 74px; }
}

/* ==========================================================================
   Portal 2026 — kierunek referencyjny ownera
   Mapa i działające zachowania Atlasu pozostają bez zmian; ta warstwa ustala
   nową kompozycję strony głównej bez ingerencji w widoki redakcyjne/admina.
   ========================================================================== */

body.is-home {
  background: var(--canvas);
}

.brand--portal {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
}
.brand-mark {
  position: relative;
  width: 38px;
  height: 44px;
  flex: none;
}
.brand-petal {
  position: absolute;
  width: 24px;
  height: 30px;
  transform: rotate(34deg);
  border: 3px solid white;
  border-radius: 55% 55% 55% 12%;
  box-shadow: 0 2px 7px rgba(25, 45, 86, .15);
}
.brand--portal .brand-petal--blue { top: 0; left: 0; background: #2f80ed; }
.brand--portal .brand-petal--orange { top: 5px; right: 0; background: var(--signal-bright); }
.brand--portal .brand-petal--green { bottom: 0; left: 8px; background: #4fc36b; }
.brand-lockup { min-width: 0; display: grid; line-height: 1; }
.brand-lockup strong { color: var(--brand-dark); font-size: 1.28rem; letter-spacing: -.035em; white-space: nowrap; }
.brand--portal .brand-lockup strong span { color: #6b7280; font-weight: 500; }
.brand-lockup small { margin-top: 6px; color: var(--muted); font-size: .66rem; font-weight: 400; letter-spacing: 0; white-space: nowrap; }

.atlas-shell {
  height: 100dvh;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 84px minmax(0, 1fr) 90px;
  gap: 12px;
  padding: 12px 14px 10px;
  overflow: hidden;
}
.atlas-shell > * { min-height: 0; }

.app-topbar {
  position: relative;
  z-index: 1050;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(300px, 680px) auto;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 12px 18px 12px 22px;
  border: 1px solid rgba(229, 233, 242, .92);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.event-search {
  min-width: 0;
  height: 52px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 54px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 2px 9px rgba(25, 45, 86, .08);
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.event-search:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 2px white, 0 0 0 5px var(--focus);
}
.event-search > .icon { margin-left: 17px; color: var(--muted); }
.event-search input {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 10px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: .9rem;
}
.event-search input:focus-visible { outline: 0; box-shadow: none; }
.event-search input::placeholder { color: var(--placeholder); opacity: 1; }
.event-search input::-webkit-search-cancel-button { cursor: pointer; }
.search-submit {
  width: 54px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 0;
  background: var(--signal);
  color: white;
  cursor: pointer;
  transition: background 160ms ease;
}
.search-submit:hover { background: #a63d00; }
.search-submit:focus-visible {
  outline: 3px solid white;
  outline-offset: -6px;
  box-shadow: inset 0 0 0 2px var(--focus);
}
.search-submit .icon { width: 21px; height: 21px; }

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.topbar-action {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: #465065;
  box-shadow: 0 2px 7px rgba(25, 45, 86, .06);
  white-space: nowrap;
  cursor: pointer;
}
.topbar-action:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); color: var(--brand-dark); }
.topbar-action[aria-pressed="true"] { border-color: #ffccb0; background: var(--signal-soft); color: var(--signal); }
.topbar-action .icon { width: 18px; height: 18px; }
.topbar-action .nav-count { background: var(--surface-2); }
.topbar-action--menu { display: none; width: 44px; padding: 0; border-radius: 12px; }
.mobile-cookie-button { display: none; width: 44px; padding: 0; border-radius: 12px; }

.atlas-workspace {
  position: relative;
  min-width: 0;
  min-height: 0;
}
.map-stage {
  position: absolute;
  inset: 0;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--water);
  box-shadow: var(--shadow-sm);
}
.map-canvas { width: 100%; height: 100%; }
.leaflet-tile-pane { filter: saturate(.82) brightness(1.035); }
.leaflet-bottom.leaflet-right { right: 382px; bottom: 8px; }
.leaflet-control-zoom { border: 0 !important; box-shadow: var(--shadow-sm) !important; }
.leaflet-control-zoom a { border-color: var(--line) !important; }

.filter-panel {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 900;
  width: 218px;
  max-height: calc(100% - 90px);
  padding: 14px;
  border: 1px solid rgba(229, 233, 242, .94);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #c7cfdd transparent;
}
.filter-section + .filter-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.filter-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.filter-panel h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.filter-heading h2 { margin: 0; }
.filter-reset {
  min-height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .72rem;
  cursor: pointer;
}
.filter-reset[aria-pressed="true"] { background: var(--signal); color: white; font-weight: 600; }
.date-switch,
.category-filter {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}
.filter-option {
  width: 100%;
  min-height: 35px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 17px;
  align-items: center;
  gap: 8px;
  padding: 3px 5px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #424b5f;
  text-align: left;
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
}
.filter-option:hover { background: var(--surface-2); }
.filter-option--date { min-height: 38px; padding-inline: 9px; border: 1px solid var(--line); }
.filter-option--date .icon { width: 17px; height: 17px; color: var(--muted); }
.filter-option--date[aria-pressed="true"] {
  border-color: var(--signal);
  background: var(--signal);
  color: white;
}
.filter-option--date[aria-pressed="true"] .icon { color: white; }
.legend-symbol {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 50% 18%;
  background: var(--cat);
  color: white;
  font: 700 .66rem var(--font-ui);
}
.option-check {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: 1.5px solid #cdd3df;
  border-radius: 4px;
  background: white;
}
.filter-option[aria-pressed="true"] .option-check {
  border-color: var(--signal);
  background: var(--signal);
}
.filter-option[aria-pressed="true"] .option-check::after {
  content: "";
  width: 7px;
  height: 4px;
  transform: translateY(-1px) rotate(-45deg);
  border-bottom: 1.5px solid white;
  border-left: 1.5px solid white;
}
.filter-option--date .option-check { display: none; }
.filter-option--mobile-all { display: none; }
.filter-option[aria-pressed="false"] .legend-symbol { filter: grayscale(.8); opacity: .48; }
.more-filters {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  padding: 0 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .76rem;
  font-weight: 600;
  text-decoration: none;
}
.more-filters:hover { color: var(--brand-dark); }
.more-filters .icon { width: 17px; height: 17px; }

.map-actions {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 910;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toolbar-location {
  min-width: 192px;
  min-height: 48px;
  justify-content: flex-start;
  padding-inline: 15px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.toolbar-location > span { display: grid; min-width: 0; line-height: 1.15; text-align: left; }
.toolbar-location strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toolbar-location small { margin-top: 2px; color: white; font-size: .66rem; }
.radius-control {
  min-width: 248px;
  min-height: 48px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 7px;
  padding: 7px 15px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--brand-dark);
  font-size: .78rem;
  cursor: pointer;
}
.radius-control strong { color: var(--ink); }
.radius-control .radius {
  grid-column: 1 / -1;
  width: 100%;
  height: 10px;
  margin: 0;
  accent-color: var(--signal);
}
.locate-button { display: none; }
.map-status { top: 18px; max-width: 360px; border-radius: 999px; background: rgba(23, 32, 51, .92); }
.map-error { top: 70px; }

.feed-panel {
  position: absolute;
  top: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 920;
  width: 352px;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(229, 233, 242, .94);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}
.feed-header {
  min-height: 78px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 17px 16px 12px 18px;
  border-bottom: 0;
}
.feed-header h1 {
  max-width: 270px;
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.2;
  letter-spacing: -.025em;
}
.feed-header p { margin: 5px 0 0; color: var(--muted); font-size: .74rem; }
.feed-header .control { width: 38px; min-height: 38px; }
.feed-scroll {
  min-height: 0;
  padding: 2px 11px 4px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #c7cfdd transparent;
}
.sheet-handle { display: none; }
.event-card-list { display: grid; gap: 9px; padding-bottom: 6px; }
.event-card {
  min-width: 0;
  min-height: 102px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  padding: 9px 7px 9px 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(25, 45, 86, .07);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.event-card--with-media { grid-template-columns: 78px minmax(0, 1fr) 30px; }
.event-card:hover {
  transform: translateY(-1px);
  border-color: #d2daea;
  background: var(--surface);
  box-shadow: 0 6px 15px rgba(25, 45, 86, .10);
}
.event-card.is-selected {
  border-color: color-mix(in srgb, var(--signal) 52%, var(--line));
  background: var(--surface);
  box-shadow: inset 3px 0 0 var(--signal), 0 3px 12px rgba(25, 45, 86, .08);
}
.event-card__media {
  width: 78px;
  height: 78px;
  display: grid;
  grid-template-rows: 58px 20px;
  gap: 2px;
  margin: 0;
  overflow: hidden;
}
.event-card__media picture {
  width: 100%;
  height: 100%;
  display: block;
}
.event-card__image {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 10px;
  object-fit: cover;
  object-position: var(--event-focal-x, 50%) var(--event-focal-y, 50%);
  background: var(--surface-2);
}
.event-media picture {
  display: block;
  width: 100%;
  height: 100%;
}
.event-card__media figcaption {
  overflow: hidden;
  color: var(--muted);
  font-size: .5rem;
  line-height: 1.05;
}
.event-card__media figcaption a { color: inherit; }
.event-card__body {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
}
.event-card__category {
  order: -1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: .62rem;
  line-height: 1.1;
}
.event-card__category > span {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--cat);
}
.event-row__title { margin: 0 0 4px; color: var(--ink); font-size: .88rem; line-height: 1.2; font-weight: 700; }
.event-row__time { order: 2; color: var(--muted); font-family: var(--font-ui); font-size: .68rem; }
.event-row__place { order: 3; margin-top: 2px; overflow: hidden; color: var(--muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.event-row__meta { order: 4; gap: 7px; margin-top: 6px; font-size: .62rem; }
.entry-label {
  padding: 2px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--entry) 11%, white);
  color: var(--entry);
  font-size: .59rem;
  font-weight: 700;
  letter-spacing: .025em;
  text-transform: uppercase;
  white-space: nowrap;
}
/* Neutralny brak danych nie udaje krzyczącego ostrzeżenia. */
.entry-label--neutral { background: transparent; color: var(--muted); font-weight: 500; letter-spacing: 0; text-transform: none; }
.entry-label--free { font-weight: 800; }
.timeline-distance { color: var(--muted); }
.timeline-distance.is-unknown,
.timeline-distance[hidden] { display: none; }
.timeline-distance small { color: inherit; font-size: inherit; }
/* Zachęta do ustalenia lokalizacji zamiast atrapy „— km” przy każdym wydarzeniu. */
.distance-cta { margin: 0 0 6px; padding: 0 4px; }
.distance-cta[hidden] { display: none; }
.distance-cta .control { display: inline-flex; align-items: center; gap: 6px; width: 100%; justify-content: center; }

.source-fresh { gap: 3px; color: var(--success); white-space: nowrap; }
.source-fresh::before { width: 12px; height: 12px; font-size: 7px; }
.row-actions {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.save-button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.save-button:hover { background: var(--signal-soft); color: var(--signal); }
.save-button[aria-pressed="true"] { background: var(--signal-soft); color: var(--signal); }
.save-button[aria-pressed="true"] .icon { fill: currentColor; }
.save-button .icon { width: 18px; height: 18px; }
.detail-link {
  width: 30px;
  min-height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--brand);
  font-size: 1.3rem;
  line-height: 1;
}
.detail-link:hover { background: var(--brand-soft); }
.feed-more {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 11px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--brand);
  font-size: .75rem;
  font-weight: 700;
  text-decoration: none;
}
.feed-more:hover { background: var(--brand-soft); }
.feed-panel .empty-state { margin: 4px; }

.benefit-strip {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 16px;
  padding: 11px 22px;
  border: 1px solid rgba(229, 233, 242, .92);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.benefit-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.benefit-item > .icon {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
}
.benefit-item > span { min-width: 0; display: grid; line-height: 1.2; }
.benefit-item strong { color: #33405a; font-size: .72rem; }
.benefit-item small { margin-top: 4px; color: var(--muted); font-size: .61rem; }
.benefit-item a,
.benefit-item .linklike { color: var(--muted); }
.benefit-item a:hover,
.benefit-item .linklike:hover { color: var(--brand-dark); }

.mobile-nav { display: none; }
.consent { border-color: var(--line); box-shadow: var(--shadow-panel); }
.consent button { border-color: var(--signal); background: var(--signal); }

@media (max-width: 1220px) and (min-width: 841px) {
  .atlas-shell { grid-template-rows: 80px minmax(0, 1fr) 82px; }
  .app-topbar { grid-template-columns: 210px minmax(260px, 1fr) auto; gap: 16px; padding-inline: 15px; }
  .brand-lockup small { display: none; }
  .topbar-action { padding-inline: 12px; }
  .topbar-action span:not(.nav-count) { display: none; }
  .filter-panel { width: 200px; }
  .feed-panel { width: 324px; }
  .leaflet-bottom.leaflet-right { right: 352px; }
  .radius-control { min-width: 220px; }
  .benefit-strip { gap: 10px; padding-inline: 14px; }
  .benefit-item { grid-template-columns: 34px minmax(0, 1fr); gap: 7px; }
  .benefit-item > .icon { width: 34px; height: 34px; padding: 8px; }
  .benefit-item small { display: none; }
}

@media (max-width: 840px) {
  body.is-home { height: 100%; overflow: hidden; }
  .atlas-shell {
    height: 100dvh;
    min-height: 0;
    display: grid;
    grid-template-rows: 114px minmax(0, 1fr);
    gap: 0;
    padding: 0;
  }
  .app-topbar {
    position: relative;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 46px 54px;
    gap: 5px 10px;
    padding: 6px 10px 8px 12px;
    border-width: 0 0 1px;
    border-radius: 0;
    box-shadow: 0 2px 12px rgba(25, 45, 86, .08);
  }
  .brand--portal { gap: 8px; }
  .brand-mark { width: 28px; height: 32px; }
  .brand-petal { width: 18px; height: 22px; border-width: 2px; }
  .brand-lockup strong { font-size: 1rem; }
  .brand-lockup small { display: none; }
  .event-search {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 44px;
    grid-template-columns: 36px minmax(0, 1fr) 44px;
    border-radius: 999px;
    box-shadow: none;
  }
  .event-search > .icon { width: 16px; height: 16px; margin-left: 13px; }
  .event-search input { padding-inline: 6px; font-size: .76rem; }
  .search-submit { width: 44px; height: 44px; }
  .search-submit .icon { width: 17px; height: 17px; }
  .topbar-actions { grid-column: 2; grid-row: 1; gap: 5px; }
  .topbar-action:not(.topbar-action--menu):not(.mobile-cookie-button) { display: none; }
  .topbar-action--menu,
  .mobile-cookie-button { display: grid; width: 44px; min-height: 44px; place-items: center; padding: 0; }

  .atlas-workspace { min-height: 0; }
  .map-stage {
    position: absolute;
    inset: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .leaflet-bottom.leaflet-right { display: none; }
  .filter-panel {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    width: auto;
    max-height: none;
    padding: 7px 11px 8px;
    border-width: 0 0 1px;
    border-radius: 0;
    box-shadow: 0 3px 12px rgba(25, 45, 86, .09);
    overflow: visible;
  }
  .filter-heading,
  .filter-section--categories,
  .filter-panel .more-filters { display: none; }
  .filter-section + .filter-section { margin: 0; padding: 0; border: 0; }
  .date-switch { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; }
  .filter-option--mobile-all { display: grid; }
  .filter-option--date {
    min-height: 44px;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0 8px;
    border-radius: 999px;
    font-size: .72rem;
  }
  .filter-option--date .icon { display: none; }
  body.filters-open .filter-panel {
    top: 7px;
    right: 7px;
    left: 7px;
    z-index: 980;
    width: auto;
    max-height: calc(100% - 82px);
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-panel);
    overflow-y: auto;
  }
  body.filters-open .map-stage { z-index: 960; }
  body.filters-open .filter-heading { display: flex; }
  body.filters-open .filter-reset { min-height: 44px; }
  body.filters-open .filter-option--mobile-all { display: none; }
  body.filters-open .filter-section--categories { display: block; }
  body.filters-open .filter-panel .more-filters { display: flex; }
  body.filters-open .date-switch { grid-template-columns: 1fr; gap: 4px; margin-top: 8px; }
  body.filters-open .filter-option--date {
    min-height: 44px;
    grid-template-columns: 28px minmax(0, 1fr);
    justify-items: start;
    border-radius: 10px;
  }
  body.filters-open .filter-option--date .icon { display: block; }
  .map-actions { display: none; }
  .locate-button {
    position: absolute;
    left: 11px;
    bottom: 304px;
    z-index: 910;
    display: inline-flex;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
  }
  .map-status { top: 54px; max-width: calc(100% - 92px); font-size: .66rem; }
  .map-error { top: 58px; }

  .feed-panel {
    position: absolute;
    top: auto;
    right: 7px;
    bottom: 68px;
    left: 7px;
    width: auto;
    height: 288px;
    min-height: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -5px 24px rgba(25, 45, 86, .15);
    transition: none;
  }
  body.sheet-expanded .feed-panel {
    top: 0;
    bottom: 68px;
    height: auto;
  }
  .feed-header { display: none; }
  .sheet-handle {
    position: relative;
    min-height: 54px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 13px 15px 7px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
  }
  .sheet-handle > span {
    position: absolute;
    top: 6px;
    left: 50%;
    width: 34px;
    height: 4px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: #d8dde7;
  }
  .sheet-handle strong { margin-top: 4px; font-size: .82rem; }
  .sheet-handle small { margin-top: 4px; color: var(--muted); font-size: .66rem; }
  .feed-scroll { padding: 8px 8px 4px; }
  .event-card-list { gap: 7px; }
  .event-card {
    min-height: 92px;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 9px;
    padding: 8px 6px 8px 8px;
  }
  .event-card--with-media { grid-template-columns: 70px minmax(0, 1fr) 44px; }
  .event-card:hover { transform: none; }
  .event-card__media { width: 70px; height: 70px; grid-template-rows: 51px 17px; }
  .event-card__image { width: 70px; height: 51px; }
  .event-row__title { font-size: .8rem; }
  .event-row__time,
  .event-row__place { font-size: .63rem; }
  .event-row__meta { margin-top: 5px; }
  .source-fresh { display: none; }
  .detail-link { display: none; }
  .row-actions { justify-content: flex-start; padding-top: 1px; }
  .save-button { width: 44px; height: 44px; }
  .feed-more { min-height: 38px; margin: 6px 4px 8px; }

  .benefit-strip { display: none; }
  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1100;
    min-height: 68px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 -3px 12px rgba(25, 45, 86, .07);
  }
  .mobile-nav a,
  .mobile-nav button {
    min-width: 0;
    min-height: 60px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--nav-muted);
    font-size: .65rem;
    text-decoration: none;
    cursor: pointer;
  }
  .mobile-nav a.is-active,
  .mobile-nav button[aria-pressed="true"] { color: var(--signal); }
  .mobile-nav .icon { width: 19px; height: 19px; }
  .toast { bottom: 370px; }
  .consent {
    right: 8px;
    bottom: 76px;
    width: calc(100% - 16px);
    max-height: calc(100dvh - 92px);
    padding: 10px 12px;
    overflow-y: auto;
  }
  .consent p { margin-bottom: 9px; font-size: .74rem; line-height: 1.35; }
  .consent-btns { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 7px; }
  .consent button { min-height: 44px; padding: 6px 8px; font-size: .68rem; line-height: 1.2; }
}

@media (max-width: 390px) {
  .atlas-shell { grid-template-rows: 110px minmax(0, 1fr); }
  .app-topbar { grid-template-rows: 43px 51px; }
  .feed-panel { height: 300px; }
  .locate-button { bottom: 316px; }
  .event-search input { font-size: .72rem; }
  .toast { bottom: 380px; }
}

@media (max-width: 320px) {
  .brand-lockup strong { font-size: .91rem; }
  .event-search input { font-size: .68rem; }
  .feed-panel { right: 4px; left: 4px; }
  .event-card { grid-template-columns: minmax(0, 1fr) 44px; gap: 7px; }
  .event-card--with-media { grid-template-columns: 62px minmax(0, 1fr) 44px; }
  .event-card__media { width: 62px; height: 68px; grid-template-rows: 49px 17px; }
  .event-card__image { width: 62px; height: 49px; }
  .event-row__place { max-width: 150px; }
  .entry-label { font-size: .54rem; }
}

@media (max-height: 720px) and (max-width: 840px) {
  .feed-panel { height: 250px; }
  .locate-button { bottom: 266px; }
  .toast { bottom: 326px; }
}

@media (min-width: 841px) and (max-height: 679px) {
  body.is-home { height: auto; overflow-y: auto; }
  .atlas-shell { height: auto; min-height: 680px; }
}

/* P1 2026-08-02: katalog gmin + jeden mobilny arkusz mapy. */
.filter-dialog-head,
.filter-dialog-footer,
.filters-backdrop { display: none; }
.filter-dialog-body { display: contents; }
.filter-kicker,
.eyebrow {
  margin: 0 0 4px;
  color: var(--signal);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.filter-dialog-head h2 { margin: 0; font-size: 1.12rem; }
.gz-pin-wrap { display: grid; place-items: center; }
.brand--portal,
.site-head .brand { min-height: 44px; display: inline-flex; align-items: center; }
.filter-reset,
.filter-option,
.more-filters,
.detail-link { min-height: 44px; }
.row-actions .source-link { min-height: 44px; display: inline-flex; align-items: center; }
.save-button,
.detail-link { width: 44px; min-height: 44px; height: 44px; }
.feed-header .control--icon { width: 44px; min-height: 44px; }
.feed-more,
.radius { min-height: 44px; }
.province-directory li a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; }
.marker-cluster { width: 44px !important; height: 44px !important; margin-left: -22px !important; margin-top: -22px !important; }
.leaflet-control-zoom a { width: 44px !important; height: 44px !important; line-height: 44px !important; }
.site-foot a,
.site-foot .linklike,
.benefit-item--legal a,
.benefit-item--legal .linklike { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; }

.catalog-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.catalog-summary__item {
  min-width: 0;
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.catalog-summary__item--current { border-color: color-mix(in srgb, var(--success) 35%, var(--line)); }
.catalog-summary__item strong { color: var(--ink); font: 700 1.45rem/1 var(--font-data); }
.catalog-summary__item span { color: var(--muted); font-size: .875rem; }
.gmina-search {
  position: relative;
  margin: 26px 0 30px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.gmina-search > label { display: block; margin-bottom: 8px; font-weight: 600; }
.gmina-search__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.gmina-search input {
  width: 100%;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
}
.gmina-search__row .control { min-width: 100px; }
.form-hint { margin: 9px 0 0; color: var(--muted); font-size: .8125rem; }
.gmina-suggestions {
  position: absolute;
  right: 18px;
  left: 18px;
  z-index: 100;
  margin-top: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}
.gmina-suggestion {
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.gmina-suggestion:last-child { border-bottom: 0; }
.gmina-suggestion:hover,
.gmina-suggestion.is-active { background: var(--brand-soft); }
.gmina-suggestion strong,
.gmina-suggestion span,
.gmina-suggestion small { min-width: 0; overflow-wrap: anywhere; }
.gmina-suggestion strong { font-size: .95rem; }
.gmina-suggestion span { color: var(--muted); font-size: .78rem; }
.gmina-suggestion small { color: var(--muted); font-size: .75rem; text-align: right; }
.gmina-suggestion small.is-current { color: var(--success); font-weight: 600; }
.gmina-suggestions__empty { min-height: 48px; display: flex; align-items: center; padding: 10px 12px; color: var(--muted); font-size: .875rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.section-heading h2 { margin: 0 0 4px; }
.result-count { color: var(--muted); font: .75rem var(--font-data); white-space: nowrap; }
.gmina-results__list { margin: 14px 0 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.gmina-result {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.gmina-result__link { min-width: 0; min-height: 56px; display: flex; flex-direction: column; justify-content: center; color: inherit; text-decoration: none; }
.gmina-result__link:hover .gmina-result__name { color: var(--brand-dark); text-decoration: underline; }
.gmina-result__name { font-size: 1.02rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.gmina-result__meta { margin-top: 3px; color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.gmina-result__status { color: var(--muted); font-size: .8125rem; text-align: right; white-space: nowrap; }
.gmina-result__status.is-current { color: var(--success); font-weight: 600; }
.catalog-note { margin: 14px 0; color: var(--muted); font-size: .875rem; }
.catalog-browse { margin: 30px 0; padding: 18px; border-left: 3px solid var(--brand); background: var(--brand-soft); }
.catalog-browse h2 { margin: 0 0 8px; font-size: 1.18rem; }
.catalog-browse p:last-child { margin-bottom: 0; color: var(--muted); }
.gmina-empty { margin: 22px 0; }
.empty-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.empty-actions .control { min-width: 44px; }

@media (max-width: 840px) {
  .brand--portal { min-height: 44px; align-items: center; }
  .topbar-action--menu { width: auto; min-width: 82px; display: inline-flex; gap: 6px; padding: 0 10px; }
  .topbar-action--menu > span { display: inline; font-size: .75rem; }
  .filters-backdrop { position: fixed; inset: 0; z-index: 975; display: block; padding: 0; border: 0; background: rgba(23, 32, 51, .42); }
  .filter-dialog-head,
  .filter-dialog-footer { display: none; }
  .filter-dialog-body { display: contents; }
  body.filters-open .filter-panel {
    top: 7px;
    right: 7px;
    bottom: calc(68px + 12px);
    left: 7px;
    z-index: 980;
    width: auto;
    max-height: none;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
  }
  body.filters-open .filter-dialog-head {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px 10px;
    border-bottom: 1px solid var(--line);
  }
  body.filters-open .filter-dialog-body { display: block; min-height: 0; overflow-y: auto; padding: 2px 14px 14px; }
  body.filters-open .filter-dialog-footer {
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--surface);
  }
  body.filters-open .filter-dialog-footer .control--primary { flex: 1; min-width: 0; }
  body.filters-open .filters-backdrop { display: block; }
  body.filters-open .filter-option,
  body.filters-open .more-filters { min-height: 44px; }

  .feed-panel,
  body[data-sheet-state="peek"] .feed-panel { top: auto; bottom: 68px; height: 198px; transition: none; }
  body[data-sheet-state="half"] .feed-panel { top: auto; bottom: 68px; height: min(54dvh, 420px); }
  body[data-sheet-state="full"] .feed-panel { top: 0; bottom: 68px; height: auto; }
  .sheet-handle { min-height: 58px; touch-action: none; user-select: none; cursor: grab; }
  .sheet-handle:active { cursor: grabbing; }
  .sheet-handle strong { font-size: .9rem; }
  .sheet-handle small { font-size: .75rem; }
  .event-card { min-height: 112px; }
  .event-row__time,
  .event-row__place,
  .event-row__meta,
  .entry-label,
  .timeline-distance { font-size: .75rem; line-height: 1.3; }
  .event-row__title { font-size: .86rem; }
  .row-actions .source-fresh { display: none !important; }
  .feed-more { min-height: 44px; }

  .catalog-summary { gap: 8px; margin: 20px 0; }
  .catalog-summary__item { min-height: 78px; padding: 12px; }
  .catalog-summary__item strong { font-size: 1.25rem; }
  .catalog-summary__item span { font-size: .75rem; line-height: 1.25; }
  .gmina-search { margin: 20px 0 26px; padding: 14px; }
  .gmina-search__row { grid-template-columns: 1fr; }
  .gmina-search__row .control { width: 100%; }
  .gmina-suggestions { right: 14px; left: 14px; }
  .gmina-suggestion { grid-template-columns: minmax(0, 1fr); gap: 2px; min-height: 66px; }
  .gmina-suggestion small { text-align: left; }
  .section-heading { align-items: start; flex-direction: column; gap: 2px; }
  .gmina-result { grid-template-columns: 1fr; gap: 3px; padding: 10px 0; }
  .gmina-result__status { text-align: left; white-space: normal; }
  .catalog-browse { margin: 24px 0; padding: 14px; }
  .empty-actions { flex-direction: column; align-items: stretch; }
  .empty-actions .control { width: 100%; }
  .province-directory li { align-items: flex-start; flex-direction: column; gap: 2px; }
  .province-directory li span { text-align: left; }
}

@media (max-width: 390px) {
  .topbar-action--menu { min-width: 76px; padding-inline: 8px; }
  .topbar-action--menu > span { font-size: .7rem; }
  .event-row__title { font-size: .82rem; }
}

@media (prefers-reduced-motion: reduce) {
  .filter-panel,
  .feed-panel,
  .event-card,
  .control { transition: none !important; }
}

/* Wspólny shell wszystkich publicznych widoków — ta sama marka co na mapie. */
.site-topbar {
  width: min(calc(100% - 24px), 1168px);
  margin: 12px auto 0;
  grid-template-columns: minmax(220px, 280px) minmax(260px, 1fr) auto;
  border-radius: var(--radius-md);
}
.site-topbar .brand-lockup small { display: block; }
.site-top-actions { gap: 7px; }
.site-top-actions .topbar-action {
  min-height: 44px;
  text-decoration: none;
}
.site-top-actions .topbar-action .icon { width: 17px; height: 17px; }
.site-top-actions .topbar-action.is-current {
  border-color: color-mix(in srgb, var(--brand) 38%, var(--line));
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.site-top-actions .topbar-action--alert {
  border-color: color-mix(in srgb, var(--signal) 35%, var(--line));
  color: var(--signal);
}
.site-mobile-nav { display: none; }
.wrap > article {
  padding: clamp(20px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.wrap > article h1 { color: var(--brand-dark); }
.wrap > article .lead { max-width: 780px; }
.alert-form-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--line));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--danger) 6%, var(--surface));
  color: var(--danger);
  font-weight: 600;
}
.alert-form [aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 18%, transparent);
}
.province-municipalities > h2:first-child { margin-top: .35em; }
.province-municipalities ul { margin-bottom: 14px; }
.province-empty { margin: 10px 0 18px; }
.province-catalog {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.province-catalog summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 8px 14px;
  color: var(--brand-dark);
  font-weight: 600;
  cursor: pointer;
}
.province-catalog ul { padding: 0 14px 12px; }
.province-catalog li { background: var(--surface); }

@media (max-width: 840px) {
  .crumbs a,
  .lista .clear,
  .lista .ev-title-link,
  .lista .ev-meta a,
  .lista .source-link,
  .list-more a,
  .back a,
  .src a,
  .description-attribution a {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .site-topbar {
    width: 100%;
    margin: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 46px 54px;
    border-radius: 0;
  }
  .site-topbar .brand-lockup small { display: none; }
  .site-topbar .site-top-actions { display: flex; }
  body.page-lista .site-topbar {
    grid-template-rows: 58px;
  }
  body.page-lista .site-topbar .event-search { display: none; }
  .site-mobile-nav {
    display: grid;
    box-shadow: 0 -3px 12px rgba(25, 45, 86, .07);
  }
  main.wrap { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .site-foot { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .wrap > article { padding: 18px 14px; }
  .event-card .detail-link { display: grid; width: 44px; height: 44px; min-height: 44px; }
  .event-card .row-actions { min-width: 44px; }
  .province-catalog summary { min-height: 56px; }
  body.is-home .atlas-shell { height: var(--gz-visual-viewport-height, 100dvh); }
  .mobile-nav { bottom: var(--gz-viewport-bottom-inset, 0px); }
  body.is-home .consent { bottom: calc(76px + var(--gz-viewport-bottom-inset, 0px)); }
  .event { display: flex; flex-direction: column; }
  .event > * { order: 7; }
  .event .crumbs { order: 1; }
  .event > h1 { order: 2; }
  .event > .edycja.next { order: 3; margin-top: 8px; }
  .event > .art-hero { order: 4; margin-top: 18px; }
  .event > .event-description { order: 5; }
  .event > .description-attribution { order: 6; }
}

@media (min-width: 841px) {
  .site-mobile-nav { display: none; }
}
