/* ============================================================
   Kifüggesztve – dizájnrendszer (2. kiadás)
   A kataszteri birtokív öröksége megmarad a részletekben: papír és vászon, kárminnal írt
   helyrajzi szám, ibolya hivatali bélyegző, tabuláris számok. A felület viszont mai
   munkaeszköz: lekerekített lapok, réteges árnyék, levegős ritmus, és mozgás, amely
   állapotot közöl (nyitás, betöltés, mentés, lapváltás).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@75..100,400..800&display=swap');

:root {
  color-scheme: light;
  /* felületek */
  --bg: #f0f1ea;
  --surface: #fdfcf9;
  --surface-2: #f6f5ef;
  --surface-3: #eceae1;
  --line: #e3e1d6;
  --line-strong: #c8c6b8;
  /* tinta */
  --ink: #1f1c18;
  --ink-2: #4d473e;
  --ink-3: #6b655a;
  /* márka és állapot */
  --carmine: #a8202a;
  --carmine-deep: #8a1922;
  --carmine-wash: #fbecea;
  --stamp: #5b3fa0;
  --stamp-wash: #efeaf9;
  --good: #24682f;
  --good-wash: #e5f2e3;
  --bad: #a2401a;
  --bad-wash: #fbe9dd;
  --lease: #86600c;
  --lease-wash: #f8efd8;
  --info: #1f6f9f;
  --info-wash: #e3eff6;
  --focus: #1f6f9f;
  /* régi nevek – a korábbi komponensek és a diagramok ezeket olvassák */
  --paper: var(--surface); --paper-2: var(--surface-2); --linen: var(--bg); --rule: var(--line); --rule-strong: var(--line-strong);
  /* forma */
  --r-1: 6px; --r-2: 10px; --r-3: 16px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(31, 28, 24, .06), 0 1px 1px rgba(31, 28, 24, .04);
  --sh-2: 0 6px 16px -4px rgba(31, 28, 24, .12), 0 2px 4px rgba(31, 28, 24, .05);
  --sh-3: 0 24px 48px -16px rgba(31, 28, 24, .32), 0 4px 10px rgba(31, 28, 24, .08);
  --shadow: var(--sh-2);
  /* tipográfia */
  --font: 'Archivo', 'Segoe UI', system-ui, Roboto, sans-serif;
  --fs-0: .8125rem; --fs-1: .875rem; --fs-2: 1rem; --fs-3: 1.125rem; --fs-4: 1.375rem; --fs-5: 1.75rem; --fs-6: 2.25rem;
  /* mozgás */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --d-1: .12s; --d-2: .2s; --d-3: .36s;
  --topbar-h: 60px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #161713; --surface: #20221d; --surface-2: #272a23; --surface-3: #30332b; --line: #32362d; --line-strong: #4b5043;
    --ink: #ece9e1; --ink-2: #c2bcb0; --ink-3: #a09b90;
    --carmine: #e8646d; --carmine-deep: #f08a90; --carmine-wash: #38211f;
    --stamp: #b39ff0; --stamp-wash: #2a2440; --good: #86c98b; --good-wash: #1f2f1e; --bad: #eba17a; --bad-wash: #3a281c;
    --lease: #dcb65a; --lease-wash: #33290f; --info: #74b7e2; --info-wash: #17293a; --focus: #74b7e2;
    --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 6px 16px -4px rgba(0,0,0,.55); --sh-3: 0 24px 48px -16px rgba(0,0,0,.7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #161713; --surface: #20221d; --surface-2: #272a23; --surface-3: #30332b; --line: #32362d; --line-strong: #4b5043;
  --ink: #ece9e1; --ink-2: #c2bcb0; --ink-3: #a09b90;
  --carmine: #e8646d; --carmine-deep: #f08a90; --carmine-wash: #38211f;
  --stamp: #b39ff0; --stamp-wash: #2a2440; --good: #86c98b; --good-wash: #1f2f1e; --bad: #eba17a; --bad-wash: #3a281c;
  --lease: #dcb65a; --lease-wash: #33290f; --info: #74b7e2; --info-wash: #17293a; --focus: #74b7e2;
  --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 6px 16px -4px rgba(0,0,0,.55); --sh-3: 0 24px 48px -16px rgba(0,0,0,.7);
}

/* ---------- alap ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 12px); }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font); font-size: var(--fs-2); line-height: 1.5; color: var(--ink); background: var(--bg);
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh;
  font-variant-numeric: tabular-nums lining-nums; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.015em; text-wrap: balance; line-height: 1.2; }
h2 { font-size: var(--fs-3); margin-bottom: .6rem; }
h2 small { font-weight: 400; letter-spacing: 0; }
h3 { font-size: var(--fs-1); color: var(--ink-2); margin: 1.4rem 0 .5rem; font-weight: 600; }
p { margin: 0 0 .7rem; }
small, .small { font-size: var(--fs-1); }
.muted { color: var(--ink-3); }
a { color: var(--carmine); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color var(--d-1); }
a:hover { color: var(--carmine-deep); }
code { font-family: ui-monospace, Consolas, monospace; font-size: .85em; background: var(--surface-2); padding: .05em .35em; border: 1px solid var(--line); border-radius: var(--r-1); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-1); }
.r { text-align: right; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
.icon { width: 1.15em; height: 1.15em; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -0.18em; }

/* rovatfej – a birtokív kondenzált, ritkított fejléce: táblafej, kulcs-címke */
.rovat, .tbl th, .list-head, .kv dt, .kpi .l, .legend-title {
  font-stretch: 88%; font-weight: 600; font-size: .75rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3);
}
.hrsz { color: var(--carmine); font-weight: 600; letter-spacing: .005em; }
.muv { display: inline-flex; vertical-align: -0.2em; margin-right: .3rem; color: var(--ink-2); }
.muv .muv-icon { width: 1.15em; height: 1.15em; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.mellek { font-size: var(--fs-0); color: var(--ink-3); }
.note { margin: .6rem 0 .9rem; }
.hanyad { color: var(--stamp); font-weight: 600; }
.up { color: var(--bad); } .down { color: var(--good); }

/* ---------- fejléc ---------- */
.topbar {
  position: sticky; top: 0; z-index: 1000; height: var(--topbar-h);
  display: flex; align-items: center; gap: 1.2rem; padding: 0 max(1.2rem, env(safe-area-inset-right)) 0 max(1.2rem, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line); transition: box-shadow var(--d-2), border-color var(--d-2);
  view-transition-name: topbar;
}
body.scrolled .topbar { box-shadow: var(--sh-2); border-bottom-color: transparent; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; flex: none; }
.brand:hover { color: var(--ink); }
.brand .mark { width: 36px; height: 36px; flex: none; overflow: visible; }
.brand .mark .sheet { transform-box: view-box; transform-origin: 24px 9.5px; }
.brand .mark .pin { transform-box: fill-box; transform-origin: center; }
.brand:hover .mark .sheet { animation: sway .9s var(--ease-out); }
.first-visit .brand .mark .pin { animation: pin-drop .55s var(--ease-spring) .15s both; }
.first-visit .brand .mark .sheet { animation: sway 1.3s var(--ease-out) .55s both; }
.wordmark { font-weight: 750; font-size: 1.2rem; letter-spacing: -0.025em; }
.wordmark .tld { color: var(--ink-3); font-weight: 500; }
.nav { display: flex; gap: 2px; padding: 3px; background: var(--surface-3); border-radius: var(--r-pill); }
.nav a { color: var(--ink-2); text-decoration: none; padding: .38rem .95rem; font-size: var(--fs-1); font-weight: 550; border-radius: var(--r-pill); transition: color var(--d-1), background var(--d-2); white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.nav a.active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); view-transition-name: nav-pill; }
.topbar-right { margin-left: auto; color: var(--ink-3); font-size: var(--fs-0); display: flex; align-items: center; gap: .4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right .live { width: .5rem; height: .5rem; border-radius: 50%; background: var(--good); flex: none; box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent); animation: pulse 2.4s ease-out infinite; }
.authbox { display: flex; gap: .4rem; align-items: center; flex: none; margin-left: auto; }
.topbar-right + .authbox { margin-left: 0; }
.avatar { width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--ink); color: var(--surface); display: inline-grid; place-items: center; font-size: .8rem; font-weight: 700; flex: none; text-transform: uppercase; }
.userbtn { padding: .2rem .7rem .2rem .25rem; border-radius: var(--r-pill); }
.userbtn .name { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- gombok, mezők ---------- */
input, select, button, textarea, .btn { font: inherit; color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .5rem .95rem; min-height: 2.6rem;
  border: 1px solid var(--line-strong); border-radius: var(--r-2); background: var(--surface); cursor: pointer; text-decoration: none; font-weight: 550; font-size: var(--fs-1); white-space: nowrap;
  transition: background var(--d-1), border-color var(--d-1), box-shadow var(--d-2), transform var(--d-1) var(--ease-out), color var(--d-1);
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); color: var(--ink); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--carmine); border-color: var(--carmine); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, var(--sh-1); }
.btn.primary:hover { background: var(--carmine-deep); border-color: var(--carmine-deep); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 6px 14px -4px color-mix(in srgb, var(--carmine) 55%, transparent); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.link { border: 0; background: none; padding: 0; min-height: 0; color: var(--carmine); font-weight: 500; }
.btn.link:hover { color: var(--carmine-deep); text-decoration: underline; }
.btn.sm { min-height: 2.1rem; padding: .3rem .7rem; }
.btn.icon-only { padding: 0; width: 2.6rem; }
.btn.google { font-weight: 600; }
:root[data-theme="dark"] .btn.primary, :root[data-theme="dark"] .btn.danger { color: #1a1210; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary, :root:not([data-theme="light"]) .btn.danger { color: #1a1210; } }

.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field > label, .field > .rovat { font-size: var(--fs-0); font-weight: 550; color: var(--ink-2); letter-spacing: 0; text-transform: none; font-stretch: 100%; }
.field.grow { flex: 1 1 12rem; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  padding: .5rem .75rem; min-height: 2.6rem; width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r-2); background: var(--surface);
  transition: border-color var(--d-1), box-shadow var(--d-2);
}
select { padding-right: 2rem; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b655a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .6rem center; background-size: 1rem; }
textarea { resize: vertical; min-height: 4.2rem; line-height: 1.45; }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: .8; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
input.invalid { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 20%, transparent); animation: shake .3s; }
.check { display: inline-flex; align-items: center; gap: .5rem; font-size: var(--fs-1); min-height: 2.6rem; cursor: pointer; white-space: nowrap; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--carmine); }
.with-icon { position: relative; }
.with-icon > .icon { position: absolute; left: .75rem; top: 50%; translate: 0 -50%; color: var(--ink-3); pointer-events: none; }
.with-icon > input:not([type=checkbox]):not([type=radio]) { padding-left: 2.4rem; }

.chip {
  display: inline-flex; align-items: center; gap: .4rem; padding: .34rem .8rem; border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: var(--surface); font-size: var(--fs-1); font-weight: 550; color: var(--ink-2); cursor: pointer; white-space: nowrap;
  transition: background var(--d-1), border-color var(--d-1), color var(--d-1), transform var(--d-1) var(--ease-out);
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip:active { transform: scale(.96); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip .n { font-weight: 500; opacity: .7; }
.chip.removable { padding-right: .45rem; background: var(--surface-3); border-color: transparent; cursor: default; animation: chip-in var(--d-3) var(--ease-out) both; }
.chip.removable button { all: unset; cursor: pointer; display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; color: var(--ink-3); transition: background var(--d-1), color var(--d-1); }
.chip.removable button:hover { background: var(--line-strong); color: var(--ink); }
.chip.removable button .icon { width: .8rem; height: .8rem; stroke-width: 2.4; }

.badge { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .45rem; font-size: .75rem; font-weight: 650; border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink-2); vertical-align: middle; }
.badge.alert { background: var(--carmine); color: #fff; }
.tag { display: inline-block; font-size: .7rem; font-stretch: 88%; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; padding: .12rem .45rem; border-radius: var(--r-1); background: var(--surface-3); color: var(--ink-2); line-height: 1.5; vertical-align: .08em; }
.tag.sale { background: var(--carmine-wash); color: var(--carmine); }
.tag.lease { background: var(--lease-wash); color: var(--lease); }
.tag.fh { background: var(--info-wash); color: var(--info); }
.tag.gone { background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* határidő – a hivatali bélyegző */
.stamp {
  display: inline-block; font-size: .78rem; font-stretch: 88%; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap;
  color: var(--stamp); border: 2px solid var(--stamp); box-shadow: inset 0 0 0 1px var(--stamp-wash), inset 0 0 0 2px var(--stamp);
  padding: .12rem .45rem; border-radius: 3px; background: var(--stamp-wash); rotate: -2deg; line-height: 1.35;
  animation: thunk .45s var(--ease-spring) both; animation-delay: calc(var(--i, 0) * 22ms + .15s);
}
.stamp.soon { border-width: 3px; font-weight: 800; rotate: -3deg; }
.delta { display: inline-block; font-size: var(--fs-0); padding: .05rem .45rem; border-radius: var(--r-1); line-height: 1.5; }
.delta.cheap { color: var(--good); background: var(--good-wash); }
.delta.dear { color: var(--bad); background: var(--bad-wash); }
.delta.flat { color: var(--ink-2); background: var(--surface-3); }

/* ---------- lapváz ---------- */
.page, .listpage, .dash, .detailpage { flex: 1; width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 max(1.2rem, env(safe-area-inset-right)) 4rem max(1.2rem, env(safe-area-inset-left)); }
.detailpage { max-width: 1180px; }
.dash { display: flex; flex-direction: column; gap: 1.1rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); padding: 1.15rem 1.3rem; box-shadow: var(--sh-1); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 1.1rem; }

.hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; padding: 2rem 0 1.2rem; }
.hero-title { font-size: clamp(1.6rem, 1.1rem + 1.6vw, var(--fs-6)); font-weight: 750; letter-spacing: -0.03em; line-height: 1.08; }
.hero-title .count { color: var(--carmine); }
.hero-sub { margin: .5rem 0 0; color: var(--ink-2); font-size: var(--fs-2); display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; }
.hero-sub b { color: var(--ink); font-weight: 650; }
.quick { display: flex; flex-wrap: wrap; gap: .45rem; }

/* ---------- szűrősáv ---------- */
.filterbar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--sh-1); padding: .7rem; }
.filter-main { display: grid; grid-template-columns: minmax(200px, 1.5fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(200px, 1.1fr) auto; gap: .6rem; align-items: center; }
.filter-main .field > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.filter-toggle .badge { background: var(--carmine); color: #fff; }
.filter-toggle .chev { transition: rotate var(--d-3) var(--ease-out); }
.filterbar.more-open .filter-toggle .chev { rotate: 180deg; }
.filterbar.more-open .filter-toggle { background: var(--surface-3); }
.filter-more-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--d-3) var(--ease-out); }
.filterbar.more-open .filter-more-wrap { grid-template-rows: 1fr; }
.filter-more { overflow: hidden; min-height: 0; }
.filter-more-inner { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .7rem .8rem; padding: .9rem .1rem .2rem; margin-top: .7rem; border-top: 1px solid var(--line); align-items: end; }
.filter-more-inner .actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
.active-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .7rem .1rem 0; min-height: 0; }
.active-chips:empty { display: none; }

/* ---------- a hirdetmények listája ---------- */
.ledger { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--sh-1); margin-top: .9rem; }
.list-head, .hmain { display: grid; align-items: center; column-gap: 1rem; grid-template-columns: 2.25rem minmax(200px, 1.5fr) minmax(140px, .95fr) minmax(130px, .9fr) minmax(200px, 1.35fr) minmax(165px, 1fr) 1.5rem; padding: .75rem 1.1rem; }
.list-head { position: sticky; top: var(--topbar-h); z-index: 5; background: color-mix(in srgb, var(--surface-2) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); border-radius: var(--r-3) var(--r-3) 0 0; padding-top: .55rem; padding-bottom: .55rem; }
.hrow { border-top: 1px solid var(--line); animation: rise var(--d-3) var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 14) * 22ms); }
.hrow:first-child { border-top: 0; }
.hrow:last-child, .hrow:last-child .hmain { border-radius: 0 0 var(--r-3) var(--r-3); }
.hmain { cursor: pointer; transition: background var(--d-1); line-height: 1.35; position: relative; }
.hmain:hover { background: var(--surface-2); }
.hmain:focus-visible { outline-offset: -2px; }
.hrow.open > .hmain { background: var(--surface-2); border-radius: 0; }
.hrow.open { box-shadow: inset 3px 0 0 var(--carmine); }
.c-hely b { font-size: var(--fs-3); font-weight: 650; letter-spacing: -0.01em; }
.c-hely .megye { color: var(--ink-3); font-size: var(--fs-0); margin-left: .25rem; }
.c-hely .sub { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .5rem; margin-top: .15rem; font-size: var(--fs-1); }
.c-hely .sub small { color: var(--ink-3); font-weight: 400; }
.c-fold b, .c-ar b { font-weight: 650; }
.c-fold small, .c-ar small { display: block; color: var(--ink-3); font-size: var(--fs-0); margin-top: .1rem; }
.c-fold .muvs { display: flex; align-items: center; flex-wrap: wrap; gap: .1rem .15rem; color: var(--ink-2); font-size: var(--fs-1); margin-top: .1rem; }
.c-ar { text-align: right; }
.c-ar b { font-size: var(--fs-3); letter-spacing: -0.01em; }
.chev { color: var(--ink-3); transition: rotate var(--d-3) var(--ease-out), color var(--d-1); justify-self: end; }
.hmain:hover .chev { color: var(--ink); }
.hrow.open .chev { rotate: 180deg; color: var(--carmine); }

/* kedvenc csillag */
.fav { all: unset; box-sizing: border-box; cursor: pointer; display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; color: var(--line-strong); transition: color var(--d-1), background var(--d-1); }
.fav .icon { width: 1.3rem; height: 1.3rem; transition: fill var(--d-2), scale var(--d-2) var(--ease-spring); }
.fav:hover { color: var(--carmine); background: var(--carmine-wash); }
.fav:focus-visible { outline: 2px solid var(--focus); }
.fav.on { color: var(--carmine); }
.fav.on .icon { fill: currentColor; }
.fav.pop .icon { animation: pop .5s var(--ease-spring); }

/* ár-ítélet műszer: hol áll az ár a viszonyítási mediánhoz képest (fele … kétszerese, log skálán) */
.gauge { min-width: 0; }
.gauge-track { position: relative; height: 6px; border-radius: 3px; background: linear-gradient(90deg, color-mix(in srgb, var(--good) 55%, var(--surface-3)) 0%, var(--surface-3) 42%, var(--surface-3) 58%, color-mix(in srgb, var(--bad) 55%, var(--surface-3)) 100%); margin: .35rem 0 .4rem; }
.gauge-track::before { content: ''; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink-3); border-radius: 1px; opacity: .55; }
.gauge-dot { position: absolute; top: 50%; left: var(--pos, 50%); width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--ink); border: 2px solid var(--surface); box-shadow: var(--sh-1); animation: slide-in .7s var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 14) * 22ms + .1s); }
.gauge.cheap .gauge-dot { background: var(--good); }
.gauge.dear .gauge-dot { background: var(--bad); }
.gauge-label { font-size: var(--fs-1); display: flex; gap: .4rem; align-items: baseline; }
.gauge-label b { font-weight: 650; }
.gauge.cheap .gauge-label b { color: var(--good); }
.gauge.dear .gauge-label b { color: var(--bad); }
.gauge small, .no-verdict { display: block; color: var(--ink-3); font-size: .75rem; line-height: 1.35; }

/* határidő: hátralévő idő + az eltelt rész sávja */
.dl-top { display: flex; align-items: center; gap: .5rem; font-weight: 650; min-height: 1.5rem; }
.dl-bar { height: 4px; border-radius: 2px; background: var(--surface-3); margin: .35rem 0 .3rem; overflow: hidden; }
.dl-bar i { display: block; height: 100%; width: var(--p, 0%); background: var(--ink-3); border-radius: 2px; transform-origin: left; animation: fill .8s var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 14) * 22ms + .1s); }
.dl.mid .dl-bar i { background: var(--stamp); }
.dl.urgent .dl-bar i { background: var(--stamp); }
.dl.closed .dl-bar { display: none; }
.dl small { color: var(--ink-3); font-size: var(--fs-0); }

/* nagyon olcsó tétel */
.hrow.nagyon-olcso > .hmain { background: linear-gradient(90deg, var(--good-wash), transparent 55%); }
.hrow.nagyon-olcso > .hmain:hover, .hrow.nagyon-olcso.open > .hmain { background: linear-gradient(90deg, var(--good-wash), var(--surface-2) 55%); }
.hrow.nagyon-olcso .c-hely b { color: var(--good); }

/* kinyíló részletek */
.hwrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--d-3) var(--ease-out); }
.hrow.open > .hwrap { grid-template-rows: 1fr; }
.hwrap > .hdetail { overflow: hidden; min-height: 0; }
.hdetail-inner { padding: 1.1rem 1.3rem 1.4rem 4.35rem; background: var(--surface-2); border-top: 1px dashed var(--line-strong); }
.hrow.open .hdetail-inner > * { animation: rise var(--d-3) var(--ease-out) both; }
.hrow.open .hdetail-inner > *:nth-child(2) { animation-delay: .06s; }
.hrow.open .hdetail-inner > *:nth-child(3) { animation-delay: .12s; }
.detail-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.1rem; }
.detail-actions .spacer { flex: 1; }
.detail-grid { display: grid; grid-template-columns: minmax(280px, 1fr) 1.65fr; gap: 1.4rem 2.2rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.1rem; font-size: var(--fs-1); margin: 0; align-items: baseline; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.att { display: flex; flex-direction: column; gap: .4rem; }
.file { display: inline-flex; align-items: center; gap: .6rem; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); text-decoration: none; color: var(--ink); max-width: 100%; transition: border-color var(--d-1), box-shadow var(--d-2), translate var(--d-2) var(--ease-out); }
.file:hover { border-color: var(--carmine); color: var(--ink); box-shadow: var(--sh-2); translate: 0 -1px; }
.file .icon { color: var(--carmine); width: 1.4rem; height: 1.4rem; }
.file .fn { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file small { color: var(--ink-3); font-size: var(--fs-0); flex: none; }
.ctx { display: grid; gap: .3rem; }
.ctx div { display: flex; justify-content: space-between; gap: 1rem; }
.ctx b { font-weight: 650; }

.tbl-wrap { border: 1px solid var(--line); border-radius: var(--r-2); overflow: auto; background: var(--surface); -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-1); }
.tbl th, .tbl td { padding: .55rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background var(--d-1); }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl td small { color: var(--ink-3); }
/* cellán belüli sáv: az érték nagysága a sor hátterében */
.barcell { position: relative; }
.barcell > span { position: relative; }
.barcell::before { content: ''; position: absolute; left: 0; top: 18%; bottom: 18%; width: var(--w, 0%); background: color-mix(in srgb, var(--carmine) 13%, transparent); border-radius: 0 3px 3px 0; transform-origin: left; animation: fill .9s var(--ease-out) both; }
.barcell.r::before { left: auto; right: 0; border-radius: 3px 0 0 3px; transform-origin: right; }

/* állapotok */
.empty, .errbox { padding: 2.6rem 1.2rem; text-align: center; color: var(--ink-2); }
.empty .icon, .errbox .icon { width: 2rem; height: 2rem; color: var(--ink-3); display: block; margin: 0 auto .6rem; }
.errbox { color: var(--bad); }
.errbox.small { padding: .6rem .8rem; background: var(--bad-wash); border-radius: var(--r-2); text-align: left; }
.skeleton { padding: 0; }
.sk-row { display: grid; grid-template-columns: 2.25rem 1.7fr 1fr .9fr 1.15fr 1.05fr; gap: 1rem; padding: 1rem 1.1rem; border-top: 1px solid var(--line); align-items: center; }
.sk-row:first-child { border-top: 0; }
.sk, .skeleton .bar { height: .85rem; border-radius: 4px; background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 45%, var(--surface-3) 65%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
.sk.w60 { width: 60%; } .sk.w40 { width: 40%; } .sk.w80 { width: 80%; } .sk.circle { width: 1.4rem; height: 1.4rem; border-radius: 50%; }
.skeleton .bar { margin: 1rem auto; max-width: 70%; }
.print-head { display: none; }
.pager-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: center; margin-top: 1.2rem; font-size: var(--fs-1); color: var(--ink-2); }
.pager-bar select { width: auto; min-height: 2.2rem; padding-top: .25rem; padding-bottom: .25rem; }
.pager-bar label { display: inline-flex; align-items: center; gap: .4rem; }

/* ---------- jegyzet, rájelentkezés ---------- */
.jegyzet-box, .ny-box { margin-top: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); padding: 1rem 1.1rem 1.1rem; box-shadow: var(--sh-1); animation: rise var(--d-3) var(--ease-out) both; }
.ny-box { border-top: 3px solid var(--stamp); }
.jegyzet-box { border-top: 3px solid var(--carmine); }
.ny-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .7rem .9rem; margin: .8rem 0; align-items: end; }
.ny-grid .field.grow { grid-column: 1 / -1; }
.ny-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .6rem; }
.ny-result { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .9rem; padding: .8rem; border-radius: var(--r-2); background: var(--good-wash); animation: rise var(--d-3) var(--ease-out) both; }
.ny-info { margin: .7rem 0; border: 1px solid var(--line); border-radius: var(--r-2); padding: .2rem .9rem; background: var(--surface-2); }
.ny-info summary, details > summary { cursor: pointer; font-weight: 600; color: var(--ink-2); padding: .55rem 0; list-style: none; display: flex; align-items: center; gap: .4rem; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: ''; width: .5rem; height: .5rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: -45deg; transition: rotate var(--d-2) var(--ease-out); flex: none; margin-right: .2rem; }
details[open] > summary::before { rotate: 45deg; }
.ny-info ul { margin: .2rem 0 .7rem 1.1rem; padding: 0; }
.ny-info li { margin: .3rem 0; }
.ny-info .tbl { margin: .2rem 0 .6rem; }

/* ---------- külön részletező oldal ---------- */
.crumb { display: inline-flex; align-items: center; gap: .4rem; margin: 1.3rem 0 .9rem; color: var(--ink-2); text-decoration: none; font-size: var(--fs-1); font-weight: 550; }
.crumb:hover { color: var(--carmine); }
.crumb .icon { transition: translate var(--d-2) var(--ease-out); }
.crumb:hover .icon { translate: -3px 0; }
.detail-sheet { margin-top: 0; overflow: hidden; animation: rise var(--d-3) var(--ease-out) both; }
.detail-head { display: grid; grid-template-columns: 1fr auto; gap: 1.2rem 2.5rem; padding: 1.5rem 1.6rem; border-bottom: 1px solid var(--line); align-items: start; }
.detail-title { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); font-weight: 750; letter-spacing: -0.025em; margin: .3rem 0 .5rem; }
.detail-title .hrsz { font-weight: 650; }
.detail-meta { color: var(--ink-2); display: flex; flex-wrap: wrap; gap: .3rem .5rem; align-items: center; }
.detail-side { display: grid; gap: .9rem; min-width: 260px; }
.detail-price { font-size: 1.7rem; font-weight: 750; letter-spacing: -0.02em; line-height: 1.1; }
.detail-price small { font-size: var(--fs-1); font-weight: 400; color: var(--ink-3); display: block; margin-top: .2rem; letter-spacing: 0; }
.detail-body .hdetail-inner { padding: 1.4rem 1.6rem 1.6rem; border-top: 0; background: var(--surface); }
.nagyon-olcso .detail-head { background: linear-gradient(120deg, var(--good-wash), transparent 60%); }
/* eljárási idővonal */
.timeline { list-style: none; margin: .3rem 0 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 1rem 1.7rem; font-size: var(--fs-1); animation: rise var(--d-3) var(--ease-out) both; animation-delay: calc(var(--i) * 45ms); }
.timeline li::before { content: ''; position: absolute; left: .32rem; top: 1.05rem; bottom: -.15rem; width: 2px; background: var(--line-strong); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ''; position: absolute; left: 0; top: .3rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); }
.timeline li.done::after { background: var(--ink-3); border-color: var(--ink-3); }
.timeline li.done::before { background: var(--ink-3); }
.timeline li.now::after { background: var(--stamp); border-color: var(--stamp); box-shadow: 0 0 0 4px var(--stamp-wash); animation: pulse-ring 2s ease-out infinite; }
.timeline .when { font-weight: 650; display: block; }
.timeline li.now .when { color: var(--stamp); }
.timeline small { color: var(--ink-3); display: block; }

/* ---------- áttekintés ---------- */
.statband { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--sh-1); overflow: hidden; }
.stat { padding: 1.2rem 1.4rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; }
.stat:nth-child(4n) { border-right: 0; }
.stat:nth-last-child(-n+4) { border-bottom: 0; }
.stat .v { font-size: 1.9rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1.1; }
.stat.lead .v { color: var(--carmine); }
.stat .l { margin-top: .3rem; font-size: var(--fs-1); color: var(--ink-2); font-weight: 550; }
.stat .s { font-size: var(--fs-0); color: var(--ink-3); margin-top: .15rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .6rem; margin: .6rem 0 1rem; }
.kpi { padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface-2); }
.kpi .v { font-size: var(--fs-4); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.kpi .l { margin-top: .2rem; }
.kpi .s { font-size: var(--fs-0); color: var(--ink-3); margin-top: .2rem; }
.chartbox { position: relative; height: 260px; }
.bars { display: grid; gap: .55rem; margin-top: .3rem; }
.bar-row { display: grid; grid-template-columns: 9.5rem 1fr auto; gap: .8rem; align-items: center; font-size: var(--fs-1); }
.bar-row .track { height: .55rem; background: var(--surface-3); border-radius: var(--r-pill); overflow: hidden; }
.bar-row .track i { display: block; height: 100%; width: var(--w, 0%); background: var(--ink-2); border-radius: var(--r-pill); transform-origin: left; animation: fill .9s var(--ease-out) both; }
.bar-row:first-child .track i { background: var(--carmine); }
.bar-row .val { color: var(--ink-2); white-space: nowrap; }
.bar-row .val b { color: var(--ink); font-weight: 650; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .dash > section, .dash > details { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
  }
}

/* ---------- térkép ---------- */
.layout { flex: 1; display: grid; grid-template-columns: 1fr minmax(360px, 460px); min-height: 0; height: calc(100dvh - var(--topbar-h)); }
.mapwrap { position: relative; min-height: 0; }
#map { position: absolute; inset: 0; background: var(--bg); }
.legend, .map-toolbar { position: absolute; z-index: 500; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--sh-2); padding: .55rem .75rem; font-size: var(--fs-0); }
.legend { right: 12px; bottom: 26px; width: 200px; }
.legend-title { margin-bottom: .35rem; }
.legend-scale { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #f3ead6, #e4b56a, #c96a3c, #a8202a, #5a0f16); }
.legend-labels { display: flex; justify-content: space-between; color: var(--ink-3); margin-top: .2rem; }
.legend-note { color: var(--ink-3); margin-top: .25rem; }
.map-toolbar { left: 12px; top: 12px; display: flex; gap: .3rem .9rem; align-items: center; flex-wrap: wrap; }
.map-toolbar label { display: flex; gap: .35rem; align-items: center; cursor: pointer; font-weight: 550; }
.map-toolbar input[type=radio] { accent-color: var(--carmine); }
.map-toolbar select { min-height: 2.1rem; padding-top: .2rem; padding-bottom: .2rem; width: auto; }
.panel { background: var(--surface); border-left: 1px solid var(--line); overflow-y: auto; padding: 1.1rem; }
.panel > div { animation: rise var(--d-3) var(--ease-out) both; }
.panel .card { box-shadow: none; padding: 0; border: 0; margin-bottom: 1.3rem; background: transparent; }
.search { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .4rem; }
.search .wide { grid-column: 1 / -1; }
.search .actions { grid-column: 1 / -1; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.results-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .7rem; }
.results-head h2 { margin: 0; }
.pager { display: flex; gap: .4rem; align-items: center; font-size: var(--fs-1); }
.reslist { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; background: var(--surface); }
.reslist:empty { display: none; }
.res { padding: .75rem .9rem; cursor: pointer; border-top: 1px solid var(--line); transition: background var(--d-1); display: block; color: inherit; text-decoration: none; }
.res:first-child { border-top: 0; }
.res:hover { background: var(--surface-2); color: inherit; }
.res .t { display: flex; justify-content: space-between; gap: .6rem; font-weight: 650; align-items: baseline; }
.res .m { display: flex; flex-wrap: wrap; gap: .2rem .8rem; font-size: var(--fs-0); color: var(--ink-2); margin-top: .25rem; align-items: center; }
.res.unread { background: linear-gradient(90deg, var(--carmine-wash), transparent 70%); box-shadow: inset 3px 0 0 var(--carmine); }
.res.kedv { cursor: default; padding: 1rem; }
.res.kedv:hover { background: transparent; }
.res.kedv .field { margin-top: .7rem; }
.leaflet-container { font-family: var(--font); }
.leaflet-tooltip { border-radius: var(--r-1); border: 0; box-shadow: var(--sh-2); font-size: var(--fs-0); padding: .35rem .55rem; }

/* ---------- párbeszéd, toast ---------- */
dialog.dialog, .authdialog {
  border: 0; border-radius: var(--r-3); background: var(--surface); color: var(--ink); padding: 0; max-width: 440px; width: calc(100% - 2rem); box-shadow: var(--sh-3);
  opacity: 0; scale: .96; translate: 0 8px;
  transition: opacity var(--d-2), scale var(--d-3) var(--ease-out), translate var(--d-3) var(--ease-out), overlay var(--d-3) allow-discrete, display var(--d-3) allow-discrete;
}
dialog.dialog[open], .authdialog[open] { opacity: 1; scale: 1; translate: 0 0; }
@starting-style { dialog.dialog[open], .authdialog[open] { opacity: 0; scale: .96; translate: 0 8px; } }
dialog.dialog::backdrop, .authdialog::backdrop { background: rgba(20, 18, 15, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.dialog-body, .authform { display: flex; flex-direction: column; gap: .8rem; padding: 1.5rem 1.6rem 1.4rem; position: relative; }
.dialog-body h2, .authform h2 { font-size: var(--fs-4); margin: 0; }
.dialog-body p, .authform p { margin: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .5rem; }
.authform .ny-actions { flex-direction: column; align-items: stretch; margin-top: .3rem; }
.authform .consent { font-size: var(--fs-0); color: var(--ink-3); line-height: 1.45; margin: 0; }
.authform .consent a { color: var(--ink-2); }
.authform .or { display: flex; align-items: center; gap: .7rem; color: var(--ink-3); font-size: var(--fs-0); }
.authform .or::before, .authform .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.modal-close { position: absolute; right: .7rem; top: .7rem; width: 2.1rem; height: 2.1rem; display: grid; place-items: center; border-radius: 50%; background: none; border: 0; cursor: pointer; color: var(--ink-3); transition: background var(--d-1), color var(--d-1), rotate var(--d-3) var(--ease-out); }
.modal-close:hover { background: var(--surface-3); color: var(--ink); rotate: 90deg; }
.toasts { position: fixed; left: 50%; bottom: calc(1.4rem + env(safe-area-inset-bottom)); translate: -50% 0; z-index: 3000; display: flex; flex-direction: column; gap: .5rem; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 2rem); }
.toast { display: flex; align-items: center; gap: .55rem; padding: .7rem 1rem; border-radius: var(--r-2); background: var(--ink); color: var(--surface); font-size: var(--fs-1); font-weight: 550; box-shadow: var(--sh-3); opacity: 0; translate: 0 14px; scale: .96; transition: opacity var(--d-2), translate var(--d-3) var(--ease-spring), scale var(--d-3) var(--ease-spring); }
.toast.in { opacity: 1; translate: 0 0; scale: 1; }
.toast .icon { color: var(--good-wash); }
.toast.err .icon { color: var(--bad-wash); }

/* ---------- fiók ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .2rem; }
.section-head h2 { margin: 0; display: flex; align-items: center; gap: .5rem; }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.guest-card { max-width: 620px; margin: 2rem auto; text-align: center; padding: 2.4rem 2rem; }
.guest-card .icon.big { width: 3rem; height: 3rem; color: var(--carmine); margin-bottom: .6rem; }
.guest-card ul { text-align: left; display: grid; gap: .55rem; padding: 0; margin: 1.2rem auto 1.5rem; list-style: none; max-width: 30rem; }
.guest-card li { display: flex; gap: .6rem; align-items: flex-start; }
.guest-card li .icon { color: var(--good); margin-top: .2rem; }
.guest-card .ny-actions { justify-content: center; }

/* ---------- v2 kiegészítések ---------- */
a.res { text-decoration: none; }
.res .t a { color: inherit; text-decoration: none; }
.res .t a:hover { color: var(--carmine); }
.res .m .btn.link { font-size: inherit; }
.res .go { color: var(--ink-3); transition: translate var(--d-2) var(--ease-out), color var(--d-1); flex: none; }
a.res:hover .go { translate: 3px 0; color: var(--carmine); }
.stat { animation: rise var(--d-3) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms); }
.dash > section, .dash > details, .dash > .stack > section { animation: rise var(--d-3) var(--ease-out) both; }
.dash > :nth-child(2) { animation-delay: 60ms; } .dash > :nth-child(3) { animation-delay: 120ms; } .dash > :nth-child(4) { animation-delay: 180ms; } .dash > :nth-child(5) { animation-delay: 240ms; }
.detail-extra { display: grid; grid-template-columns: 1fr; gap: 1.1rem; margin-top: 1.1rem; }
.detail-extra .card { animation: rise var(--d-3) var(--ease-out) .12s both; }
.detail-sheet.nagyon-olcso { box-shadow: inset 4px 0 0 var(--good), var(--sh-1); }
.tbl a { text-decoration: none; }
.tbl a:hover { text-decoration: underline; }
.btn[aria-busy="true"] { pointer-events: none; opacity: .7; }
.btn[aria-busy="true"]::after { content: ''; width: .9em; height: .9em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
.leaflet-container { font: inherit; }
.leaflet-interactive { transition: fill-opacity var(--d-1), stroke-width var(--d-1); }
.leaflet-interactive:hover { stroke-width: 2.2; fill-opacity: 1; }

/* ---------- tartalmi oldalak ---------- */
.prose { max-width: 820px; padding-top: 1.6rem; }
.prose section { margin: 2.2rem 0; scroll-margin-top: calc(var(--topbar-h) + 1rem); animation: rise var(--d-3) var(--ease-out) both; }
.prose h1 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem); font-weight: 750; letter-spacing: -0.03em; line-height: 1.1; margin: .2rem 0 .8rem; }
.prose h2 { font-size: var(--fs-4); margin: 0 0 .7rem; }
.prose p, .prose li { line-height: 1.65; max-width: 70ch; }
.prose ul, .prose ol { padding-left: 1.3rem; display: grid; gap: .45rem; }
.prose .lead { font-size: var(--fs-3); color: var(--ink-2); line-height: 1.55; }
.prose-head { padding-bottom: .4rem; border-bottom: 1px solid var(--line); animation: rise var(--d-3) var(--ease-out) both; }
.callout { margin: 1.4rem 0; padding: 1rem 1.2rem; border-radius: var(--r-2); background: var(--stamp-wash); border: 1px solid color-mix(in srgb, var(--stamp) 30%, transparent); line-height: 1.6; }
.toc { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.2rem 0 0; }
.toc a { font-size: var(--fs-1); padding: .3rem .8rem; border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink-2); text-decoration: none; transition: background var(--d-1), color var(--d-1); }
.toc a:hover { background: var(--ink); color: var(--surface); }
.prose ol.steps { list-style: none; padding: 0; counter-reset: lepes; gap: .9rem; }
.prose ol.steps li { counter-increment: lepes; position: relative; padding: .9rem 1rem .9rem 3.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--sh-1); }
.prose ol.steps li::before { content: counter(lepes); position: absolute; left: .9rem; top: .85rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--carmine); color: #fff; font-weight: 700; font-size: .85rem; }
.prose ol.rank li::marker { color: var(--carmine); font-weight: 700; }
.timeline.static li { animation: none; }
.prose .tbl td { vertical-align: top; line-height: 1.45; }
mark.todo { background: var(--bad-wash); color: var(--bad); padding: .05rem .35rem; border-radius: 4px; font-weight: 600; }
.notfound { text-align: center; padding-top: 4rem; }
.notfound p { margin-left: auto; margin-right: auto; }
.notfound .ny-actions { justify-content: center; }
.code-404 { font-size: clamp(4rem, 3rem + 6vw, 8rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1; color: var(--carmine); margin: 0; animation: thunk .6s var(--ease-spring) both; }
.hero-link { display: inline-block; margin-top: .5rem; font-size: var(--fs-1); color: var(--carmine); text-decoration: none; font-weight: 600; }
.hero-link:hover { text-decoration: underline; }

/* ---------- lábléc ---------- */
.sitefoot { border-top: 1px solid var(--line); margin-top: 2rem; padding: 1.4rem max(1.2rem, env(safe-area-inset-right)) 2rem max(1.2rem, env(safe-area-inset-left)); color: var(--ink-3); font-size: var(--fs-0); }
.sitefoot-inner { max-width: 1360px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; align-items: center; justify-content: space-between; }
.sitefoot nav { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; }
.sitefoot a { color: var(--ink-2); text-decoration: none; }
.sitefoot a:hover { color: var(--carmine); }
.page-map .sitefoot { display: none; }

/* ---------- alsó fülsáv (telefon, tablet) ---------- */
.tabbar { display: none; }
.tab-dot { position: absolute; top: .4rem; right: calc(50% - 1.15rem); width: .55rem; height: .55rem; border-radius: 50%; background: var(--carmine); box-shadow: 0 0 0 2px var(--surface); }

/* ---------- mozgás ---------- */
@keyframes rise { from { opacity: 0; translate: 0 8px; } }
@keyframes shimmer { to { background-position: -300% 0; } }
@keyframes fill { from { transform: scaleX(0); } }
@keyframes slide-in { from { left: 50%; opacity: 0; } }
@keyframes pop { 0% { scale: 1; } 35% { scale: 1.45; } 100% { scale: 1; } }
@keyframes thunk { 0% { opacity: 0; scale: 1.7; } 60% { opacity: 1; scale: .94; } 100% { scale: 1; } }
@keyframes chip-in { from { opacity: 0; scale: .85; } }
@keyframes pin-drop { from { translate: 0 -22px; opacity: 0; } }
@keyframes sway { 0% { rotate: 0deg; } 25% { rotate: 7deg; } 55% { rotate: -4deg; } 80% { rotate: 2deg; } 100% { rotate: 0deg; } }
@keyframes shake { 25% { translate: -4px 0; } 75% { translate: 4px 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--stamp) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
@keyframes vt-out { to { opacity: 0; translate: 0 -6px; } }
@keyframes vt-in { from { opacity: 0; translate: 0 10px; } }

/* lapváltás: a fejléc a helyén marad, a menü jelölője átcsúszik, a tartalom áttűnik */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .16s ease-in both; }
::view-transition-new(root) { animation: vt-in .32s var(--ease-out) both; }
::view-transition-group(nav-pill), ::view-transition-group(tab-ind) { animation-duration: .38s; animation-timing-function: var(--ease-out); }
::view-transition-old(topbar), ::view-transition-new(topbar), ::view-transition-old(tabbar), ::view-transition-new(tabbar) { animation: none; mix-blend-mode: normal; }
::view-transition-old(topbar), ::view-transition-old(tabbar) { display: none; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

/* ---------- nyomtatás ---------- */
@media print {
  body { background: #fff; }
  .topbar, .tabbar, .filterbar, .quick, .active-chips, .pager-bar, .fav, .chev, .detail-actions, .toasts { display: none !important; }
  .print-head { display: block; margin-bottom: .6rem; font-size: var(--fs-1); }
  .ledger, .card { box-shadow: none; }
  .hrow { break-inside: avoid; animation: none; }
  .hwrap { grid-template-rows: 1fr !important; }
}

/* ---------- közepes szélesség: a lista kártyás rácsra vált ---------- */
@media (max-width: 1120px) {
  .list-head { display: none; }
  .hmain { grid-template-columns: 1fr 1fr; grid-template-areas: "hely fav" "fold ar" "itelet dl"; row-gap: .75rem; padding: 1rem 1.1rem; align-items: start; }
  .hmain > .fav { grid-area: fav; justify-self: end; margin: -.3rem -.4rem 0 0; }
  .hmain > .c-hely { grid-area: hely; }
  .hmain > .c-fold { grid-area: fold; }
  .hmain > .c-ar { grid-area: ar; text-align: left; }
  .hmain > .c-itelet { grid-area: itelet; }
  .hmain > .c-hatarido { grid-area: dl; }
  .hmain > .chev { display: none; }
  .hmain > .c-itelet:not(:has(.gauge, .no-verdict)) { visibility: hidden; }
  .hdetail-inner { padding-left: 1.1rem; }
  .detail-grid { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .sk-row { grid-template-columns: 1fr 1fr; }
  .sk-row > :nth-child(n+4) { display: none; }
  .filter-main { grid-template-columns: 1fr 1fr; }
  .filter-main .filter-toggle { grid-column: 1 / -1; }
  .statband { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-child(4n) { border-right: 0; }
  .stat:nth-last-child(-n+4) { border-bottom: 1px solid var(--line); }
  .stat:nth-last-child(-n+2) { border-bottom: 0; }
  .detail-head { grid-template-columns: 1fr; }
}

/* ---------- telefon és tablet ---------- */
@media (max-width: 900px) {
  :root { --topbar-h: 54px; }
  .topbar { gap: .6rem; padding-top: env(safe-area-inset-top); height: calc(var(--topbar-h) + env(safe-area-inset-top)); }
  .topbar .nav, .topbar-right { display: none; }
  .brand .mark { width: 30px; height: 30px; }
  .wordmark { font-size: 1.05rem; }
  .topbar > .authbox { margin-left: auto; }
  .authbox .logout { display: none; }
  .userbtn .name { max-width: 34vw; }

  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200;
    background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); view-transition-name: tabbar;
  }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .12rem; min-height: 3.3rem; padding: .4rem 0 .3rem; color: var(--ink-3); text-decoration: none; font-size: .68rem; font-weight: 600; letter-spacing: .01em; transition: color var(--d-1); }
  .tabbar a svg { width: 1.45rem; height: 1.45rem; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; transition: translate var(--d-2) var(--ease-spring); }
  .tabbar a.active { color: var(--carmine); }
  .tabbar a.active svg { translate: 0 -1px; }
  .tabbar a.active::before { content: ''; position: absolute; top: -1px; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--carmine); view-transition-name: tab-ind; }
  .tabbar a:active svg { scale: .9; }
  body.has-tabbar { padding-bottom: calc(3.5rem + env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(4.6rem + env(safe-area-inset-bottom)); }

  input:not([type=checkbox]):not([type=radio]), select, textarea, .btn { font-size: 16px; min-height: 44px; }
  .btn.link { min-height: 0; font-size: var(--fs-1); }
  .btn.sm { min-height: 40px; }
  .chip { min-height: 38px; padding: .4rem .9rem; }
  .chip.removable { min-height: 34px; }
  .hero { padding: 1.3rem 0 .9rem; }
  .quick { flex-wrap: nowrap; overflow-x: auto; margin: 0 -1.2rem; padding: .1rem 1.2rem .3rem; scrollbar-width: none; width: calc(100% + 2.4rem); }
  .quick::-webkit-scrollbar { display: none; }
  .filter-more-inner { grid-template-columns: 1fr 1fr; }
  .filter-more-inner .field.wide { grid-column: 1 / -1; }
  .pager-bar .btn { flex: 1; }
  dialog.dialog, .authdialog { max-height: calc(100dvh - 2rem); margin: auto auto 1rem; border-radius: var(--r-3); translate: 0 30px; }
  dialog.dialog[open], .authdialog[open] { translate: 0 0; }

  .layout { grid-template-columns: 1fr; grid-template-rows: 46vh auto; height: auto; }
  .panel { border-left: 0; border-top: 1px solid var(--line); overflow: visible; border-radius: var(--r-3) var(--r-3) 0 0; margin-top: -14px; position: relative; z-index: 600; box-shadow: 0 -8px 24px -12px rgba(31,28,24,.25); }
  .legend { display: none; }
  .map-toolbar { left: 8px; top: 8px; right: 8px; }
  .kv { grid-template-columns: 1fr; gap: .1rem 0; }
  .kv dt { margin-top: .6rem; }
  .detail-head { padding: 1.1rem; }
  .detail-body .hdetail-inner { padding: 1.1rem; }
  .detail-side { min-width: 0; }
  .card { padding: 1rem 1.05rem; }
  .bar-row { grid-template-columns: 7rem 1fr auto; }
}
@media (max-width: 520px) {
  .hmain { column-gap: .8rem; }
  .statband { grid-template-columns: 1fr 1fr; }
  .stat { padding: 1rem; }
  .stat .v { font-size: 1.5rem; }
  .filter-main { grid-template-columns: 1fr 1fr; }
  .filter-main > .with-icon { grid-column: 1 / -1; }
  .filter-main .filter-toggle { grid-column: auto; }
  .filter-more-inner { grid-template-columns: 1fr; }
  .search { grid-template-columns: 1fr; }
}
