/* =====================================================================
   Free-Ads.In — design tokens, layout, components
   Modern CSS: custom properties, container queries, :has(), reduced-motion aware.
   ===================================================================== */

:root {
  color-scheme: light;
  --bg: #f6f6f4;
  --surface: #ffffff;
  --surface-2: #f1f1ef;
  --ink: #0a0a0a;
  --ink-2: #3f3f46;
  --muted: #71717a;
  --line: #e4e4e0;
  --line-strong: #0a0a0a;
  --primary: #0a0a0a;
  --primary-ink: #ffffff;
  --accent: #16a34a;
  --accent-soft: #dcfce7;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --link: #0f766e;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 8px 24px -12px rgb(0 0 0 / .12);
  --shadow-lg: 0 24px 64px -16px rgb(0 0 0 / .35);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 var(--font); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
code, .mono { font-family: var(--mono); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.wrap { width: min(1220px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--primary); color: var(--primary-ink); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; opacity: 0; }
[hidden] { display: none !important; }

.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }

/* ------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent;
  background: none; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .15s var(--ease), opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--primary); color: var(--primary-ink); box-shadow: var(--shadow); }
.btn--primary:hover { opacity: .88; }
.btn--ghost { border-color: var(--line); background: var(--surface); }
.btn--ghost:hover { border-color: var(--ink-2); }
.btn--text { padding: 0 8px; min-height: 32px; color: var(--link); }
.btn--text:hover { text-decoration: underline; }
.btn--danger { background: var(--danger); color: #fff; }
.btn--ok { background: var(--accent); color: #fff; }
.btn--sm { min-height: 30px; padding: 0 12px; font-size: 13px; }
.btn--icon { width: 40px; padding: 0; }
.btn--block { width: 100%; }

/* ------------------------------------------------------------- Top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; }
.topbar__actions { display: flex; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand strong { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.brand small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--muted); margin-top: 4px; }
.brand__mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--primary); color: var(--primary-ink); font-weight: 800; letter-spacing: -.04em; }
.brand--center { justify-content: center; margin-bottom: 20px; }

/* ------------------------------------------------------------- Filters */
.filters { padding-top: 16px; }
.filters__row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.fl { display: grid; gap: 4px; min-width: 0; }
.fl > span:first-child { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fl select, .fake-input, .fl output {
  height: 36px; width: 100%; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface-2); font-size: 13px; display: flex; align-items: center; min-width: 0;
}
.fl select { appearance: none; padding-right: 28px; cursor: pointer; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2371717a' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.fl select:disabled { opacity: .55; cursor: not-allowed; }
.fl select.is-set { border-color: var(--ink); background-color: var(--surface); font-weight: 600; }
.fake-input { justify-content: space-between; color: var(--ink-2); }
.fake-input b { font-size: 10px; color: var(--muted); }
.fl output { font-family: var(--mono); font-size: 11.5px; color: var(--muted); background: none; border-style: dashed; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl output.is-active { color: var(--accent); border-color: var(--accent); }
.gps-link { border: 0; background: none; padding: 0; color: var(--link); font: 700 10.5px var(--font); letter-spacing: .04em; cursor: pointer; display: inline-flex; gap: 3px; align-items: center; text-transform: uppercase; }
.gps-link .i { width: 12px; height: 12px; }

.search { display: flex; gap: 8px; margin-top: 10px; }
.search__box { flex: 1; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); color: var(--muted); }
.search__box:focus-within { border-color: var(--ink); }
.search__box input { flex: 1; border: 0; outline: 0; background: none; color: var(--ink); min-width: 0; }
.search__box kbd { font: 600 11px var(--mono); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }

/* ------------------------------------------------------------- Panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: 16px; margin-top: 16px; box-shadow: var(--shadow); }
.panel--flat { box-shadow: none; }
.panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.panel__head h1 { font-size: 17px; font-weight: 700; }
.panel__head h1 small { font-size: 12px; font-weight: 500; color: var(--muted); }
.panel__head p { font-size: 13px; color: var(--muted); margin-top: 4px; }


/* ------------------------------------------------------------- Grid */
.grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: auto;
  gap: 10px; padding: 10px; border: 2px solid var(--line-strong); border-radius: var(--radius);
}
.slot {
  grid-column: var(--c); grid-row: var(--r); position: relative; min-height: 150px;
  border-radius: var(--radius-sm); overflow: hidden; container-type: inline-size;
  transition: opacity .3s var(--ease), filter .3s, transform .2s var(--ease), box-shadow .2s;
}
.slot--skeleton { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 300% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -150% 0; } }

.slot__btn { all: unset; position: absolute; inset: 0; cursor: pointer; display: flex; flex-direction: column; border-radius: inherit; }
.slot__btn:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

/* Live ad card */
.slot--live { background: #111; color: #fff; }
.slot--live:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.slot__art { position: absolute; inset: 0; background:
    radial-gradient(120% 90% at 85% 10%, hsl(var(--h) 85% 62% / .9), transparent 60%),
    radial-gradient(90% 80% at 0% 100%, hsl(calc(var(--h) + 40) 80% 40% / .9), transparent 65%),
    linear-gradient(135deg, hsl(var(--h) 45% 18%), hsl(calc(var(--h) + 30) 50% 10%)); }
.slot__art::after { content: ""; position: absolute; inset: 0; opacity: .14;
  background-image: linear-gradient(rgb(255 255 255 / .6) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .6) 1px, transparent 1px);
  background-size: 22px 22px; mask-image: linear-gradient(135deg, #000 10%, transparent 70%); -webkit-mask-image: linear-gradient(135deg, #000 10%, transparent 70%); }
.slot__art .i { position: absolute; right: 6%; top: 8%; width: clamp(36px, 22cqi, 150px); height: auto; aspect-ratio: 1; stroke-width: 1.1; color: rgb(255 255 255 / .5); filter: drop-shadow(0 6px 20px rgb(0 0 0 / .35)); }
.slot__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.slot--live:hover .slot__img { transform: scale(1.04); }
.slot__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / 0) 30%, rgb(0 0 0 / .82) 100%); }
.slot__top { position: relative; display: flex; gap: 6px; padding: 10px; flex-wrap: wrap; }
.slot__body { position: relative; margin-top: auto; padding: 10px 12px 12px; }
.slot__title { font-weight: 800; font-size: clamp(12.5px, 5.2cqi, 22px); line-height: 1.2; text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 12px rgb(0 0 0 / .4); }
.slot__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: 11.5px; color: rgb(255 255 255 / .82); }
.slot__foot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot__foot b { color: #fde047; font-weight: 600; flex: none; display: inline-flex; align-items: center; gap: 4px; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--accent); color: #fff; }
.badge--glass { background: rgb(255 255 255 / .16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-weight: 500; }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--muted { background: var(--surface-2); color: var(--muted); }
.badge--ok { background: var(--accent-soft); color: var(--accent); }
.badge--err { background: var(--danger-soft); color: var(--danger); }
.badge .i { width: 12px; height: 12px; }
@container (max-width: 200px) { .slot__foot span { display: none; } .slot__top .badge--glass { display: none; } }

/* Available + pending */
.slot--open, .slot--pending { border: 1.5px dashed color-mix(in srgb, var(--muted) 55%, transparent); background: var(--surface); }
.slot--open .slot__btn, .slot--pending .slot__btn { align-items: center; justify-content: center; text-align: center; gap: 4px; padding: 10px; }
.slot--open:hover { border-color: var(--ink); border-style: solid; background: var(--surface-2); }
.slot--open:hover .open__plus { transform: rotate(90deg); color: var(--ink); }
.open__plus { width: 26px; height: 26px; color: var(--muted); transition: transform .3s var(--ease), color .2s; }
.open__price { font: 700 clamp(18px, 9cqi, 30px)/1.1 var(--mono); letter-spacing: -.02em; }
.open__sub { font-size: 11.5px; color: var(--muted); }
.open__cta { margin-top: 6px; font-size: 11.5px; font-weight: 700; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.slot--open:hover .open__cta { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.slot--pending { background: repeating-linear-gradient(-45deg, var(--surface), var(--surface) 10px, var(--surface-2) 10px, var(--surface-2) 20px); }
.slot--pending .slot__btn { cursor: default; }

/* Section header row inside the grid */
.grid__section { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); min-height: 0; }
.grid__section h2 { font-size: 13.5px; font-weight: 700; }
.grid__section span { font: 500 11px var(--mono); color: var(--muted); }


.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.legend__right { margin-left: auto; font-size: 11px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: 0; }
.dot--live { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dot--open { border: 1.5px dashed var(--muted); }
.dot--pending { background: repeating-linear-gradient(-45deg, var(--muted), var(--muted) 2px, transparent 2px, transparent 4px); border: 1px solid var(--muted); }

/* ------------------------------------------------------------- Cities */
.cities { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.cities h2 { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; }
.cities p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-size: 12.5px; font-weight: 500; cursor: pointer; transition: all .15s; }
.chip .i { width: 13px; height: 13px; color: var(--muted); }
.chip:hover { border-color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.chip[aria-pressed="true"] .i { color: inherit; }

/* ------------------------------------------------------------- Footer */
.footer { margin-top: 40px; border-top: 1px solid var(--line); background: var(--surface); padding: 32px 0 20px; font-size: 13px; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 28px; }
.footer h3 { font-size: 13.5px; margin-bottom: 10px; }
.footer p, .footer li { color: var(--muted); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); text-decoration: underline; }
.footer__bar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

/* ------------------------------------------------------------- Dialogs */
.modal { border: 0; padding: 0; width: min(560px, 100% - 24px); max-height: min(92dvh, 900px); border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); overflow: auto; overscroll-behavior: contain; }
.modal--wide { width: min(760px, 100% - 24px); }
.modal::backdrop { background: rgb(10 10 10 / .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal[open] { animation: pop .28s var(--ease); }
.modal[open]::backdrop { animation: fade .28s; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes fade { from { opacity: 0; } }
.modal__body { position: relative; padding: 24px; }
.modal__close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.modal__close:hover { background: var(--surface-2); }

.ad-view { padding: 0; }
.ad-view__media { position: relative; aspect-ratio: 16 / 8; overflow: hidden; background: #111; container-type: inline-size; }
.ad-view__media img { width: 100%; height: 100%; object-fit: cover; }
.ad-view__content { padding: 20px 24px 24px; display: grid; gap: 10px; }
.ad-view__meta { display: flex; gap: 6px; flex-wrap: wrap; }
.ad-view h2 { font-size: 21px; font-weight: 800; text-wrap: balance; }
.ad-view__by { color: var(--muted); font-size: 13.5px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ad-view__desc { white-space: pre-line; color: var(--ink-2); }
.ad-view__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.ad-view__foot { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; display: flex; gap: 14px; flex-wrap: wrap; }

/* Booking */
.book__head { margin-bottom: 16px; padding-right: 40px; }
.book__head h2 { font-size: 20px; font-weight: 800; }
.eyebrow { font: 700 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 12px 0 0; counter-reset: s; }
.steps li { flex: 1; font-size: 11.5px; font-weight: 600; color: var(--muted); padding-top: 8px; border-top: 3px solid var(--line); counter-increment: s; }
.steps li::before { content: counter(s) ". "; }
.steps li.is-on { color: var(--ink); border-color: var(--ink); }
.book__step { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field > span { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 600; }
.field > span em { font-style: normal; font-weight: 400; color: var(--muted); font-size: 11.5px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); transition: border-color .15s, background .15s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); background: var(--surface); }
.field.has-error input, .field.has-error select, .field.has-error textarea, .field.has-error .drop { border-color: var(--danger); background: var(--danger-soft); }
.field .err { color: var(--danger); font-size: 12px; }
.field small { font-size: 12px; }
.field--full { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); margin: 1px 0 0; flex: none; }
.check.has-error { color: var(--danger); }
.drop { position: relative; display: grid; place-items: center; min-height: 110px; border: 1.5px dashed var(--line); border-radius: var(--radius); background: var(--surface-2); cursor: pointer; overflow: hidden; color: var(--muted); font-size: 13px; transition: border-color .15s; }
.drop:hover, .drop.is-over { border-color: var(--ink); color: var(--ink); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop__empty { display: inline-flex; align-items: center; gap: 8px; padding: 12px; text-align: center; }
.drop__preview { width: 100%; max-height: 220px; object-fit: cover; }
.drop:has(.drop__preview:not([hidden])) .drop__empty { display: none; }
.form-error { margin-top: 14px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-size: 13px; font-weight: 500; }
.book__foot { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.spacer { flex: 1; }

.pay { grid-column: 1 / -1; display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.pay__qr { width: 200px; aspect-ratio: 1; display: grid; place-items: center; background: #fff; border-radius: 12px; padding: 8px; }
.pay__qr svg, .pay__qr img { width: 100%; height: auto; }
.pay__amount { font: 800 34px var(--mono); letter-spacing: -.03em; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 12px 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; word-break: break-all; }
.show-touch { display: none; }
@media (pointer: coarse) { .show-touch { display: inline-flex; } }

.book__done { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 12px 0; }
.done-badge { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); animation: pop .4s var(--ease); }
.done-badge .i { width: 32px; height: 32px; stroke-width: 2.4; }
.book__done h3 { font-size: 20px; }
.ref code { font-size: 18px; font-weight: 700; padding: 4px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }

.stack { display: grid; gap: 14px; }
.status-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 6px; font-size: 13.5px; }

/* Toasts */
.toasts { position: fixed; z-index: 100; left: 50%; bottom: 20px; translate: -50% 0; display: grid; gap: 8px; width: min(420px, 100% - 24px); pointer-events: none; }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--primary); color: var(--primary-ink); box-shadow: var(--shadow-lg); font-size: 13.5px; font-weight: 500; animation: pop .25s var(--ease); }
.toast--err { background: var(--danger); color: #fff; }

/* Notices + auth (installer/admin) */
.notice { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; margin: 12px 0; }
.notice--ok { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.notice--err { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.page-narrow { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 20px; margin-bottom: 6px; }
.auth-card .muted { font-size: 13px; margin-bottom: 12px; }

/* ------------------------------------------------------------- Responsive */
@media (max-width: 1080px) {
  .filters__row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .filters__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fl--status { grid-column: 1 / -1; }
  .panel__head { flex-direction: column; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px; }
  .slot { grid-column: auto / span var(--m); grid-row: span 1; }
  .slot[style*="--m:2"] { min-height: 190px; }
  .grid__section { flex-direction: column; align-items: flex-start; gap: 2px; }
  .legend__right { margin-left: 0; }
  .book__step { grid-template-columns: 1fr; }
  .pay { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .kv { text-align: left; }
  .hide-sm { display: none; }
  .topbar__actions .btn--primary span { display: none; }
  .topbar__actions .btn--primary { width: 40px; padding: 0; }
  .search { flex-wrap: wrap; }
  .search__box { min-width: 0; flex-basis: 0; }
  #gpsBtn { width: 44px; height: 44px; padding: 0; }
  #gpsBtn span { display: none; }
  #resetBtn { flex-basis: 100%; }
  .brand strong { font-size: 19px; }
  .footer__grid { grid-template-columns: 1fr; }
  .modal { width: 100%; max-height: 94dvh; border-radius: 20px 20px 0 0; margin: auto auto 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* View Transitions (progressive enhancement) */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }

/* ------------------------------------------------------------- Reach layers */
.scope-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font: 700 11px var(--font); letter-spacing: .02em; text-decoration: none; vertical-align: 2px; white-space: nowrap; }
.scope-tag--india { background: #0a0a0a; color: #fde047; }
.scope-tag--state { background: #1e3a8a; color: #dbeafe; }
.scope-tag--city  { background: var(--accent); color: #fff; }

.layer-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.layer-nav a { height: 28px; padding: 0 12px; }
.layer + .layer { margin-top: 22px; }
.layer { scroll-margin-top: 90px; }
.layer__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 10px; }
.layer__head h2 { font-size: 15.5px; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.layer__head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.layer__count { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.layer--india .grid { border-color: var(--line-strong); }
.layer--state .grid { border-color: #1e3a8a; }
.layer--city .grid { border-color: var(--accent); }
#layers[aria-busy="true"] { opacity: .55; transition: opacity .2s; pointer-events: none; }

.local-prompt { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 16px; border: 1.5px dashed var(--line); border-radius: var(--radius); background: var(--surface-2); }
.local-prompt__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); flex: none; }
.local-prompt div { flex: 1; min-width: 0; }
.local-prompt p { font-size: 13px; color: var(--muted); margin-top: 2px; }

.slot--open.is-pulse { animation: pulse 1.2s var(--ease) 2; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px var(--accent); border-color: var(--accent); } }

/* ------------------------------------------------------------- Post form additions */
.reach { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13.5px; }
.acct { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); min-width: 0; }
.acct legend { float: left; grid-column: 1 / -1; width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 0; margin-bottom: 4px; font-size: 13.5px; font-weight: 700; }
.acct legend em { font-style: normal; font-weight: 400; font-size: 12.5px; color: var(--muted); }
.acct .field input { background: var(--surface); }
.acct-me { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); font-size: 13.5px; }
.more { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 12px; }
.more summary { cursor: pointer; padding: 10px 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.more[open] { padding-bottom: 12px; display: grid; gap: 10px; }
.book__done .btn { margin-top: 6px; }
@media (max-width: 760px) {
  .acct { grid-template-columns: 1fr; }
  .layer__head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .local-prompt { flex-wrap: wrap; }
}

/* ------------------------------------------------------------- Search / filter results */
.results__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.results__head h2 { font-size: 17px; font-weight: 800; }
.results__head h2 span { font-weight: 500; color: var(--muted); font-size: 14px; margin-left: 4px; }
.results__head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.results__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.results__grid .slot { min-height: 0; aspect-ratio: 4 / 3; }
.results__empty { display: grid; justify-items: center; gap: 6px; padding: 48px 16px; text-align: center; border: 1.5px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.results__empty .i { width: 32px; height: 32px; }
.results__empty strong { color: var(--ink); font-size: 15px; }
.results__empty p { font-size: 13px; max-width: 360px; }
@media (max-width: 1080px) { .results__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .results__grid { grid-template-columns: 1fr; }
  .results__grid .slot { aspect-ratio: 16 / 10; }
  .results__head { flex-direction: column; align-items: flex-start; }
}
.count-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 2px; border-radius: 999px; background: var(--danger); color: #fff; font: 700 11px var(--font); }

/* ------------------------------------------------------------- SEO content: breadcrumbs, explore, FAQ */
.crumbs { margin-top: 16px; font-size: 12.5px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 4px; color: var(--line-strong); opacity: .4; }
.crumbs a { color: var(--link); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.panel__head h1 { font-size: clamp(19px, 2.4vw, 24px); font-weight: 800; letter-spacing: -.02em; }
a.chip { text-decoration: none; color: inherit; }
.chip[aria-current="page"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.chip[aria-current="page"] .i { color: inherit; }
.grid__section h3 { font-size: 13.5px; font-weight: 700; }

.explore h2, .faq h2 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.explore { display: grid; gap: 22px; }
.explore__block h3 { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }

/* Category cards */
.ex-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.ex-cat { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: inherit; transition: border-color .15s, transform .15s var(--ease), box-shadow .15s; }
.ex-cat:hover { border-color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow); }
.ex-cat.is-current { border-color: var(--ink); background: var(--surface-2); }
.ex-cat__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); flex: none; }
.ex-cat__icon .i { width: 20px; height: 20px; }
.ex-cat strong { display: block; font-size: 13.5px; line-height: 1.25; }
.ex-cat small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.chip--more { background: none; border-style: dashed; color: var(--link); }

/* States: tidy columns */
.ex-states { list-style: none; margin: 0; padding: 0; columns: 4 200px; column-gap: 24px; }
.ex-states li { break-inside: avoid; padding: 3px 0; }
.ex-states a { font-size: 13.5px; color: var(--ink-2); text-decoration: none; }
.ex-states a:hover { color: var(--link); text-decoration: underline; }
.ex-states a[aria-current] { color: var(--ink); font-weight: 700; }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 13px 0; font-weight: 600; font-size: 14.5px; }
.faq details p { padding: 0 0 14px; color: var(--ink-2); max-width: 860px; }

/* Ad page: related ads */
.related { margin-top: 18px; }
.related .results__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .related .results__grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------- Floating masthead (listing pages) */
.masthead { position: sticky; top: 10px; z-index: 30; width: min(1220px, 100% - 20px); margin: 10px auto 0; }
.masthead__inner {
  display: grid; grid-template-columns: max-content minmax(0, 1fr);
  grid-template-areas: "brand filters" "actions search";
  gap: 10px 18px; align-items: center; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  box-shadow: var(--shadow); transition: box-shadow .25s var(--ease);
}
.masthead.is-scrolled .masthead__inner { box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 18px 40px -18px rgb(0 0 0 / .35); }
.masthead__brand { grid-area: brand; text-decoration: none; align-self: start; padding-top: 2px; }
.masthead__brand strong { display: block; font-size: 25px; font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.masthead__brand small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .16em; color: var(--muted); margin-top: 5px; }
.masthead__actions { grid-area: actions; display: flex; gap: 8px; align-items: center; }
.masthead__actions .btn { min-height: 40px; }
.masthead__post { padding: 0 14px; }
.masthead .acct-btn { width: 40px; padding: 0; position: relative; }
.masthead .acct-btn .count-badge { position: absolute; top: -4px; right: -4px; margin: 0; }
.masthead__filter-toggle { display: none; position: relative; }
.masthead__filter-toggle .count-badge { margin-left: 2px; }
.masthead .filters__row { grid-area: filters; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.masthead .search { grid-area: search; margin: 0; }
.masthead .search__box { height: 42px; box-shadow: none; background: var(--surface); }
.layer, #board { scroll-margin-top: 170px; }

@media (max-width: 1080px) {
  .masthead__brand { display: flex; align-items: baseline; gap: 10px; }
  .masthead__brand small { margin: 0; }
  .masthead__inner { grid-template-columns: 1fr auto; grid-template-areas: "brand actions" "filters filters" "search search"; }
}
@media (max-width: 760px) {
  .masthead { top: 6px; width: calc(100% - 12px); margin-top: 6px; }
  .masthead__inner { padding: 10px; gap: 8px; border-radius: 16px; grid-template-areas: "brand actions" "search search" "filters filters"; }
  .masthead__brand { display: block; }
  .masthead__brand strong { font-size: 20px; }
  .masthead__brand small { font-size: 9.5px; margin-top: 3px; }
  .masthead__post span { display: none; }
  .masthead__post { width: 40px; padding: 0; }
  .masthead__filter-toggle { display: inline-flex; padding: 0 12px; }
  .masthead .filters__row { display: none; }
  .masthead.is-open .filters__row { display: grid; animation: pop .2s var(--ease); padding-top: 4px; border-top: 1px solid var(--line); }
  .masthead .search__box { height: 40px; }
  .masthead .search { flex-wrap: nowrap; gap: 6px; }
  .masthead #resetBtn { flex-basis: auto; padding: 0 4px; }
  .masthead #gpsBtn { width: 40px; height: 40px; }
  .layer, #board { scroll-margin-top: 130px; }
}
