/* Marketplace layout integration. The reference rail, palette and spring stay in public-navigation.css/js. */
html:has(.store-public-header) { scroll-padding-top:0; }
body.store-public-navigation { --pw-header-height:112px; --store-search-height:132px; padding-top:0; }
/* Clearance belongs inside the page surface, never in a separate header strip. */
.store-public-navigation:not(.store-public-home) #main > .page-head:nth-child(1 of .page-head, .section) { padding-top:calc(64px + var(--pw-header-height)); }
.store-public-navigation:not(.store-public-home) #main > .section:nth-child(1 of .page-head, .section) { padding-top:calc(80px + var(--pw-header-height)); }
.store-public-navigation > .flash-stack { margin-top:0; padding-top:var(--pw-header-height); }
.store-public-navigation .search-layout { height:100svh; }
.store-public-navigation .side-search { padding-top:calc(14px + var(--pw-header-height)); }
.store-public-navigation .map-style-ctl,
.store-public-navigation .map-area-btn { top:var(--pw-header-height); }
.store-public-navigation .mapboxgl-ctrl-top-left,
.store-public-navigation .mapboxgl-ctrl-top-right { top:var(--pw-header-height); }
/* An unpainted geometry marker lets the reference sampler classify map styles. */
.store-map-contrast { position:absolute; top:0; left:0; width:100%; height:0; pointer-events:none; }
.store-map-contrast.is-dark { height:100%; }
.store-public-navigation #top { scroll-margin-top:0; }
.store-public-home .hero { min-height:100svh; padding-top:76px; }
.store-public-navigation .store-public-header a:hover { opacity:1; }
.store-public-navigation .store-public-header svg { flex-shrink:0; pointer-events:none; }
.store-public-navigation #pw-tabbar { display:none; }
@media(max-width:900px) {
  body.store-public-navigation { --pw-header-height:100px; padding-bottom:0; }
  .store-public-navigation .area-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .store-public-navigation .area-link { min-width:0; padding-left:6px; padding-right:6px; }
  .store-public-navigation .side-search-row select { min-width:0; }
  .store-public-home .hero { padding-top:74px; }
  .store-public-navigation.has-book-bar { padding-bottom:calc(82px + env(safe-area-inset-bottom,0px)); }
  .store-public-navigation .book-bar { bottom:0; padding-bottom:calc(10px + env(safe-area-inset-bottom,0px)); }
  .store-public-navigation .space-panel:not([hidden]) { bottom:0; padding-bottom:calc(16px + env(safe-area-inset-bottom,0px)); }
}
@media(max-width:880px) {
  .store-public-navigation:not(.store-public-home) #main > .page-head:nth-child(1 of .page-head, .section) { padding-top:calc(40px + var(--pw-header-height)); }
  .store-public-navigation:not(.store-public-home) #main > .section:nth-child(1 of .page-head, .section) { padding-top:calc(52px + var(--pw-header-height)); }
  .store-public-navigation .search-layout {
    display:grid; grid-template-columns:minmax(0,1fr);
    grid-template-rows:var(--pw-header-height) auto minmax(340px,1fr) auto;
    height:auto; min-height:100svh; isolation:isolate;
  }
  .store-public-navigation .side-search {
    grid-column:1; grid-row:2; position:relative; z-index:10;
    margin:0 10px; padding:14px 14px 12px; border-radius:4px;
  }
  .store-public-navigation .search-map {
    grid-column:1; grid-row:1 / 4; height:100svh;
    min-height:calc(var(--pw-header-height) + var(--store-search-height) + 340px);
    z-index:0;
  }
  .store-public-navigation .search-list { grid-column:1; grid-row:4; position:relative; z-index:1; }
  .store-public-navigation .map-style-ctl,
  .store-public-navigation .mapboxgl-ctrl-top-left,
  .store-public-navigation .mapboxgl-ctrl-top-right { top:calc(var(--pw-header-height) + var(--store-search-height) + 12px); }
  .store-public-navigation .map-area-btn { top:auto; }
  .store-public-navigation .search-layout.list-view { grid-template-rows:var(--pw-header-height) auto auto; min-height:0; }
  .store-public-navigation .search-layout.list-view .search-list { grid-row:3; }
}
@media print { .store-public-header { display:none!important; } body.store-public-navigation { padding-top:0; } }

/* The opening surface grows with short screen content without locking scroll. */
.store-public-home .hero { min-height:100vh; min-height:100svh; min-height:100dvh; height:auto; }
/* On desktop, map tools form one column aligned with the real Log in action. */
@media(min-width:901px) {
  .store-public-navigation .search-map .map-style-ctl {
    left:auto;
    right:var(--store-map-tools-right,24px);
    top:var(--store-map-style-top,calc(var(--pw-header-height) - 8px));
    width:var(--store-map-tools-width,91px);
    flex-direction:column;
  }
  .store-public-navigation .search-map .mapboxgl-ctrl-top-right,
  .store-public-navigation .search-map:fullscreen .mapboxgl-ctrl-top-right {
    right:var(--store-map-tools-right,24px);
    top:var(--store-map-zoom-top,calc(var(--pw-header-height) + 166px));
  }
  .store-public-navigation .search-map .mapboxgl-ctrl-top-right > .mapboxgl-ctrl { margin:0; }
}

/* Approved desktop primary action pill. Keep existing dimensions and mobile circle. */
@media(min-width:901px) { .store-public-header .store-header-signin { border-radius:30px; } }

/* Desktop map tools use the IDWelly rail surface and vertical lens geometry.
   The existing compact mobile controls and generated header stay separate. */
.store-map-style-slider { display:none; }
@media(min-width:901px) {
  .store-public-navigation .search-map {
    --store-map-glass-background:#12201af0;
    --store-map-glass-filter:none;
    --store-map-tool-ink:#f7f3eb;
    --store-map-icon-filter:invert(1);
  }
  .store-public-navigation .search-map :is(.map-style-ctl,.mapboxgl-ctrl-group:has(.mapboxgl-ctrl-zoom-in)) {
    border:1px solid #ffffff4d;
    padding:3px;
    gap:2px;
    border-radius:30px;
    background:var(--store-map-glass-background);
    backdrop-filter:var(--store-map-glass-filter);
    -webkit-backdrop-filter:var(--store-map-glass-filter);
    box-shadow:inset 0 1px 1px #ffffff30,inset 0 -1px 1px #00000038,0 4px 18px #00000018;
    isolation:isolate;
  }
  .store-public-navigation .search-map .map-style-ctl {
    overflow:visible;
    touch-action:pan-x;
    user-select:none;
    font-family:Inter,Arial,sans-serif;
    line-height:1.65;
  }
  .store-public-navigation .map-style-ctl button {
    position:relative;
    z-index:1;
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    min-height:44px;
    padding:9px 4px;
    border:0;
    border-radius:24px;
    background:transparent;
    color:var(--store-map-tool-ink);
    font-family:inherit;
    font-size:12px;
    font-weight:400;
    line-height:1.65;
    transition:color .3s;
  }
  .store-public-navigation .map-style-ctl button.active { background:#16291ff0; color:#d6b77b; }
  .store-public-navigation .map-style-ctl.store-map-lens-ready button.active { background:transparent; }
  .store-map-style-visual { display:flex; align-items:center; justify-content:center; pointer-events:none; }
  .store-map-style-slider {
    display:block;
    position:absolute;
    left:3px;
    right:3px;
    top:0;
    height:44px;
    border-radius:24px;
    background:#16291ff0;
    border:1px solid #ffffff0a;
    box-shadow:inset 0 1px 2px #00000024,0 1px 2px #00000012;
    overflow:hidden;
    transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease;
    pointer-events:none;
  }
  .store-map-style-slider:is(.is-moving,.is-dragging) {
    z-index:2;
    background:rgb(22 41 31 / calc(.94 - .84 * var(--lens-energy,0)));
    border-color:rgb(237 250 240 / calc(.04 + .26 * var(--lens-energy,0)));
    box-shadow:inset 0 1px 1px rgb(255 255 255 / calc(.6 * var(--lens-energy,0))),inset 0 -1px 1px rgb(255 255 255 / calc(.44 * var(--lens-energy,0))),inset 1px 0 1px rgb(255 255 255 / calc(.15 * var(--lens-energy,0))),inset -1px 0 1px rgb(0 0 0 / calc(.3 * var(--lens-energy,0))),0 2px 4px #00000020;
    will-change:transform,height;
  }
  .store-map-style-lens { position:absolute; top:-1px; left:-1px; width:calc(100% + 2px); opacity:0; pointer-events:none; }
  .store-map-has-lens .store-map-style-slider:is(.is-moving,.is-dragging) .store-map-style-lens { opacity:1; }
  .store-map-style-copy { position:absolute; left:0; width:100%; display:flex; align-items:center; justify-content:center; color:#d6b77b; font-size:12px; white-space:nowrap; }
  .store-map-style-copy > span { transform:scale(calc(1 + .045 * var(--lens-energy,0))); }
  .store-public-navigation .search-map .mapboxgl-ctrl-group:has(.mapboxgl-ctrl-zoom-in) {
    display:flex;
    align-items:center;
    width:var(--store-map-tools-width,91px);
    height:52px;
    overflow:visible;
  }
  .store-public-navigation .search-map .mapboxgl-ctrl-group:has(.mapboxgl-ctrl-zoom-in) button {
    flex:1 1 0;
    min-width:0;
    width:auto;
    height:44px;
    border:0;
    border-radius:24px;
    background:transparent;
    transition:background-color .18s ease;
  }
  .store-public-navigation .search-map .mapboxgl-ctrl-group:has(.mapboxgl-ctrl-zoom-in) button:hover { background:#ffffff24; }
  .store-public-navigation .search-map .mapboxgl-ctrl-group:has(.mapboxgl-ctrl-zoom-in) button:active { background:#16291f55; }
  .store-public-navigation .search-map .mapboxgl-ctrl-group:has(.mapboxgl-ctrl-zoom-in) .mapboxgl-ctrl-icon { filter:var(--store-map-icon-filter); }
  .store-public-navigation .search-map :is(.map-style-ctl,.mapboxgl-ctrl-group:has(.mapboxgl-ctrl-zoom-in)) button:focus-visible { outline:2px solid #d6b77b; outline-offset:-3px; }
  @supports (backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px)) {
    .store-public-navigation .search-map {
      --store-map-glass-background:rgba(18,32,26,.28);
      --store-map-glass-filter:blur(18px) saturate(1.6);
      --store-map-tool-ink:#07130d;
      --store-map-icon-filter:none;
    }
    .store-public-navigation .search-map.store-map-dark { --store-map-tool-ink:#f7f3eb; --store-map-icon-filter:invert(1); }
    .store-public-navigation .search-map:not(.store-map-dark) :is(.map-style-ctl,.mapboxgl-ctrl-group:has(.mapboxgl-ctrl-zoom-in)) button:focus-visible { outline-color:#80612b; }
  }
  @media(prefers-reduced-motion:reduce) { .map-style-ctl *,.search-map .mapboxgl-ctrl-group button { transition:none!important; } }
  @media(forced-colors:active) {
    .store-public-navigation .search-map :is(.map-style-ctl,.mapboxgl-ctrl-group:has(.mapboxgl-ctrl-zoom-in)) { background:Canvas; border-color:CanvasText; }
    .store-public-navigation .map-style-ctl button { color:ButtonText; }
    .store-public-navigation .map-style-ctl.store-map-lens-ready button.active { color:HighlightText; background:Highlight; }
    .store-public-navigation .search-map :is(.map-style-ctl,.mapboxgl-ctrl-group:has(.mapboxgl-ctrl-zoom-in)) button:focus-visible { outline-color:Highlight; }
    .store-map-style-slider { display:none; }
  }
}

/* Keep account notices visible without changing the measured map tool width. */
.store-public-header .store-header-signin { position:relative; }
.store-account-badge { position:absolute; top:-5px; right:-5px; min-width:20px; height:20px; padding:0 4px; display:flex; align-items:center; justify-content:center; border-radius:50%; background:#16291f; color:#d6b77b; border:1px solid #d6b77b; font-size:10px; font-weight:600; line-height:1; pointer-events:none; }
