/* =============================================================================
 *  Project:   Mapa firm Kraśnik
 *  Location:  /assets/css/app.css
 *  Function:  Design system 2.0 on top of Bootstrap 6: Geist variable type, light + dark tokens
 *             (follows the OS), floating glass islands (top bar, tab bar, map panel), full-bleed
 *             map explorer, bento surfaces, spotlight hover, motion system.
 *  Version:   3.3.0   Build: 2026.11.09.0200
 * -----------------------------------------------------------------------------
 *  Changelog:
 *    3.3.0  2026-11-09  Photos like Google Business: ultra-modern mosaic, filmstrip viewer, panel photo manager
 *    3.2.0  2026-11-09  Map popups redesign (category, address, Profile/Directions/Call), hover tooltips, route link
 *    3.1.0  2026-11-09  Promo banner
 *    3.0.0  2026-11-09  Light-only heraldic palette (Kraśnik & Lubelskie: red, gold, white) for site and panel
 *    2.2.0  2026-11-09  Optimistic "sunrise" colour theme for the public site
 *    2.1.0  2026-11-09  Map consent gate
 *    2.0.0  2026-11-09  Ultra-modern redesign: dark mode, Geist font, floating islands, full-bleed map
 *    1.1.0  2026-11-08  RODO/WCAG 2.2 release
 *    1.0.0  2026-11-08  Initial version
 * ============================================================================= */

/* Theme lives in Bootstrap's "custom" layer: beats components/forms, while Bootstrap
   helpers & utilities (d-*, m-*, text-*) still win. Leaflet overrides stay unlayered. */
@view-transition { navigation: auto; }

@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-pl.woff2") format("woff2-variations"), url("../fonts/geist-pl.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

@layer custom {
/* ---------- tokens: light only, heraldic palette of Kraśnik & Lubelskie ----------
   Herb Kraśnika: red shield, gold lances with silver heads. Lubelskie: silver deer with a gold crown
   on red; flag white–red–yellow. → heraldic red (primary), gold (accent), silver/white (surfaces). */
:root {
  color-scheme: light;
  --red: #C8102E;                  /* heraldic red – white text 5.9:1 */
  --red-dark: #9E0B21;
  --gold: #E8B400;                 /* heraldic gold – fills only; dark text on it 10:1 */
  --gold-soft: rgba(232, 180, 0, .16);
  --gold-ink: #7a5600;             /* gold-brown text: 6.4:1 on white */
  --silver: #E9E5DF;
  --brand: var(--red);
  --brand-ink: #A50D23;            /* red as text: 7.5:1 on white, 6.5:1 on --soft */
  --brand-2: #9E0B21;
  --brand-3: #E8B400;
  --grad: linear-gradient(120deg, #D4182F 0%, #B80F27 55%, #9E0B21 100%);
  --brand-grad: var(--grad);
  --grad-text: linear-gradient(120deg, #C8102E 0%, #8C0B1E 100%);
  --on-grad: #fff;
  --focus: #C8102E;
  --map-line: #C8102E; --map-line-2: #C99700;   /* city outline (red) / districts (gold) – read by map scripts */
  --tile-filter: saturate(.55) sepia(.06) brightness(1.04) contrast(.94);
  --glow: rgba(200, 16, 46, .42);
  --ok: #01930E; --ok-ink: #016b0a; --ok-soft: rgba(1, 147, 14, .1);
  --danger: #C40010; --danger-ink: #9a0010; --danger-soft: rgba(196, 0, 16, .08);
  --warn: #E8B400; --warn-ink: #7a5600; --warn-soft: rgba(232, 180, 0, .16);
  --accent: #E8B400;
  --ink: #1f1a17;
  --ink-2: #463d37;
  --ink-3: #685d55;                /* ≥ 5.5:1 on --surface and --bg (WCAG 1.4.3) */
  --mix: #000;                     /* darkens category colours for text */
  --bg: #fbf8f3;                   /* warm ivory ("srebro" of the arms, softened) */
  --surface: #ffffff;
  --surface-2: #f6f2ec;
  --glass: rgba(255, 253, 250, .76);
  --glass-strong: rgba(255, 253, 250, .9);
  --panel-solid: #fffdfa;
  --line: rgba(60, 35, 20, .08);
  --line-2: rgba(60, 35, 20, .15);
  --soft: rgba(200, 16, 46, .07);
  --soft-2: rgba(200, 16, 46, .13);
  --map-bg: #f4f0e9;
  --flag: linear-gradient(90deg, #ffffff 0 33.3%, #C8102E 33.3% 66.6%, #E8B400 66.6% 100%);   /* Lubelskie flag stripe */
  --ring: 0 0 0 1px var(--line);
  --r-sm: 12px; --r: 18px; --r-lg: 24px; --r-xl: 32px;
  --sh-1: var(--ring), 0 1px 2px rgba(60, 35, 20, .05);
  --sh-2: var(--ring), 0 2px 4px rgba(60, 35, 20, .04), 0 12px 32px -16px rgba(60, 35, 20, .22);
  --sh-3: var(--ring), 0 4px 10px rgba(60, 35, 20, .05), 0 32px 64px -28px rgba(60, 35, 20, .34);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --gap: 12px;
  --topbar-h: 72px;                /* island 60px + gap */
  --tabbar-h: 0px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Bootstrap 6 theme mapping → heraldic palette */
  --bs-primary-base: var(--red);
  --bs-primary-bg: var(--red);
  --bs-primary-fg: var(--brand-ink);
  --bs-primary-focus-ring: rgba(200, 16, 46, .4);
  --bs-success-bg: var(--ok);
  --bs-danger-bg: var(--danger);
  --bs-body-font-family: var(--font);
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--ink);
  --bs-link-color: var(--brand-ink);
  --bs-border-color: var(--line-2);
  --bs-control-checked-bg: var(--red);
  --bs-control-checked-border-color: var(--red);
}

::view-transition-old(root), ::view-transition-new(root) { animation-duration: .32s; animation-timing-function: var(--ease); }
::view-transition-old(root) { animation-name: vt-out; }
::view-transition-new(root) { animation-name: vt-in; }
@keyframes vt-out { to { opacity: 0; transform: scale(.985); filter: blur(3px); } }
@keyframes vt-in { from { opacity: 0; transform: scale(1.01); filter: blur(3px); } }

/* ---------- base ---------- */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 16px); scroll-padding-bottom: calc(var(--tabbar-h) + 90px); }
/* WCAG 2.4.11: focused elements are scrolled clear of the floating top bar, tab bar and save bar */
body {
  font-family: var(--font); font-size: 15.5px; color: var(--ink); background: var(--bg); font-feature-settings: "ss01", "calt";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; min-height: 100dvh;
  background-image:
    radial-gradient(900px 520px at 95% -10%, rgba(232, 180, 0, .14), transparent 62%),
    radial-gradient(760px 480px at -8% 2%, rgba(200, 16, 46, .06), transparent 60%);
  background-attachment: fixed;
}
h1, h2, h3, .h1, .h2, .h3, .h4, .h5, .h6 { letter-spacing: -.035em; font-weight: 680; color: var(--ink); text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--brand-ink); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-ink); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
::selection { background: color-mix(in oklch, var(--brand) 26%, transparent); }
.ico { width: 1em; height: 1em; fill: currentColor; flex-shrink: 0; vertical-align: -.125em; }
.fg-3 { color: var(--ink-3) !important; }
.text-xs { font-size: .78rem; } .text-sm { font-size: .875rem; }
.nowrap { white-space: nowrap; }
code { color: var(--ink-2); background: var(--surface-2); padding: .1em .38em; border-radius: 6px; font-size: .86em; }
.grad { background: var(--grad-text); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: grad-pan 8s var(--ease) infinite alternate; }
@keyframes grad-pan { to { background-position: 100% 0; } }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 2000; padding: .6rem 1rem; border-radius: 999px; background: var(--ink); color: var(--bg); transition: top .2s; }
.skip-link:focus { top: 12px; color: var(--bg); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.container-wide { width: min(1240px, 100% - 2rem); margin-inline: auto; }
.container-narrow { width: min(820px, 100% - 2rem); margin-inline: auto; }
.page-pad { padding-block: 1.5rem 4rem; }
.center-x { text-align: center; }
.err { color: var(--danger-ink); font-size: .84rem; margin: .35rem 0 0; }
[aria-invalid="true"] { border-color: var(--danger) !important; }

/* surfaces share one recipe: solid card, hairline ring instead of border, soft depth */
.fcard, .tile, .feature, .block, .panel, .kpi, .card-x, .numbers div, .steps li, .table-wrap, .dlist a, .offline-card, .dash-empty {
  background: var(--surface); border: 0 !important; box-shadow: var(--sh-1);
}
/* spotlight that follows the pointer (vars set in app.js) */
.fcard, .tile, .feature, .kpi { position: relative; isolation: isolate; }
.fcard::after, .tile::after, .feature::after, .kpi::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s var(--ease);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in oklch, var(--cat, var(--brand)) 10%, transparent), transparent 55%);
}
.fcard:hover::after, .tile:hover::after, .feature:hover::after, .kpi:hover::after, .fcard.is-hot::after { opacity: 1; }

/* ---------- buttons (pill system) ---------- */
.btn-pill {
  --h: 42px; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: var(--h);
  padding: 0 1.15rem; border-radius: 999px; border: 1px solid transparent; font-weight: 600; font-size: .92rem; letter-spacing: -.01em;
  text-decoration: none; cursor: pointer; white-space: nowrap; user-select: none; background: none; color: var(--ink);
  transition: transform .2s var(--ease), box-shadow .3s var(--ease), background-color .2s, color .2s, border-color .2s;
}
.btn-pill:hover { text-decoration: none; }
.btn-pill:active { transform: scale(.96); }
.btn-pill-sm { --h: 34px; padding: 0 .85rem; font-size: .84rem; }
.btn-pill-lg { --h: 54px; padding: 0 1.6rem; font-size: 1rem; }
.btn-pill-block { width: 100%; }
.btn-pill-primary { background: var(--grad); background-size: 160% 100%; color: var(--on-grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 22px -10px var(--glow); }
.btn-pill-primary:hover { color: var(--on-grad); background-position: 100% 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 14px 30px -12px var(--glow); transform: translateY(-1px); }
.btn-pill-success { background: #017a0b; color: #fff; }   /* brand green darkened: white text 5.3:1 */
.btn-pill-success:hover { color: #fff; filter: brightness(1.06); }
.btn-pill-soft { background: var(--soft); color: var(--brand-ink); }
.btn-pill-soft:hover { background: var(--soft-2); color: var(--brand-ink); }
.btn-pill-ghost { background: var(--surface); color: var(--ink); box-shadow: var(--ring); border-color: transparent; }
.btn-pill-ghost:hover { color: var(--ink); box-shadow: 0 0 0 1px var(--line-2), 0 6px 16px -10px rgba(10, 13, 22, .4); }
.btn-pill-text { padding-inline: .6rem; color: var(--brand-ink); }
.btn-pill-text:hover { background: var(--soft); color: var(--brand-ink); }
.danger { color: var(--danger-ink) !important; }
.btn-icon-x { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; transition: background .2s, color .2s; }
.btn-icon-x:hover { background: var(--soft); color: var(--brand-ink); }
.btn-icon-x.danger:hover { background: var(--danger-soft); }

/* ---------- top bar: floating glass island ---------- */
.topbar { position: sticky; top: 0; z-index: 1000; padding: var(--gap) var(--gap) 0; padding-top: max(var(--gap), env(safe-area-inset-top)); pointer-events: none; }
.topbar-inner {
  pointer-events: auto; display: flex; align-items: center; gap: .9rem; height: 60px; width: min(1320px, 100%); margin-inline: auto; padding: 0 10px 0 12px;
  border-radius: 20px; background: var(--glass); backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%); box-shadow: var(--sh-2);
}
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-size: 1.04rem; letter-spacing: -.03em; }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand-mark { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--grad); color: var(--on-grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 18px -8px var(--glow); transition: transform .5s var(--spring); }
.brand:hover .brand-mark { transform: rotate(-10deg) scale(1.06); }
.brand-text { font-weight: 450; }
.brand-text strong { font-weight: 750; }
.topnav { display: flex; gap: 2px; padding: 3px; border-radius: 14px; background: var(--surface-2); box-shadow: var(--ring); }
.topnav-link { position: relative; padding: .42rem .85rem; border-radius: 11px; color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: .9rem; transition: color .2s, background .25s var(--ease); }
.topnav-link:hover { color: var(--ink); text-decoration: none; background: var(--line); }
.topnav-link.is-active { color: var(--bg); background: var(--ink); }
.topsearch { margin-left: auto; position: relative; display: flex; align-items: center; }
.topsearch .ico { position: absolute; left: .9rem; color: var(--ink-3); pointer-events: none; }
.topsearch input { width: 240px; height: 40px; border-radius: 13px; border: 0; background: var(--surface-2); color: var(--ink); box-shadow: var(--ring); padding: 0 1rem 0 2.4rem; font-size: .9rem;
  transition: width .4s var(--ease), box-shadow .2s; }
.topsearch input::placeholder { color: var(--ink-3); }
.topsearch input:focus { outline: none; width: 320px; box-shadow: 0 0 0 1px color-mix(in oklch, var(--brand) 60%, transparent), 0 0 0 5px var(--soft); }
.topbar-account { --h: 40px; border-radius: 13px; }

/* mobile: floating glass tab bar */
.tabbar { display: none; }
@media (max-width: 860px) {
  :root { --gap: 8px; --topbar-h: 64px; --tabbar-h: calc(76px + env(safe-area-inset-bottom)); }
  .topbar-inner { height: 56px; border-radius: 18px; }
  .topnav, .topsearch, .topbar-account { display: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 1100; height: 64px;
    padding: 0 4px; border-radius: 22px; background: var(--glass-strong); backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%); box-shadow: var(--sh-3);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .68rem; font-weight: 600; color: var(--ink-3); text-decoration: none; min-height: 48px; }
  .tabbar a .ico { box-sizing: content-box; width: 1.2rem; height: 1.2rem; padding: 4px 14px; border-radius: 999px; transition: background .3s var(--ease), transform .35s var(--spring); }
  .tabbar a.is-active { color: var(--ink); }
  .tabbar a.is-active .ico { background: var(--soft-2); color: var(--brand-ink); transform: translateY(-1px); }
  body { padding-bottom: var(--tabbar-h); }
}

/* ---------- reveal & motion ---------- */
/* Only hide when scripting is on – content stays visible for no-JS browsers and AI agents. */
@media (scripting: enabled) {
  .reveal { opacity: 0; transform: translateY(18px) scale(.985); filter: blur(6px); transition: opacity .7s var(--ease), transform .7s var(--ease), filter .7s var(--ease); transition-delay: var(--d, 0ms); }
  .reveal.is-in { opacity: 1; transform: none; filter: none; }
}
@keyframes pop { 0% { transform: scale(.4) translateY(10px); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--ok) 50%, transparent); } 100% { box-shadow: 0 0 0 7px transparent; } }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(24px, -32px); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* ---------- explorer: full-bleed map + floating panel ---------- */
.page-explorer { overflow: hidden; }
.page-explorer .topbar { position: fixed; left: 0; right: 0; }
.explorer { position: relative; height: 100dvh; }
.explorer-map { position: absolute; inset: 0; }
.map { position: absolute; inset: 0; z-index: 0; background: var(--map-bg); }   /* own stacking context: map panes & consent gate stay under the panel */
.explorer-panel {
  position: absolute; z-index: 2; left: var(--gap); top: calc(var(--topbar-h) + var(--gap)); bottom: var(--gap); width: clamp(380px, 34vw, 450px);
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; padding: 1.25rem 1.1rem 1.5rem;
  border-radius: var(--r-xl); background: var(--glass-strong); backdrop-filter: blur(26px) saturate(170%); -webkit-backdrop-filter: blur(26px) saturate(170%); box-shadow: var(--sh-3);
}
.sheet-handle { display: none; }
.page-explorer .site-footer { display: none; }           /* map pages: footer links live at the end of the panel */
.panel-foot { display: grid; gap: .3rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--ink-3); }
.panel-foot a { color: var(--ink-2); text-decoration: none; }
.panel-foot a:hover { color: var(--brand-ink); text-decoration: underline; }
.panel-head { position: sticky; top: -1.25rem; z-index: 3; margin: -1.25rem -1.1rem 0; padding: 1.25rem 1.1rem .8rem;
  background: linear-gradient(var(--panel-solid) 82%, color-mix(in oklch, var(--panel-solid) 0%, transparent)); border-radius: var(--r-xl) var(--r-xl) 0 0; }
.eyebrow { display: inline-flex; align-items: center; gap: .4rem; margin: 0 0 .6rem; padding: .28rem .7rem .28rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 650;
  letter-spacing: .05em; text-transform: uppercase; color: var(--brand-ink); background: var(--soft); }
.panel-title { font-size: clamp(1.55rem, 2.2vw, 2rem); margin: 0 0 .35rem; line-height: 1.08; letter-spacing: -.045em; }
.panel-intro { color: var(--ink-3); margin: 0 0 1rem; font-size: .95rem; }
.searchbox { position: relative; display: flex; align-items: center; gap: .4rem; padding: 5px 5px 5px 2.6rem; border-radius: 18px; background: var(--surface); box-shadow: var(--sh-2); transition: box-shadow .25s; }
.searchbox:focus-within { box-shadow: 0 0 0 1px color-mix(in oklch, var(--brand) 60%, transparent), 0 0 0 6px var(--soft), var(--sh-2); }
.searchbox > .ico { position: absolute; left: 1rem; color: var(--ink-3); }
.searchbox input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); height: 42px; font-size: .98rem; }
.searchbox input::placeholder { color: var(--ink-3); }
.searchbox .btn-pill { border-radius: 14px; }
.searchbox-center { max-width: 560px; margin: 1.5rem auto 0; }
.chips { display: flex; gap: .4rem; overflow-x: auto; padding: .9rem .1rem .2rem; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 90%, transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip-x { --cat: var(--brand); display: inline-flex; align-items: center; gap: .4rem; flex-shrink: 0; min-height: 36px; padding: 0 .85rem; border-radius: 12px;
  background: var(--surface); box-shadow: var(--ring); color: var(--ink-2); font-size: .85rem; font-weight: 600; text-decoration: none; transition: all .25s var(--ease); }
.chip-x .ico { color: var(--cat); }
.chip-x small { font-weight: 600; color: var(--ink-3); font-size: .74rem; font-variant-numeric: tabular-nums; }
.chip-x:hover { box-shadow: 0 0 0 1px color-mix(in oklch, var(--cat) 50%, transparent); color: var(--ink); text-decoration: none; transform: translateY(-1px); }
.chip-x.is-active { background: color-mix(in oklch, var(--cat) 66%, #000); color: #fff; box-shadow: 0 8px 18px -10px var(--cat); }
.chip-x.is-active .ico, .chip-x.is-active small { color: rgba(255, 255, 255, .9); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .7rem; }
.select-pill { height: 36px; border-radius: 12px; border: 0; box-shadow: var(--ring); background-color: var(--surface); color: var(--ink-2); padding: 0 2rem 0 .9rem; font-size: .85rem; font-weight: 600;
  appearance: none; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-width='2' d='m4 6 4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right .7rem center; background-size: 12px; }
.toggle-pill { position: relative; display: inline-flex; cursor: pointer; }
.toggle-pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.toggle-pill span { display: inline-flex; align-items: center; gap: .4rem; height: 36px; padding: 0 .9rem; border-radius: 12px; box-shadow: var(--ring); background: var(--surface); font-size: .85rem; font-weight: 600; color: var(--ink-2); transition: all .2s; }
.toggle-pill input:checked + span { background: var(--ok-soft); box-shadow: 0 0 0 1px color-mix(in oklch, var(--ok) 45%, transparent); color: var(--ok-ink); }
.toggle-pill input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.result-count { margin: 0 0 0 auto; font-size: .84rem; color: var(--ink-3); }
.result-count strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* promo banner (home, config HOME_BANNER) */
.promo { position: relative; display: grid; grid-template-columns: auto 1fr; gap: .4rem .9rem; align-items: center; margin: .9rem 0 .4rem; padding: 1rem 1rem 1rem .9rem;
  border-radius: var(--r-lg); text-decoration: none; color: var(--ink); overflow: hidden; isolation: isolate;
  background: linear-gradient(120deg, rgba(232, 180, 0, .2), rgba(255, 255, 255, .9) 55%), var(--surface);
  box-shadow: 0 0 0 1px rgba(232, 180, 0, .45), var(--sh-2); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.promo::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; z-index: -1;
  background: radial-gradient(rgba(200, 16, 46, .12), transparent 70%); transition: transform .6s var(--ease); }
.promo:hover { color: var(--ink); text-decoration: none; transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(232, 180, 0, .7), var(--sh-3); }
.promo:hover::after { transform: scale(1.4); }
.promo-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; font-size: 1.35rem; color: #fff; background: var(--grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 2px var(--gold), 0 10px 20px -10px var(--glow); }
.promo-body { display: grid; gap: .1rem; min-width: 0; }
.promo-label { justify-self: start; padding: .1rem .5rem; border-radius: 6px; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: var(--gold); color: var(--ink); }
.promo-title { font-size: 1.02rem; font-weight: 680; letter-spacing: -.02em; line-height: 1.25; }
.promo-text { font-size: .84rem; color: var(--ink-2); }
.promo-cta { grid-column: 2; display: inline-flex; align-items: center; gap: .35rem; font-size: .86rem; font-weight: 650; color: var(--brand-ink); }
.promo:hover .promo-cta .ico { transform: translateX(3px); }
.promo-cta .ico { transition: transform .3s var(--ease); }

/* cards */
.cards { display: grid; gap: .6rem; margin-top: .5rem; }
.cards-row { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.fcard { border-radius: var(--r-lg); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.fcard:hover, .fcard.is-hot { transform: translateY(-2px); box-shadow: 0 0 0 1px color-mix(in oklch, var(--cat, var(--brand)) 35%, transparent), var(--sh-3); }
.fcard-link { display: grid; grid-template-columns: 88px 1fr; gap: .9rem; padding: .65rem; color: inherit; text-decoration: none; }
.fcard-link:hover { color: inherit; text-decoration: none; }
.fcard-media { --cat: var(--brand); position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden;
  background: radial-gradient(120% 90% at 20% 10%, color-mix(in oklch, var(--cat) 26%, var(--surface)), color-mix(in oklch, var(--cat) 8%, var(--surface))); }
.fcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.fcard:hover .fcard-media img { transform: scale(1.06); }
.fcard-ph { display: grid; place-items: center; height: 100%; font-size: 1.9rem; color: color-mix(in oklch, var(--cat) 80%, var(--mix)); }
.fcard-body { min-width: 0; display: flex; flex-direction: column; }
.fcard-title { font-size: 1rem; font-weight: 650; margin: .1rem 0 .1rem; line-height: 1.25; letter-spacing: -.02em; }
.fcard-meta { margin: 0; font-size: .78rem; color: var(--ink-3); font-weight: 500; }
.fcard-desc { margin: .25rem 0 .45rem; font-size: .84rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fcard-foot { display: flex; align-items: center; gap: .6rem; margin-top: auto; flex-wrap: wrap; }
.cards-row .fcard-link { grid-template-columns: 1fr; padding: .55rem .55rem .9rem; }
.cards-row .fcard-media { aspect-ratio: 16 / 10; border-radius: 18px; }
.cards-row .fcard-body { padding-inline: .35rem; }
.openpill { display: inline-flex; align-items: center; gap: .4rem; font-size: .76rem; font-weight: 650; color: var(--ink-3); }
.openpill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.openpill.is-open { color: var(--ok-ink); }
.openpill.is-open::before { background: var(--ok); animation: pulse-ring 1.8s infinite; }
.openpill.is-closed { color: var(--danger-ink); }
.openpill.is-closed::before { background: var(--danger); }
.empty { display: grid; justify-items: center; gap: .5rem; padding: 2.5rem 1rem; text-align: center; color: var(--ink-3); }
.empty > .ico { font-size: 2rem; color: var(--brand); opacity: .6; }
.faq { margin-top: 2rem; }
.faq-item { border-bottom: 1px solid var(--line); padding: .25rem 0; }
.faq-item summary { cursor: pointer; list-style: none; padding: .8rem 2rem .8rem 0; font-weight: 600; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: .25rem; top: .5rem; font-size: 1.3rem; color: var(--brand-ink); transition: transform .35s var(--ease); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0 0 .9rem; color: var(--ink-2); animation: vt-in .35s var(--ease); }
.faq-wide { max-width: 820px; }

/* map UI */
.map-tools { position: absolute; right: var(--gap); top: calc(var(--topbar-h) + var(--gap)); z-index: 500; display: grid; gap: 4px; padding: 4px; border-radius: 18px;
  background: var(--glass-strong); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: var(--sh-2); }
.map-card .map-tools { top: var(--gap); }
.fab { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; transition: transform .25s var(--spring), color .2s, background .2s; }
.fab:hover { transform: scale(1.06); color: var(--brand-ink); background: var(--soft); }
.fab[aria-pressed="false"] { opacity: .55; }
.pin { --c: var(--brand); position: relative; width: 40px; height: 50px; animation: pop .6s var(--spring) both; animation-delay: var(--d, 0ms); }
.pin-body { position: absolute; left: 2px; top: 2px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 13px;
  background: linear-gradient(160deg, color-mix(in oklch, var(--c) 82%, #fff), var(--c) 60%, color-mix(in oklch, var(--c) 80%, #000));
  box-shadow: 0 0 0 2.5px #fff, 0 10px 18px -6px color-mix(in oklch, var(--c) 70%, #000); transition: transform .35s var(--spring); }
.pin-body::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #fff; }
.pin-body svg { width: 17px; height: 17px; fill: #fff; }
.pin.is-closed .pin-body { filter: saturate(.2) brightness(1.05); opacity: .85; }
.pin:hover .pin-body, .pin.is-hot .pin-body { transform: translateY(-3px) scale(1.14); }
.pin.is-hot { z-index: 1000 !important; }
.pin.is-hot .pin-body { box-shadow: 0 0 0 2.5px #fff, 0 0 0 8px color-mix(in oklch, var(--c) 30%, transparent), 0 14px 24px -8px color-mix(in oklch, var(--c) 70%, #000); }
.cluster { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 15px; background: var(--grad); color: var(--on-grad); font-weight: 700; font-size: .92rem; font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 2.5px #fff, 0 0 0 8px color-mix(in oklch, var(--brand) 22%, transparent), 0 12px 22px -8px var(--glow); animation: pop .5s var(--spring) both; }
.mpop { --c: var(--brand); display: block; }
.mpop-media { position: relative; display: grid; place-items: center; height: 112px; overflow: hidden; color: rgba(255, 255, 255, .92); font-size: 2.6rem;
  background: radial-gradient(120% 120% at 15% 10%, color-mix(in oklch, var(--c) 70%, #fff), color-mix(in oklch, var(--c) 85%, #000)); }
.mpop-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mpop-media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(transparent, rgba(0, 0, 0, .18)); }
.mpop-b { display: grid; gap: .3rem; padding: .85rem 1rem 1rem; }
.mpop-cat { justify-self: start; display: inline-flex; align-items: center; gap: .3rem; max-width: 100%; padding: .2rem .55rem; border-radius: 8px;
  font-size: .72rem; font-weight: 650; background: color-mix(in oklch, var(--c) 12%, #fff); color: color-mix(in oklch, var(--c) 58%, #000);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mpop-cat .ico { flex-shrink: 0; }
.mpop-addr { display: flex; align-items: flex-start; gap: .35rem; font-size: .8rem; color: var(--ink-3); }
.mpop-addr .ico { margin-top: .15rem; color: var(--brand-ink); }
.mpop-actions { display: flex; gap: .4rem; margin-top: .45rem; }

/* map consent gate: shown inside every map container until the visitor turns the map on */
.map-consent { position: absolute; inset: 0; z-index: 800; display: grid; place-items: center; padding: 1rem; overflow: auto;
  background:
    radial-gradient(60% 60% at 30% 30%, color-mix(in oklch, var(--brand) 9%, transparent), transparent 70%),
    radial-gradient(50% 60% at 75% 70%, color-mix(in oklch, var(--brand-3) 8%, transparent), transparent 70%),
    repeating-linear-gradient(0deg, transparent 0 39px, var(--line) 39px 40px), repeating-linear-gradient(90deg, transparent 0 39px, var(--line) 39px 40px),
    var(--map-bg); }
html.map-ok .map-consent { display: none; }
.map-consent-card { width: min(420px, 100%); padding: 1.4rem 1.4rem 1.2rem; border-radius: var(--r-xl); background: var(--glass-strong); text-align: left;
  backdrop-filter: blur(20px) saturate(170%); -webkit-backdrop-filter: blur(20px) saturate(170%); box-shadow: var(--sh-3); }
.map-consent-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--grad); color: var(--on-grad); font-size: 1.2rem; margin-bottom: .8rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 10px 20px -10px var(--glow); }
.map-consent-h { margin: 0 0 .35rem; font-weight: 680; font-size: 1.08rem; letter-spacing: -.025em; color: var(--ink); }
.map-consent-t { margin: 0 0 1rem; font-size: .86rem; color: var(--ink-2); line-height: 1.5; }
.map-consent-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.map-consent-remember { display: inline-flex; align-items: center; gap: .45rem; font-size: .84rem; color: var(--ink-2); cursor: pointer; min-height: 32px; }
.map-consent-remember input { width: 18px; height: 18px; accent-color: var(--brand); }
.map-consent-more { margin: .8rem 0 0; font-size: .8rem; }
.map-consent-nojs { display: none; margin: .6rem 0 0; font-size: .8rem; color: var(--ink-3); }
@media (scripting: none) { .map-consent-actions { display: none; } .map-consent-nojs { display: block; } }
.map-consent-compact .map-consent-card { padding: 1rem; border-radius: var(--r-lg); }
.map-consent-compact .map-consent-ico { display: none; }
.map-consent-compact { padding: .6rem; }
.map-consent-compact .map-consent-h { font-size: .95rem; }
.map-consent-compact .map-consent-t { font-size: .8rem; margin-bottom: .7rem; }
.map-consent-compact .map-consent-more { margin-top: .5rem; }
/* explorer: keep the card in the part of the map that is not covered by the panel / sheet / top bar */
.map-consent-explorer { padding: calc(var(--topbar-h) + var(--gap)) 1.5rem 1.5rem calc(clamp(380px, 34vw, 450px) + 2 * var(--gap) + 1.5rem); }
html.map-ask .page-explorer .map-tools, html:not(.map-ok) .map-tools { display: none; }
html.map-ask .leaflet-control-container { display: none; }

/* mobile: map full screen behind, panel as draggable bottom sheet that slides under the tab bar */
@media (max-width: 860px) {
  .explorer { height: auto; }
  .explorer-map { position: fixed; inset: 0; }
  .map-tools { top: calc(var(--topbar-h) + var(--gap)); right: var(--gap); }
  .explorer-panel {
    --sheet: 42dvh; position: fixed; left: 0; right: 0; top: auto; bottom: 0; width: auto; height: calc(var(--sheet) + var(--tabbar-h));
    max-height: calc(100dvh - var(--topbar-h) - 6px); border-radius: 28px 28px 0 0; padding: 1.6rem 1.1rem calc(var(--tabbar-h) + 1rem);
    transition: height .45s var(--ease); z-index: 900; touch-action: pan-y; box-shadow: 0 -1px 0 var(--line), 0 -18px 50px -18px rgba(0, 0, 0, .35);
  }
  .explorer-panel.is-dragging { transition: none; }
  .explorer-panel.is-full { --sheet: 100dvh; }
  .explorer-panel.is-mini { --sheet: 132px; }
  .sheet-handle { display: grid; place-items: center; position: sticky; top: -1.6rem; z-index: 5; width: calc(100% + 2.2rem); height: 28px; margin: -1.6rem -1.1rem 0; cursor: grab; touch-action: none; border: 0; background: transparent; padding: 0; }
  .sheet-handle span { width: 40px; height: 5px; border-radius: 99px; background: var(--line-2); }
  .panel-head { position: static; margin: 0; padding: 0 0 .5rem; background: none; }
  .panel-title { font-size: 1.4rem; }
  .panel-intro { display: none; }
  .map-consent-explorer { place-items: start center; padding: calc(var(--topbar-h) + var(--gap)) .75rem calc(42dvh + var(--tabbar-h)); }
  .map-consent-explorer .map-consent-card { padding: 1rem 1.1rem; }
  .map-consent-explorer .map-consent-ico { display: none; }
  .map-consent-explorer .map-consent-t { font-size: .8rem; margin-bottom: .7rem; }
}

/* ---------- generic page bits ---------- */
.main:not(.main-home):not(.main-category):not(.main-district):not(.main-search) { padding-top: .5rem; }
.page-hero { margin: 1.5rem 0 2.2rem; max-width: 780px; }
.page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); line-height: 1.02; letter-spacing: -.05em; margin: 0 0 .7rem; font-weight: 700; }
.lead-sm { font-size: 1.08rem; color: var(--ink-2); }
.hero-x { margin: 2rem 0 3rem; max-width: 860px; }
.hero-x h1 { font-size: clamp(2.6rem, 7vw, 4.9rem); line-height: .98; letter-spacing: -.055em; margin: .2rem 0 1rem; font-weight: 720; }
.crumbs .breadcrumb { font-size: .82rem; margin-bottom: .6rem; }
.crumbs .breadcrumb-link { min-height: 28px; padding: 0 .1rem; color: var(--ink-3); }
.crumbs .breadcrumb-link.active { color: var(--ink); font-weight: 600; }
.crumbs .breadcrumb-divider { color: var(--line-2); margin-inline: .35rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.tile { --cat: var(--brand); display: grid; gap: .35rem; padding: 1.4rem 1.4rem 1.5rem; border-radius: var(--r-lg); text-decoration: none; color: var(--ink); overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.tile::before { content: ""; position: absolute; inset: auto -30% -55% auto; width: 240px; height: 240px; border-radius: 50%; z-index: -1;
  background: radial-gradient(color-mix(in oklch, var(--cat) 22%, transparent), transparent 68%); transition: transform .7s var(--ease); }
.tile:hover { color: var(--ink); text-decoration: none; transform: translateY(-4px); box-shadow: 0 0 0 1px color-mix(in oklch, var(--cat) 40%, transparent), var(--sh-3); }
.tile:hover::before { transform: scale(1.35) translate(-10%, -10%); }
.tile-ico { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; font-size: 1.35rem; color: #fff;
  background: linear-gradient(150deg, color-mix(in oklch, var(--cat) 78%, #fff), color-mix(in oklch, var(--cat) 82%, #000));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 10px 20px -10px var(--cat); transition: transform .5s var(--spring); }
.tile:hover .tile-ico { transform: rotate(-6deg) scale(1.06); }
.tile-name { position: relative; font-weight: 650; font-size: 1.12rem; letter-spacing: -.025em; margin-top: .6rem; }
.tile-n { position: relative; font-size: .8rem; font-weight: 650; color: color-mix(in oklch, var(--cat) 62%, var(--mix)); font-variant-numeric: tabular-nums; }
.tile-intro { position: relative; font-size: .86rem; color: var(--ink-3); }
.tile-arrow { position: absolute; right: 1.1rem; top: 1.2rem; box-sizing: content-box; width: 14px; height: 14px; padding: 9px; border-radius: 50%; background: var(--surface-2); color: var(--ink-3);
  transition: transform .35s var(--ease), color .3s, background .3s; }
.tile:hover .tile-arrow { transform: rotate(45deg); color: #fff; background: var(--ink); }
.districts-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.25rem; align-items: start; }
.map-card { position: relative; height: 580px; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-2); }
.dlist { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; max-height: 580px; overflow: auto; padding: 2px; }
.dlist a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .1rem .5rem; padding: .8rem 1rem; border-radius: 16px; text-decoration: none; color: var(--ink); transition: all .3s var(--ease); }
.dlist a:hover, .dlist a.is-hot { box-shadow: 0 0 0 1px color-mix(in oklch, var(--brand) 40%, transparent), var(--sh-2); transform: translateX(3px); text-decoration: none; color: var(--ink); }
.dlist-name { font-weight: 650; } .dlist-meta { grid-column: 1; font-size: .78rem; color: var(--ink-3); } .dlist .ico { grid-row: 1 / 3; grid-column: 2; color: var(--ink-3); }
@media (max-width: 900px) { .districts-layout { grid-template-columns: 1fr; } .map-card { height: 380px; } }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; margin-bottom: 3rem; }
.feature { padding: 1.5rem; border-radius: var(--r-lg); overflow: hidden; }
.feature:first-child { grid-column: span 2; background: linear-gradient(140deg, color-mix(in oklch, var(--brand) 10%, var(--surface)), var(--surface) 60%); }
@media (max-width: 600px) { .feature:first-child { grid-column: auto; } }
.feature-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: var(--grad); color: var(--on-grad); font-size: 1.2rem; margin-bottom: .9rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 10px 20px -10px var(--glow); }
.feature h2 { letter-spacing: -.025em; }
.feature p { color: var(--ink-3); font-size: .9rem; margin: 0; }
.steps ol { list-style: none; counter-reset: s; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.steps li { counter-increment: s; position: relative; padding: 1.3rem 1.3rem 1.3rem 4.1rem; border-radius: var(--r-lg); display: grid; }
.steps li::before { content: counter(s); position: absolute; left: 1.1rem; top: 1.15rem; width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-weight: 700; }
.steps span { color: var(--ink-3); font-size: .9rem; }
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin: 0 0 2rem; }
.numbers div { padding: 1.3rem 1.1rem; border-radius: var(--r-lg); text-align: left; }
.numbers strong { display: block; font-size: 2.6rem; font-weight: 720; letter-spacing: -.06em; line-height: 1; font-variant-numeric: tabular-nums; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.numbers span { display: block; margin-top: .35rem; font-size: .8rem; color: var(--ink-3); font-weight: 600; }
@media (max-width: 600px) { .numbers { grid-template-columns: repeat(2, 1fr); } }
.prose-x { line-height: 1.72; color: var(--ink-2); }
.prose-x h2 { font-size: 1.35rem; margin: 2.2rem 0 .6rem; }
.card-x { padding: 1.6rem; border-radius: var(--r-lg); box-shadow: var(--sh-2); }
.card-soft { background: var(--glass) !important; box-shadow: var(--ring) !important; }
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
.success-x { text-align: center; padding: 2rem 1rem; } .success-x > .ico { font-size: 2.6rem; color: var(--ok); animation: pop .6s var(--spring); }
.big-404 { font-size: clamp(5rem, 18vw, 10rem); font-weight: 800; letter-spacing: -.07em; line-height: 1; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; margin-top: 2rem; }
.form-control { border-radius: 13px; border-color: var(--line-2); min-height: 44px; transition: border-color .2s, box-shadow .2s; }
.form-control:focus { border-color: color-mix(in oklch, var(--brand) 60%, transparent); box-shadow: 0 0 0 5px var(--soft); }
.form-control-sm { min-height: 34px; border-radius: 10px; }
.form-label { font-weight: 600; font-size: .86rem; color: var(--ink-2); }
.table { --bs-table-bg: transparent; --bs-table-color: var(--ink); --bs-table-border-color: var(--line); color: var(--ink); }

/* ---------- business profile ---------- */
.page-firm .main { padding-bottom: 3rem; }
.banner { display: flex; align-items: center; gap: .5rem; justify-content: center; padding: .6rem 1rem; margin: .5rem auto 0; width: min(1240px, 100% - 2rem); border-radius: 14px; font-size: .9rem; font-weight: 600; }
.banner-warn { background: var(--warn-soft); color: var(--warn-ink); }
.firm-hero { position: relative; margin-top: .75rem; }
.firm-cover { position: relative; height: clamp(190px, 28vw, 340px); overflow: hidden; border-radius: var(--r-xl); box-shadow: var(--ring);
  background:
    radial-gradient(60% 90% at 12% 18%, color-mix(in oklch, var(--cat) 55%, transparent), transparent 70%),
    radial-gradient(50% 80% at 88% 30%, color-mix(in oklch, var(--brand-3) 38%, transparent), transparent 70%),
    radial-gradient(70% 90% at 60% 110%, color-mix(in oklch, var(--brand) 40%, transparent), transparent 70%),
    color-mix(in oklch, var(--cat) 18%, var(--surface)); }
.firm-cover img { width: 100%; height: 100%; object-fit: cover; animation: cover-in 1.4s var(--ease) both; }
@keyframes cover-in { from { transform: scale(1.08); filter: blur(8px); } }
.firm-cover-ph { height: 100%; display: grid; place-items: center; font-size: clamp(4rem, 9vw, 7rem); color: rgba(255, 255, 255, .85); filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .18)); }
.firm-cover-ph .ico { animation: float 10s ease-in-out infinite; }
.firm-head { position: relative; margin: -72px 1rem 0; padding: 1.25rem 1.5rem 1.4rem; border-radius: var(--r-xl); background: var(--glass-strong);
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); box-shadow: var(--sh-3); }
.firm-id { display: flex; gap: 1.2rem; align-items: center; }
.firm-logo { flex-shrink: 0; width: 92px; height: 92px; border-radius: 26px; overflow: hidden; display: grid; place-items: center; font-size: 2.3rem; color: #fff;
  background: linear-gradient(150deg, color-mix(in oklch, var(--cat) 78%, #fff), color-mix(in oklch, var(--cat) 82%, #000));
  box-shadow: 0 0 0 4px var(--surface), 0 16px 30px -14px var(--cat); animation: pop .7s var(--spring) both .1s; }
.firm-logo img { width: 100%; height: 100%; object-fit: cover; background: var(--surface); }
.firm-titles h1 { font-size: clamp(1.8rem, 3.8vw, 2.9rem); margin: 0 0 .45rem; line-height: 1.02; letter-spacing: -.05em; font-weight: 700; }
.firm-sub { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 .55rem; }
.tag { --cat: var(--brand); display: inline-flex; align-items: center; gap: .3rem; padding: .24rem .65rem; border-radius: 9px; font-size: .78rem; font-weight: 650; text-decoration: none;
  background: color-mix(in oklch, var(--cat) 12%, var(--surface)); color: color-mix(in oklch, var(--cat) 58%, var(--mix)); }
.tag:hover { text-decoration: none; color: color-mix(in oklch, var(--cat) 58%, var(--mix)); box-shadow: 0 0 0 1px color-mix(in oklch, var(--cat) 35%, transparent); }
.tag-ghost { background: var(--surface-2); color: var(--ink-2); box-shadow: var(--ring); }
.tag-ghost:hover { color: var(--ink); }
.firm-status { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.actions { display: flex; gap: .5rem; margin-top: 1.2rem; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.action { display: inline-flex; align-items: center; gap: .5rem; min-height: 46px; padding: 0 1.1rem; border-radius: 15px; border: 0; background: var(--surface); box-shadow: var(--ring); color: var(--brand-ink);
  font-size: .9rem; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .3s var(--spring), box-shadow .3s; }
.action .ico { font-size: 1.1rem; }
.action span { color: var(--ink); }
.action:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--line-2), var(--sh-2); color: var(--brand-ink); text-decoration: none; }
.action-primary { background: var(--grad); color: var(--on-grad); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 10px 24px -12px var(--glow); }
.action-primary span, .action-primary:hover { color: var(--on-grad); }
.firm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 1rem; margin-top: 1rem; align-items: start; }
@media (max-width: 960px) { .firm-grid { grid-template-columns: minmax(0, 1fr); } .firm-side { order: -1; } }
.firm-main, .firm-side { min-width: 0; }
@media (max-width: 600px) {
  .firm-cover { border-radius: 24px; }
  .firm-head { margin: -48px .5rem 0; padding: 1rem; border-radius: 24px; }
  .firm-id { align-items: flex-start; gap: .9rem; }
  .firm-logo { width: 64px; height: 64px; border-radius: 19px; font-size: 1.6rem; }
}
.block { padding: 1.5rem; border-radius: var(--r-lg); margin-bottom: 1rem; }
.block h2 { font-size: 1.22rem; margin: 0 0 .9rem; letter-spacing: -.03em; }
.block-sticky { position: sticky; top: calc(var(--topbar-h) + 1rem); }
.side-h { display: flex; align-items: center; gap: .45rem; font-size: .92rem; margin: 1.3rem 0 .6rem; color: var(--ink-2); }
.info-list, .amenities, .special { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.info-list li { display: grid; grid-template-columns: 20px 1fr; gap: .6rem; align-items: start; font-size: .92rem; word-break: break-word; }
.info-list .ico { color: var(--brand-ink); margin-top: .2rem; }
.hours { width: 100%; font-size: .88rem; border-collapse: separate; border-spacing: 0; }
.hours th { font-weight: 500; color: var(--ink-3); padding: .36rem .55rem; }
.hours td { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; padding: .36rem .55rem; }
.hours tr.is-today th, .hours tr.is-today td { color: var(--brand-ink); font-weight: 700; background: var(--soft); }
.hours tr.is-today th { border-radius: 10px 0 0 10px; } .hours tr.is-today td { border-radius: 0 10px 10px 0; }
.special li { display: flex; justify-content: space-between; gap: .5rem; font-size: .85rem; }
.amenities { grid-template-columns: 1fr 1fr; }
.amenities li { display: flex; align-items: center; gap: .45rem; font-size: .85rem; color: var(--ink-2); }
.amenities .ico { color: var(--ok-ink); }
.mini-map { position: relative; z-index: 0; height: 230px; border-radius: 18px; overflow: hidden; box-shadow: var(--ring); }
.posts { display: grid; gap: .8rem; }
.post { display: grid; grid-template-columns: 140px 1fr; gap: 1rem; padding: .9rem; border-radius: 18px; background: var(--surface-2); }
.post:not(:has(img)) { grid-template-columns: 1fr; }
.post img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.post h3 { font-size: 1.02rem; margin: .45rem 0 .25rem; }
.post p { font-size: .9rem; color: var(--ink-2); margin-bottom: .4rem; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.block-head h2 small { font-size: .7em; font-weight: 600; margin-left: .2rem; }
.chips-tight { padding: .1rem .1rem .8rem; }
button.chip-x { border: 0; font-family: inherit; cursor: pointer; }
.chip-x[aria-pressed="true"] { background: color-mix(in oklch, var(--cat) 66%, #000); color: #fff; box-shadow: 0 8px 18px -10px var(--cat); }
.chip-x[aria-pressed="true"] .ico, .chip-x[aria-pressed="true"] small { color: rgba(255, 255, 255, .9); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.gallery-item { position: relative; display: block; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-2); }
.gallery-item[hidden] { display: none; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.gallery-item:hover img { transform: scale(1.07); }
/* mosaic like Google Business: one big photo + four small, "+N" on the last tile */
.gallery.is-mosaic { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: .35rem; border-radius: 26px; overflow: hidden;
  box-shadow: 0 30px 60px -40px color-mix(in oklch, var(--red) 55%, transparent); }
.gallery.is-mosaic .gallery-item { border-radius: 6px; }
.gallery.is-mosaic .gallery-item::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .35s var(--ease);
  background: linear-gradient(180deg, transparent 55%, rgba(20, 6, 8, .55)); }
.gallery.is-mosaic .gallery-item:hover::before, .gallery.is-mosaic .gallery-item:focus-visible::before { opacity: 1; }
.gallery-tag { position: absolute; left: .6rem; bottom: .6rem; z-index: 2; display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem; border-radius: 999px;
  font-size: .72rem; font-weight: 600; color: #fff; background: rgba(28, 8, 12, .42); backdrop-filter: blur(10px) saturate(1.4); -webkit-backdrop-filter: blur(10px) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); opacity: 0; transform: translateY(6px); transition: all .35s var(--ease); pointer-events: none; }
.gallery-item:hover .gallery-tag, .gallery-item:focus-visible .gallery-tag, .gallery-item.is-lead .gallery-tag { opacity: 1; transform: none; }
.gallery-item.has-more .gallery-tag { display: none; }
.gallery.is-mosaic .is-lead { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.gallery.is-mosaic[data-n="1"] .is-lead { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 9; }
.gallery.is-mosaic[data-n="2"] .gallery-item { grid-column: span 2; grid-row: auto; aspect-ratio: 4 / 3; }
.gallery.is-mosaic[data-n="3"] .gallery-item:not(.is-lead) { grid-column: span 2; aspect-ratio: auto; }
.gallery.is-mosaic[data-n="3"] .is-lead { aspect-ratio: 4 / 3; }
.gallery-item.has-more::after { content: attr(data-more); position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; font-size: 1.8rem; font-weight: 700;
  color: #fff; background: rgba(40, 8, 14, .5); backdrop-filter: blur(6px) saturate(1.3); -webkit-backdrop-filter: blur(6px) saturate(1.3); letter-spacing: -.03em; transition: background .25s; }
.gallery-item.has-more:hover::after { background: rgba(20, 8, 10, .4); }
.gallery-item:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
@media (max-width: 600px) {
  .gallery.is-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 20px; }
  .gallery.is-mosaic .is-lead { grid-row: auto; aspect-ratio: 16 / 10; }
  .gallery.is-mosaic[data-n="3"] .gallery-item:not(.is-lead) { grid-column: auto; aspect-ratio: 4 / 3; }
}
.avatar-x { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; background: var(--grad); color: var(--on-grad); font-weight: 700; flex-shrink: 0; }
.block-similar { margin-top: 1.5rem; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100dvh; width: 100vw; height: 100dvh; overflow: hidden; color: #fff; }
.lightbox::backdrop { background: rgba(10, 4, 6, .92); backdrop-filter: blur(14px); }
:root:has(.lightbox[open]) { overflow: hidden; }       /* scroll lock; firm.js also drops the scrollbar gutter while the viewer is open */
.lb-amb { position: fixed; inset: -10%; background: center / cover no-repeat; filter: blur(60px) saturate(1.5) brightness(.55); opacity: .75; transition: background-image .4s; pointer-events: none; }
.lightbox figure { position: relative; margin: 0; height: 100%; display: grid; place-items: center; align-content: center; gap: .7rem; padding: 4.2rem 4.5rem 7.2rem; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 13rem); border-radius: 22px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8); animation: lbin .45s var(--ease); }
@keyframes lbin { from { opacity: 0; transform: scale(.96); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.lightbox figcaption { color: #f1f5f9; text-align: center; display: grid; gap: .15rem; max-width: 60ch; }
.lb-cap:empty { display: none; }
.lb-meta { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); padding: .45rem 1rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
  font-variant-numeric: tabular-nums; background: rgba(255, 255, 255, .12); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.lb-close, .lb-nav { position: fixed; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; border: 0; color: #fff; cursor: pointer; font-size: 1.2rem;
  background: rgba(255, 255, 255, .12); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); transition: background .2s, transform .2s var(--spring); }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .24); transform: scale(1.06); }
.lb-close:focus-visible, .lb-nav:focus-visible, .lb-strip button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.lb-close { top: 16px; right: 16px; } .lb-prev { left: 16px; top: 50%; } .lb-next { right: 16px; top: 50%; }
.lb-strip { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 2; display: flex; gap: .4rem; max-width: calc(100vw - 32px); overflow-x: auto; padding: .4rem;
  border-radius: 20px; background: rgba(255, 255, 255, .1); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); scrollbar-width: none; }
.lb-strip::-webkit-scrollbar { display: none; }
.lb-strip button { flex-shrink: 0; width: 64px; height: 48px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: pointer; opacity: .5; background: #000; transition: opacity .2s, transform .25s var(--spring); }
.lb-strip button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-strip button:hover { opacity: .85; }
.lb-strip button[aria-current="true"] { opacity: 1; transform: translateY(-3px); box-shadow: 0 0 0 2px var(--gold); }
@media (max-width: 600px) {
  .lightbox figure { padding: 4.2rem .75rem 6.6rem; }
  .lb-nav { top: auto; bottom: 86px; width: 42px; height: 42px; }
  .lb-strip button { width: 52px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) { .lightbox img { animation: none; } .lb-amb { transition: none; } }

/* ---------- footer (floating card) & toasts ---------- */
.site-footer { margin: 3rem var(--gap) var(--gap); padding: 3rem 0 2rem; border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--sh-1); }
@media (max-width: 860px) { .site-footer { margin-bottom: 1rem; } }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 2rem; }
.footer-grid nav { display: grid; gap: .45rem; align-content: start; }
.footer-grid nav a, .footer-bottom a { color: var(--ink-2); text-decoration: none; font-size: .9rem; }
.footer-grid nav a:hover, .footer-bottom a:hover { color: var(--brand-ink); text-decoration: underline; }
.footer-h { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin-bottom: .4rem; font-weight: 650; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--ink-3); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.toasts { position: fixed; top: calc(var(--topbar-h) + 12px); left: 50%; transform: translateX(-50%); z-index: 3000; display: grid; gap: .5rem; pointer-events: none; width: min(520px, 92vw); }
.toast-pill { display: flex; align-items: center; gap: .6rem; padding: .75rem .8rem .75rem 1rem; border-radius: 18px; background: rgba(10, 13, 22, .92); color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 24px 48px -20px rgba(0, 0, 0, .6); backdrop-filter: blur(14px); font-size: .9rem; font-weight: 500; animation: toast-in .55s var(--spring) both; pointer-events: auto; }
.toast-pill .ico { color: #4ade80; font-size: 1.1rem; }
.toast-error .ico { color: #fda4af; }
.toast-pill.is-out { animation: toast-out .4s var(--ease) forwards; }
.toast-close { margin-left: auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-16px) scale(.94); filter: blur(4px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-12px) scale(.96); } }

/* ---------- offline ---------- */
.offline { min-height: 100dvh; display: grid; place-items: center; padding: 2rem; }
.offline-card { max-width: 440px; text-align: center; padding: 2.5rem 2rem; border-radius: var(--r-xl); box-shadow: var(--sh-3) !important; }
.offline-ico { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; background: var(--soft); color: var(--brand-ink); font-size: 2rem; margin-bottom: 1rem; }

/* =============================== DASHBOARD =============================== */
.dash { background: var(--bg); }
.dash-shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100dvh; }
.dash-side { position: sticky; top: 0; height: 100dvh; padding: var(--gap); z-index: 1200; display: flex; flex-direction: column; }
.dash-side > * { position: relative; }
.dash-side::before { content: ""; position: absolute; inset: var(--gap); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--sh-2);
  background-image: var(--flag); background-size: 72px 3px; background-repeat: no-repeat; background-position: 1.6rem 0; }
.dash-side { gap: 1.4rem; padding: calc(var(--gap) + 1.1rem) calc(var(--gap) + .75rem); color: var(--ink-2); }
.dash-side .brand, .dash-side .brand:hover { color: var(--ink); }
.dash-nav { display: grid; gap: 2px; }
.dash-nav a, .dash-site, .dash-logout { display: flex; align-items: center; gap: .75rem; min-height: 42px; padding: 0 .8rem; border-radius: 13px; color: var(--ink-2); text-decoration: none;
  font-weight: 550; font-size: .92rem; border: 0; background: none; width: 100%; cursor: pointer; transition: background .2s, color .2s, transform .25s var(--ease); }
.dash-nav a .ico, .dash-site .ico, .dash-logout .ico { font-size: 1.1rem; }
.dash-nav a:hover, .dash-site:hover, .dash-logout:hover { background: var(--surface-2); color: var(--ink); transform: translateX(2px); text-decoration: none; }
.dash-nav a.is-active { background: var(--soft); color: var(--brand-ink); box-shadow: inset 3px 0 0 var(--red); }
.dash-nav a.is-active .ico { color: var(--red); }
.count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 8px; background: var(--brand); color: #fff; font-size: .72rem; display: inline-grid; place-items: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.dash-side-foot { margin-top: auto; display: grid; gap: 2px; }
.dash-main { min-width: 0; }
.dash-top { position: sticky; top: 0; z-index: 900; display: flex; align-items: center; justify-content: flex-end; gap: 1rem; height: 64px; margin: var(--gap) var(--gap) 0 0; padding: 0 1rem;
  border-radius: 20px; background: var(--glass); backdrop-filter: blur(20px) saturate(170%); -webkit-backdrop-filter: blur(20px) saturate(170%); box-shadow: var(--sh-1); }
.dash-burger { display: none; width: 42px; height: 42px; border-radius: 13px; border: 0; box-shadow: var(--ring); background: var(--surface); color: var(--ink); margin-right: auto; font-size: 1.2rem; }
.dash-who { display: flex; align-items: center; gap: .6rem; }
.dash-who strong { display: block; font-size: .88rem; } .dash-who small { display: block; font-size: .74rem; color: var(--ink-3); }
.dash-content { padding: 1.75rem 1.5rem 4rem .5rem; max-width: 1300px; }
.dash-content .toasts { top: 86px; }
.dash-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.dash-head h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0 0 .3rem; letter-spacing: -.05em; font-weight: 700; }
.dash-head p { margin: 0; }
.back { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--ink-3); margin-bottom: .35rem; }
.panel { padding: 1.4rem; border-radius: var(--r-lg); }
.panel-h { display: flex; align-items: center; gap: .5rem; font-size: 1.04rem; font-weight: 650; margin: 0 0 1rem; letter-spacing: -.025em; }
.panel-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.panel.narrow { max-width: 560px; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.panel-wide { grid-column: 1 / -1; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.kpi { display: grid; gap: .3rem; padding: 1.15rem 1.25rem 1.25rem; border-radius: var(--r-lg); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.kpi-label { display: flex; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 600; color: var(--ink-3); }
.kpi-label .ico { display: inline-grid; box-sizing: content-box; padding: 6px; border-radius: 9px; background: var(--soft); color: var(--brand-ink); }
.kpi-value { font-size: 2.3rem; font-weight: 700; letter-spacing: -.06em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi-diff { font-size: .76rem; font-weight: 650; } .kpi-diff.up { color: var(--ok-ink); } .kpi-diff.down { color: var(--danger-ink); }
.spark { width: 100%; height: 90px; display: block; overflow: visible; color: var(--brand); }
.spark-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s var(--ease) forwards .2s; }
.spark-axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--ink-3); margin-top: .3rem; }
.todo { list-style: none; padding: 0; margin: 0 0 .8rem; display: grid; gap: .4rem; }
.todo a { display: flex; align-items: center; gap: .6rem; padding: .75rem .85rem; border-radius: 14px; background: var(--surface-2); text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9rem; transition: background .2s, transform .25s var(--ease); }
.todo a:hover { background: var(--soft); transform: translateX(2px); color: var(--ink); text-decoration: none; }
.rows { list-style: none; padding: 0; margin: 0; display: grid; }
.rows > li > a, .row-x { display: flex; align-items: center; gap: .8rem; padding: .8rem .4rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); justify-content: space-between; border-radius: 10px; transition: background .2s; }
.rows > li > a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.rows > li:last-child > a, .rows > li:last-child.row-x { border-bottom: 0; }
.rows > li > a .ico { color: var(--ink-3); }
.rows > li > a strong { margin-right: auto; font-weight: 600; }
.state { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .6rem; border-radius: 8px; font-size: .74rem; font-weight: 650; white-space: nowrap; }
.state-approved { background: var(--ok-soft); color: var(--ok-ink); }
.state-pending { background: var(--warn-soft); color: var(--warn-ink); }
.state-rejected { background: var(--danger-soft); color: var(--danger-ink); }
.state-hidden { background: var(--surface-2); color: var(--ink-3); }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.toolbar .form-control { width: auto; min-width: 200px; }
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); }
.table-x { margin: 0; font-size: .9rem; }
.table-x th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 650; padding: .85rem 1rem; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.table-x td { padding: .75rem 1rem; vertical-align: middle; border-bottom: 1px solid var(--line); }
.table-x tr:last-child td { border-bottom: 0; }
.table-x tbody tr { transition: background .15s; }
.table-x tbody tr:hover { background: var(--surface-2); }
.firm-cell { display: flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; }
.thumb { width: 38px; height: 38px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--soft); color: var(--brand-ink); flex-shrink: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.table-diff del { color: var(--danger-ink); text-decoration: line-through; } .table-diff ins { color: var(--ok-ink); text-decoration: none; font-weight: 600; }
.tabs-x { display: flex; gap: 2px; padding: 4px; border-radius: 16px; background: var(--surface-2); box-shadow: var(--ring); margin-bottom: 1.25rem; overflow-x: auto; width: fit-content; max-width: 100%; }
.tabs-x a { display: inline-flex; align-items: center; gap: .35rem; padding: .5rem 1rem; border-radius: 12px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .9rem; white-space: nowrap; transition: all .25s var(--ease); }
.tabs-x a:hover { color: var(--ink); text-decoration: none; }
.tabs-x a small { font-size: .72rem; color: var(--ink-3); }
.tabs-x a.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-2); }
.alert-x { display: flex; gap: .7rem; align-items: flex-start; padding: .95rem 1rem; border-radius: 16px; margin-bottom: 1rem; font-size: .92rem; }
.alert-x > .ico { margin-top: .15rem; font-size: 1.1rem; }
.alert-x-danger { background: var(--danger-soft); color: var(--danger-ink); }
.alert-x-info { background: var(--soft); color: var(--brand-ink); }
.edit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; align-items: start; }
.edit-side { display: grid; gap: 1rem; position: sticky; top: 92px; }
.edit-layout:not(:has(.edit-side)) { grid-template-columns: minmax(0, 980px); }
@media (max-width: 1100px) { .edit-layout { grid-template-columns: 1fr; } .edit-side { position: static; } }
.form-section { margin: 0 0 1rem; min-width: 0; }
.form-section legend { float: left; width: 100%; }
.form-section > *:not(legend) { clear: both; }
.grid-2, .grid-3 { display: grid; gap: .9rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-all { grid-column: 1 / -1; }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .span-2, .span-3 { grid-column: auto; } }
.chip-checks { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-check { position: relative; display: inline-flex; cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-check span { display: inline-flex; align-items: center; gap: .35rem; min-height: 34px; padding: 0 .8rem; border-radius: 11px; box-shadow: 0 0 0 1px var(--line-2); background: var(--surface); font-size: .84rem; font-weight: 600; color: var(--ink-2); transition: all .2s var(--ease); }
.chip-check input:checked + span { background: var(--soft); box-shadow: 0 0 0 1px color-mix(in oklch, var(--brand) 50%, transparent); color: var(--brand-ink); }
.chip-check input:checked + span::before { content: "✓"; font-weight: 800; }
.chip-check input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.picker-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin: 1rem 0 .5rem; }
.picker { position: relative; z-index: 0; height: 340px; border-radius: 18px; overflow: hidden; box-shadow: var(--ring); }
.hours-edit { display: grid; gap: .35rem; }
.hrow { display: grid; grid-template-columns: 170px 1fr auto; align-items: center; gap: .6rem; padding: .45rem .6rem; border-radius: 13px; transition: background .2s; }
.hrow:hover { background: var(--surface-2); }
.hrow-day { display: flex !important; align-items: center; gap: .6rem; margin: 0; }
.hrow-ranges { display: grid; gap: .35rem; }
.hrange { display: flex; align-items: center; gap: .4rem; }
.hrange .form-control { width: 120px; min-height: 38px; }
.hrow-closed { display: none; color: var(--ink-3); font-size: .85rem; }
.hrow.is-closed .hrow-ranges, .hrow.is-closed [data-range-add] { display: none; }
.hrow.is-closed .hrow-closed { display: inline; }
.hrange:only-child [data-range-remove] { visibility: hidden; }
@media (max-width: 640px) { .hrow { grid-template-columns: 1fr; } }
.srow { display: grid; grid-template-columns: 160px auto 110px 110px 1fr; gap: .4rem; align-items: center; margin-bottom: .4rem; }
@media (max-width: 760px) { .srow { grid-template-columns: 1fr 1fr; } }
.savebar { position: sticky; bottom: 12px; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem .8rem .7rem 1.2rem;
  border-radius: 20px; background: var(--glass-strong); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: var(--sh-3); }
.img-slot { display: grid; place-items: center; height: 160px; border-radius: 18px; background: var(--surface-2); color: var(--ink-3); font-size: 2rem; overflow: hidden; margin-bottom: .8rem; }
.img-slot img { width: 100%; height: 100%; object-fit: cover; }
.img-slot-logo { width: 160px; }
.dropzone { position: relative; display: grid; justify-items: center; gap: .4rem; padding: 2rem 1rem; border: 2px dashed color-mix(in oklch, var(--brand) 35%, transparent); border-radius: 20px; text-align: center; color: var(--ink-2);
  background: color-mix(in oklch, var(--brand) 4%, transparent); transition: all .25s var(--ease); margin-bottom: 1rem; }
.dropzone > .ico { font-size: 1.8rem; color: var(--brand-ink); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone.is-over { border-color: var(--brand); background: var(--soft); transform: scale(1.01); }
.uploader .dropzone { padding: 2.4rem 1rem; border: 0; border-radius: 24px; background:
  radial-gradient(120% 140% at 0% 0%, color-mix(in oklch, var(--gold) 16%, transparent), transparent 55%),
  radial-gradient(120% 140% at 100% 100%, color-mix(in oklch, var(--red) 10%, transparent), transparent 55%), var(--surface);
  box-shadow: inset 0 0 0 2px color-mix(in oklch, var(--red) 22%, transparent), 0 18px 40px -30px var(--red); }
.uploader .dropzone > .ico { width: 58px; height: 58px; padding: 15px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, var(--red), var(--brand-ink));
  box-shadow: 0 12px 26px -10px var(--red); transition: transform .35s var(--spring); }
.uploader .dropzone:hover > .ico, .uploader .dropzone.is-over > .ico { transform: translateY(-4px) rotate(-6deg); }
.uploader .dropzone.is-over { box-shadow: inset 0 0 0 2px var(--red), 0 24px 50px -28px var(--red); transform: scale(1.01); }
.uploader .dropzone:focus-within { box-shadow: inset 0 0 0 3px var(--brand), 0 0 0 4px color-mix(in oklch, var(--brand) 25%, transparent); }
input[type=file].form-control { padding: .35rem; border-radius: 14px; }
input[type=file].form-control::file-selector-button { margin-right: .8rem; padding: .45rem 1rem; border: 0; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer;
  color: #fff; background: linear-gradient(135deg, var(--red), var(--brand-ink)); transition: filter .2s; }
input[type=file].form-control:hover::file-selector-button { filter: brightness(1.1); }
.photo-tips { list-style: none; margin: .4rem 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem; }
.photo-tips li { display: flex; gap: .55rem; align-items: center; padding: .6rem .8rem; border-radius: 14px; background: color-mix(in oklch, var(--gold) 12%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--gold) 40%, transparent); font-size: .85rem; color: var(--ink-2); }
.photo-tips .ico { flex-shrink: 0; color: var(--brand-ink); font-size: 1.1rem; }
.uploader { margin-bottom: 1.2rem; }
.uploader-cat { max-width: 340px; margin-bottom: .7rem; }
.uploader.is-busy .dropzone { opacity: .6; pointer-events: none; }
.upload-queue { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: .4rem; }
.upload-queue:empty { display: none; }
.upload-queue li { display: grid; grid-template-columns: 44px minmax(0, 1fr) 120px auto; gap: .7rem; align-items: center; padding: .35rem .6rem .35rem .35rem;
  border-radius: 14px; background: var(--surface-2); font-size: .85rem; }
.upload-queue img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.uq-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uq-state { color: var(--ink-3); font-weight: 600; font-size: .8rem; }
.upload-queue progress { width: 100%; height: 6px; accent-color: var(--brand); }
.upload-queue .is-ok .uq-state { color: var(--ok); }
.upload-queue .is-err .uq-state { color: var(--danger); }
@media (max-width: 600px) { .upload-queue li { grid-template-columns: 44px minmax(0, 1fr) auto; } .upload-queue progress { grid-column: 2 / -1; grid-row: 2; } }
.photo-filter { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0 .9rem; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .9rem; list-style: none; margin: 0; padding: 0; }
.photo-tile { margin: 0; border-radius: 22px; overflow: hidden; background: var(--surface); box-shadow: var(--ring), 0 14px 30px -26px rgba(60, 10, 20, .5); display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; transition: box-shadow .25s, opacity .2s, transform .3s var(--spring); }
.photo-tile:hover { transform: translateY(-3px); box-shadow: var(--ring), 0 22px 40px -26px rgba(60, 10, 20, .55); }
.photo-tile[hidden] { display: none; }
.photo-tile:first-child { box-shadow: 0 0 0 2px var(--gold), var(--ring); }
.photo-tile.is-dragging { opacity: .35; transform: scale(.97); }
.photo-tile:target { box-shadow: 0 0 0 3px var(--brand); }
.photo-img { position: relative; cursor: grab; }
.photo-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; pointer-events: none; }
.photo-badge { position: absolute; left: .5rem; bottom: .5rem; display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem; border-radius: 999px;
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--ink); font-size: .74rem; font-weight: 600; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.photo-badge .ico { color: var(--brand-ink); }
.photo-pos { position: absolute; left: .5rem; top: .5rem; min-width: 26px; height: 26px; display: grid; place-items: center; padding: 0 .4rem; border-radius: 9px;
  background: rgba(20, 8, 10, .7); color: #fff; font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.photo-tile:first-child .photo-pos { background: var(--gold); color: #2b1d00; }
.photo-grip { position: absolute; right: .5rem; top: .5rem; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: rgba(255, 255, 255, .9); color: var(--ink-2); }
.photo-meta { display: grid; gap: .35rem; padding: .6rem .6rem 0; min-width: 0; }
.photo-meta .form-control { min-width: 0; width: 100%; }
.photo-meta .d-flex > .form-control { flex: 1; }
.photo-actions { display: flex; align-items: center; gap: .1rem; padding: .35rem .4rem .45rem; min-width: 0; }
.photo-actions .btn-pill { white-space: nowrap; padding-inline: .6rem; }
.photo-actions form { margin: 0; }
.photo-actions .btn-icon-x:disabled { opacity: .35; cursor: default; background: transparent; }
.mod-item { display: grid; grid-template-columns: 1fr 340px; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.mod-item:last-child { border-bottom: 0; }
.mod-actions { display: grid; gap: .5rem; align-content: start; }
.mod-rev { padding: 1rem 0; border-bottom: 1px solid var(--line); display: grid; gap: .7rem; }
.mod-rev header { display: flex; flex-wrap: wrap; gap: .6rem; align-items: baseline; }
@media (max-width: 800px) { .mod-item { grid-template-columns: 1fr; } }
.cat-list { display: grid; gap: .6rem; margin-top: 1rem; }
.cat-sum, .summary-x { display: flex; align-items: center; gap: .8rem; cursor: pointer; list-style: none; }
.cat-sum::-webkit-details-marker, .summary-x::-webkit-details-marker { display: none; }
.cat-form { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .7rem; margin-top: 1rem; }
@media (max-width: 900px) { .cat-form { grid-template-columns: 1fr 1fr; } }
.src-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.src-list li { display: flex; gap: .6rem; } .src-list .text-xs { word-break: break-word; }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: .4rem; flex-shrink: 0; }
.dot.ok { background: var(--ok); } .dot.err { background: var(--danger); } .dot.off { background: var(--line-2); }
.msg.is-read { opacity: .65; }
.dash-empty { display: grid; justify-items: center; text-align: center; gap: .5rem; padding: 3rem 1rem; border-radius: var(--r-xl); box-shadow: inset 0 0 0 1px var(--line-2) !important; background: transparent !important; }
.dash-empty-ico { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--soft); color: var(--brand-ink); font-size: 1.7rem; animation: pop .6s var(--spring); }
@media (max-width: 960px) {
  .dash-shell { grid-template-columns: 1fr; }
  .dash-side { position: fixed; inset: 0 auto 0 0; width: 280px; transform: translateX(-105%); transition: transform .45s var(--ease); }
  .dash-side.is-open { transform: none; }
  .dash-burger { display: grid; place-items: center; }
  .dash-top { margin: var(--gap) var(--gap) 0; }
  .dash-content { padding: 1.25rem 1rem 4rem; }
}

/* auth */
.dash-guest { min-height: 100dvh; overflow-x: hidden; }
.auth-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.auth-bg span { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .45; animation: float 14s ease-in-out infinite; }
.auth-bg span:nth-child(1) { width: 480px; height: 480px; background: #C8102E; left: -120px; top: -120px; }
.auth-bg span:nth-child(2) { width: 420px; height: 420px; background: #E8B400; right: -100px; top: 20%; animation-delay: -5s; }
.auth-bg span:nth-child(3) { width: 360px; height: 360px; background: #f3d9a4; left: 30%; bottom: -160px; animation-delay: -9s; }
.auth-bg span { opacity: .16; }
.auth { min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 1.2rem; padding: 2rem 1rem; }
.auth-brand { font-size: 1.15rem; }
.auth-card { width: min(440px, 100%); padding: 2rem; border-radius: var(--r-xl); background: var(--glass-strong); backdrop-filter: blur(26px) saturate(180%); -webkit-backdrop-filter: blur(26px) saturate(180%);
  box-shadow: var(--sh-3); animation: vt-in .6s var(--ease) both; }
.auth-card h1 { font-size: 1.8rem; margin: 0 0 .3rem; letter-spacing: -.045em; }
.auth-alt { margin: 1.2rem 0 0; text-align: center; font-size: .9rem; color: var(--ink-3); }
.auth-foot { font-size: .88rem; } .auth-foot a { color: var(--ink-2); text-decoration: none; }

/* =============================== HERALDIC ACCENTS (public site + panel) =============================== */
.topnav-link.is-active { background: var(--gold); color: var(--ink); box-shadow: 0 6px 16px -10px rgba(232, 180, 0, .9); }
.tabbar a.is-active .ico { background: var(--gold); color: var(--ink); }
.chip-x:not([style]).is-active { background: var(--ink); color: #fff; }
.steps li::before { background: var(--grad); color: var(--on-grad); }
.feature:first-child { background: linear-gradient(140deg, var(--gold-soft), var(--surface) 62%); }
.eyebrow { background: var(--gold-soft); color: var(--gold-ink); }
.brand-mark { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 2px var(--gold), 0 8px 18px -8px var(--glow); }
::selection { background: rgba(232, 180, 0, .35); }
/* thin white–red–gold stripe (flag of Lubelskie) */
.site-footer, .auth-card { position: relative; }
.site-footer::before, .auth-card::before {
  content: ""; position: absolute; left: 24px; right: 24px; height: 3px; border-radius: 3px; background: var(--flag);
  box-shadow: 0 0 0 1px var(--line); pointer-events: none; }
.site-footer::before { top: 0; left: 48px; right: auto; width: 96px; }
.auth-card::before { top: 0; left: 2rem; right: auto; width: 72px; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
  @view-transition { navigation: none; }
}
}

/* ---------- Leaflet overrides (unlayered: Leaflet's own CSS is unlayered) ---------- */
.leaflet-container { font: inherit; background: var(--map-bg); }
.leaflet-tile-pane { filter: var(--tile-filter); }
.leaflet-control-attribution a { color: var(--brand-ink) !important; }
.leaflet-control-zoom { border: 0 !important; box-shadow: var(--sh-2) !important; border-radius: 16px !important; overflow: hidden; background: var(--glass-strong) !important; backdrop-filter: blur(18px); }
.leaflet-control-zoom a { width: 42px !important; height: 42px !important; line-height: 42px !important; border: 0 !important; color: var(--ink-2) !important; background: transparent !important; }
.leaflet-control-zoom a:hover { background: var(--soft) !important; color: var(--brand-ink) !important; }
.leaflet-control-attribution { background: var(--glass-strong) !important; color: var(--ink-3) !important; border-radius: 10px 0 0 0; font-size: 10px; }
.mpop-wrap .leaflet-popup-content-wrapper, .leaflet-popup-content-wrapper { border-radius: 22px; box-shadow: var(--sh-3); padding: 0; overflow: hidden; background: var(--surface); color: var(--ink); }
.leaflet-popup-tip { background: var(--surface); box-shadow: none; }
.leaflet-popup-content { margin: 0; width: 288px !important; line-height: 1.4; }
.leaflet-popup-content-wrapper { animation: popin .35s var(--spring) both; transform-origin: 50% 100%; }
@keyframes popin { from { opacity: 0; transform: translateY(8px) scale(.94); } }
/* popup links: unlayered so they beat Leaflet's `.leaflet-container a` colour */
.leaflet-container a.mpop-media { color: rgba(255, 255, 255, .95); }
.leaflet-container a.mpop-title, .mpop-title { display: block; font-size: 1.04rem; font-weight: 680; letter-spacing: -.02em; line-height: 1.25; color: var(--ink); text-decoration: none; }
.leaflet-container a.mpop-title:hover { color: var(--brand-ink); text-decoration: underline; }
.leaflet-container a.mpop-btn, .mpop-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 38px; padding: 0 .7rem;
  border-radius: 12px; font-size: .82rem; font-weight: 650; text-decoration: none; color: var(--ink); background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-2); transition: transform .2s var(--ease), box-shadow .2s; }
.leaflet-container a.mpop-btn:hover { color: var(--ink); box-shadow: 0 0 0 1px color-mix(in oklch, var(--brand) 40%, transparent), var(--sh-2); transform: translateY(-1px); }
.leaflet-container a.mpop-btn-primary, .mpop-btn-primary { background: var(--grad); color: var(--on-grad); box-shadow: 0 8px 18px -10px var(--glow); }
.leaflet-container a.mpop-btn-primary:hover { color: var(--on-grad); }
.leaflet-container a.mpop-btn-icon, .mpop-btn-icon { flex: 0 0 38px; padding: 0; color: var(--brand-ink); }
.mtip { padding: .3rem .65rem; border: 0; border-radius: 10px; background: var(--ink); color: #fff; font: 600 .78rem/1.3 var(--font); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); }
.leaflet-tooltip-top.mtip::before { border-top-color: var(--ink); }
.route-link { display: inline-flex; align-items: center; gap: .3rem; margin-top: .25rem; font-size: .84rem; font-weight: 600; }
.leaflet-container a.leaflet-popup-close-button { color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.district-label { background: transparent; border: 0; box-shadow: none; font-weight: 650; font-size: 11px; letter-spacing: .02em; color: var(--ink-2);
  text-shadow: 0 0 3px var(--map-bg), 0 0 3px var(--map-bg), 0 0 6px var(--map-bg); }
.district-label::before { display: none; }
.page-explorer .leaflet-bottom.leaflet-right { margin-bottom: 0; }
@media (max-width: 860px) { .page-explorer .leaflet-control-zoom { display: none; } }
