/* ──────────────────────────────────────────────
   MANOR — Shared site layer (every page)
   Header · Footer · Brand · Motion
────────────────────────────────────────────── */

/* ── BRAND (logo slot) ──
   Both marks ship and CSS shows one: black artwork on light, white on dark.
   (A single mask-tinted asset was tried first — masks can silently paint
   nothing, so the mark is a plain <img> that either loads or visibly fails.) */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 40px; height: 40px; flex-shrink: 0;
  display: inline-block; position: relative;
  transform: rotate(0deg) scale(1);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.brand:hover .brand-mark { transform: rotate(-4deg) scale(1.06); }
.brand:not(:hover) .brand-mark { transform: rotate(0deg) scale(1); }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.brand-mark .bm-d { display: none; }
[data-theme="dark"] .brand-mark .bm-l { display: none; }
[data-theme="dark"] .brand-mark .bm-d { display: block; }
.brand-word {
  font-family: 'Newsreader', serif; font-weight: 500;
  font-size: 24px; line-height: 1; color: var(--ink); padding-top: 3px;
  letter-spacing: 0.14em;
  transition: color var(--trans-fast);
}
.dark-nav .brand-word, .site-footer .brand-word { color: var(--ink); }

/* ── HEADER ── */
.navbar {
  height: var(--nav-h);
  padding: 0 clamp(20px, 4vw, 40px);
  transition: background var(--trans-med), box-shadow var(--trans-med), height var(--trans-med);
}
.navbar.scrolled {
  background: rgba(22,18,19,0.90);
  -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px);
  box-shadow: 0 1px 0 var(--hairline);
}
.nav-links { gap: 30px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--muted);
  position: relative; padding: 6px 2px; transition: color var(--trans-fast);
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px;
  background: var(--accent); border-radius: 2px;
  transform: scaleX(0); transform-origin: center; transition: transform 0.3s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--ink); }

.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-login { font-size: 14px; font-weight: 600; color: var(--ink); padding: 9px 16px; border-radius: 2px; transition: background var(--trans-fast); }
.nav-login:hover { background: rgba(126,123,120,0.14); }
.dark-nav .nav-login { color: var(--ink); }
.dark-nav .nav-login:hover { background: rgba(126,123,120,0.18); }

/* ── PAGE-ENTER ── */
body { opacity: 0; }
body.page-ready { opacity: 1; transition: opacity 0.5s ease; }

/* ── REVEAL / MOTION ── */
.aw { opacity: 0; transform: translateY(28px); }
.aw.in { opacity: 1; transform: none; transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }

.img-reveal { clip-path: inset(0 0 100% 0); transition: clip-path 0.95s var(--ease); will-change: clip-path; }
.img-reveal.in { clip-path: inset(0 0 0 0); }

.line-reveal { display: block; overflow: hidden; padding-bottom: 0.2em; margin-bottom: -0.2em; }
.line-reveal > span { display: inline-block; transform: translateY(116%); transition: transform 0.9s var(--ease); }
.line-reveal.in > span { transform: none; }

[data-tilt], .pcard, .listing-card, .rule-card, .acard { will-change: transform; }
.link-ul { position: relative; }
.link-ul::after { content:''; position:absolute; left:0; bottom:-2px; width:100%; height:1.5px; background:var(--accent); transform:scaleX(0); transform-origin:right; transition:transform .35s var(--ease); }
.link-ul:hover::after { transform:scaleX(1); transform-origin:left; }
.btn { will-change: transform; }
.btn:active                   { transform: translateY(0) scale(0.965) !important; transition: transform 0.08s ease !important; }
.btn-primary:active, .btn-gold:active { box-shadow: none !important; }
.btn-ghost:active             { background: rgba(126,123,120,0.14) !important; }

/* ── STORY RAIL ── */
.story-rail {
  position: fixed; left: 26px; top: 50%; transform: translateY(-50%);
  z-index: 400; display: flex; flex-direction: column; align-items: center; gap: 14px;
  opacity: 0; transition: opacity 0.5s ease;
}
.story-rail.show { opacity: 1; }
.story-rail .sr-line { position: relative; width: 2px; height: 150px; background: var(--hairline); border-radius: 2px; overflow: hidden; }
.story-rail .sr-fill { position: absolute; left: 0; top: 0; width: 100%; height: 0; background: var(--ink); border-radius: 2px; }
.story-rail .sr-dots { display: flex; flex-direction: column; gap: 13px; }
.story-rail .sr-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hairline); cursor: pointer; transition: transform .25s var(--ease), background .25s; }
.story-rail .sr-dot:hover { transform: scale(1.4); }
.story-rail .sr-dot.on { background: var(--ink); transform: scale(1.4); }
@media (max-width: 1100px) { .story-rail { display: none; } }

/* ── SUB-PAGE HERO → editorial card ── */
/* This is the rule that actually sets the sub-page hero's spacing — it carries
   !important, so the .page-hero padding in pages.css never applies. Change it
   here or nothing moves. */
.page-hero {
  max-width: 1240px; margin: 96px auto 0 !important;
  border-radius: 2px; overflow: hidden; position: relative;
  padding: clamp(58px, 7vw, 104px) clamp(24px, 5vw, 60px) !important;
}
/* Browse is a working page, not a landing page: the filters have to be on
   screen when you arrive, because they are the reason you came. The editorial
   hero the other sub-pages wear pushed them below the fold on a laptop, so
   here it keeps the type and gives back the height. */
.page-hero.browse-hero {
  margin: calc(var(--nav-h-rest) + 18px) auto 0 !important;
  padding: 26px clamp(24px, 5vw, 60px) 24px !important;
}
.browse-hero .page-title { margin-bottom: 6px; }
.page-hero .page-title { font-family: 'Newsreader', serif !important; font-weight: 400 !important; letter-spacing: -0.02em !important; }
.page-hero .page-title em { font-style: italic; color: var(--accent); }

/* ── FOOTER — minimal, blended ── */
.site-footer {
  position: relative;
  background: transparent;
  color: var(--ink);
  margin-top: 56px;
  padding-top: 0;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  display: block;
  height: 1px;
  margin: 0 auto;
  max-width: 1240px;
  background: var(--hairline);
}

.site-footer .fwrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  position: relative;
  z-index: 2;
}

.footer-cta { display: none; }

.footer-main {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 24px 40px;
  padding: 48px 0 36px;
}

.footer-brand-col { max-width: 260px; }
.footer-brand-col .brand { margin-bottom: 10px; display: inline-flex; }
.footer-brand-col .ftag {
  font-size: 13px; line-height: 1.65;
  color: var(--muted);
  margin-bottom: 18px;
}

.footer-socials { display: flex; gap: 8px; }
.footer-socials a {
  width: 34px; height: 34px; border-radius: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--hairline);
  transition: all var(--trans-fast);
}
.footer-socials a:hover { border-color: var(--accent); transform: translateY(-2px); }
.footer-socials svg { width: 16px; height: 16px; stroke: var(--bronze); fill: none; stroke-width: 1.8; transition: stroke var(--trans-fast); }
.footer-socials a:hover svg { stroke: var(--accent); }

.footer-col h5 {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--bronze);
  margin-bottom: 14px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 13px; color: var(--muted);
  transition: color var(--trans-fast);
  width: fit-content;
}
.footer-col a:hover { color: var(--accent); }

/* Footer background slot — pattern art drops in here (per-theme) */

/* Bottom bar */
.footer-bottom {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  padding: 18px 0 32px;
  border-top: 1px solid var(--hairline);
}
.footer-copy { font-size: 12px; color: var(--muted); opacity: 0.7; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { font-size: 12px; color: var(--muted); opacity: 0.7; transition: opacity var(--trans-fast), color var(--trans-fast); }
.footer-links a:hover { color: var(--accent); opacity: 1; }

@media (max-width: 860px) {
  .footer-main { grid-template-columns: 1fr 1fr; gap: 30px 20px; padding: 44px 0 30px; }
  .footer-brand-col { grid-column: 1 / -1; max-width: none; }
}
@media (max-width: 480px) {
  .footer-main { grid-template-columns: 1fr 1fr; gap: 26px 18px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; padding-bottom: 24px; }
}

/* ── Nav user avatar (auth state) ── */
.nav-user-menu { position: relative; }
.nav-user-btn {
  width: 36px; height: 36px; min-height: 0; border-radius: 50%; overflow: hidden;
  background: var(--surface); border: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: border-color var(--trans-fast);
  flex-shrink: 0;
}
.nav-user-btn:hover { border-color: var(--bronze); }
.nav-user-avatar { width: 100%; height: 100%; object-fit: cover; display: block; }
.nav-user-initials { font-size: 13px; font-weight: 700; color: var(--ink); }
.nav-user-drop {
  position: absolute; top: calc(100% + 10px); right: 0; left: auto;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 2px;
  box-shadow: var(--shadow-lg); padding: 8px; min-width: 200px;
  max-width: calc(100vw - 32px);
  opacity: 0; pointer-events: none; transform: translateY(-6px);
  transition: opacity var(--trans-fast), transform var(--trans-fast);
  z-index: 500;
}
.nav-user-drop.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.nud-name { font-size: 14px; font-weight: 600; color: var(--ink); padding: 10px 12px 2px; }
.nud-email { font-size: 12px; color: var(--muted); padding: 0 12px 10px; }
.nud-div { height: 1px; background: var(--hairline); margin: 4px 0; }
.nud-item {
  display: block; width: 100%; text-align: left; padding: 10px 12px;
  font-size: 14px; color: var(--ink); border-radius: 2px;
  transition: background var(--trans-fast);
}
.nud-item:hover { background: rgba(126,123,120,0.14); }

/* ── AMBIENT BACKGROUND LAYERS ── */
html::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

.ambient-layer {
  position: fixed; inset: -12%; z-index: 0; pointer-events: none;
  will-change: transform, opacity;
}
.ambient-layer-a {
  background: radial-gradient(ellipse 72% 60% at 15% 15%, var(--ambient-a) 0%, transparent 100%),
              radial-gradient(ellipse 55% 50% at 85% 80%, var(--ambient-b) 0%, transparent 100%);
  animation: ambientDrift 22s ease-in-out infinite alternate;
}
.ambient-layer-b {
  background: radial-gradient(ellipse 50% 44% at 78% 20%, var(--ambient-b) 0%, transparent 100%),
              radial-gradient(ellipse 40% 35% at 25% 75%, var(--ambient-a) 0%, transparent 100%);
  animation: ambientDrift2 28s ease-in-out infinite alternate;
  opacity: 0.8;
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  body { opacity: 1 !important; }
  .aw, .aw.in { opacity: 1 !important; transform: none !important; transition: none !important; }
  .img-reveal { clip-path: none !important; transition: none !important; }
  .line-reveal > span { transform: none !important; transition: none !important; }
  [data-tilt] { transform: none !important; }
  .story-rail { display: none !important; }
  .scrolly-step { opacity: 1 !important; }
}

/* inline check icon */
.ick{width:1em;height:1em;display:inline-block;vertical-align:-0.125em;flex-shrink:0;}

/* emoji-replacement icon */
.emi{width:1em;height:1em;display:inline-block;vertical-align:-0.15em;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}

/* ── Auth sheet ──
   Sign in without leaving the page. The standalone pages still exist; this is
   just the faster door.

   Two shapes, one markup: a centred card on a desktop, and on a phone a sheet
   that rises from the bottom edge and is attached to it. It used to float in
   the middle of a phone screen with a margin all round while the page scrolled
   on behind it, which read as a dialog that had come loose. Anchored to one
   edge, sized to its own contents, with the page held still behind it, it
   reads as a drawer the site opened on purpose.

   Nothing here uses display:none — the panel has to be in the layout to
   animate out of it. */
.kauth {
  position: fixed; inset: 0; z-index: 960;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,.55);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  opacity: 0; visibility: hidden;
  /* pointer-events, not just visibility: visibility flips only at the END of
     the fade-out, so for those 300ms a closed sheet would still be catching
     taps meant for the page behind it. */
  pointer-events: none;
  transition: opacity .3s var(--ease), visibility .3s;
}
.kauth.open { opacity: 1; visibility: visible; pointer-events: auto; }

.kauth-panel {
  position: relative;
  display: flex; flex-direction: column;
  width: 100%; max-width: 430px;
  max-height: min(88vh, 780px);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(16px) scale(.985);
  transition: opacity .3s ease, transform .45s var(--expo-out);
}
.kauth.open .kauth-panel { opacity: 1; transform: none; }

/* The one scrolling thing inside. `contain` is the other half of holding the
   page still: without it, scrolling to the end of this list hands the gesture
   on to the page underneath and the background starts moving. */
.kauth-scroll {
  overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 38px 32px 30px;
}

/* Sheet handle — phones only, where the sheet can be thrown back down */
.kauth-grab { display: none; }

.kauth-x {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--hairline); border-radius: 2px;
  color: var(--muted); cursor: pointer;
  transition: color var(--trans-fast), border-color var(--trans-fast);
}
.kauth-x:hover { color: var(--ink); border-color: var(--bronze); }
.kauth-x svg { width: 14px; height: 14px; }

.kauth-head { padding-right: 44px; }
.kauth-title { font-family: 'Newsreader', serif; font-weight: 400; font-size: 27px; line-height: 1.2; color: var(--ink); margin-bottom: 7px; }
.kauth-sub { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* Two states, one line, and the mark slides between them */
.kauth-switch {
  position: relative; display: flex; gap: 4px;
  margin: 24px 0 26px; border-bottom: 1px solid var(--hairline);
}
.kauth-switch-ink {
  position: absolute; bottom: -1px; left: 0;
  width: 50%; height: 2px; background: var(--accent);
  transition: transform .38s var(--ease);
}
.kauth.signup .kauth-switch-ink { transform: translateX(100%); }
.kauth-tab {
  flex: 1; padding: 11px 8px; background: none; border: none;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  color: var(--muted); cursor: pointer;
  transition: color var(--trans-fast);
}
.kauth-tab.active { color: var(--ink); }

/* Said where it happened, not thrown as a toast behind the sheet */
.kauth-error {
  margin-bottom: 20px; padding: 11px 13px;
  background: var(--danger-bg); border: 1px solid var(--danger-border);
  border-radius: 2px;
  font-size: 13px; line-height: 1.5; color: var(--danger); font-weight: 500;
}

.kauth-field { display: block; margin-bottom: 20px; }
.kauth-field > span:first-child,
.kauth-field-top span {
  display: block; margin-bottom: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.kauth-field-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.kauth-field-top label { cursor: pointer; }
.kauth-forgot { font-size: 12px; font-weight: 600; }
.kauth-field .phone-wrap { display: flex; }
.kauth.signup .kauth-login-only { display: none; }

/* Typing a password blind is where signing in goes wrong most often */
.kauth-pw { position: relative; display: block; }
.kauth-pw .form-input { padding-right: 42px; }
.kauth-eye {
  position: absolute; right: 0; bottom: 4px;
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--muted); cursor: pointer;
  transition: color var(--trans-fast);
}
.kauth-eye:hover, .kauth-eye.on { color: var(--ink); }
.kauth-eye svg { width: 19px; height: 19px; }
/* Struck through while the password is showing */
.kauth-eye.on::after {
  content: ''; position: absolute; left: 9px; right: 9px; top: 50%;
  height: 1.7px; background: currentColor; transform: rotate(-45deg);
}

/* signup-only fields collapse away in sign-in mode */
.kauth-signup-only { display: none; }
.kauth.signup .kauth-signup-only { display: block; }
.kauth.signup .kauth-terms { display: grid; }
.kauth-terms {
  grid-template-columns: auto 1fr; align-items: start; gap: 11px;
  font-size: 13px; color: var(--muted); line-height: 1.55;
  margin: 2px 0 22px; cursor: pointer;
}
.kauth-terms input[type="checkbox"] {
  width: 17px; height: 17px; min-height: 0; margin-top: 2px;
  flex-shrink: 0; accent-color: var(--accent); cursor: pointer;
}
.kauth-submit { width: 100%; justify-content: center; }

/* Why an account exists — shown only where that question is being asked */
.kauth-why { list-style: none; margin: 22px 0 0; padding: 18px 0 0; border-top: 1px solid var(--hairline); }
.kauth.signup .kauth-why { display: block; }
.kauth-why li {
  position: relative; padding-left: 18px; margin-bottom: 9px;
  font-size: 12.5px; line-height: 1.55; color: var(--muted);
}
.kauth-why li:last-child { margin-bottom: 0; }
.kauth-why li::before {
  content: ''; position: absolute; left: 2px; top: 8px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--bronze);
}

.kauth-foot { text-align: center; font-size: 13px; color: var(--muted); margin-top: 22px; }

/* ── As a sheet ── */
@media (max-width: 640px) {
  .kauth { padding: 0; align-items: flex-end; }
  .kauth-panel {
    max-width: none;
    /* --kauth-kb is how much of the screen the keyboard has taken, published
       by js/main.js from visualViewport. Lifting by it keeps the field being
       typed into on screen without the browser scrolling the page to do it. */
    margin-bottom: var(--kauth-kb, 0px);
    max-height: 90vh;
    max-height: calc(90dvh - var(--kauth-kb, 0px));
    border-left: none; border-right: none; border-bottom: none;
    border-radius: 3px 3px 0 0;
    box-shadow: 0 -18px 44px rgba(0,0,0,0.34);
    opacity: 1;
    transform: translateY(100%);
    transition: transform .44s var(--expo-out), margin-bottom .22s var(--ease);
  }
  .kauth.open .kauth-panel { transform: translateY(0); }
  .kauth-scroll { padding: 4px 20px calc(24px + env(safe-area-inset-bottom, 0px)); }
  /* The strip you drag. Wide target, quiet mark. */
  .kauth-grab {
    display: flex; align-items: center; justify-content: center;
    height: 26px; flex-shrink: 0; cursor: grab;
    touch-action: none;
  }
  .kauth-grab span { width: 38px; height: 3px; border-radius: 3px; background: var(--hairline); }
  .kauth-x { top: 30px; right: 14px; }
  .kauth-head { padding: 8px 44px 0 0; }
  .kauth-title { font-size: 25px; }
  .kauth-switch { margin: 20px 0 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .kauth, .kauth-panel, .kauth-switch-ink { transition-duration: .01ms !important; }
}

/* ── Custom Dropdown (kd) ── */
/* Every select that main.js replaces with a styled dropdown. Hidden as soon as
   the page paints (see the kd-js class in loader.js) so a fast tap can't open
   the browser's own unstyled dropdown in the gap before the script runs. */
.kd-js .hs-field select,
.kd-js .filter-bar-inner select.filter-select,
.kd-js .filter-bar-inner select.sort-select,
.kd-js select.form-select {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.kd-wrap { position: relative; display: inline-block; }

.kd-chev { display: inline-flex; align-items: center; flex-shrink: 0; opacity: 0.5; transition: opacity var(--trans-fast); }
.kd-chev svg { width: 10px; height: 10px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; transition: transform 0.2s ease; }
.kd-wrap.open .kd-chev svg { transform: rotate(180deg); }
.kd-wrap.open .kd-chev { opacity: 0.8; }

.kd-list {
  position: absolute; top: calc(100% + 10px); left: 0;
  min-width: 190px; background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
  padding: 6px; z-index: 400; list-style: none; margin: 0;
  opacity: 0; pointer-events: none;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top left;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.kd-wrap.open .kd-list { opacity: 1; pointer-events: all; transform: none; }
.kd-wrap.kd-right .kd-list { left: auto; right: 0; transform-origin: top right; }

.kd-opt {
  padding: 10px 14px; border-radius: 2px; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--ink);
  transition: background 0.12s, color 0.12s; white-space: nowrap;
  line-height: 1.3;
}
.kd-opt:hover { background: rgba(126,123,120,0.16); color: var(--ink); }
.kd-opt.kd-selected { background: rgba(126,123,120,0.22); color: var(--ink); font-weight: 600; }

/* Atoll headings inside the island list */
.kd-group {
  padding: 12px 14px 4px; cursor: default;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}

/* Long lists (islands) scroll and carry a sticky search box */
.kd-big .kd-list { max-height: 340px; overflow-y: auto; min-width: 230px; }
.kd-search {
  position: sticky; top: -6px; z-index: 2;
  margin: -6px -6px 4px; padding: 8px;
  background: var(--surface); border-bottom: 1px solid var(--hairline);
}
.kd-search input {
  width: 100%; padding: 8px 10px;
  font-family: inherit; font-size: 14px; color: var(--ink);
  background: transparent; border: 1px solid var(--hairline);
  border-radius: 2px; outline: none;
}
.kd-search input::placeholder { color: var(--muted); opacity: 0.8; }
.kd-search input:focus { border-color: var(--bronze); }

/* Failed validation — the <select> is hidden, so the trigger carries the error */
.kd-wrap.kd-invalid .kd-trigger { border-color: var(--danger); }
.kd-form.kd-invalid .kd-trigger { border-bottom-color: var(--danger); }

/* ── Hero search variant ── */
.hs-field .kd-wrap { flex: 1; min-width: 0; display: flex; }
.hs-field .kd-trigger {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  color: var(--ink); width: 100%; min-width: 0; padding: 0; text-align: left;
}
.hs-field .kd-trigger .kd-lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-field .kd-list { top: calc(100% + 14px); min-width: 180px; }

/* ── Filter bar variant ──
   Scoped to .filter-bar-inner, not .filter-bar: that inner row is the element
   that travels into the header drawer and the phone sheet (js/search-dock.js),
   and styling anchored to the outer bar stayed behind when it moved — the
   dropdowns arrived in the sheet as bare centred text with no border. */
.filter-bar-inner .kd-wrap { display: inline-block; }
.filter-bar-inner .kd-trigger {
  display: inline-flex; align-items: center; gap: 7px;
  height: 42px; padding: 0 14px; cursor: pointer; white-space: nowrap;
  font-size: 14px; font-weight: 500; font-family: inherit;
  color: var(--ink); background: transparent;
  border: 1px solid var(--hairline); border-radius: 2px;
  transition: border-color var(--trans-fast), color var(--trans-fast), background var(--trans-fast);
}
.filter-bar-inner .kd-trigger:hover { border-color: var(--bronze); color: var(--ink); }
.filter-bar-inner .kd-trigger:hover .kd-chev { opacity: 0.8; }
.filter-bar-inner .kd-wrap.open .kd-trigger { border-color: var(--bronze); background: rgba(126,123,120,0.12); color: var(--ink); }

/* ── Form dropdown variant — register-line look for every .form-select
   (report a listing, contact subject, post-listing island/type/stay…) ── */
.kd-form { display: block; width: 100%; }
.kd-form .kd-trigger {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 12px 2px;
  font-family: inherit; font-size: 15px; font-weight: 400; text-align: left;
  color: var(--ink); background: transparent; cursor: pointer;
  border: none; border-bottom: 1px solid var(--bronze); border-radius: 0;
  transition: border-color var(--trans-fast);
}
.kd-form .kd-trigger .kd-lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kd-form.open .kd-trigger { border-bottom-color: var(--ink); }
.kd-form.kd-empty .kd-lbl { color: var(--muted); opacity: 0.8; }
.kd-form .kd-list { width: 100%; max-height: 260px; overflow-y: auto; z-index: 1500; }
/* An open dropdown must clear anything below it (the Leaflet map sets z-index 400
   on its panes, which is why the island list used to disappear behind it). */
.kd-wrap.open { z-index: 1500; }

@media (max-width: 768px) {
  .kd-list { min-width: 160px; }
  /* The filter row scrolls sideways on a phone rather than stacking, so its
     dropdowns keep their natural width instead of each taking a full line. */
  .filter-bar-inner .kd-wrap { display: inline-block; width: auto; }
}
