/* =====================================================================
   Near2 design system
   Tokens → base → layout → components → page sections → responsive
   Reference desktop: 1920×1280 (content rail ≈ 78% of the viewport).
   ===================================================================== */

@font-face { font-family: "Lora"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/lora-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/lora-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/lora-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Lora"; font-style: italic; font-weight: 500; font-display: swap; src: url("../fonts/lora-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/caveat-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/caveat-600-normal.woff2") format("woff2"); }

:root {
    --font-serif: "Lora", Georgia, "Times New Roman", serif;
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-script: "Caveat", "Segoe Script", cursive;

    --ink-900: #231e1b;
    --ink-800: #2f2825;
    --ink-700: #463d38;
    --ink-600: #5e544e;
    --ink-500: #776c66;
    --ink-400: #9b908a;
    --ink-300: #c3b9b2;
    --sand-50: #fcfaf8;
    --sand-100: #f8f3ef;
    --sand-200: #f1e9e3;
    --sand-300: #e6dcd4;
    --white: #ffffff;
    --rose-50: #fdf3f7;
    --rose-100: #fbe5ee;
    --rose-200: #f6c9da;
    --rose-300: #ee9fbd;
    --rose-500: #d64a7d;
    --rose-600: #c73669;
    --rose-700: #a82656;
    --rose-800: #861d45;
    --gold-500: #e6a23c;
    --green-50: #edf7f1;
    --green-600: #2f7d57;
    --green-700: #22613f;
    --amber-50: #fff7e8;
    --amber-700: #8a5a00;
    --red-50: #fdf0ef;
    --red-600: #c0392b;
    --blue-50: #eef4fb;
    --blue-700: #2b5a8a;
    --footer-bg: #2a2421;

    --text: var(--ink-900);
    --text-body: var(--ink-700);
    --text-muted: var(--ink-500);
    --bg: var(--sand-50);
    --surface: var(--white);
    --border: var(--sand-300);
    --border-soft: var(--sand-200);
    --primary: var(--rose-600);
    --primary-hover: var(--rose-700);
    --focus: 0 0 0 3px rgba(199, 54, 105, .28);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-pill: 999px;
    --shadow-xs: 0 1px 2px rgba(35, 30, 27, .06);
    --shadow-sm: 0 2px 8px rgba(35, 30, 27, .07);
    --shadow: 0 10px 30px rgba(35, 30, 27, .09);
    --shadow-lg: 0 22px 50px rgba(35, 30, 27, .14);

    --rail: min(1480px, 78vw);
    --gutter: 24px;
    --header-h: 84px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-sans); font-size: 15.5px; line-height: 1.6; color: var(--text-body); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--text); font-weight: 600; line-height: 1.18; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 1.2rem + 2.4vw, 3.6rem); }
h2 { font-size: clamp(1.45rem, 1.1rem + 1vw, 2.05rem); }
h3 { font-size: 1.18rem; }
h4 { font-size: 1.02rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--border-soft); margin: 1.5rem 0; }
small, .small { font-size: .86em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
h1:focus, h1:focus-visible, [tabindex="-1"]:focus { outline: none; box-shadow: none; }
::selection { background: var(--rose-100); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--ink-900); color: #fff; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Layout ---------- */
.container { width: var(--rail); margin-inline: auto; }
.container-narrow { width: min(820px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.container-mid { width: min(1120px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.page { padding: 40px 0 72px; }
.page-header { margin-bottom: 28px; }
.page-header p { color: var(--text-muted); max-width: 70ch; }
.stack > * + * { margin-top: var(--stack, 1rem); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--gap, .75rem); align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.grid { display: grid; gap: var(--gap, 24px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.muted { color: var(--text-muted); }
.eyebrow { font-family: var(--font-sans); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); margin-bottom: .75rem; }
.script { font-family: var(--font-script); font-weight: 600; }
.lead { font-size: 1.12rem; color: var(--text-body); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.w-full { width: 100%; }
.nowrap { white-space: nowrap; }

/* ---------- Icons ---------- */
.icon { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: -0.2em; }
.icon-fill { fill: currentColor; stroke: none; }

/* ---------- Buttons ---------- */
.btn { --btn-bg: var(--surface); --btn-fg: var(--text); --btn-border: var(--border); display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 44px; max-width: 100%; padding: .65em 1.25em; border-radius: var(--radius-pill); border: 1.5px solid var(--btn-border); background: var(--btn-bg); color: var(--btn-fg); font: 600 .95rem/1.2 var(--font-sans); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s; white-space: nowrap; overflow-wrap: anywhere; }
.btn:hover { text-decoration: none; color: var(--btn-fg); border-color: var(--ink-300); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-primary { --btn-bg: var(--primary); --btn-fg: #fff; --btn-border: var(--primary); }
.btn-primary:hover { --btn-bg: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-dark { --btn-bg: var(--ink-900); --btn-fg: #fff; --btn-border: var(--ink-900); }
.btn-dark:hover { --btn-bg: var(--ink-700); border-color: var(--ink-700); color: #fff; }
.btn-outline { --btn-bg: transparent; --btn-fg: var(--primary); --btn-border: var(--rose-300); }
.btn-outline:hover { --btn-bg: var(--rose-50); border-color: var(--primary); color: var(--primary-hover); }
.btn-ghost { --btn-bg: transparent; --btn-border: transparent; --btn-fg: var(--text-body); }
.btn-ghost:hover { --btn-bg: var(--sand-100); border-color: transparent; }
.btn-danger { --btn-bg: var(--red-600); --btn-fg: #fff; --btn-border: var(--red-600); }
.btn-danger:hover { --btn-bg: #a02f23; color: #fff; }
.btn-white { --btn-bg: #fff; --btn-fg: var(--rose-700); --btn-border: #fff; }
.btn-sm { min-height: 34px; padding: .4em .9em; font-size: .85rem; }
.btn-lg { min-height: 52px; padding: .8em 1.6em; font-size: 1.02rem; }
.btn-block { width: 100%; }
.link-arrow { display: inline-flex; align-items: center; gap: .35em; font-weight: 600; font-size: .92rem; color: var(--primary); white-space: nowrap; }
.link-arrow .icon { transition: transform .15s; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field > label, .label { font-weight: 600; font-size: .9rem; color: var(--text); }
.input, .select, .textarea, input[type="text"].input, input[type="email"].input { width: 100%; min-height: 46px; padding: .65em .9em; font: 400 .97rem/1.4 var(--font-sans); color: var(--text); background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s; }
.textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.select { appearance: none; padding-right: 2.4em; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23776c66' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9em center; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-300); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
.input::placeholder, .textarea::placeholder { color: var(--ink-400); }
.input.invalid, .select.invalid, .textarea.invalid, .modified.invalid { border-color: var(--red-600); }
.help { font-size: .84rem; color: var(--text-muted); }
.validation-message, .field-error { font-size: .84rem; color: var(--red-600); font-weight: 500; }
.validation-errors { margin: 0 0 18px; padding: 12px 16px 12px 34px; border-radius: var(--radius-sm); background: var(--red-50); color: var(--red-600); font-size: .9rem; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .94rem; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--primary); flex: none; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-400); pointer-events: none; }
.input-icon > .input { padding-left: 42px; }
.counter { font-size: .8rem; color: var(--text-muted); text-align: right; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-weight: 600; color: var(--text); margin-bottom: 8px; }

/* ---------- Cards, panels ---------- */
.card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.card-body { padding: 24px; }
.category-card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--sand-200); }
.category-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.card-header { padding: 18px 24px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-header h2, .card-header h3 { margin: 0; font-size: 1.12rem; }
.card-footer { padding: 16px 24px; border-top: 1px solid var(--border-soft); background: var(--sand-50); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.panel { background: var(--sand-100); border-radius: var(--radius); padding: 20px; }
.divider-list > * + * { border-top: 1px solid var(--border-soft); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: var(--radius-pill); font: 600 .74rem/1.4 var(--font-sans); letter-spacing: .01em; background: var(--sand-200); color: var(--ink-700); white-space: nowrap; }
.badge .icon { width: 13px; height: 13px; }
.badge-verified { background: var(--green-50); color: var(--green-700); }
.badge-sponsored { background: var(--amber-50); color: var(--amber-700); }
.badge-rose { background: var(--rose-100); color: var(--rose-700); }
.badge-blue { background: var(--blue-50); color: var(--blue-700); }
.badge-red { background: var(--red-50); color: var(--red-600); }
.badge-dark { background: var(--ink-900); color: #fff; }
.badge-demo { background: #efe9ff; color: #5b3fb5; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-open { color: var(--green-600); } .status-closed { color: var(--ink-500); }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--radius); border: 1px solid transparent; margin-bottom: 20px; font-size: .94rem; }
.alert .icon { margin-top: 3px; }
.alert-info { background: var(--blue-50); color: var(--blue-700); border-color: #d6e4f3; }
.alert-success { background: var(--green-50); color: var(--green-700); border-color: #cfe8d9; }
.alert-warning { background: var(--amber-50); color: var(--amber-700); border-color: #f3e0b8; }
.alert-error { background: var(--red-50); color: var(--red-600); border-color: #f2d0cc; }
.alert p:last-child { margin-bottom: 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: var(--radius); background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-weight: 600; color: var(--ink-600); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; background: var(--sand-50); padding: 12px 16px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--sand-50); }
.table-sort { border: 0; background: transparent; padding: 0; color: inherit; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
.table-sort:hover { color: var(--primary); }
.admin-listings-table .table th, .admin-listings-table .table td { white-space: nowrap; padding: 9px 12px; }
.admin-listing-actions { display: inline-flex; align-items: center; gap: 4px; }
.admin-listing-actions .btn-icon { width: 30px; min-width: 30px; height: 30px; min-height: 30px; padding: 0; }
.user-actions { gap: 4px; }
.user-actions .btn-icon { width: 30px; min-width: 30px; height: 30px; min-height: 30px; padding: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Tabs, pagination, breadcrumbs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.tabs a, .tabs button { padding: 10px 16px; font-weight: 600; font-size: .92rem; color: var(--text-muted); border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.tabs a:hover, .tabs button:hover { color: var(--text); text-decoration: none; }
.tabs .active, .tabs [aria-current="page"], .tabs [aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); }
.pager { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 32px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: #fff; color: var(--text); font-weight: 600; font-size: .9rem; text-decoration: none; }
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager .current { background: var(--ink-900); border-color: var(--ink-900); color: #fff; }
.pager .gap { border: 0; background: none; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 18px; font-size: .86rem; color: var(--text-muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--ink-300); }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs [aria-current] { color: var(--text); font-weight: 500; }

/* ---------- Stars ---------- */
.stars { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--text-body); }
.stars-row { display: inline-flex; gap: 1px; color: var(--gold-500); }
.stars-row .icon { width: 15px; height: 15px; }
.stars-row .off { color: var(--sand-300); }
.stars strong { color: var(--text); }
.rating-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rating-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.rating-input label { cursor: pointer; color: var(--sand-300); font-size: 0; }
.rating-input label .icon { width: 30px; height: 30px; }
.rating-input input:checked ~ label, .rating-input label:hover, .rating-input label:hover ~ label { color: var(--gold-500); }
.rating-input input:focus-visible + label { box-shadow: var(--focus); border-radius: 6px; }

/* ---------- Empty state, stat cards ---------- */
.empty { text-align: center; padding: 48px 24px; border: 1.5px dashed var(--border); border-radius: var(--radius-lg); background: #fff; }
.empty .icon { width: 42px; height: 42px; color: var(--rose-300); margin: 0 auto 12px; }
.empty h3 { margin-bottom: .35em; }
.empty p { color: var(--text-muted); max-width: 46ch; margin-inline: auto; }
.stat { background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 18px 20px; }
.stat-label { font-size: .8rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.stat-value { font: 600 1.8rem/1.2 var(--font-serif); color: var(--text); margin-top: 6px; }
.stat-note { font-size: .82rem; color: var(--text-muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.admin-dashboard-title { margin-bottom: 30px; }
.admin-dashboard-title h1 { letter-spacing: -.02em; }
.admin-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.admin-stats .stat { min-height: 128px; display: flex; flex-direction: column; justify-content: space-between; padding: 20px 22px; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.admin-stats .stat:hover { border-color: var(--rose-300); box-shadow: var(--shadow); transform: translateY(-1px); text-decoration: none; }
.admin-stats .stat-label { line-height: 1.35; }
.admin-stats .stat-value { font-size: clamp(1.8rem, 3vw, 2.35rem); margin-top: 14px; }
.admin-dashboard-sections { display: grid; gap: 34px; }
.admin-dashboard-section { min-width: 0; }
.admin-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.admin-section-heading h2 { margin: 0; font-size: 1.35rem; }
.admin-section-heading .eyebrow { margin: 0 0 4px; }
.admin-stats-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
.admin-mobile-menu { display: none; }

/* =====================================================================
   Header & navigation
   ===================================================================== */
.site-header { position: relative; z-index: 30; background: rgba(252, 250, 248, .92); border-bottom: 1px solid var(--border-soft); backdrop-filter: saturate(140%) blur(8px); }
.site-header.is-overlay { position: absolute; inset: 0 0 auto 0; background: transparent; border-bottom-color: transparent; backdrop-filter: none; }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 40px; }
.brand { display: inline-flex; align-items: center; color: var(--text); text-decoration: none; flex: none; }
.brand:hover { text-decoration: none; color: var(--text); }
.brand svg { height: 50px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav > a, .nav-menu > summary { display: inline-flex; align-items: center; gap: 4px; padding: 10px 14px; font-weight: 500; font-size: .97rem; color: var(--ink-800); border-radius: var(--radius-pill); text-decoration: none; cursor: pointer; list-style: none; }
.main-nav > a:hover, .nav-menu > summary:hover { background: rgba(35, 30, 27, .05); text-decoration: none; color: var(--text); }
.main-nav > a.active { color: var(--primary); }
.nav-menu { position: relative; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu[open] > summary { background: rgba(35, 30, 27, .06); }
.nav-dropdown { position: absolute; top: calc(100% + 8px); left: 0; min-width: 280px; background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 10px; z-index: 40; }
.nav-dropdown a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text-body); font-size: .93rem; }
.nav-dropdown a:hover { background: var(--sand-100); text-decoration: none; color: var(--text); }
.nav-dropdown .nav-heading { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); padding: 8px 12px 4px; }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: 18px; }
.header-actions .btn { min-height: 42px; }
.header-link { font-weight: 600; font-size: .95rem; color: var(--ink-800); padding: 8px 10px; }
.header-link:hover { color: var(--primary); text-decoration: none; }
.mobile-nav { display: none; margin-left: auto; }
.mobile-nav > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-pill); cursor: pointer; color: var(--text); }
.mobile-nav > summary::-webkit-details-marker { display: none; }
.mobile-panel { position: absolute; left: 12px; right: 12px; top: calc(var(--header-h) - 6px); max-height: calc(100dvh - var(--header-h) - 16px); overflow-y: auto; overscroll-behavior: contain; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 14px; display: grid; gap: 2px; z-index: 50; }
.mobile-panel a { padding: 12px 14px; border-radius: var(--radius-sm); color: var(--text); font-weight: 500; }
.mobile-panel a:hover { background: var(--sand-100); text-decoration: none; }
.mobile-panel .btn { margin-top: 8px; }
.user-menu .nav-dropdown { left: auto; right: 0; min-width: 230px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--rose-100); color: var(--rose-700); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.notice-dot { position: relative; }
.notice-dot[data-count]:not([data-count="0"])::after { content: attr(data-count); position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--primary); color: #fff; font-size: .66rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* =====================================================================
   Footer
   ===================================================================== */
.site-footer { background: var(--footer-bg); color: #cfc5be; font-size: .86rem; }
.footer-inner { display: grid; grid-template-columns: 1.35fr repeat(4, minmax(0, .8fr)) 1.2fr; gap: 28px; padding: 30px 0 18px; align-items: start; }
.footer-brand svg { height: 42px; width: auto; }
.footer-brand p { margin: 8px 0 0; color: #a99f98; max-width: 30ch; font-size: .82rem; line-height: 1.5; }
.footer-col h2 { font: 600 .74rem/1.3 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 8px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; }
.footer-col a { color: #cfc5be; }
.footer-col a:hover { color: #fff; }
.footer-script { font-family: var(--font-script); font-size: 1.9rem; line-height: 1.1; color: var(--rose-300); text-align: right; align-self: center; }
.footer-script .icon { display: inline; width: 22px; height: 22px; color: var(--rose-300); vertical-align: -2px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .09); padding: 10px 0 14px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: #988d86; }
.footer-bottom a { color: #b8aea7; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .07); color: #e8dfd8; }
.footer-social a:hover { background: var(--primary); color: #fff; }

/* =====================================================================
   Homepage (reference layout)
   ===================================================================== */
.home-hero { position: relative; min-height: clamp(460px, 29vw, 560px); background: var(--sand-100); overflow: visible; display: flex; align-items: center; }
.home-hero-photo { position: absolute; inset: 0 0 0 36%; }
.home-hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.home-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, var(--sand-100) 0%, var(--sand-100) 36%, rgba(248, 243, 239, .9) 44%, rgba(248, 243, 239, .35) 56%, rgba(248, 243, 239, 0) 66%); pointer-events: none; }
.home-hero-inner { position: relative; z-index: 2; width: var(--rail); margin: 0 auto; padding: calc(var(--header-h) + 14px) 0 40px; display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.home-hero-copy { flex: 1 1 auto; min-width: 0; max-width: min(980px, 78%); }
.home-hero h1 { font-size: clamp(2.2rem, 1rem + 2.2vw, 3.45rem); line-height: 1.08; margin-bottom: .32em; letter-spacing: -.02em; max-width: 12em; }
.home-hero .lead { font-size: clamp(1rem, .85rem + .3vw, 1.22rem); color: var(--ink-600); max-width: 34em; margin-bottom: 22px; }
.hero-search { width: 100%; position: relative; z-index: 30; }
.hero-search-bar { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(260px, 1fr) auto; align-items: center; background: #fff; border-radius: var(--radius-pill); box-shadow: var(--shadow); padding: 7px; border: 1px solid var(--border-soft); }
.hero-search .seg { position: relative; display: flex; align-items: center; gap: 10px; padding: 0 18px; min-height: 52px; }
.hero-search .seg + .seg { border-left: 1px solid var(--border); }
.hero-search .seg .icon { color: var(--primary); width: 20px; height: 20px; }
.location-picker { z-index: 4; }
.service-picker { z-index: 5; }
.town-suggestions { position: absolute; left: 10px; right: 10px; top: calc(100% + 8px); display: grid; gap: 2px; width: auto; min-width: 0; max-width: none; padding: 8px; background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 100; }
.town-suggestions[hidden] { display: none; }
.town-suggestions button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; border: 0; border-radius: 7px; background: transparent; color: var(--text); text-align: left; font: 500 .9rem/1.3 var(--font-sans); cursor: pointer; }
.town-suggestions button:hover, .town-suggestions button:focus-visible { background: var(--sand-100); color: var(--primary); outline: none; }
.town-suggestions .town-option { white-space: nowrap; }
.town-use-location { border-bottom: 1px solid var(--border-soft) !important; color: var(--primary) !important; font-weight: 700 !important; white-space: nowrap; }
.search-suggestions { position: absolute; left: 10px; right: 10px; top: calc(100% + 8px); display: grid; padding: 8px; background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 100; }
.search-suggestions[hidden] { display: none; }
.search-option { display: grid; gap: 2px; width: 100%; padding: 10px 12px; border: 0; border-radius: 7px; background: transparent; color: var(--text); text-align: left; font: 500 .9rem/1.3 var(--font-sans); cursor: pointer; }
.search-option-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; }
.search-option strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: inherit; font-weight: 500; }
.search-option:hover, .search-option:focus-visible { background: var(--sand-100); color: var(--primary); outline: none; }
.search-option small { color: var(--text-muted); font: 500 .9rem/1.3 var(--font-sans); }
.search-option-type { flex: 0 0 auto; text-align: right; font-size: .78rem !important; }
.search-option-location { min-height: 1.2em; color: var(--text-muted); font-size: .82rem; }
.picker-heading { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 6px; color: var(--text-muted); font: 600 .9rem/1.3 var(--font-sans); }
.picker-clear { border: 0; padding: 0; background: transparent; color: var(--primary); font: 600 .82rem/1.3 var(--font-sans); cursor: pointer; }
.picker-clear:hover, .picker-clear:focus-visible { color: var(--rose-700); text-decoration: underline; outline: none; }
.town-suggestions .picker-clear { display: inline; width: auto; padding: 0; border-radius: 0; color: var(--primary); text-align: right; font: 600 .82rem/1.3 var(--font-sans); }
.town-suggestions .picker-clear:hover, .town-suggestions .picker-clear:focus-visible { background: transparent; color: var(--rose-700); }
.picker-recent { display: grid; gap: 2px; }
.popular-service-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 12px 10px; }
.popular-service-chip { border: 0; border-radius: 8px; background: var(--sand-100); color: var(--text); padding: 9px 13px; font: 600 .9rem/1.2 var(--font-sans); cursor: pointer; }
.popular-service-chip:hover, .popular-service-chip:focus-visible { background: var(--sand-200); color: var(--primary); outline: none; }
.search-picker-menu .recent-option { color: var(--text); }
.search-picker-menu .recent-option:hover, .search-picker-menu .recent-option:focus-visible { background: var(--sand-100); color: var(--primary); outline: none; }
.hero-search input { border: 0; outline: none; background: transparent; width: 100%; font: 500 1rem/1.3 var(--font-sans); letter-spacing: normal; color: var(--text); min-width: 0; padding: 10px 0; }
.hero-search .service-picker input, .hero-search .location-picker input { font-family: var(--font-sans); font-size: 1rem; font-weight: 500; }
.hero-search input::placeholder { color: var(--ink-400); font-weight: 400; }
.hero-search input:focus { box-shadow: none; }
.hero-search .btn { min-height: 54px; padding-inline: 28px; font-size: 1rem; }
.hero-search-help { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; margin: 12px 0 0; padding: 6px 16px; border-radius: var(--radius-lg); background: rgba(255, 255, 255, .82); backdrop-filter: blur(4px); color: var(--ink-600); font-size: .88rem; }
.location-action { display: inline-flex; align-items: center; gap: 7px; padding: 4px 0; border: 0; background: none; color: var(--primary); font: 600 .92rem/1.3 var(--font-sans); cursor: pointer; }
.location-action:hover { text-decoration: underline; text-underline-offset: 3px; }
.location-action[aria-busy="true"] { opacity: .65; cursor: wait; }
.location-action .icon { width: 17px; height: 17px; }
.hero-search-help [data-location-status].is-error { color: var(--red-600); }
.hero-proof { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 18px; font-size: .95rem; color: var(--ink-700); font-weight: 500; }
.hero-proof span { display: inline-flex; align-items: center; gap: 8px; }
.hero-proof .icon { width: 20px; height: 20px; color: var(--primary); }
.mobile-search-location { display: contents; }
.mobile-search-location > summary { display: none; }
.mobile-search-location-fields { display: contents; }
.mobile-filters { display: contents; }
.mobile-filters > summary { display: none; }
.mobile-filters .filters { display: block; }
.hero-note { flex: 0 0 auto; margin: 0; background: rgba(251, 229, 238, .94); color: var(--rose-800); border-radius: var(--radius-lg); padding: 16px 22px; box-shadow: var(--shadow); font-family: var(--font-script); font-size: clamp(1.35rem, 1rem + .7vw, 1.9rem); line-height: 1.05; max-width: 250px; transform: rotate(-2deg); }
.hero-note .icon { display: inline; width: .8em; height: .8em; color: var(--rose-600); vertical-align: -1px; }

.home-band { padding: 30px 0 0; }
.home-band:last-of-type { padding-bottom: 40px; }
.band-split { display: grid; grid-template-columns: minmax(220px, 17%) minmax(0, 1fr); gap: 34px; align-items: start; }
.band-title h2 { font-size: clamp(1.45rem, 1rem + .95vw, 2.1rem); margin-bottom: .35em; }
.band-title p { color: var(--text-muted); font-size: .94rem; margin-bottom: 14px; }
.band-head-link { display: flex; justify-content: flex-end; margin: -6px 0 12px; }

.service-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.service-tile { display: block; color: var(--text); text-decoration: none; }
.service-tile:hover { text-decoration: none; color: var(--primary); }
.service-tile .ph { aspect-ratio: 16 / 8; border-radius: var(--radius); overflow: hidden; background: var(--sand-200); box-shadow: var(--shadow-xs); }
.homepage-services-no-feature .service-tile .ph { aspect-ratio: 5 / 3; }
.service-tile .ph { position: relative; }
.service-tile-icon { position: absolute; left: 12px; bottom: 12px; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 50%; background: rgba(255,255,255,.94); color: var(--primary); box-shadow: var(--shadow-sm); line-height: 0; }
.service-tile-icon .icon { display: block; width: 22px; height: 22px; margin: 0; vertical-align: middle; }
.service-tile-icon img { display: block; width: 24px !important; height: 24px !important; margin: 0; object-fit: contain; }
.service-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.service-tile:hover img { transform: scale(1.05); }
.service-tile span { display: block; margin-top: 8px; font-weight: 600; font-size: .95rem; }
.service-tile > .ph > .service-tile-icon { display: grid; align-items: center; justify-items: center; margin-top: 0; font-size: initial; font-weight: initial; }

.featured-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.home-feature-card { display: grid; gap: 8px; min-width: 0; height: 100%; box-sizing: border-box; align-self: start; padding: 16px; background: linear-gradient(145deg, #fff1fa, #fbe5f2); border: 1px solid #f3d1e3; border-radius: 22px; box-shadow: 0 10px 24px rgba(202, 54, 117, .12); overflow: hidden; }
.home-feature-head { display: flex; align-items: center; gap: 8px; color: var(--rose-700); font-size: 1.02rem; }
.home-feature-head > .icon:first-child { width: 25px; height: 25px; color: var(--rose-600); }
.home-feature-head > .icon:last-child { margin-left: auto; width: 28px; height: 28px; color: var(--rose-600); }
.home-feature-photo { height: 92px; border-radius: 12px; overflow: hidden; background: var(--sand-200); filter: grayscale(1); }
.home-feature-photo img { width: 100%; height: 100%; object-fit: cover; }
.home-feature-card h3 { margin: 0; font-size: 1.35rem; letter-spacing: -.02em; }
.home-feature-rating .stars { margin: 0; }
.home-feature-facts { display: grid; gap: 9px; }
.home-feature-facts > div { display: flex; align-items: center; gap: 10px; color: var(--ink-700); }
.home-feature-facts .icon { width: 19px; height: 19px; color: var(--rose-600); flex: 0 0 auto; }
.home-feature-card > .btn { display: inline-flex; width: 100%; min-height: 42px; justify-content: center; align-items: center; border-radius: 999px; box-sizing: border-box; }
.homepage-services-layout { grid-template-columns: minmax(150px, 17%) minmax(0, 1fr) minmax(240px, .34fr); }
.homepage-services-no-feature .homepage-services-layout { grid-template-columns: minmax(180px, 17%) minmax(0, 1fr); }
.homepage-services-no-feature .service-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.feature-card { display: grid; grid-template-columns: 42% minmax(0, 1fr); background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); min-height: 172px; }
.feature-card .ph { background: var(--sand-200); position: relative; }
.feature-card .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-card .body { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.feature-card h3 { font-size: 1.08rem; margin: 2px 0 0; }
.feature-card h3 a { color: var(--text); }
.feature-card .meta { font-size: .86rem; color: var(--text-muted); }
.feature-card .desc { font-size: .86rem; color: var(--text-body); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.feature-card .btn { margin-top: auto; align-self: flex-start; }
.hours-editor .select { min-width: 170px; }
.hours-bank-holidays { margin-top: 18px; }
.hours-bank-holidays h3 { margin-bottom: 4px; }
.hours-bank-holiday-note { margin-top: 10px; }
.admin-claims-layout { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.8fr); gap: 20px; align-items: start; }
.admin-claims-list { overflow: hidden; }
.admin-claims-list-items { display: grid; }
.admin-claim-list-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 16px; border: 0; border-top: 1px solid var(--border-soft); background: #fff; color: var(--text); text-align: left; cursor: pointer; }
.admin-claim-list-item:hover, .admin-claim-list-item.active { background: var(--rose-100); }
.admin-claim-list-item strong, .admin-claim-list-item small { display: block; }
.admin-claim-list-item small { margin-top: 3px; color: var(--text-muted); font-size: .8rem; }
.admin-claim-detail { min-width: 0; }
@media (max-width: 900px) { .admin-claims-layout { grid-template-columns: 1fr; } }

.duo { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 34px; align-items: stretch; }
.duo-even { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 6px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step-num { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--rose-100); color: var(--rose-700); display: inline-flex; align-items: center; justify-content: center; }
.step-num .icon { width: 22px; height: 22px; }
.step h3 { font-size: 1.02rem; margin-bottom: .2em; font-family: var(--font-sans); font-weight: 700; letter-spacing: 0; }
.step p { font-size: .9rem; color: var(--text-muted); margin: 0; }
.cta-band { background: linear-gradient(135deg, var(--rose-600), var(--rose-500)); color: #fff; border-radius: var(--radius-lg); padding: 20px 26px; display: flex; flex-direction: column; justify-content: center; gap: 6px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.cta-band::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.cta-band h2 { color: #fff; font-size: clamp(1.3rem, 1rem + .6vw, 1.7rem); margin: 0; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .9); max-width: 40ch; }
.cta-band .btn { align-self: flex-start; margin-top: 4px; position: relative; z-index: 1; min-height: 40px; }
.duo h2 { font-size: clamp(1.4rem, 1rem + .85vw, 1.95rem); }
.guides-layout { display: grid; gap: 34px; }
.guides-content, .coming-soon-content { min-width: 0; }
.guide-carousel { overflow: hidden; }
.guide-carousel-track { display: flex; gap: 18px; transition: transform .7s ease; will-change: transform; }
.guide-slide { flex: 0 0 calc((100% - 54px) / 4); min-width: 0; }
.guides-content .guide-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.guide-card > div:last-child { display: flex; flex-direction: column; min-height: 100%; }
.guide-card .more { margin-top: auto; }
.coming-soon-content { border-top: 1px solid var(--border-soft); padding-top: 26px; }
@media (prefers-reduced-motion: reduce) { .guide-carousel-track { transition: none; } }

.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.guide-card { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; align-items: start; color: var(--text); text-decoration: none; }
.guide-card:hover { text-decoration: none; }
.guide-card:hover h3 { color: var(--primary); }
.guide-card .ph { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--sand-200); }
.guide-card img { width: 100%; height: 100%; object-fit: cover; }
.guide-card h3 { font-size: .98rem; margin: 0 0 .3em; line-height: 1.3; }
.guide-card p { font-size: .84rem; color: var(--text-muted); margin: 0 0 .35em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.guide-card .more { font-size: .84rem; font-weight: 600; color: var(--primary); }
.soon-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.soon-tile { background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 12px 10px; text-align: center; box-shadow: var(--shadow-xs); }
.soon-tile .icon { width: 28px; height: 28px; margin: 0 auto 8px; color: var(--rose-500); }
.soon-tile strong { display: block; font-size: .9rem; color: var(--text); line-height: 1.3; }
.soon-tile small { color: var(--text-muted); font-size: .76rem; }

/* =====================================================================
   Listing cards & search
   ===================================================================== */
.listing-card { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 0; background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs); transition: box-shadow .15s, border-color .15s; }
.listing-card:hover { box-shadow: var(--shadow-sm); border-color: var(--sand-300); }
.listing-card .ph { background: var(--sand-200); position: relative; min-height: 170px; }
.listing-card .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.listing-card .ph .initial { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 600 2.6rem/1 var(--font-serif); color: var(--rose-300); background: linear-gradient(135deg, var(--rose-50), var(--sand-200)); }
.listing-card .body { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.listing-card h3 { font-size: 1.15rem; margin: 0; }
.listing-card h3 a { color: var(--text); }
.listing-card h3 a::after { content: ""; position: absolute; inset: 0; }
.listing-card { position: relative; }
.listing-card .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .86rem; color: var(--text-muted); align-items: center; }
.listing-card .meta .icon { width: 15px; height: 15px; }
.listing-card .snippet { font-size: .9rem; margin: 2px 0 0; color: var(--text-body); }
.listing-card .actions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; position: relative; z-index: 1; }
.listing-list { display: grid; gap: 16px; }
.sponsored-strip { border: 1px solid #f3e0b8; background: linear-gradient(180deg, #fffaf0, #fff); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 22px; }
.sponsored-strip > header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: .84rem; color: var(--amber-700); font-weight: 600; }
.search-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; }
.filters { position: sticky; top: 16px; background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 20px; }
.filters h2 { font-size: 1.05rem; font-family: var(--font-sans); font-weight: 700; margin-bottom: 14px; }
.filters .field { margin-bottom: 14px; }
.filters details { border-top: 1px solid var(--border-soft); padding: 10px 0; }
.filters summary { font-weight: 600; font-size: .9rem; cursor: pointer; color: var(--text); }
.search-bar { display: grid; grid-template-columns: 1.3fr 1fr 150px auto auto; gap: 10px; background: #fff; padding: 10px; border-radius: var(--radius-lg); border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm); margin-bottom: 26px; }
.not-found-search { grid-template-columns: 1fr 1fr auto; margin: 24px auto 16px; max-width: 640px; }
.search-bar .input, .search-bar .select { border-color: transparent; background: var(--sand-50); }
.result-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.result-head h1 { font-size: clamp(1.5rem, 1.1rem + 1vw, 2.2rem); margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius-pill); background: #fff; border: 1px solid var(--border); font-size: .88rem; font-weight: 500; color: var(--text-body); text-decoration: none; }
.chip:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.chip.active { background: var(--ink-900); border-color: var(--ink-900); color: #fff; }
.chip .count { color: var(--text-muted); font-size: .8rem; }
.chip.active .count { color: rgba(255, 255, 255, .7); }

/* ---------- Results view toggle & map ---------- */
.listing-card .actions { flex-wrap: wrap; }
.listing-card.is-selected { border-color: var(--primary); box-shadow: 0 0 0 2px var(--rose-200), var(--shadow-sm); }
.listing-card.is-hovered { border-color: var(--rose-300); }
.rank-badge { position: absolute; top: 10px; left: 10px; min-width: 28px; height: 28px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-pill); background: var(--primary); color: #fff; font: 700 .82rem/1 var(--font-sans); box-shadow: 0 0 0 2px #fff, var(--shadow-sm); }
.listing-card.is-selected .rank-badge { background: var(--ink-900); }
.view-toggle { display: inline-flex; padding: 4px; gap: 4px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-pill); align-self: center; }
.view-toggle a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 16px; border-radius: var(--radius-pill); color: var(--text-body); font-weight: 600; font-size: .9rem; text-decoration: none; }
.view-toggle a:hover { color: var(--primary); text-decoration: none; }
.view-toggle a[aria-current="page"] { background: var(--ink-900); color: #fff; }
.map-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
.map-results { position: static; }
.map-results-note { margin: 0 0 12px; }
.map-split .listing-card { grid-template-columns: 132px minmax(0, 1fr); }
.map-split .listing-card .ph { min-height: 132px; }
.map-split .listing-card .body { padding: 14px 16px; }
.map-split .listing-card h3 { font-size: 1.05rem; }
.map-split .listing-card .snippet { display: none; }
.results-map { position: sticky; top: 16px; height: calc(100vh - 32px); min-height: 420px; max-height: 860px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-soft); background: var(--sand-200); box-shadow: var(--shadow-xs); isolation: isolate; z-index: 0; }
.results-map-canvas { position: absolute; inset: 0; font: inherit; background: var(--sand-200); }
.results-map-status { position: absolute; inset: auto 16px 16px; margin: 0; padding: 10px 14px; border-radius: var(--radius); background: rgba(255, 255, 255, .94); color: var(--text-muted); font-size: .9rem; text-align: center; z-index: 1000; }
.results-map-error { display: none; }
.results-map.is-ready .results-map-status { display: none; }
.results-map.is-failed .results-map-loading { display: none; }
.results-map.is-failed .results-map-error { display: inline; }
.map-pin { background: none; border: 0; display: flex; justify-content: center; }
.map-pin span { --pin: #fff; --edge: var(--ink-500); --tip: var(--ink-500); position: relative; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--pin); border: 2px solid var(--edge); box-shadow: var(--shadow-sm); color: var(--ink-700); font: 700 .78rem/1 var(--font-sans); transform-origin: 50% 100%; transition: transform .12s; }
.map-pin span::after { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 6px solid transparent; border-top: 8px solid var(--tip); border-bottom: 0; }
.map-pin.is-on-page span { --pin: var(--primary); --edge: #fff; --tip: var(--primary); color: #fff; }
.map-pin.is-hovered span { --pin: var(--rose-700); --edge: #fff; --tip: var(--rose-700); color: #fff; transform: scale(1.15); }
.map-pin.is-selected span { --pin: var(--ink-900); --edge: #fff; --tip: var(--ink-900); color: #fff; transform: scale(1.25); }
.map-pin:focus-visible { box-shadow: none; outline: none; }
.map-pin:focus-visible span { box-shadow: var(--focus); }
.map-cluster { background: none; }
.map-cluster span { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: var(--ink-700); color: #fff; font: 700 .9rem/1 var(--font-sans); box-shadow: 0 0 0 5px rgba(70, 61, 56, .22); }
.map-cluster.is-on-page span { background: var(--primary); box-shadow: 0 0 0 5px rgba(199, 54, 105, .25); }
.results-map .leaflet-popup-content-wrapper { border-radius: var(--radius); padding: 0; overflow: hidden; }
.results-map .leaflet-popup-content { margin: 0; font: inherit; line-height: 1.45; }
.map-popup img { width: 100%; height: 110px; object-fit: cover; }
.map-popup-body { padding: 12px 14px 14px; display: grid; gap: 6px; }
.map-popup-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.results-map .map-popup-title { font: 600 1.02rem/1.25 var(--font-serif); color: var(--text); }
.map-popup-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: .82rem; color: var(--text-muted); }
.map-popup-meta .status { font-size: .82rem; }
.map-popup-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.map-popup-actions .btn { min-height: 34px; }
.results-map .leaflet-popup-content a.btn-primary { color: #fff; }

/* =====================================================================
   Business profile
   ===================================================================== */
.profile-hero { background: #fff; border-bottom: 1px solid var(--border-soft); }
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; height: clamp(150px, 20vw, 260px); gap: 8px; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px; }
.gallery a, .gallery div { display: block; background: var(--sand-200); overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery > :first-child { grid-row: span 2; }
.gallery.count-1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.gallery.count-2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.gallery.count-2 > :first-child { grid-row: auto; }
.profile-head { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; padding: 28px 0 24px; }
.profile-head h1 { font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.8rem); margin-bottom: .2em; }
.profile-logo { width: 76px; height: 76px; border-radius: var(--radius); border: 1px solid var(--border-soft); background: #fff; object-fit: contain; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 36px; align-items: start; padding: 32px 0 72px; }
.profile-section { margin-bottom: 36px; }
.profile-section > h2 { font-size: 1.4rem; margin-bottom: 14px; }
.profile-aside { position: sticky; top: 16px; display: grid; gap: 16px; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; font-size: .94rem; word-break: break-word; }
.contact-list .icon { color: var(--primary); margin-top: 3px; }
.hours { width: 100%; font-size: .92rem; border-collapse: collapse; }
.hours td { padding: 6px 0; border-bottom: 1px dashed var(--border-soft); }
.hours td:last-child { text-align: right; }
.hours .today td { font-weight: 700; color: var(--text); }
.services-list { display: grid; gap: 0; border: 1px solid var(--border-soft); border-radius: var(--radius); background: #fff; }
.services-list > div { display: flex; justify-content: space-between; gap: 18px; padding: 14px 18px; border-bottom: 1px solid var(--border-soft); }
.services-list > div:last-child { border-bottom: 0; }
.services-list .price { font-weight: 700; color: var(--text); white-space: nowrap; }
.review { padding: 20px 0; border-bottom: 1px solid var(--border-soft); }
.review header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.review .who { font-weight: 600; color: var(--text); }
.owner-reply { margin-top: 12px; padding: 12px 16px; background: var(--sand-100); border-radius: var(--radius); border-left: 3px solid var(--rose-300); font-size: .92rem; }
.rating-summary { display: flex; gap: 18px; align-items: center; padding: 18px; background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius); margin-bottom: 12px; }
.rating-big { font: 600 2.6rem/1 var(--font-serif); color: var(--text); }
.map-embed { width: 100%; height: 240px; border: 0; border-radius: var(--radius); background: var(--sand-200); }
.faq details { border-bottom: 1px solid var(--border-soft); padding: 14px 0; }
.faq summary { font-weight: 600; cursor: pointer; color: var(--text); }
.faq p { margin: 8px 0 0; }
.attr-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.attr-groups ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .92rem; }
.attr-groups li { display: flex; gap: 8px; align-items: center; }
.attr-groups .icon { color: var(--green-600); width: 16px; height: 16px; }

/* =====================================================================
   Content (guides, legal)
   ===================================================================== */
.prose { font-size: 1.04rem; line-height: 1.75; color: var(--text-body); }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.25rem; margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--rose-300); color: var(--ink-600); font-style: italic; }
.prose img { border-radius: var(--radius); margin: 1.4em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--border-soft); padding: 10px 12px; text-align: left; }
.prose th { background: var(--sand-100); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.article-hero { aspect-ratio: 21 / 9; border-radius: var(--radius-lg); overflow: hidden; background: var(--sand-200); margin: 24px 0 32px; }
.article-hero img { width: 100%; height: 100%; object-fit: cover; }
.article-card { display: block; background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius-lg); overflow: hidden; color: var(--text); text-decoration: none; box-shadow: var(--shadow-xs); transition: box-shadow .15s; }
.article-card:hover { box-shadow: var(--shadow); text-decoration: none; }
.article-card .ph { aspect-ratio: 16 / 10; background: var(--sand-200); }
.article-card img { width: 100%; height: 100%; object-fit: cover; }
.article-card .body { padding: 18px 20px 20px; }
.article-card h3 { font-size: 1.15rem; margin-bottom: .35em; }
.article-card p { color: var(--text-muted); font-size: .92rem; margin: 0; }

/* =====================================================================
   Pricing
   ===================================================================== */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
.plan { position: relative; background: #fff; border: 1.5px solid var(--border-soft); border-radius: var(--radius-lg); padding: 28px 26px; display: flex; flex-direction: column; box-shadow: var(--shadow-xs); }
.plan.highlight { border-color: var(--primary); box-shadow: var(--shadow); }
.plan .ribbon { position: absolute; top: -13px; left: 26px; background: var(--primary); color: #fff; padding: 4px 12px; border-radius: var(--radius-pill); font-size: .76rem; font-weight: 700; letter-spacing: .03em; }
.plan h2 { font-size: 1.5rem; margin-bottom: .2em; }
.plan .price { font: 600 2.6rem/1 var(--font-serif); color: var(--text); margin: 18px 0 4px; }
.plan .price small { font: 500 .95rem var(--font-sans); color: var(--text-muted); }
.plan ul { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 9px; font-size: .93rem; flex: 1; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li .icon { width: 17px; height: 17px; margin-top: 3px; }
.plan li.yes .icon { color: var(--green-600); }
.plan li.no { color: var(--ink-400); }
.plan li.no .icon { color: var(--ink-300); }
.compare th:not(:first-child), .compare td:not(:first-child) { text-align: center; }
.compare .icon { margin: 0 auto; }
.compare .yes { color: var(--green-600); } .compare .no { color: var(--ink-300); }
.interval-toggle { display: inline-flex; background: var(--sand-200); padding: 4px; border-radius: var(--radius-pill); gap: 4px; }
.interval-toggle a, .interval-toggle button { padding: 8px 18px; border-radius: var(--radius-pill); font-weight: 600; font-size: .9rem; color: var(--text-body); border: 0; background: none; cursor: pointer; text-decoration: none; }
.interval-toggle .active { background: #fff; color: var(--text); box-shadow: var(--shadow-xs); }

/* =====================================================================
   Auth & account
   ===================================================================== */
.auth-wrap { min-height: calc(100vh - var(--header-h) - 200px); display: flex; align-items: flex-start; justify-content: center; padding: 56px 16px 80px; background: radial-gradient(ellipse at top, var(--rose-50), transparent 60%); }
.auth-card { width: min(460px, 100%); background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 34px 32px; }
.auth-card h1 { font-size: 1.85rem; margin-bottom: .25em; }
.auth-card .sub { color: var(--text-muted); margin-bottom: 24px; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: .84rem; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.provider-btn { width: 100%; justify-content: center; margin-bottom: 10px; }
.role-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.role-choice label { border: 1.5px solid var(--border); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.role-choice label:has(input:checked) { border-color: var(--primary); background: var(--rose-50); }
.role-choice input { accent-color: var(--primary); margin-top: 3px; }
.role-choice strong { display: block; color: var(--text); }

/* =====================================================================
   Dashboard & admin shells
   ===================================================================== */
.app-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); }
.app-sidebar { background: #fff; border-right: 1px solid var(--border-soft); padding: 22px 14px; }
.app-sidebar .side-title { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); padding: 14px 12px 6px; }
.app-sidebar nav { display: grid; gap: 2px; }
.app-sidebar a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--ink-700); font-weight: 500; font-size: .93rem; text-decoration: none; }
.app-sidebar a:hover { background: var(--sand-100); color: var(--text); }
.app-sidebar a.active { background: var(--rose-50); color: var(--rose-700); font-weight: 600; }
.app-sidebar .icon { width: 18px; height: 18px; }
.app-sidebar .count { margin-left: auto; background: var(--rose-100); color: var(--rose-700); font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 10px; }
.app-main { padding: 32px clamp(20px, 3vw, 44px) 64px; min-width: 0; }
.app-main > .page-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.app-main > .page-title h1 { font-size: 1.9rem; margin: 0; }
.admin-shell .app-sidebar { background: var(--ink-900); border-right: 0; }
.admin-shell .app-sidebar a { color: #d8cfc9; }
.admin-shell .app-sidebar a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.admin-shell .app-sidebar a.active { background: var(--primary); color: #fff; }
.admin-shell .app-sidebar .side-title { color: #8d827b; }
.wizard-steps { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; }
.wizard-steps li { height: 6px; border-radius: 3px; background: var(--sand-300); }
.wizard-steps li.done { background: var(--rose-300); }
.wizard-steps li.current { background: var(--primary); }
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border-soft); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: center; font-size: .94rem; }
.checklist .ok { color: var(--green-600); } .checklist .todo { color: var(--ink-300); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.photo-grid figure { margin: 0; background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; }
.photo-grid img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }
.photo-grid figcaption { padding: 8px; display: flex; gap: 6px; align-items: center; }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.category-grid fieldset { margin: 0; min-width: 0; }
.input-with-action { display: flex; gap: 8px; align-items: center; }
.input-with-action .input { min-width: 0; }
.town-picker { position: relative; }
.town-picker-options { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% - 8px); display: grid; padding: 6px; background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.town-picker-options button { border: 0; background: transparent; padding: 9px 10px; text-align: left; display: flex; justify-content: space-between; border-radius: var(--radius-sm); cursor: pointer; }
.town-picker-options button:hover, .town-picker-options button:focus-visible { background: var(--sand-100); }
.media-upload-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px; border: 1px dashed var(--rose-300); border-radius: var(--radius); background: var(--rose-50); }
.media-upload-card h3 { margin: 2px 0 4px; }
.media-upload-status { margin: 6px 0 0; color: var(--rose-700); font-size: .86rem; font-weight: 650; }
.media-upload-card label.disabled { opacity: .6; pointer-events: none; }
.media-upload-card input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.preview-grid { margin-top: 14px; opacity: .78; }
.logo-preview { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: #fff; }
.logo-preview img { width: 120px; height: 80px; object-fit: contain; border-radius: var(--radius-sm); background: var(--sand-50); }
@media (max-width: 900px) { .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .category-grid { grid-template-columns: 1fr; } .media-upload-card { align-items: flex-start; flex-direction: column; } .input-with-action { align-items: stretch; flex-direction: column; } }
.bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.bar-chart span { flex: 1; background: var(--rose-200); border-radius: 3px 3px 0 0; min-height: 2px; }
.bar-chart span:hover { background: var(--primary); }
.swatch { height: 64px; border-radius: var(--radius-sm); border: 1px solid var(--border-soft); }
.kv { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 8px 16px; font-size: .92rem; }
.kv dt { color: var(--text-muted); font-weight: 500; }
.kv dd { margin: 0; color: var(--text); word-break: break-word; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(35, 30, 27, .45); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { width: min(560px, 100%); background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-height: 90vh; overflow: auto; }

/* =====================================================================
   Mobile hardening
   Shared safeguards for narrow viewports. These rules intentionally sit
   after the component styles so pages with dense admin/account content get
   the same behaviour as the public pages.
   ===================================================================== */
html, body { overflow-x: clip; }
button, input, select, textarea { max-width: 100%; }
.container, .container-narrow, .container-mid, .app-main { min-width: 0; }
.between > *, .cluster > *, .card-header > *, .page-title > * { min-width: 0; }
.prose, .card, .panel, .empty, .listing-card, .feature-card, .article-card { overflow-wrap: anywhere; }
.prose table { display: block; overflow-x: auto; }
.email-preview { overflow-wrap: anywhere; }

/* Keep the admin users grid dense: the action controls should not determine
   the height of every user row. */
.users-table td { padding-block: 9px; }
.users-table .user-actions { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px; justify-content: start; align-items: center; }
.users-table .user-actions .btn { min-height: 30px; padding: .28em .65em; font-size: .76rem; }
.users-table .badge { padding: 2px 7px; font-size: .7rem; }

@media (max-width: 1100px) {
    .app-sidebar nav { scrollbar-width: thin; }
    .app-sidebar a { flex: 0 0 auto; }
    .app-main { padding-inline: clamp(16px, 3vw, 32px); }
}

@media (max-width: 760px) {
    .container, .container-narrow, .container-mid { width: calc(100% - 32px); }
    .header-inner { gap: 12px; }
    .mobile-panel { left: 8px; right: 8px; }
    .page-header, .app-main > .page-title { align-items: flex-start; }
    .page-header h1, .app-main > .page-title h1 { font-size: clamp(1.65rem, 7vw, 2.1rem); }
    .page-header .btn, .app-main > .page-title .btn { width: 100%; }
    .card-header { align-items: flex-start; flex-wrap: wrap; padding: 15px 16px; }
    .card-body { padding: 18px 16px; }
    .card-footer { padding: 14px 16px; }
    .panel { padding: 16px; }
    .app-sidebar { padding: 8px 16px; }
    .app-sidebar nav { margin-inline: -8px; padding: 0 8px 4px; }
    .app-sidebar a { padding: 9px 10px; }
    .app-main { padding: 24px 16px 48px; }
    .footer-inner { grid-template-columns: 1fr; gap: 22px; }
    .footer-brand { grid-column: auto; }
    .footer-script { text-align: left; }
    .footer-bottom { align-items: flex-start; flex-direction: column; }
    .form-actions { align-items: stretch; }
    .form-actions .btn { flex: 1 1 auto; }
    .search-bar .btn, .hero-search .btn { min-height: 48px; }
    .services-list > div { align-items: flex-start; gap: 12px; }
    .services-list .price { white-space: normal; text-align: right; }
    .rating-summary { align-items: flex-start; flex-direction: column; gap: 10px; }
    .modal-backdrop { padding: 10px; }
    .modal { max-height: calc(100vh - 20px); }
    .app-sidebar { display: none; }
    .admin-mobile-menu { display: block; margin: 10px 16px 0; background: var(--ink-900); border-radius: var(--radius); color: #fff; }
    .admin-mobile-menu > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 15px; cursor: pointer; list-style: none; font-weight: 650; }
    .admin-mobile-menu > summary::-webkit-details-marker { display: none; }
    .admin-mobile-menu > summary span { display: inline-flex; align-items: center; gap: 9px; }
    .admin-mobile-menu > summary .icon { width: 18px; height: 18px; }
    .admin-mobile-menu[open] > summary { border-bottom: 1px solid rgba(255,255,255,.12); }
    .admin-mobile-menu nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 8px; max-height: min(62vh, 520px); overflow-y: auto; }
    .admin-mobile-menu .side-title { grid-column: 1 / -1; padding: 9px 8px 3px; color: #a99d96; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
    .admin-mobile-menu a { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 10px 8px; border-radius: 7px; color: #d8cfc9; font-size: .84rem; text-decoration: none; }
    .admin-mobile-menu a:hover, .admin-mobile-menu a.active { background: var(--primary); color: #fff; }
    .admin-mobile-menu a .icon { flex: 0 0 17px; width: 17px; height: 17px; }
    .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .admin-stats .stat { min-height: 104px; padding: 14px; }
    .admin-stats .stat-label { font-size: .7rem; }
    .admin-stats .stat-value { font-size: 1.65rem; margin-top: 10px; }
    .admin-section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
    .admin-section-heading .link-arrow { font-size: .88rem; }
    .admin-stats-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1280px) {
    :root { --rail: min(1480px, calc(100vw - 64px)); }
    .band-split { grid-template-columns: 1fr; gap: 16px; }
    .band-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
    .band-title p { margin-bottom: 0; }
    .footer-inner { grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); }
    .footer-script { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 1100px) {
    .main-nav, .header-actions { display: none; }
    .mobile-nav { display: block; }
    .home-hero-copy { max-width: 640px; }
    .home-hero-photo { inset: 0 0 0 46%; }
    .hero-note { display: none; }
    .homepage-services-layout { grid-template-columns: 1fr 1fr; }
    .homepage-services-layout .band-title { grid-column: 1 / -1; }
    .homepage-services-layout .home-feature-card { grid-column: 2; grid-row: 2; }
    .homepage-services-no-feature .homepage-services-layout { grid-template-columns: 1fr; }
    .home-feature-card { height: auto; }
    .featured-grid { grid-template-columns: 1fr; }
    .feature-card { grid-template-columns: 220px minmax(0, 1fr); }
    .duo, .duo-even { grid-template-columns: 1fr; }
    .service-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .homepage-services-no-feature .service-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .search-layout { grid-template-columns: 1fr; }
    .filters { position: static; }
    .map-split { display: flex; flex-direction: column; gap: 20px; min-height: 0; }
    .map-results { position: static; width: auto; max-height: none; overflow: visible; padding: 0; order: 2; }
    .results-map { display: block; order: 1; top: 8px; width: 100%; min-width: 0; height: 50vh; min-height: 320px; z-index: 2; }
    .profile-layout { grid-template-columns: 1fr; }
    .profile-aside { position: static; }
    .app-shell { grid-template-columns: 1fr; }
    .app-sidebar { border-right: 0; border-bottom: 1px solid var(--border-soft); padding: 12px; }
    .admin-shell .app-sidebar nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
    .admin-shell .app-sidebar .side-title { display: block; grid-column: 1 / -1; padding: 8px 8px 2px; }
    .admin-shell .app-sidebar a { min-width: 0; white-space: normal; padding: 10px 8px; font-size: .86rem; }
    .admin-shell .app-sidebar a .icon { flex: 0 0 18px; }
    .plans { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .admin-stats-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Keep the full filter panel visible on desktop/tablet map views. The
   collapsible filter control is reserved for genuinely narrow mobile screens. */
@media (min-width: 761px) {
    .search-layout > aside { display: block; }
    .search-layout .mobile-filters { display: contents; }
    .search-layout .mobile-filters > summary { display: none; }
    /* The details element is intentionally closed by default for mobile.
       Override the browser's closed-details rule so its form remains visible
       when the same markup is used in the desktop sidebar. */
    .search-layout .mobile-filters:not([open]) > .filters { display: block !important; }
}

@media (max-width: 760px) {
    :root { --rail: calc(100vw - 32px); --header-h: 68px; --gutter: 16px; }
    body { font-size: 15px; }
    .brand svg { height: 40px; }
    .home-hero { min-height: 0; display: block; }
    .home-hero-photo { position: relative; inset: auto; height: 260px; }
    .home-hero::before { display: none; }
    .home-hero-inner { padding: 22px 0 30px; }
    .home-hero-inner { display: block; }
    .home-hero-copy { max-width: none; }
    .homepage-services-layout { grid-template-columns: 1fr; }
    .homepage-services-layout .band-title, .homepage-services-layout .home-feature-card { grid-column: auto; grid-row: auto; }
    .site-header.is-overlay { background: rgba(252, 250, 248, .96); position: absolute; }
    .hero-search-bar { grid-template-columns: 1fr; border-radius: var(--radius-lg); padding: 8px; gap: 4px; }
    .hero-search .seg + .seg { border-left: 0; border-top: 1px solid var(--border); }
    .hero-search-bar .btn { width: 100%; }
    .hero-search-help { display: flex; align-items: flex-start; flex-direction: column; gap: 4px; margin-inline: 0; }
    .service-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .homepage-services-no-feature .service-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .feature-card { grid-template-columns: 1fr; }
    .feature-card .ph { aspect-ratio: 16 / 9; }
    .steps { grid-template-columns: 1fr; }
    .guide-grid { grid-template-columns: 1fr; }
    .guide-slide { flex-basis: 100%; }
    .guide-slide { flex-basis: calc((100% - 18px) / 2); }
    .soon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .listing-card { grid-template-columns: 1fr; }
    .listing-card .ph { min-height: 180px; }
    .search-bar { grid-template-columns: 1fr; }
    .mobile-search-location, .mobile-filters { display: block; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
    .mobile-search-location > summary, .mobile-filters > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 13px; color: var(--text); font-weight: 600; cursor: pointer; list-style: none; }
    .mobile-search-location > summary::-webkit-details-marker, .mobile-filters > summary::-webkit-details-marker { display: none; }
    .mobile-search-location > summary::after, .mobile-filters > summary::after { content: "＋"; margin-left: auto; color: var(--primary); font-size: 1.2rem; line-height: 1; }
    .mobile-search-location[open] > summary::after, .mobile-filters[open] > summary::after { content: "−"; }
    .mobile-search-location > summary .icon, .mobile-filters > summary .icon { width: 18px; height: 18px; color: var(--primary); }
    .mobile-search-location-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(100px, .45fr); gap: 8px; padding: 0 10px 10px; }
    .mobile-filters .filters { margin: 0; border: 0; border-top: 1px solid var(--border-soft); border-radius: 0; box-shadow: none; }
    .results-map { height: 42vh; min-height: 280px; }
    .map-split .listing-card { grid-template-columns: 96px minmax(0, 1fr); }
    .map-split .listing-card .ph { min-height: 96px; }
    .result-head .view-toggle { align-self: flex-start; }
    .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; height: 180px; }
    .gallery > :first-child { grid-column: span 2; grid-row: auto; }
    .gallery > :nth-child(n+4) { display: none; }
    .form-row, .form-row-3, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .role-choice { grid-template-columns: 1fr; }
    .kv { grid-template-columns: 1fr; }
    .wizard-steps { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .auth-card { padding: 26px 20px; }
    .page { padding: 28px 0 56px; }
    .footer-inner { grid-template-columns: 1fr; gap: 22px; }
    .footer-brand { grid-column: auto; }
    .footer-script { text-align: left; }
    .footer-bottom { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
    .site-header, .site-footer, .profile-aside .btn, .filters, .view-toggle, .results-map { display: none !important; }
}

/* Admin additions */
.token-grid code { display: block; margin-top: 6px; font-size: .76rem; overflow-wrap: anywhere; }
.token-swatch[data-token="--ink-900"] { background: var(--ink-900); }
.token-swatch[data-token="--ink-800"] { background: var(--ink-800); }
.token-swatch[data-token="--ink-700"] { background: var(--ink-700); }
.token-swatch[data-token="--ink-600"] { background: var(--ink-600); }
.token-swatch[data-token="--ink-500"] { background: var(--ink-500); }
.token-swatch[data-token="--ink-400"] { background: var(--ink-400); }
.token-swatch[data-token="--ink-300"] { background: var(--ink-300); }
.token-swatch[data-token="--sand-50"] { background: var(--sand-50); }
.token-swatch[data-token="--sand-100"] { background: var(--sand-100); }
.token-swatch[data-token="--sand-200"] { background: var(--sand-200); }
.token-swatch[data-token="--sand-300"] { background: var(--sand-300); }
.token-swatch[data-token="--white"] { background: var(--white); }
.token-swatch[data-token="--rose-50"] { background: var(--rose-50); }
.token-swatch[data-token="--rose-100"] { background: var(--rose-100); }
.token-swatch[data-token="--rose-200"] { background: var(--rose-200); }
.token-swatch[data-token="--rose-300"] { background: var(--rose-300); }
.token-swatch[data-token="--rose-500"] { background: var(--rose-500); }
.token-swatch[data-token="--rose-600"] { background: var(--rose-600); }
.token-swatch[data-token="--rose-700"] { background: var(--rose-700); }
.token-swatch[data-token="--rose-800"] { background: var(--rose-800); }
.token-swatch[data-token="--gold-500"] { background: var(--gold-500); }
.token-swatch[data-token="--green-50"] { background: var(--green-50); }
.token-swatch[data-token="--green-600"] { background: var(--green-600); }
.token-swatch[data-token="--green-700"] { background: var(--green-700); }
.token-swatch[data-token="--amber-50"] { background: var(--amber-50); }
.token-swatch[data-token="--amber-700"] { background: var(--amber-700); }
.token-swatch[data-token="--red-50"] { background: var(--red-50); }
.token-swatch[data-token="--red-600"] { background: var(--red-600); }
.token-swatch[data-token="--blue-50"] { background: var(--blue-50); }
.token-swatch[data-token="--blue-700"] { background: var(--blue-700); }
.token-swatch[data-token="--footer-bg"] { background: var(--footer-bg); }
.token-swatch[data-token="--text"] { background: var(--text); }
.token-swatch[data-token="--text-body"] { background: var(--text-body); }
.token-swatch[data-token="--text-muted"] { background: var(--text-muted); }
.token-swatch[data-token="--bg"] { background: var(--bg); }
.token-swatch[data-token="--surface"] { background: var(--surface); }
.token-swatch[data-token="--border"] { background: var(--border); }
.token-swatch[data-token="--border-soft"] { background: var(--border-soft); }
.token-swatch[data-token="--primary"] { background: var(--primary); }
.token-swatch[data-token="--primary-hover"] { background: var(--primary-hover); }
.email-preview { overflow-wrap: anywhere; max-height: 60vh; overflow: auto; background: #fff; border: 1px solid var(--border-soft); }
.icon-grid .panel { display: flex; align-items: center; gap: 10px; min-width: 0; }
.icon-grid code { overflow-wrap: anywhere; }
@media (max-width: 760px) {
   .token-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Final narrow-screen safeguards for every route, including dense admin views. */
@media (max-width: 760px) {
    .btn:not(.btn-block) { white-space: normal; text-align: center; }
    .btn-block, .form-actions .btn { width: 100%; }
    .form-actions { width: 100%; }
    .between, .cluster { align-items: stretch; }
    .between > .btn, .cluster > .btn { flex: 1 1 100%; }
    .page-header .cluster, .page-title .cluster { width: 100%; }
    .card-header .btn, .card-footer .btn { width: 100%; }
    .page-header p, .page-title p, .lead { overflow-wrap: anywhere; }
    .table-wrap { max-width: 100%; -webkit-overflow-scrolling: touch; }
    .table { min-width: 560px; }
    .users-table-wrap { overflow: visible; border: 0; background: transparent; }
    .users-table { min-width: 0; display: block; }
    .users-table thead { display: none; }
    .users-table tbody, .users-table tr, .users-table td { display: block; width: 100%; }
    .users-table tr { margin-bottom: 14px; padding: 14px 16px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-xs); }
    .users-table td { display: grid; grid-template-columns: minmax(88px, 34%) minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); overflow-wrap: anywhere; }
    .users-table td:last-child { border-bottom: 0; padding-bottom: 0; }
    .users-table td::before { content: attr(data-label); color: var(--ink-600); font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
    .users-table .user-actions { align-items: stretch; gap: 6px; }
    .users-table .user-actions .btn { width: 100%; }
    .hours { min-width: 0; }
    .gallery.count-2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; height: 180px; }
    .gallery.count-1 { grid-template-rows: 1fr; height: 180px; }
    .profile-head > *, .profile-layout > *, .app-main > * { min-width: 0; }
    .wizard-nav { flex-direction: column-reverse; }
    .wizard-nav .btn { width: 100%; }
    .kv dd, .kv dt { overflow-wrap: anywhere; }
    .modal { width: 100%; }
}

@media (max-width: 380px) {
    :root { --rail: calc(100vw - 24px); --gutter: 12px; }
    .container, .container-narrow, .container-mid { width: calc(100% - 24px); }
    .header-inner { gap: 8px; }
    .brand svg { height: 36px; }
    .mobile-panel { left: 6px; right: 6px; }
    .service-tiles, .soon-grid { grid-template-columns: 1fr; }
    .auth-card { padding-inline: 16px; }
    .app-main { padding-inline: 12px; }
}
