/* ==========================================================================
   Atrakcje dla Dzieci — design system
   Tokeny → baza → komponenty → strony. Brak zewnętrznych fontów (stos systemowy).
   ========================================================================== */

:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #efece5;
  --surface-3: #e6e2d9;
  --ink: #1c1d1a;
  --ink-2: #57594f;
  --line: #e0dcd2;
  --primary: #1f6f5c;
  --primary-hover: #185a4b;
  --primary-ink: #ffffff;
  --primary-soft: #e2efea;
  --danger: #b42318;
  --danger-soft: #fdeceb;
  --success: #166534;
  --success-soft: #e6f4ea;
  --warning: #92400e;
  --warning-soft: #fdf3e2;
  --focus: #1f6f5c;
  --cat: #57594f;
  --accent-1: #1f6f5c;
  --accent-2: #e07a3f;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-1: 0 1px 2px rgb(28 29 26 / 6%), 0 1px 1px rgb(28 29 26 / 4%);
  --shadow-2: 0 6px 24px rgb(28 29 26 / 10%), 0 2px 6px rgb(28 29 26 / 6%);
  --shadow-3: 0 -8px 32px rgb(28 29 26 / 14%);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --topbar-h: 60px;
  --bottomnav-h: 0px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 150ms;
  --t: 260ms;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131512; --surface: #1c1f1b; --surface-2: #252923; --surface-3: #2f342d;
    --ink: #ebede6; --ink-2: #a9ada2; --line: #353a32;
    --primary: #62c4a7; --primary-hover: #7fd3b9; --primary-ink: #0b1d17; --primary-soft: #1d332b;
    --danger: #f2877d; --danger-soft: #3a1d1a; --success: #7bd39a; --success-soft: #19301f;
    --warning: #f0b45a; --warning-soft: #36291a; --focus: #62c4a7;
    --shadow-1: 0 1px 2px rgb(0 0 0 / 40%); --shadow-2: 0 8px 28px rgb(0 0 0 / 45%); --shadow-3: 0 -8px 32px rgb(0 0 0 / 50%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131512; --surface: #1c1f1b; --surface-2: #252923; --surface-3: #2f342d;
  --ink: #ebede6; --ink-2: #a9ada2; --line: #353a32;
  --primary: #62c4a7; --primary-hover: #7fd3b9; --primary-ink: #0b1d17; --primary-soft: #1d332b;
  --danger: #f2877d; --danger-soft: #3a1d1a; --success: #7bd39a; --success-soft: #19301f;
  --warning: #f0b45a; --warning-soft: #36291a; --focus: #62c4a7;
  --shadow-1: 0 1px 2px rgb(0 0 0 / 40%); --shadow-2: 0 8px 28px rgb(0 0 0 / 45%); --shadow-3: 0 -8px 32px rgb(0 0 0 / 50%);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- baza */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main { flex: 1; outline: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
h1, h2, h3, h4, h5 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); }
h2 { font-size: 1.25rem; }
.h4 { font-size: 1.05rem; }
.h5 { font-size: .95rem; }
p { margin: 0 0 1em; }
code { font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--primary); color: var(--primary-ink); padding: 10px 16px; border-radius: var(--radius-sm); transition: top var(--t-fast); }
.skip-link:focus { top: 12px; color: var(--primary-ink); }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-xl { width: 48px; height: 48px; stroke-width: 1.5; color: var(--ink-2); margin: 0 auto 12px; }

/* ---------------------------------------------------------------- przyciski */
.btn {
  --btn-bg: var(--surface); --btn-ink: var(--ink); --btn-line: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--btn-line);
  background: var(--btn-bg); color: var(--btn-ink); font: 600 .95rem/1 var(--font);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast) var(--ease);
}
.btn:hover { color: var(--btn-ink); background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn .icon { width: 18px; height: 18px; }
.btn-primary { --btn-bg: var(--primary); --btn-ink: var(--primary-ink); --btn-line: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-ink); }
.btn-secondary { --btn-bg: var(--surface); }
.btn-ghost { --btn-bg: transparent; --btn-line: transparent; }
.btn-danger { --btn-bg: var(--danger-soft); --btn-ink: var(--danger); --btn-line: transparent; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .875rem; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .6; pointer-events: none; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
  border: 0; background: transparent; color: inherit; cursor: pointer; transition: background var(--t-fast);
}
.icon-btn:hover { background: var(--surface-2); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; gap: 8px; align-items: center; }

/* ---------------------------------------------------------------- topbar i nawigacja */
.topbar {
  position: sticky; top: 0; z-index: 500; height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 750; letter-spacing: -.02em; margin-right: auto; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 32px; height: 32px; }
.brand-name { font-size: 1.05rem; }
.topnav { display: flex; gap: 4px; }
.topnav a {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; transition: background var(--t-fast), color var(--t-fast);
}
.topnav a:hover { background: var(--surface-2); color: var(--ink); }
.topnav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

@media (max-width: 899px) {
  :root { --topbar-h: 56px; --bottomnav-h: calc(64px + env(safe-area-inset-bottom)); }
  body { padding-bottom: var(--bottomnav-h); }
  .topnav {
    position: fixed; inset: auto 0 0 0; z-index: 600; height: var(--bottomnav-h); padding: 6px 8px env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--line); justify-content: space-around;
  }
  .topnav a { flex-direction: column; gap: 2px; font-size: .72rem; padding: 6px 4px; border-radius: 14px; flex: 1 1 0; min-width: 0; max-width: 96px; text-align: center; }
  .topnav a span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topnav a .icon { width: 22px; height: 22px; }
  .topnav a[aria-current="page"] { background: transparent; }
  .topnav a[aria-current="page"] .icon { background: var(--primary-soft); border-radius: 999px; width: 22px; padding: 2px 12px; box-sizing: content-box; height: 22px; }
}
@media (max-width: 380px) { .brand-name { font-size: .95rem; } }
@media (max-width: 420px) {
  .topnav { padding-inline: 2px; }
  .topnav a { flex: 1 1 0; min-width: 0; padding: 6px 1px; font-size: .66rem; letter-spacing: -.01em; }
  .topnav a[aria-current="page"] .icon { width: 40px; padding: 2px 9px; }
}

/* ---------------------------------------------------------------- toast */
.toast {
  position: fixed; z-index: 900; top: calc(var(--topbar-h) + 12px); left: 50%; translate: -50% 0;
  display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 32px));
  padding: 8px 8px 8px 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-2);
  border: 1px solid var(--line); animation: toast-in var(--t) var(--ease);
}
.toast-success .icon:first-child { color: var(--success); }
.toast-error { border-color: var(--danger); }
.toast-error .icon:first-child { color: var(--danger); }
.toast.is-leaving { animation: toast-out var(--t) var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-8px); } }

/* ---------------------------------------------------------------- strony tekstowe */
.page { width: 100%; max-width: 1100px; margin: 0 auto; padding: 32px 16px 56px; }
.page.narrow { max-width: 720px; }
.page.center { text-align: center; }
.error-code { font-size: 4.5rem; font-weight: 800; line-height: 1; margin: 24px 0 8px; color: var(--surface-3); letter-spacing: -.04em; }
.prose { max-width: 68ch; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; font-size: 1.05rem; }
.prose li { margin-bottom: .35em; }
.prose .placeholder { background: var(--warning-soft); color: var(--warning); padding: 0 .3em; border-radius: 4px; }
.notice { background: var(--warning-soft); color: var(--warning); padding: 12px 16px; border-radius: var(--radius-sm); }
.empty { text-align: center; padding: 40px 16px; }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 24px 16px; display: grid; gap: 10px; }
.footer-brand { font-weight: 700; margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer nav a, .site-footer .link-btn { color: var(--ink-2); font-size: .9rem; }
.site-footer p { margin: 0; }

/* ---------------------------------------------------------------- formularze */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field > label, .label { font-weight: 600; font-size: .95rem; }
.field .help { font-size: .85rem; color: var(--ink-2); }
.field .error { font-size: .875rem; color: var(--danger); display: flex; gap: 6px; align-items: center; }
.field .error .icon { width: 16px; height: 16px; }
.input, .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--primary); flex: none; }
.code-input { font-size: 1.6rem !important; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.card + .card { margin-top: 16px; }
.auth-card { max-width: 440px; margin: 32px auto; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: .875rem; margin: 8px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------------------------------------------------------------- kategorie: kropka z ikoną */
.cat-dot { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: var(--cat); color: #fff; flex: none; }
.cat-dot .icon { width: 18px; height: 18px; }
.cat-dot-sm { width: 24px; height: 24px; }
.cat-dot-sm .icon { width: 14px; height: 14px; }
.cat-dot-lg { width: 72px; height: 72px; }
.cat-dot-lg .icon { width: 34px; height: 34px; stroke-width: 1.75; }

/* ---------------------------------------------------------------- eksplorator (mapa + lista) */
.page-home { height: 100dvh; overflow: hidden; padding-bottom: 0; }
.page-home main { display: flex; min-height: 0; }
.explorer { position: relative; flex: 1; display: grid; grid-template-columns: minmax(360px, 440px) 1fr; grid-template-rows: minmax(0, 1fr); min-height: 0; }
.panel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: var(--bg); border-right: 1px solid var(--line); z-index: 2; }
.map-wrap { position: relative; min-height: 0; }
.map { position: absolute; inset: 0; background: var(--surface-2); }
.sheet-handle { display: none; }

.search { position: relative; margin: 16px 16px 10px; }
.search .search-icon { position: absolute; left: 16px; top: 50%; translate: 0 -50%; color: var(--ink-2); pointer-events: none; }
.search input {
  width: 100%; height: 50px; padding: 0 48px 0 46px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; box-shadow: var(--shadow-1); transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
.search-clear { position: absolute; right: 3px; top: 3px; }
.search-inline { max-width: 420px; margin: 24px auto; }

.chips { display: flex; gap: 8px; padding: 2px 16px 10px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; flex: none; scroll-snap-align: start;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 600 .875rem/1 var(--font); cursor: pointer; transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease);
}
.chip .icon { width: 16px; height: 16px; }
.chip:hover { border-color: var(--ink-2); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"], .chip[aria-expanded="true"], .chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip-select { position: relative; padding-right: 8px; }
.chip-select select { appearance: none; border: 0; background: transparent; color: inherit; font: inherit; padding: 0 18px 0 0; cursor: pointer; height: 100%; }
.chip-select::after { content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.chip-select select:focus { outline: none; }
.chip-select:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.chip-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--primary); color: var(--primary-ink); font-size: .75rem; }

.filters-panel { margin: 0 16px 10px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); animation: fade-down var(--t) var(--ease); }
.filters-panel fieldset { border: 0; margin: 0; padding: 0; }
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cat-group { margin: 14px 0 6px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.cat-group:first-of-type { margin-top: 4px; }
.filters-panel { max-height: min(70vh, 640px); overflow-y: auto; overscroll-behavior: contain; padding-bottom: 0; }
.filters-panel .filters-actions { position: sticky; bottom: 0; background: var(--surface); padding: 12px 0 16px; margin-top: 8px; border-top: 1px solid var(--line); }
.cat-option { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; cursor: pointer; font-size: .9rem; border: 1px solid transparent; transition: background var(--t-fast), border-color var(--t-fast); }
.cat-option:hover { background: var(--surface-2); }
.cat-option input { position: absolute; opacity: 0; pointer-events: none; }
.cat-option .cat-dot { width: 30px; height: 30px; }
.cat-option .cat-dot .icon { width: 16px; height: 16px; }
.cat-option:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); }
.cat-option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 1px; }
.filters-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; }
@keyframes fade-down { from { opacity: 0; transform: translateY(-6px); } }

.results-head { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 6px; min-height: 36px; }
.results-count { margin: 0; font-size: .875rem; color: var(--ink-2); font-weight: 600; }
.view-toggle { display: none; }

.results { list-style: none; margin: 0; padding: 0 12px 24px; overflow-y: auto; flex: 1; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.results-page { padding: 0; }
.result {
  position: relative; display: flex; align-items: stretch; border-radius: var(--radius); margin-bottom: 4px;
  transition: background var(--t-fast); animation: result-in var(--t) var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms);
}
.result:hover, .result.is-highlight { background: var(--surface); box-shadow: var(--shadow-1); }
@keyframes result-in { from { opacity: 0; transform: translateY(6px); } }
.result-link { flex: 1; display: flex; gap: 14px; padding: 10px; color: inherit; text-decoration: none; min-width: 0; border-radius: var(--radius); }
.result-link:hover { color: inherit; }
.result-media { position: relative; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; flex: none; background: color-mix(in srgb, var(--cat) 14%, var(--surface)); display: grid; place-items: center; }
.result-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.result-media img:not([hidden]) + .cat-dot { position: absolute; left: 4px; bottom: 4px; width: 24px; height: 24px; }
.result-media img:not([hidden]) + .cat-dot .icon { width: 14px; height: 14px; }
.result-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-right: 32px; }
.result-title { font-weight: 700; line-height: 1.25; }
.result-meta { font-size: .85rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-tags { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .8rem; color: var(--ink-2); }
.tag-open { color: var(--success); font-weight: 600; }
.tag-closed { color: var(--ink-2); }
.fav-btn { position: absolute; right: 4px; top: 4px; color: var(--ink-2); }
.fav-btn[aria-pressed="true"] { color: #d9304f; }
.fav-btn[aria-pressed="true"] .icon, .fav-toggle[aria-pressed="true"] .icon { fill: currentColor; animation: heart-pop 320ms var(--ease); }
@keyframes heart-pop { 40% { transform: scale(1.3); } }
.result-skeleton { display: grid; grid-template-columns: 76px 1fr; grid-template-rows: auto auto 1fr; gap: 8px 14px; padding: 10px; }
.result-skeleton span { border-radius: 8px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; height: 14px; }
.result-skeleton span:first-child { grid-row: 1 / 4; height: 76px; border-radius: 12px; }
.result-skeleton span:nth-child(2) { width: 70%; height: 18px; }
.result-skeleton span:nth-child(3) { width: 45%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.results-empty { padding: 32px 12px; text-align: center; color: var(--ink-2); }

.map-btn {
  position: absolute; z-index: 450; right: 12px; bottom: 24px; width: 48px; height: 48px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2); display: grid; place-items: center; cursor: pointer;
}
.map-btn:hover { background: var(--surface-2); }
.map-btn.is-loading .icon { animation: spin 1s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
.map-hint {
  position: absolute; z-index: 450; top: 12px; left: 50%; translate: -50% 0; margin: 0; padding: 8px 14px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-size: .875rem; font-weight: 600; box-shadow: var(--shadow-2); animation: toast-in var(--t) var(--ease);
}

/* pinezki */
.pin-wrap { background: none; border: 0; }
.pin {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50% 50% 50% 4px; rotate: -45deg;
  background: var(--cat); color: #fff; border: 2px solid #fff; box-shadow: 0 2px 6px rgb(0 0 0 / 30%);
  transition: transform var(--t-fast) var(--ease);
}
.pin .icon { width: 16px; height: 16px; rotate: 45deg; }
.pin-wrap:hover .pin, .pin-wrap.is-highlight .pin { transform: scale(1.18); }
.pin-wrap.is-highlight { z-index: 1000 !important; }
.cluster { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: .875rem; border: 3px solid color-mix(in srgb, var(--surface) 80%, transparent); box-shadow: 0 2px 8px rgb(0 0 0 / 30%); }
.cluster-wrap { background: none; }
.leaflet-container { font: inherit; background: var(--surface-2); }
.leaflet-control-attribution { font-size: 11px; }
:root[data-theme="dark"] .leaflet-tile-pane { filter: brightness(.82) contrast(1.05) saturate(.85); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .leaflet-tile-pane { filter: brightness(.82) contrast(1.05) saturate(.85); } }
.leaflet-bar a { color: var(--ink); background: var(--surface); border-color: var(--line); }

/* --- mobile: dolny arkusz nad mapą */
@media (max-width: 899px) {
  .page-home .explorer { display: block; }
  .page-home .map-wrap { position: absolute; inset: 0; }
  .panel {
    --peek: 196px;
    position: absolute; left: 0; right: 0; bottom: 0; height: calc(100% - 8px); z-index: 460;
    border-right: 0; border-radius: 22px 22px 0 0; box-shadow: var(--shadow-3);
    transform: translateY(calc(100% - var(--peek))); transition: transform var(--t) var(--ease); will-change: transform;
  }
  .panel[data-state="half"] { transform: translateY(45%); }
  .panel[data-state="full"] { transform: translateY(0); }
  .panel.is-dragging { transition: none; }
  .sheet-handle { display: flex; justify-content: center; align-items: center; width: 100%; height: 22px; border: 0; background: transparent; cursor: grab; touch-action: none; padding: 0; flex: none; }
  .sheet-grip { width: 40px; height: 5px; border-radius: 999px; background: var(--surface-3); }
  .search { margin-top: 2px; }
  .view-toggle { display: inline-flex; }
  .map-btn { bottom: calc(196px + 14px); transition: opacity var(--t-fast); }
  .panel:not([data-state="peek"]) ~ .map-wrap .map-btn { opacity: 0; pointer-events: none; }
  .cat-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- karta miejsca */
.place { max-width: 880px; margin: 0 auto; padding: 12px 16px 56px; width: 100%; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; font-size: .9rem; color: var(--ink-2); }
.breadcrumbs a { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); text-decoration: none; font-weight: 600; }
.breadcrumbs a .icon { width: 18px; height: 18px; }
.breadcrumbs a:hover { color: var(--ink); }
.place-hero { display: grid; gap: 20px; }
.place-photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg); background: var(--surface-2); view-transition-name: place-photo; }
.place-photo-empty { display: grid; place-items: center; aspect-ratio: 21 / 9; background: color-mix(in srgb, var(--cat) 14%, var(--surface)); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .85rem; color: var(--ink-2); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; }
.lead { font-size: 1.1rem; color: var(--ink-2); max-width: 60ch; }
.facts { list-style: none; padding: 0; margin: 4px 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.fact { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .9rem; }
.fact .icon { width: 18px; height: 18px; color: var(--ink-2); }
.fact-open { background: var(--success-soft); border-color: transparent; color: var(--success); }
.fact-open .icon { color: currentColor; }
.actions { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px 12px; scrollbar-width: none; }
.actions::-webkit-scrollbar { display: none; }
.amen-pills { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--ink-2); font-size: .9rem; }
.amen-pills li { display: inline-flex; gap: 6px; align-items: center; }
.amen-pills .icon { width: 18px; height: 18px; color: var(--primary); }
.sections { display: grid; gap: 12px; }
.section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.section > h2 { font-size: 1.1rem; }
details.section { padding: 0; }
details.section > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; cursor: pointer; list-style: none; border-radius: var(--radius-lg); }
details.section > summary::-webkit-details-marker { display: none; }
details.section > summary h2 { margin: 0; font-size: 1.1rem; }
details.section > summary:hover { background: var(--surface-2); }
details.section > :not(summary) { margin-left: 20px; margin-right: 20px; }
details.section > :last-child { margin-bottom: 20px; }
details.section[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
details.section[open] > :not(summary) { animation: fade-down var(--t) var(--ease); }
.chevron { transition: rotate var(--t) var(--ease); color: var(--ink-2); }
details[open] .chevron { rotate: 180deg; }
.hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th, .hours td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }
.hours th { width: 45%; }
.hours .today { font-weight: 700; }
.hours .today th, .hours .today td { font-weight: 700; color: var(--primary); }
.amen-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; }
.amen-list li { display: flex; gap: 8px; align-items: flex-start; font-size: .95rem; }
.amen-list .icon { width: 18px; height: 18px; margin-top: 3px; }
.amen-yes .icon { color: var(--success); }
.amen-no { color: var(--ink-2); }
.amen-no .icon { color: var(--ink-2); }
.place-map { height: 260px; border-radius: var(--radius); overflow: hidden; margin-top: 12px; border: 1px solid var(--line); }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.link-list a, .link-list .link-btn { display: inline-flex; gap: 10px; align-items: center; padding: 6px 0; text-decoration: none; font-weight: 600; }
.link-list .link-btn { text-decoration: none; }
.place-foot { margin-top: 24px; }
.place-foot p { display: flex; gap: 6px; align-items: center; margin: 0 0 4px; }
.place-foot .icon { width: 16px; height: 16px; }
@media (min-width: 900px) {
  .place-hero { grid-template-columns: 1fr; }
  .place { padding-top: 20px; }
}

/* ---------------------------------------------------------------- baner cookies */
.cookie-banner { position: fixed; z-index: 950; left: 16px; right: 16px; bottom: calc(var(--bottomnav-h) + 16px); display: flex; justify-content: center; pointer-events: none; }
.cookie-card { pointer-events: auto; width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); padding: 20px; animation: toast-in var(--t) var(--ease); max-height: calc(100dvh - 120px); overflow-y: auto; }
.cookie-card p { margin-bottom: 12px; }
.cookie-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.cookie-actions .btn { white-space: normal; }
.cookie-options { display: grid; gap: 12px; margin: 4px 0 16px; }
.switch-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.switch-row input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); flex: none; }

/* ---------------------------------------------------------------- panel konta */
.account-grid { display: grid; gap: 16px; }
.session-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.session-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--surface-2); border-radius: 12px; font-size: .9rem; }
.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-primary { background: var(--primary-soft); color: var(--primary); }

/* ---------------------------------------------------------------- przejścia między stronami */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 200ms; }
}

/* ---------------------------------------------------------------- ograniczenie ruchu */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }

/* ---------------------------------------------------------------- panel administratora */
.page-admin { --admin-nav-w: 260px; }
.admin { display: grid; grid-template-columns: var(--admin-nav-w) minmax(0, 1fr); gap: 28px; max-width: 1380px; margin: 0 auto; padding: 24px 20px 72px; width: 100%; }
.admin-mobilebar { display: none; }
.admin-nav { position: sticky; top: calc(var(--topbar-h) + 16px); align-self: start; max-height: calc(100dvh - var(--topbar-h) - 32px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; border-radius: var(--radius-lg); }
.admin-nav-inner { display: grid; gap: 2px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.admin-nav-title { margin: 14px 12px 4px; font-size: .7rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.admin-nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .92rem; transition: background var(--t-fast), color var(--t-fast); }
.admin-nav a .icon { width: 18px; height: 18px; }
.admin-nav a:hover { background: var(--surface-2); color: var(--ink); }
.admin-nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); }
.admin-nav a[aria-current="page"]::before { content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.admin-nav a.admin-nav-site { font-size: .85rem; padding-block: 8px; }
.nav-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--danger); color: #fff; font-size: .72rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.admin-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; }
.admin-main > h1, .admin-head h1 { font-size: clamp(1.45rem, 1.15rem + 1vw, 1.85rem); letter-spacing: -.02em; line-height: 1.15; }
.admin-main > .muted, .admin-main > p.muted { max-width: 80ch; margin: -8px 0 0; }
.admin-main .card { padding: 22px 24px; box-shadow: var(--shadow-1); }
.admin-main > .card + .card { margin-top: 0; }
.admin-main .card > h2:first-child, .admin-main .card > .admin-head:first-child h2, .admin-main legend.h4 { font-size: 1.05rem; letter-spacing: -.01em; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-head h1, .admin-head h2 { margin: 0; }
.admin-head p { margin: 0; }
.alerts { display: grid; gap: 8px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius); margin: 0; }
.alert p { margin: 2px 0 0; font-size: .9rem; }
.alert .icon { margin-top: 2px; }
.alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert-warning { background: var(--warning-soft); color: var(--warning); }
.alert-success { background: var(--success-soft); color: var(--success); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.stat { display: grid; gap: 4px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); color: var(--ink); text-decoration: none; transition: border-color var(--t-fast), transform var(--t-fast) var(--ease); }
a.stat:hover { border-color: var(--primary); color: var(--ink); transform: translateY(-1px); }
.stat-value { font-size: 1.8rem; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; }
.small-value { font-size: 1.15rem; }
.stat-label { font-size: .85rem; color: var(--ink-2); }
.plain-list { list-style: none; padding: 0; margin: 0; display: grid; }
.plain-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.plain-list li:last-child { border-bottom: 0; }
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); background: var(--surface-2); font-weight: 700; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.table-compact th, .table-compact td { padding: 7px 12px; }
.table-title { display: inline-flex; gap: 10px; align-items: center; font-weight: 650; color: var(--ink); text-decoration: none; }
.table-title:hover { color: var(--primary); }
.nowrap { white-space: nowrap; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar .input { width: auto; flex: 1 1 200px; min-height: 44px; }
.toolbar select.input { flex: 0 1 200px; }
.inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inline-form .input { width: auto; min-height: 36px; padding: 4px 10px; }
.input-narrow { width: 80px !important; }
.pager { display: flex; gap: 4px; flex-wrap: wrap; }
.pager a { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: var(--surface); }
.pager a[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.admin-form fieldset.card { margin: 0; display: grid; gap: 16px; min-width: 0; }
.admin-form legend { padding: 0; float: left; width: 100%; margin-bottom: 4px; }
.admin-form legend + * { clear: both; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 16px; }
.check-grid .check { font-size: .92rem; }
.map-editor { display: grid; gap: 10px; }
.admin-map { height: 340px; border-radius: var(--radius); border: 1px solid var(--line); }
.hours-editor { border-collapse: collapse; width: 100%; max-width: 560px; }
.hours-editor th, .hours-editor td { padding: 4px 8px 4px 0; text-align: left; font-weight: 500; }
.hours-editor thead th { font-size: .8rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.hours-editor input[type="time"] { min-height: 40px; padding: 4px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }
.hours-editor input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--primary); }
.amen-editor { display: grid; gap: 6px; }
.amen-row { display: grid; grid-template-columns: minmax(160px, 1fr) auto minmax(160px, 1.2fr); gap: 10px; align-items: center; }
.amen-name { font-size: .95rem; }
.amen-note { min-height: 38px !important; padding: 6px 12px !important; font-size: .9rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: block; padding: 7px 14px; font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.seg label + label span { border-left: 1px solid var(--line); }
.seg input:checked + span { background: var(--ink); color: var(--bg); }
.seg input[value="yes"]:checked + span { background: var(--success); color: #fff; }
.seg input[value="no"]:checked + span { background: var(--danger); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -3px; }
.link-row { display: grid; grid-template-columns: 160px 1fr; gap: 8px; margin-bottom: 6px; }
.link-row select { min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 10px; font: inherit; }
.admin-photo { border-radius: var(--radius); max-width: 320px; }
.sticky-actions { position: sticky; bottom: 0; z-index: 10; display: flex; gap: 8px; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 30%); }

@media (max-width: 899px) {
  .amen-row { grid-template-columns: 1fr auto; }
  .amen-note { grid-column: 1 / -1; }
  .link-row { grid-template-columns: 1fr; }
  .sticky-actions { bottom: var(--bottomnav-h); }
}

/* poprawki układu */
.with-icon { display: flex; gap: 8px; align-items: flex-start; }
.with-icon .icon { margin-top: 3px; color: var(--ink-2); }
details.section > table { width: calc(100% - 40px); }
.place-photo-empty { aspect-ratio: auto; height: clamp(140px, 22vw, 220px); }
/* backdrop-filter tworzy kontekst dla position:fixed — na telefonie dolne menu musi być liczone względem okna */
@media (max-width: 899px) {
  .topbar { backdrop-filter: none; background: var(--bg); }
}
@media (max-width: 899px) {
  .page-home { padding-bottom: var(--bottomnav-h); }
}
/* mapa we własnym kontekście warstw — kontrolki Leaflet nie nachodzą na arkusz z listą */
.map-wrap { z-index: 0; }

/* pasek postępu (szerokość przez klasy — bez stylów inline, zgodnie z CSP) */
.progress { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress-bar { display: block; height: 100%; background: var(--primary); border-radius: inherit; transition: width var(--t) var(--ease); width: 0; }
.progress-1 { width: 1%; }
.progress-2 { width: 2%; }
.progress-3 { width: 3%; }
.progress-4 { width: 4%; }
.progress-5 { width: 5%; }
.progress-6 { width: 6%; }
.progress-7 { width: 7%; }
.progress-8 { width: 8%; }
.progress-9 { width: 9%; }
.progress-10 { width: 10%; }
.progress-11 { width: 11%; }
.progress-12 { width: 12%; }
.progress-13 { width: 13%; }
.progress-14 { width: 14%; }
.progress-15 { width: 15%; }
.progress-16 { width: 16%; }
.progress-17 { width: 17%; }
.progress-18 { width: 18%; }
.progress-19 { width: 19%; }
.progress-20 { width: 20%; }
.progress-21 { width: 21%; }
.progress-22 { width: 22%; }
.progress-23 { width: 23%; }
.progress-24 { width: 24%; }
.progress-25 { width: 25%; }
.progress-26 { width: 26%; }
.progress-27 { width: 27%; }
.progress-28 { width: 28%; }
.progress-29 { width: 29%; }
.progress-30 { width: 30%; }
.progress-31 { width: 31%; }
.progress-32 { width: 32%; }
.progress-33 { width: 33%; }
.progress-34 { width: 34%; }
.progress-35 { width: 35%; }
.progress-36 { width: 36%; }
.progress-37 { width: 37%; }
.progress-38 { width: 38%; }
.progress-39 { width: 39%; }
.progress-40 { width: 40%; }
.progress-41 { width: 41%; }
.progress-42 { width: 42%; }
.progress-43 { width: 43%; }
.progress-44 { width: 44%; }
.progress-45 { width: 45%; }
.progress-46 { width: 46%; }
.progress-47 { width: 47%; }
.progress-48 { width: 48%; }
.progress-49 { width: 49%; }
.progress-50 { width: 50%; }
.progress-51 { width: 51%; }
.progress-52 { width: 52%; }
.progress-53 { width: 53%; }
.progress-54 { width: 54%; }
.progress-55 { width: 55%; }
.progress-56 { width: 56%; }
.progress-57 { width: 57%; }
.progress-58 { width: 58%; }
.progress-59 { width: 59%; }
.progress-60 { width: 60%; }
.progress-61 { width: 61%; }
.progress-62 { width: 62%; }
.progress-63 { width: 63%; }
.progress-64 { width: 64%; }
.progress-65 { width: 65%; }
.progress-66 { width: 66%; }
.progress-67 { width: 67%; }
.progress-68 { width: 68%; }
.progress-69 { width: 69%; }
.progress-70 { width: 70%; }
.progress-71 { width: 71%; }
.progress-72 { width: 72%; }
.progress-73 { width: 73%; }
.progress-74 { width: 74%; }
.progress-75 { width: 75%; }
.progress-76 { width: 76%; }
.progress-77 { width: 77%; }
.progress-78 { width: 78%; }
.progress-79 { width: 79%; }
.progress-80 { width: 80%; }
.progress-81 { width: 81%; }
.progress-82 { width: 82%; }
.progress-83 { width: 83%; }
.progress-84 { width: 84%; }
.progress-85 { width: 85%; }
.progress-86 { width: 86%; }
.progress-87 { width: 87%; }
.progress-88 { width: 88%; }
.progress-89 { width: 89%; }
.progress-90 { width: 90%; }
.progress-91 { width: 91%; }
.progress-92 { width: 92%; }
.progress-93 { width: 93%; }
.progress-94 { width: 94%; }
.progress-95 { width: 95%; }
.progress-96 { width: 96%; }
.progress-97 { width: 97%; }
.progress-98 { width: 98%; }
.progress-99 { width: 99%; }
.progress-100 { width: 100%; }
.coords { font-variant-numeric: tabular-nums; user-select: all; }
.results-more { list-style: none; padding: 8px 10px 16px; }
.section code { white-space: normal; overflow-wrap: anywhere; }
code { overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- strony miast */
.city-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -8px -16px 18px; padding: 2px 16px; scroll-snap-type: x proximity; }
.city-tabs .chip { text-decoration: none; }
.city-tabs .chip[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.city-head { display: grid; gap: 16px; margin-bottom: 28px; }
.city-head h1 { margin: 0; letter-spacing: -.02em; text-wrap: balance; }
.city-all { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radius-lg); background: var(--primary); color: var(--primary-ink); text-decoration: none; max-width: 480px; transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast); }
.city-all:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.city-all > span:nth-child(2) { display: grid; gap: 2px; flex: 1; }
.city-all strong { font-size: 1.35rem; letter-spacing: -.01em; }
.city-all-label { font-size: .9rem; opacity: .9; }
.city-all-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; background: color-mix(in srgb, var(--primary-ink) 16%, transparent); }
.city-section { margin-bottom: 32px; }
.city-section h2 { font-size: 1.15rem; margin: 0 0 12px; }
.idea-grid, .cat-tiles, .city-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.idea-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.idea { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; height: 100%; transition: border-color var(--t-fast), transform var(--t-fast) var(--ease); }
.idea .icon { grid-row: span 2; width: 24px; height: 24px; color: var(--primary); }
.idea-label { font-weight: 700; line-height: 1.25; }
.idea-count { font-size: .85rem; color: var(--ink-2); }
.idea:hover, .cat-tile:hover, .city-list a:hover { border-color: var(--ink-2); }
.idea:active, .cat-tile:active { transform: scale(.98); }
.cat-tiles { grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); }
.cat-tile { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; transition: border-color var(--t-fast), transform var(--t-fast) var(--ease); }
.cat-tile .cat-dot .icon { width: 18px; height: 18px; }
.cat-tile-name { flex: 1; font-weight: 600; line-height: 1.25; }
.cat-tile-count { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-2); }
.top-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 8px; }
.top-grid .result { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.top-grid .result-body { padding-right: 0; }
.city-list { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-top: 20px; }
.city-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 12px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; font-weight: 600; }
.city-source { margin-top: 8px; }
@media (max-width: 480px) {
  .idea-grid { grid-template-columns: 1fr 1fr; }
  .idea { grid-template-columns: 1fr; padding: 12px; }
  .idea .icon { grid-row: auto; margin-bottom: 6px; }
  .top-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- panel: kontrolki formularzy */
/* checkbox */
.page-admin input[type="checkbox"], .check input[type="checkbox"], .switch-row input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 2px 0 0; flex: none; display: inline-grid; place-content: center;
  border: 1.5px solid color-mix(in srgb, var(--ink-2) 55%, var(--line)); border-radius: 6px; background: var(--surface); cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.page-admin input[type="checkbox"]::before, .check input[type="checkbox"]::before, .switch-row input[type="checkbox"]::before {
  content: ""; width: 10px; height: 5px; margin-top: -3px; border: 2.5px solid var(--primary-ink); border-top: 0; border-right: 0;
  transform: rotate(-45deg) scale(0); transition: transform var(--t-fast) var(--ease);
}
.page-admin input[type="checkbox"]:hover, .check input[type="checkbox"]:hover { border-color: var(--primary); }
.page-admin input[type="checkbox"]:checked, .check input[type="checkbox"]:checked, .switch-row input[type="checkbox"]:checked { background: var(--primary); border-color: var(--primary); }
.page-admin input[type="checkbox"]:checked::before, .check input[type="checkbox"]:checked::before, .switch-row input[type="checkbox"]:checked::before { transform: rotate(-45deg) scale(1); }
.page-admin input[type="checkbox"]:focus-visible, .check input[type="checkbox"]:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent); }
.page-admin input[type="checkbox"]:disabled { opacity: .5; cursor: not-allowed; }
/* przełącznik: <input type="checkbox" role="switch"> */
.page-admin input[type="checkbox"][role="switch"] { width: 42px; height: 24px; border-radius: 999px; place-content: center start; padding: 0 3px; background: var(--surface-3); border-color: transparent; }
.page-admin input[type="checkbox"][role="switch"]::before { width: 18px; height: 18px; margin: 0; border: 0; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 25%); transform: none; transition: translate var(--t-fast) var(--ease); }
.page-admin input[type="checkbox"][role="switch"]:checked { background: var(--primary); }
.page-admin input[type="checkbox"][role="switch"]:checked::before { translate: 18px 0; transform: none; }
.check:has(input:checked) > span { color: var(--ink); }
.check-grid .check { padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; transition: background var(--t-fast), border-color var(--t-fast); }
.check-grid .check:hover { background: var(--surface-2); }
.check-grid .check:has(input:checked) { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 30%, transparent); }
.check-grid .check[hidden] { display: none; }
.check-filter { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.check-filter .input { max-width: 320px; min-height: 40px; }
/* listy wyboru: własna strzałka */
.page-admin select { appearance: none; -webkit-appearance: none; padding-right: 38px !important; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 19px) 52%, calc(100% - 14px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.page-admin .input, .page-admin .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .page-admin .field select, .page-admin .field textarea, .page-admin .table select, .page-admin .table input:not([type="checkbox"]) {
  border-radius: 10px; border: 1px solid var(--line); background-color: var(--surface); color: var(--ink); font: inherit;
}
.page-admin .table .input, .page-admin .table select { min-height: 38px; padding: 6px 10px; }
.page-admin .input:hover, .page-admin .field input:hover, .page-admin .field select:hover, .page-admin .field textarea:hover { border-color: color-mix(in srgb, var(--ink-2) 45%, var(--line)); }

/* pole z podpowiedziami (combobox) */
.cb { position: relative; min-width: 160px; width: 100%; }
.cb-native { position: absolute !important; inset: 0; opacity: 0; pointer-events: none; }
.cb-field { position: relative; display: flex; align-items: center; }
.cb-text { width: 100%; min-height: 46px; padding: 10px 42px 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; text-overflow: ellipsis; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.cb-text:hover { border-color: color-mix(in srgb, var(--ink-2) 45%, var(--line)); }
.cb-text:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.cb-text[aria-invalid="true"] { border-color: var(--danger); }
.cb-input .cb-text, .table .cb-text { min-height: 40px; padding: 6px 38px 6px 12px; }
.cb-preview { position: absolute; left: 12px; display: grid; color: var(--ink); pointer-events: none; }
.cb-preview .icon { width: 18px; height: 18px; }
.cb-preview + .cb-text { padding-left: 40px; }
.cb-toggle { position: absolute; right: 4px; width: 34px; height: 34px; border: 0; background: transparent; color: var(--ink-2); border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.cb-toggle:hover { background: var(--surface-2); color: var(--ink); }
.cb-toggle .icon { width: 18px; height: 18px; transition: rotate var(--t-fast) var(--ease); }
.cb.is-open .cb-toggle .icon { rotate: 180deg; }
.cb-list { position: fixed; z-index: 1200; margin: 0; padding: 6px; list-style: none; max-height: min(320px, 50vh); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-2); animation: fade-down var(--t-fast) var(--ease); scrollbar-width: thin; }
.cb-list [role="option"] { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: .92rem; line-height: 1.3; }
.cb-list [role="option"] > span { flex: 1; min-width: 0; }
.cb-list [role="option"] .icon { width: 18px; height: 18px; flex: none; color: var(--ink-2); }
.cb-list [role="option"] > .icon:last-child { color: var(--primary); }
.cb-list [role="option"].is-active { background: var(--primary-soft); color: var(--primary); }
.cb-list [role="option"].is-active .icon { color: var(--primary); }
.cb-list [aria-selected="true"] { font-weight: 700; }
.cb-list [aria-disabled="true"] { opacity: .5; cursor: default; }
.cb-list mark { background: color-mix(in srgb, var(--primary) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.cb-empty { padding: 8px 10px; color: var(--ink-2); font-size: .85rem; list-style: none; }
.toolbar .cb { flex: 0 1 220px; width: auto; }

@media (max-width: 899px) {
  .admin { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 12px 16px 72px; }
  .admin-mobilebar { display: flex; }
  .admin-nav { position: fixed; inset: 0; align-self: stretch; justify-self: stretch; z-index: 1100; max-height: none; border-radius: 0; background: rgb(0 0 0 / 0%); visibility: hidden; transition: background var(--t) var(--ease), visibility 0s linear var(--t); overflow: hidden; }
  .admin-nav-inner { position: absolute; inset: 0 auto 0 0; width: min(300px, 86vw); overflow-y: auto; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; translate: -100% 0; transition: translate var(--t) var(--ease); padding: 16px 12px calc(16px + env(safe-area-inset-bottom)); }
  .admin-nav.is-open { visibility: visible; background: rgb(0 0 0 / 40%); transition: background var(--t) var(--ease); }
  .admin-nav.is-open .admin-nav-inner { translate: 0 0; }
  .admin-nav a { padding: 11px 12px; }
  body.admin-nav-open { overflow: hidden; }
  .admin-main .card { padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .admin-nav, .admin-nav-inner, .cb-list { transition: none; animation: none; }
}
.page-admin .table td:first-child > .input { min-width: 210px; }
.toolbar .cb-text { min-height: 44px; padding: 8px 38px 8px 12px; }

/* ---------------------------------------------------------------- import: reguły i mapowanie */
.rules { display: grid; gap: 8px; }
.rule { display: grid; grid-template-columns: auto minmax(140px, 1.2fr) minmax(130px, .9fr) minmax(110px, 1fr) auto minmax(150px, 1.2fr) minmax(130px, 1fr) minmax(110px, 1fr) auto; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.rule > [hidden], .rule .cb[hidden] { display: none; }
.rule-label { font-size: .8rem; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.rule .input, .rule select, .rule .cb-text { min-height: 40px; }
.rule select { padding: 6px 30px 6px 10px; border-radius: 10px; border: 1px solid var(--line); background-color: var(--surface); color: var(--ink); font: inherit; }
.map-table th[scope="row"] { font-weight: 600; white-space: nowrap; }
.map-table td { min-width: 200px; }
@media (max-width: 1100px) {
  .rule { grid-template-columns: 1fr 1fr; }
  .rule-label { grid-column: 1 / -1; }
  .rule [data-repeat-remove] { justify-self: end; grid-column: 2; }
}

/* ---------------------------------------------------------------- synchronizacja: karty źródeł */
.sync-src { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.sync-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sync-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); flex: none; }
.sync-title { flex: 1 1 260px; min-width: 0; }
.sync-title h2 { margin: 0 0 2px; }
.sync-title p { margin: 0; }
.sync-progress { display: grid; gap: 6px; }
.sync-cond { border-top: 1px solid var(--line); padding-top: 10px; }
.sync-cond > summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 650; color: var(--ink-2); list-style: none; }
.sync-cond > summary::-webkit-details-marker { display: none; }
.sync-cond > summary:hover, .sync-cond[open] > summary { color: var(--ink); }
.sync-cond[open] > summary { margin-bottom: 12px; }
.sync-tiles { max-height: 420px; overflow-y: auto; }
.check-row { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.check-grid-sm { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

/* ---------------------------------------------------------------- zakładki */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: -1px; color: var(--ink-2); text-decoration: none; font-weight: 650; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--primary); border-bottom-color: var(--primary); }
.tab-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: .75rem; font-weight: 750; }

/* ---------------------------------------------------------------- moderacja propozycji */
.sugg { display: grid; gap: 14px; }
.sugg-head { display: flex; align-items: center; gap: 14px; }
.sugg-thumb { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; flex: none; }
.sugg-thumb-empty { display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.sugg-title { flex: 1; min-width: 0; }
.sugg-title h2 { margin: 0 0 2px; }
.sugg-title p { margin: 0; }
.sugg-note { display: flex; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font-style: italic; }
.sugg-note .icon { flex: none; margin-top: 2px; }
.diff-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.diff { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color var(--t-fast), background var(--t-fast); }
.diff:has(.diff-pick input:checked) { border-color: color-mix(in srgb, var(--success) 45%, var(--line)); background: color-mix(in srgb, var(--success-soft) 45%, var(--surface)); }
.diff-pick { padding-top: 2px; }
.diff-body { flex: 1; min-width: 0; display: grid; gap: 6px; }
.diff-label { font-size: .75rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); margin: 0; }
.diff-values { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: stretch; }
.diff-old, .diff-new { position: relative; padding: 22px 12px 10px; border-radius: 10px; font-size: .95rem; line-height: 1.45; overflow-wrap: anywhere; }
.diff-old { background: var(--danger-soft); color: color-mix(in srgb, var(--danger) 70%, var(--ink)); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.diff-new { background: var(--success-soft); color: color-mix(in srgb, var(--success) 70%, var(--ink)); font-weight: 600; }
.diff-tag { position: absolute; top: 6px; left: 12px; font-size: .68rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; text-decoration: none; opacity: .75; }
.diff-arrow { display: grid; place-items: center; color: var(--ink-2); }
.diff-long .diff-old, .diff-long .diff-new { max-height: 220px; overflow-y: auto; }
.diff-stale { display: flex; gap: 6px; align-items: center; margin: 0; font-size: .85rem; color: var(--warning); }
.diff-stale .icon { width: 16px; height: 16px; }
.photo-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photo-tile { position: relative; display: block; border-radius: 12px; overflow: hidden; cursor: pointer; border: 3px solid transparent; aspect-ratio: 4 / 3; background: var(--surface-2); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tile input { position: absolute; top: 8px; left: 8px; z-index: 1; background: var(--surface); }
.photo-tile:has(input:checked) { border-color: var(--success); }
.photo-tile:has(input:not(:checked)) img { opacity: .4; filter: grayscale(1); }
.sugg-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 4px; border-top: 1px solid var(--line); padding-top: 14px; }
.sugg-actions .input { flex: 1 1 260px; min-height: 44px; }
@media (max-width: 700px) {
  .diff-values { grid-template-columns: 1fr; }
  .diff-arrow { rotate: 90deg; justify-self: center; }
}

/* ---------------------------------------------------------------- formularz propozycji (strona publiczna) */
.suggest-page { max-width: 820px; }
.suggest-hero { display: flex; gap: 16px; align-items: center; margin: 8px 0 20px; }
.suggest-hero h1 { margin: 0 0 4px; }
.suggest-hero p { margin: 0; }
.suggest-hero-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); color: #fff; flex: none; box-shadow: var(--shadow-2); }
.suggest-hero-icon .icon { width: 26px; height: 26px; }
.suggest-form fieldset.card { display: grid; gap: 14px; margin: 0; min-width: 0; }
.suggest-form legend { display: flex; align-items: center; gap: 10px; float: left; width: 100%; margin-bottom: 6px; padding: 0; }
.suggest-form legend + * { clear: both; }
.suggest-form legend .icon { color: var(--primary); }
.suggest-more > summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.photo-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.photo-previews img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }

/* ---------- API: dokumentacja i bloki kodu ---------- */
.code-block { position: relative; margin: 8px 0 16px; }
.code-block pre { margin: 0; padding: 14px 16px; padding-right: 96px; overflow-x: auto; background: #1b1f1d; color: #e8efe9; border-radius: var(--radius-sm); font-size: .84rem; line-height: 1.55; tab-size: 2; }
.code-block code { background: none; padding: 0; color: inherit; font-size: inherit; white-space: pre; }
.code-block .code-copy { position: absolute; top: 8px; right: 8px; --btn-bg: rgba(255,255,255,.08); --btn-ink: #e8efe9; --btn-line: rgba(255,255,255,.18); }
.code-block .code-copy:hover { background: rgba(255,255,255,.16); color: #fff; }
.code-block .code-copy.is-copied { --btn-bg: var(--accent-1); --btn-line: var(--accent-1); color: #fff; }
.api-newkey { border: 2px solid var(--accent-1); }
.api-newkey h2 { display: flex; align-items: center; gap: 8px; }
.api-docs h3 { margin-top: 32px; scroll-margin-top: 80px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.api-docs ul, .api-docs ol { padding-left: 1.2em; display: grid; gap: 6px; }
.api-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.api-toc a { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: .85rem; text-decoration: none; color: var(--ink); }
.api-toc a:hover { background: var(--surface-3); }
.method { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .75rem; font-weight: 700; letter-spacing: .04em; color: #fff; font-family: ui-monospace, monospace; }
.method-post { background: #1f7a4d; }
.method-get { background: #2563a8; }
.method-delete { background: #b42b2b; }
.api-fields td:first-child { white-space: nowrap; }
.api-fields td:last-child code { white-space: nowrap; }
.h3 { font-size: 1.3rem; font-weight: 700; }

/* ---------- Weryfikacja zmian ---------- */
.rv { display: grid; gap: 14px; }
.rv-form { display: grid; gap: 10px; }
.rv-filters { display: grid; gap: 10px; margin: 14px 0; }
.rv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rv-chips .chip { text-decoration: none; }
.rv-bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.rv-filter-note { display: flex; gap: 8px; align-items: center; margin: 12px 0; }
.rv-src { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; color: var(--ink); }
.rv-src .icon { width: 14px; height: 14px; }
.rv-field { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); display: grid; gap: 8px; min-width: 0; }
.rv-field legend { padding: 0 4px; }
.rv-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.rv-opt { position: relative; display: grid; gap: 6px; align-content: start; padding: 10px 12px 10px 38px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); overflow-wrap: anywhere; min-width: 0; }
.rv-opt > input[type="radio"] { position: absolute; left: 12px; top: 12px; width: 18px; height: 18px; accent-color: var(--primary); }
.rv-opt:hover { border-color: var(--ink-2); }
.rv-tag { font-size: .75rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.rv-val { font-size: .95rem; line-height: 1.45; }
.rv-opt .input { width: 100%; }
.rv-opt-old:has(input:checked) { border-color: var(--ink-2); background: var(--surface-2); }
.rv-opt-new:has(input:checked) { border-color: color-mix(in srgb, var(--success) 60%, var(--line)); background: var(--success-soft); }
.rv-opt-new:has(input:checked) .rv-val { font-weight: 650; }
.rv-opt-custom:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.rv-prev { display: flex; gap: 6px; align-items: center; margin: 0; font-size: .85rem; color: var(--ink-2); }
.rv-prev .icon { width: 16px; height: 16px; flex: none; }
.rv-hist th[scope="row"] { font-weight: 650; white-space: nowrap; }
.rv-dec { font-weight: 650; }
.rv-dec-new { color: var(--success); }
.rv-dec-old { color: var(--danger); }

/* ---------- Wydarzenia ---------- */
.events-page { max-width: 1100px; margin: 0 auto; padding: 16px; display: grid; gap: 18px; }
.events-head h1 { margin: 0 0 4px; }
.events-head p { margin: 0; }
.events-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.ev-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-chips .chip { text-decoration: none; }
.ev-city select { min-width: 220px; }
.ev-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.ev-card a { display: grid; height: 100%; color: var(--ink); text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: transform var(--t-fast), box-shadow var(--t-fast); }
.ev-card a:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.ev-media { position: relative; display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--accent-1, var(--primary)), var(--primary-soft)); }
.ev-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-date { position: absolute; left: 12px; top: 12px; display: grid; place-items: center; min-width: 54px; padding: 6px 8px; border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2); line-height: 1.1; text-transform: uppercase; font-size: .72rem; font-weight: 700; }
.ev-date strong { font-size: 1.35rem; }
.ev-body { display: grid; gap: 6px; padding: 14px 16px 16px; align-content: start; }
.ev-when, .ev-where { display: flex; gap: 6px; align-items: center; font-size: .85rem; color: var(--ink-2); }
.ev-when { color: var(--primary); font-weight: 650; }
.ev-when .icon, .ev-where .icon { width: 15px; height: 15px; flex: none; }
.ev-title { font-size: 1.08rem; font-weight: 750; line-height: 1.3; }
.ev-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-tags .tag { font-size: .78rem; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.ev-tags .tag-free { background: var(--success-soft); color: var(--success); font-weight: 650; }
.ev-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.ev-facts li { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.ev-facts .icon { color: var(--primary); }
.ev-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-dates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.ev-dates li { padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-weight: 600; }
.ev-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.ev-gallery img { width: 100%; height: 130px; object-fit: cover; border-radius: 10px; display: block; }
.event .contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.event .contact-list li { display: flex; gap: 8px; align-items: center; }
.place-events { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.place-events a { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.place-events a:hover { border-color: var(--ink-2); }
.place-events .ev-date { position: static; box-shadow: none; background: var(--primary-soft); color: var(--primary); }
.place-events .ev-title { font-size: 1rem; }

/* ================================================================ PANEL — odświeżony wygląd (nadpisuje wcześniejsze reguły) */
.page-admin { --admin-nav-w: 272px; background: color-mix(in srgb, var(--bg) 92%, var(--primary) 8%); }
.page-admin .site-footer { display: none; }

/* pasek postępu przy zapisie i przechodzeniu między stronami */
.admin-progress { position: fixed; z-index: 2000; top: 0; left: 0; height: 3px; width: 0; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--primary), var(--accent-2, var(--primary-hover))); box-shadow: 0 0 10px var(--primary); }
.admin-progress.is-active { opacity: 1; animation: admin-progress 1.6s cubic-bezier(.2, .7, .2, 1) forwards; }
@keyframes admin-progress { from { width: 0; } 30% { width: 45%; } to { width: 88%; } }
.admin-main[aria-busy="true"] { opacity: .6; transition: opacity .2s ease .15s; pointer-events: none; }

/* menu boczne */
.admin { gap: 32px; max-width: 1440px; padding: 24px 24px 80px; }
.admin-nav-inner { gap: 1px; padding: 12px; border-radius: 20px; box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--line) 70%, transparent); }
.admin-nav-user { display: flex; gap: 12px; align-items: center; padding: 8px 8px 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.admin-avatar { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: var(--primary-ink, #fff);
  background: linear-gradient(135deg, var(--primary), var(--accent-2, var(--primary-hover))); }
.admin-nav-who { display: grid; min-width: 0; line-height: 1.25; }
.admin-nav-who strong { font-size: .92rem; }
.admin-nav-who span { font-size: .78rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-nav-title { margin: 16px 12px 6px; font-size: .68rem; }
.admin-nav a { border-radius: 12px; padding: 9px 12px; }
.admin-nav a[aria-current="page"] { background: var(--primary); color: var(--primary-ink, #fff); box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 35%, transparent); }
.admin-nav a[aria-current="page"]::before { display: none; }
.admin-nav a[aria-current="page"] .nav-count { background: #fff; color: var(--danger); }
.admin-nav a.admin-nav-site { margin-top: 12px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; padding-top: 14px; }

/* nagłówek strony i karty */
.admin-main { gap: 22px; }
.admin-head { padding-bottom: 2px; }
.admin-head h1 { font-weight: 800; }
.admin-main .card { border-radius: 20px; border-color: color-mix(in srgb, var(--line) 75%, transparent); box-shadow: 0 1px 2px rgb(0 0 0 / 4%), 0 8px 24px -12px rgb(0 0 0 / 14%); }
.admin-main .card > h2:first-child, .admin-main .card > .h4:first-child { margin-top: 0; }
.admin-main .btn { border-radius: 12px; }

/* statystyki pulpitu */
.stat-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.stat { position: relative; grid-template-columns: auto 1fr; grid-template-areas: "icon value" "icon label"; column-gap: 14px; align-items: center;
  padding: 16px 18px; border-radius: 18px; border-color: color-mix(in srgb, var(--line) 75%, transparent); overflow: hidden; }
.stat::after { content: ""; position: absolute; inset: auto -30% -60% auto; width: 120px; height: 120px; border-radius: 50%; background: var(--tone, var(--primary)); opacity: .07; }
.stat-icon { grid-area: icon; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: var(--tone, var(--primary)); background: color-mix(in srgb, var(--tone, var(--primary)) 14%, transparent); }
.stat-icon .icon { width: 22px; height: 22px; }
.stat-value { grid-area: value; font-size: 1.65rem; }
.stat-label { grid-area: label; }
a.stat:hover { border-color: var(--tone, var(--primary)); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.tone-blue { --tone: #3b82f6; } .tone-amber { --tone: #d97706; } .tone-violet { --tone: #8b5cf6; } .tone-rose { --tone: #e11d48; } .tone-teal { --tone: var(--primary); } .tone-slate { --tone: #64748b; }
.alerts { gap: 10px; }
.alert { border-radius: 16px; border: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
.dash-quick { display: flex; flex-wrap: wrap; gap: 8px; }

/* tabele */
.table-wrap { border-radius: 18px; border-color: color-mix(in srgb, var(--line) 75%, transparent); box-shadow: 0 1px 2px rgb(0 0 0 / 4%), 0 8px 24px -14px rgb(0 0 0 / 16%); }
.card .table-wrap { box-shadow: none; }
.table thead th { position: sticky; top: 0; z-index: 1; font-size: .72rem; letter-spacing: .06em; background: color-mix(in srgb, var(--surface-2) 85%, var(--surface)); }
.table tbody tr { transition: background var(--t-fast); }
.table td .btn-ghost { white-space: nowrap; }

/* formularze */
.page-admin .field label, .page-admin label.field-label { font-weight: 650; }
.page-admin .input, .page-admin .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .page-admin .field select, .page-admin .field textarea { border-radius: 12px; }
.admin-form .form-actions, .admin-main form > .form-actions { position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; margin-top: 4px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-2); }

/* ---------------------------------------------------------------- telefon i tablet */
@media (max-width: 899px) {
  .admin { padding: 0 12px 96px; gap: 14px; }
  .admin-mobilebar { position: sticky; top: var(--topbar-h); z-index: 50; display: flex; align-items: center; gap: 10px; margin: 0 -12px; padding: 10px 12px;
    background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .admin-menu-btn { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: var(--shadow-1); }
  .admin-menu-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
  .admin-mobilebar-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 750; font-size: 1.02rem; }
  .admin-mobilebar-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-mobilebar-title .icon { color: var(--primary); flex: none; }
  .admin-mobilebar-badge { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px; background: var(--danger); color: #fff; font-weight: 750; font-size: .8rem; text-decoration: none; }
  .admin-mobilebar-badge .icon { width: 14px; height: 14px; }
  .admin-nav-inner { border-radius: 0 24px 24px 0; }
  .admin-head { gap: 10px; }
  .admin-head h1 { font-size: 1.4rem; }
  .admin-main .card { border-radius: 18px; padding: 16px 14px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { grid-template-columns: 1fr; grid-template-areas: "icon" "value" "label"; row-gap: 6px; padding: 14px; }
  .stat-icon { width: 36px; height: 36px; border-radius: 12px; }
  .stat-value { font-size: 1.35rem; }
  .stat-label { font-size: .78rem; }
  .toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .toolbar > .input:first-child, .toolbar > .cb:first-child { grid-column: 1 / -1; }
  .toolbar .cb { width: 100%; flex: none; }
  .sugg-actions { display: grid; grid-template-columns: 1fr; }
  .sugg-actions .btn { width: 100%; justify-content: center; }
  .rv-bulk { display: grid; grid-template-columns: 1fr 1fr; }
  .rv-bulk > span { grid-column: 1 / -1; }
  .rv-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px 2px; }
  .rv-chips::-webkit-scrollbar { display: none; }
  .rv-chips .chip { flex: none; }
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tabs a { flex: none; }
  .code-block pre { font-size: .76rem; padding-right: 14px; padding-top: 48px; }
  .admin-form .form-actions, .admin-main form > .form-actions { bottom: calc(var(--bottomnav-h, 64px) + 8px); }
}

/* tabele jako karty na wąskim ekranie (etykiety kolumn dodaje admin-ui.js) */
@media (max-width: 720px) {
  .table-wrap:has(.table-stack) { border: 0; background: transparent; box-shadow: none; overflow: visible; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td, .table-stack th[scope="row"] { display: block; width: 100%; }
  .table-stack thead, .table-stack thead tr, .table-stack thead th { display: block; position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .table-stack td, .table-stack th[scope="row"] { overflow-wrap: anywhere; min-width: 0; }
  .table-stack code { white-space: normal !important; overflow-wrap: anywhere; }
  .table-stack tbody { display: grid; gap: 10px; }
  .table-stack tr { padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-1); }
  .table-stack tbody tr:hover { background: var(--surface); }
  .table-stack td, .table-stack th[scope="row"] { display: grid; grid-template-columns: minmax(90px, 34%) minmax(0, 1fr); gap: 10px; align-items: start; padding: 6px 0; border: 0; text-align: left; white-space: normal; }
  .table-stack td::before, .table-stack th[scope="row"]::before { content: attr(data-label); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); padding-top: 3px; }
  .table-stack td:not([data-label])::before, .table-stack td[data-label=""]::before { display: none; }
  .table-stack td:not([data-label]), .table-stack td[data-label=""] { grid-template-columns: 1fr; }
  .table-stack td:first-child { grid-template-columns: 1fr; font-weight: 650; padding-top: 0; }
  .table-stack td:first-child::before { display: none; }
  .table-stack td:last-child { padding-bottom: 0; }
  .table-stack .nowrap { white-space: normal; }
  .table-stack td .inline-form, .table-stack td > .btn { display: inline-flex; }
  .page-admin .table-stack td:first-child > .input { min-width: 0; width: 100%; }
  .table-stack td > form.inline-form + .btn, .table-stack td > .btn + .btn { margin-left: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .admin-progress.is-active { animation: none; width: 70%; }
  a.stat:hover { transform: none; }
}
@media (max-width: 899px) {
  .admin-main .btn { white-space: normal; max-width: 100%; height: auto; text-align: left; line-height: 1.25; padding-block: 8px; }
  .alert { padding: 10px 14px; font-size: .9rem; }
  .alert p { font-size: .82rem; }
}
@media (max-width: 720px) {
  .table-stack td { justify-items: start; }
  .table-stack td > .badge { justify-self: start; }
}
.alerts-box { border: 1px solid color-mix(in srgb, var(--warning) 30%, var(--line)); border-radius: 18px; background: var(--surface); padding: 4px 6px; }
.alerts-box > summary { display: flex; align-items: center; gap: 10px; padding: 10px 10px; cursor: pointer; font-weight: 700; color: var(--warning); list-style: none; }
.alerts-box > summary::-webkit-details-marker { display: none; }
.alerts-box > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform var(--t-fast); }
.alerts-box[open] > summary::after { transform: rotate(-135deg); }
.alerts-box .alerts { padding: 0 4px 8px; }
