/* =====================================================================
   Off-Grid Places — styles
   Light / dark via [data-theme] on <html>; follows the OS when unset.
   ===================================================================== */
:root {
  --bg: #f6f2ea;
  --bg-2: #ede6d9;
  --surface: #fffdf8;
  --text: #22261f;
  --muted: #676b5f;
  --line: #ddd4c4;
  --primary: #3d5a3a;        /* moss */
  --primary-ink: #fff;
  --primary-soft: #dfe8d6;
  --accent: #d1803a;         /* ember */
  --danger: #b23b2e;
  --ok: #2f7a45;
  --warn: #a8690f;
  --shadow: 0 1px 2px rgb(40 35 20 / .06), 0 6px 20px rgb(40 35 20 / .07);
  --radius: 14px;
  --font: "Work Sans", "Golos Text", system-ui, sans-serif;
  --display: "Fraunces", "Lora", Georgia, serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #141713; --bg-2: #1b1f1a; --surface: #1f241e; --text: #e9e7df; --muted: #a2a597;
  --line: #333a31; --primary: #9cc38f; --primary-ink: #142012; --primary-soft: #2a3a27;
  --accent: #e89a55; --danger: #e5786b; --ok: #7ccf91; --warn: #e3b04f;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .35);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141713; --bg-2: #1b1f1a; --surface: #1f241e; --text: #e9e7df; --muted: #a2a597;
    --line: #333a31; --primary: #9cc38f; --primary-ink: #142012; --primary-soft: #2a3a27;
    --accent: #e89a55; --danger: #e5786b; --ok: #7ccf91; --warn: #e3b04f;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--text); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img, video { max-width: 100%; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.8rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 760px; }
.section { padding-block: 40px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.warn { color: var(--warn); }
.lead { font-size: 1.15rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 600; color: var(--accent); margin-bottom: .4em; }
.visually-hidden, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 8px; z-index: 99; background: var(--surface); padding: 8px 12px; }
.muted-link { color: var(--muted); }
.muted-link:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- buttons ---------- */
.btn { --b: var(--line); display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .62em 1.1em; border-radius: 999px; border: 1px solid var(--b); background: var(--surface); color: var(--text); font: 600 .95rem var(--font); text-decoration: none; cursor: pointer; transition: transform .08s, background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { border-color: var(--primary); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--primary-ink); --b: var(--primary); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); --b: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn-small { padding: .42em .85em; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled], fieldset[disabled] .btn { opacity: .5; cursor: not-allowed; }
.icon-btn { border: 0; background: var(--surface); color: var(--text); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: .85rem; box-shadow: var(--shadow); }
.icon-btn.danger { color: var(--danger); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font: 700 1.2rem var(--display); }
.brand svg { width: 30px; height: 30px; color: var(--primary); }
.main-nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; }
.main-nav > a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav > a[aria-current] { border-color: var(--accent); }
.main-nav > a:not(.btn):hover { color: var(--primary); }
.theme-toggle { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; } :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; } }
.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 16px 18px; box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .main-nav > a { padding: 10px 0; }
  .theme-toggle { align-self: flex-start; }
}

/* ---------- flashes ---------- */
.flashes { margin-top: 16px; display: grid; gap: 8px; }
.flash { padding: 12px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); margin: 0 0 10px; }
.flash-success { border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
.flash-error { border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.flash-info { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; min-width: 0; }
.field > span { font-size: .82rem; font-weight: 600; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .6em .75em; width: 100%; min-width: 0; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
input[disabled], select[disabled], textarea[disabled], fieldset[disabled] input, fieldset[disabled] select, fieldset[disabled] textarea { background: var(--bg-2); color: var(--muted); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.check { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; font-size: .95rem; }
.check input { width: auto; accent-color: var(--primary); }
.checks { display: flex; gap: 22px; flex-wrap: wrap; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 0 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.span-2 { grid-column: span 2; }
@media (max-width: 760px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }
.row-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-inline select, .row-inline input { flex: 1; min-width: 140px; }

/* ---------- hero + carousel ---------- */
.hero { padding: 48px 0 28px; background: radial-gradient(1200px 400px at 85% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent), linear-gradient(var(--bg), var(--bg)); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: center; }
.hero h1 em { font-style: italic; color: var(--primary); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.carousel { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 4/3; background: var(--bg-2); box-shadow: var(--shadow); }
.carousel-track { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; color: #fff; text-decoration: none; }
.slide.is-active { opacity: 1; z-index: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 20px 40px; background: linear-gradient(transparent, rgb(0 0 0 / .65)); display: flex; flex-direction: column; }
.slide-caption strong { font: 700 1.25rem var(--display); }
.carousel-btn { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .85); color: #222; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.carousel-btn.prev { left: 12px; } .carousel-btn.next { right: 12px; }
.carousel-dots { position: absolute; bottom: 14px; left: 0; right: 0; z-index: 2; display: flex; justify-content: center; gap: 6px; }
.carousel-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: rgb(255 255 255 / .5); cursor: pointer; }
.carousel-dots button[aria-current] { background: #fff; width: 22px; border-radius: 4px; }
.carousel-empty { display: grid; place-items: center; }
.carousel-empty img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.carousel-empty p { position: relative; background: var(--surface); padding: 6px 14px; border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { .slide { transition: none; } }

/* ---------- search ---------- */
.search-section { margin-top: -6px; }
.search { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 6px; box-shadow: var(--shadow); }
.search-main { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr auto; gap: 12px; align-items: end; }
.search-go { margin-bottom: 14px; height: 44px; }
@media (max-width: 900px) { .search-main { grid-template-columns: 1fr 1fr; } .search-main .grow { grid-column: 1 / -1; } .search-go { grid-column: 1 / -1; } }
.search-more { border-top: 1px dashed var(--line); padding: 10px 0; }
.search-more summary { cursor: pointer; font-weight: 600; color: var(--primary); padding: 4px 0; }
.search-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 12px; margin-top: 12px; }
.distance-field { grid-column: span 2; }
@media (max-width: 760px) { .search-grid { grid-template-columns: 1fr 1fr; } }
.quick-types { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ---------- chips / badges ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip { display: inline-flex; gap: 6px; align-items: center; font-size: .78rem; font-weight: 600; padding: .25em .7em; border-radius: 999px; background: var(--bg-2); color: var(--text); }
.chip-rent { background: var(--primary-soft); }
.chip-event { background: color-mix(in srgb, var(--accent) 20%, var(--surface)); }
.chip-sale { background: color-mix(in srgb, #4a6fa5 22%, var(--surface)); }
.chip-link { text-decoration: none; border: 1px solid var(--line); background: var(--surface); padding: .4em .9em; font-size: .85rem; }
.chip-link span { color: var(--muted); font-weight: 500; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 600; padding: .3em .75em; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .0; }
.badge-editable, .badge-pending, .badge-locked, .badge-full, .badge-limited { }
.badge-editable::before, .badge-pending::before, .badge-locked::before, .badge-full::before, .badge-limited::before { opacity: 1; }
.badge-editable { color: var(--muted); }
.badge-pending  { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.badge-locked   { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.badge-full     { color: var(--ok); }
.badge-limited  { color: var(--warn); }
.count { font: 600 .75rem var(--font); color: var(--muted); background: var(--bg-2); padding: .1em .55em; border-radius: 999px; vertical-align: middle; }
.count.hot { background: var(--accent); color: #fff; }

/* ---------- cards ---------- */
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-media { position: relative; aspect-ratio: 4/3; background: var(--bg-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; left: 10px; top: 10px; background: rgb(0 0 0 / .6); color: #fff; font-size: .75rem; font-weight: 600; padding: .25em .65em; border-radius: 999px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin-bottom: 2px; }
.card h3 a { color: var(--text); text-decoration: none; }
.card .loc { margin: 0; }
.price { font-weight: 700; margin: auto 0 0; padding-top: 6px; }
.price.big { font: 700 1.5rem var(--display); }
.empty { text-align: center; padding: 40px 16px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.result-count { margin: 18px 0 14px; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pager a { padding: .4em .85em; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; background: var(--surface); }
.pager a[aria-current] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }

/* ---------- home sections ---------- */
.steps { list-style: none; counter-reset: s; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 18px 0 26px; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.steps li::before { content: counter(s); font: 700 1.6rem var(--display); color: var(--accent); }
.steps span { color: var(--muted); font-size: .92rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; padding: 20px; } }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 18px; }
.service { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.service ul { padding-left: 1.1em; color: var(--muted); }
@media (max-width: 860px) { .service-grid { grid-template-columns: 1fr; } }
.prose { overflow-wrap: anywhere; }

/* ---------- object page ---------- */
.object-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 20px; }
.price-box { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: 180px; gap: 8px; border-radius: 18px; overflow: hidden; margin-bottom: 28px; }
.gallery a { display: block; background: var(--bg-2); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery .g-main { grid-row: span 2; }
.gallery a:nth-child(n+6) { display: none; }
.gallery[data-more]::after { content: attr(data-more); }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 130px; } .gallery .g-main { grid-column: span 2; grid-row: span 2; } }
.object-layout { display: grid; grid-template-columns: 1fr 320px; gap: 40px; }
.object-main section { margin-bottom: 30px; }
@media (max-width: 860px) { .object-layout { grid-template-columns: 1fr; } }
.facts { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 18px; margin: 0; position: sticky; top: 84px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border: 0; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; font-weight: 600; text-align: right; }
.amenities { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.amenities li { background: var(--surface); border: 1px solid var(--line); padding: .3em .8em; border-radius: 999px; font-size: .9rem; }
.videos { display: grid; gap: 14px; }
.videos video { width: 100%; border-radius: 12px; background: #000; }
.ask { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; margin-top: 10px; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgb(0 0 0 / .9); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 6px; }
.lightbox button { position: fixed; background: rgb(255 255 255 / .15); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 1.8rem; cursor: pointer; }
.lb-close { top: 16px; right: 16px; } .lb-prev { left: 16px; top: 50%; } .lb-next { right: 16px; top: 50%; }

/* ---------- auth ---------- */
.auth { display: grid; place-items: center; }
.auth-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); }
.split { display: flex; justify-content: space-between; margin-top: 14px; }

/* ---------- dashboard (user area) ---------- */
.dash-body .site-footer { display: none; }
.dash { display: grid; grid-template-columns: 300px 1fr; min-height: calc(100vh - 65px); }
.dash-side { border-right: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; position: sticky; top: 65px; height: calc(100vh - 65px); }
.side-head { padding: 18px 16px 10px; }
.side-head h2 { font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); gap: 2px; }
.seg a, .seg button { border: 0; background: none; font: 600 .85rem var(--font); color: var(--muted); padding: .38em .95em; border-radius: 999px; cursor: pointer; text-decoration: none; }
.seg a[aria-current], .seg button[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); }
.seg-small a { font-size: .78rem; padding: .3em .75em; }
.obj-list { list-style: none; margin: 0; padding: 4px 8px; overflow-y: auto; flex: 1; }
.obj-list a { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; text-decoration: none; color: var(--text); }
.obj-list a:hover { background: var(--surface); }
.obj-list a[aria-current] { background: var(--surface); box-shadow: inset 3px 0 0 var(--primary), var(--shadow); }
.obj-list img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; background: var(--surface); }
.ol-text { min-width: 0; display: flex; flex-direction: column; }
.ol-text strong { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ol-text small { color: var(--muted); font-size: .78rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-editable { background: var(--muted); opacity: .5; } .dot-pending { background: var(--warn); } .dot-locked { background: var(--ok); }
.pad { padding: 10px; }
.side-foot { padding: 12px 16px; border-top: 1px solid var(--line); }
.side-foot a[aria-current] { color: var(--text); font-weight: 600; }
.dash-main { padding: 20px 28px 60px; min-width: 0; }
.dash-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.dash-title h1 { font-size: 1.6rem; margin: 0; }
.dash-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.status-help p { margin-bottom: 8px; }
.obj-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.more-fields { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.more-fields summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }
.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.media-block { margin-top: 24px; }
.media-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 10px; }
.media-head h2 { margin: 0; font-size: 1.2rem; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.thumb { margin: 0; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.thumb img, .thumb video { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #000; }
.thumb.is-cover { outline: 2px solid var(--accent); }
.cover-tag { position: absolute; top: 6px; left: 6px; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; padding: .15em .55em; border-radius: 999px; }
.thumb figcaption { display: flex; gap: 6px; align-items: center; justify-content: space-between; padding: 6px; }
.thumb .caption-form { flex: 1; }
.thumb .caption-form input { padding: .3em .5em; font-size: .8rem; border-radius: 6px; }
.thumb form.inline { display: flex; gap: 4px; margin: 0; }
.play { position: absolute; inset: 0 0 auto 0; aspect-ratio: 4/3; display: grid; place-items: center; color: #fff; font-size: 2rem; text-shadow: 0 2px 8px #000; }
.locked-note { background: color-mix(in srgb, var(--warn) 10%, var(--surface)); border: 1px dashed color-mix(in srgb, var(--warn) 45%, transparent); padding: 10px 14px; border-radius: 10px; }
.upload-form { margin: 0; }
.upload-form label { cursor: pointer; }
.upload-progress { margin-top: 12px; }
.danger-zone { margin-top: 36px; border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); border-radius: 12px; padding: 12px 16px; }
.danger-zone summary { cursor: pointer; color: var(--danger); font-weight: 600; }
.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
@media (max-width: 860px) {
  .dash { grid-template-columns: 1fr; }
  .dash-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .obj-list { max-height: 240px; }
  .dash-main { padding: 16px; }
}

/* ---------- admin ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current] { color: var(--text); border-color: var(--accent); }
.admin-search { max-width: 520px; margin-bottom: 16px; }
.admin-list { display: grid; gap: 12px; }
.admin-item { display: grid; grid-template-columns: 120px 1fr 280px; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.admin-item > img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; }
.admin-item h3 { margin-bottom: 4px; } .admin-item p { margin-bottom: 4px; }
.ai-actions { display: flex; flex-direction: column; gap: 10px; }
.reject-form { display: flex; flex-direction: column; gap: 6px; }
.reject-form textarea { font-size: .85rem; }
@media (max-width: 860px) { .admin-item { grid-template-columns: 1fr; } .admin-item > img { width: 100%; height: 160px; } }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: .9rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.table tr.is-off { opacity: .55; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.msg { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.msg.unread { border-left: 4px solid var(--accent); }
.msg header { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 28px 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; align-items: start; }
.site-footer nav { display: flex; flex-direction: column; gap: 6px; }
.site-footer nav a { color: var(--text); text-decoration: none; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

/* gallery adapts to the number of photos */
.gallery.g-n1 { grid-template-columns: 1fr; grid-auto-rows: 420px; }
.gallery.g-n2 { grid-template-columns: 2fr 1fr; }
.gallery.g-n2 a:nth-child(2) { grid-row: span 2; }
.gallery.g-n3 { grid-template-columns: 2fr 1fr; }
.gallery.g-n4 { grid-template-columns: 2fr 1fr 1fr; }
.gallery.g-n4 a:nth-child(4) { grid-column: span 2; }
@media (max-width: 700px) {
  .gallery.g-n1 { grid-auto-rows: 240px; }
  .gallery.g-n2, .gallery.g-n3 { grid-template-columns: 1fr 1fr; }
  .gallery.g-n2 a:nth-child(2) { grid-row: auto; grid-column: span 2; }
}

/* ---------- language switch ---------- */
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface); }
.lang-switch a { font: 600 .75rem var(--font); color: var(--muted); text-decoration: none; padding: .3em .6em; border-radius: 999px; }
.lang-switch a:hover { color: var(--text); }
.lang-switch a[aria-current] { background: var(--primary); color: var(--primary-ink); }
@media (max-width: 900px) { .lang-switch { align-self: flex-start; } }

/* ---------- maps ---------- */
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0 14px; }
.results-bar .result-count { margin: 0; }
.results-map { height: min(70vh, 640px); min-height: 380px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: var(--bg-2); z-index: 0; }
.place-map { height: 300px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; margin-bottom: 8px; z-index: 0; }
.picker-map { height: 280px; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; margin: 4px 0 6px; cursor: crosshair; z-index: 0; }
fieldset[disabled] .picker-map { cursor: default; opacity: .85; }
.map-empty { margin-top: 10px; }
.map-pin-wrap { background: none; border: 0; }
.map-pin { position: absolute; transform: translate(-50%, -100%); white-space: nowrap; background: var(--primary); color: var(--primary-ink); font: 700 .78rem var(--font); padding: .28em .6em; border-radius: 999px; box-shadow: 0 2px 6px rgb(0 0 0 / .35); border: 2px solid #fff; }
.map-pin::after { content: ""; position: absolute; left: 50%; bottom: -7px; translate: -50% 0; border: 5px solid transparent; border-top-color: #fff; }
.map-pin-dot { width: 16px; height: 16px; padding: 0; background: var(--accent); }
.map-pin-big { width: 22px; height: 22px; }
.leaflet-marker-icon:hover .map-pin, .leaflet-marker-icon:focus .map-pin { background: var(--accent); z-index: 2; }
.map-pop { display: flex; flex-direction: column; text-decoration: none; color: #22261f; }
.map-pop img { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; margin-bottom: 6px; }
.map-pop-body { display: flex; flex-direction: column; gap: 1px; font: .85rem/1.35 var(--font); }
.map-pop-body small { color: #676b5f; text-transform: uppercase; font-size: .68rem; letter-spacing: .06em; }
.map-pop-body strong { font: 700 1rem var(--display); }
.map-pop-body b { margin-top: 3px; }
.leaflet-container { font-family: var(--font); }
.leaflet-container a.map-pop { color: #22261f; }
:root[data-theme="dark"] .leaflet-tile-pane { filter: brightness(.75) contrast(1.1) saturate(.8); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .leaflet-tile-pane { filter: brightness(.75) contrast(1.1) saturate(.8); } }
