/* Apple-inspired glass navigation sits above the map with a quiet selection. */
@media (min-width: 821px) {
  body.map-first-app { --sidebar-width: 104px; }
  #mapSidebar {
    inset: 12px auto 12px 10px; width: 84px; padding: calc(var(--apple-rail-inset) - 1px); gap: 3px; overflow-y: auto;
    border: 1px solid #ffffff30; border-radius: var(--apple-rail-radius);
    background: linear-gradient(145deg,#ffffff12,#ffffff03 45%), #1c1c1ee8;
    box-shadow: inset 0 1px 0 #ffffff1a, 0 12px 36px #0005, 0 2px 6px #0003;
    -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5);
    scrollbar-width: thin; scrollbar-color: #ffffff40 transparent;
  }
  #mapSidebar > .sidebar-button {
    flex: 0 0 auto; min-height: 64px; margin: 0; padding: 7px 2px;
    display: grid; grid-template-rows: 28px auto; align-content: center;
    justify-items: center; gap: 4px; border: 1px solid transparent;
    border-radius: var(--apple-rail-control-radius); background: transparent; box-shadow: none;
    color: #d2d2d7; font-size: .75rem; font-weight: 500; line-height: 1.25;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
  }
  #mapSidebar > .sidebar-button svg {
    width: 28px; height: 28px; padding: 2px; border-radius: 8px; stroke-width: 1.6;
  }
  #mapSidebar > .sidebar-button:hover { color: #fff; background: #ffffff0f; border-color: #ffffff12; }
  #mapSidebar > .sidebar-button.active {
    color: #fff; background: #ffffff1c; border-color: #ffffff21;
    box-shadow: inset 0 1px 0 #ffffff12, 0 2px 5px #0002;
  }
  #mapSidebar > .sidebar-button.active svg { color: #ff6961; }
  #mapSidebar > .sidebar-button:active { background: #ffffff29; }
  #mapSidebar > .sidebar-button:focus-visible { outline: 2px solid #a9ceff; outline-offset: -3px; }
  #mapSidebar #sidebarMenu {
    min-height: 56px; grid-template-rows: 24px auto; gap: 3px;
    background: #ffffff08; border-color: #ffffff14; margin-bottom: 2px;
  }
  #mapSidebar #sidebarMenu svg { width: 24px; height: 24px; padding: 1px; }
  #mapSidebar #sidebarMenu[aria-expanded="true"] { color: #fff; background: #ffffff1c; }
  #mapSidebar .sidebar-section-label {
    flex: 0 0 auto; padding: 9px 0 5px; color: #ababaf;
    font-size: .625rem; font-weight: 600; line-height: 1.4; text-align: center;
  }
  #mapSidebar .sidebar-data-label { border-top: 1px solid #ffffff1a; margin-top: 9px; padding-top: 13px; }
  #mapSidebar .sidebar-spacer { min-height: 12px; }
  #mapSidebar .sidebar-divider { flex: 0 0 1px; margin: 4px 10px; background: #ffffff1a; }
  #mapSidebar #fitResults { min-height: 56px; grid-template-rows: 24px auto; gap: 3px; }
  #mapSidebar #fitResults svg { width: 24px; height: 24px; padding: 1px; }
  #mapSidebar #fitResults > span { font-size: .6875rem; }
  #mapSidebar .sidebar-count {
    top: 4px; right: 3px; min-width: 19px; height: 19px; padding: 0 4px;
    border: 1px solid #ffffff24; background: #48484a; color: #fff;
    font-size: .625rem; font-weight: 600; line-height: 1;
  }
  #mapSidebar #filterCount { background: #b32626; border-color: #ffffff38; }
}
@media (min-width: 821px) and (max-height: 700px) {
  #mapSidebar { inset-block: 8px; gap: 2px; }
  #mapSidebar > .sidebar-button { min-height: 56px; grid-template-rows: 28px auto; gap: 3px; padding-block: 4px; }
  #mapSidebar > .sidebar-button svg { width: 28px; height: 28px; padding: 3px; }
  #mapSidebar #sidebarMenu, #mapSidebar #fitResults { min-height: 52px; }
  #mapSidebar .sidebar-section-label { padding-top: 5px; }
  #mapSidebar .sidebar-data-label { margin-top: 4px; padding-top: 9px; }
}
@media (min-width: 821px) and (prefers-reduced-transparency: reduce) {
  #mapSidebar { background: #242426; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (min-width: 821px) and (prefers-contrast: more) {
  #mapSidebar { background: #1c1c1e; border-color: #aaa; }
  #mapSidebar > .sidebar-button.active { background: #444446; border-color: #ddd; }
}
@media (prefers-reduced-motion: reduce) {
  #mapSidebar > .sidebar-button { transition: none; }
}

/* Shared Apple-inspired typography and solid fallback surfaces. The material
   appearance below adds translucency when system or explicit preferences allow. */
body.map-first-app {
  --bg: #1c1c1e;
  --panel: #1c1c1e;
  --panel-2: #2c2c2e;
  --text: #f5f5f7;
  --muted: #b8b8bd;
  --border: #48484a;
  --control-border: #8e8e93;
  /* Insets include the outer border. Children at a container's corners use
     its radius minus that inset; standalone controls keep their own shape. */
  --apple-panel-radius: 28px;
  --apple-panel-inset: 16px;
  --apple-content-radius: calc(var(--apple-panel-radius) - var(--apple-panel-inset));
  --apple-card-radius: 24px;
  --apple-card-inset: 12px;
  --apple-card-control-radius: calc(var(--apple-card-radius) - var(--apple-card-inset));
  --apple-rail-radius: 28px;
  --apple-rail-inset: 8px;
  --apple-rail-control-radius: calc(var(--apple-rail-radius) - var(--apple-rail-inset));
  --apple-nav-radius: 28px;
  --apple-nav-inset: 6px;
  --apple-nav-control-radius: calc(var(--apple-nav-radius) - var(--apple-nav-inset));
  --explorer-radius: var(--apple-content-radius);
  --apple-surface: #242426;
  --apple-raised: #323235;
  --apple-glass: #252527c7;
  --apple-glass-border: #ffffff30;
  --apple-glass-shadow: 0 10px 32px #0004;
  --apple-focus: #a9ceff;
  --shadow: 0 12px 36px #0004;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.map-first-app .map-shell { background: transparent; }
body.map-first-app :is(h1,h2,h3,.result-name,.results-title strong) { letter-spacing: -.02em; }
body.map-first-app :is(button,input,select,textarea) { font-family: inherit; }
body.map-first-app :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible {
  outline: 2px solid var(--apple-focus); outline-offset: -3px;
}
body.map-first-app :is(input,select,textarea) { accent-color: #ff6961; }
body.map-first-app :is(.button,.small-button,.small-icon-button) {
  border-radius: var(--apple-content-radius); background: var(--apple-raised); border-color: var(--control-border);
  color: var(--text); font-weight: 500;
}
body.map-first-app :is(.button,.small-button,.small-icon-button):hover { background: #414144; }
body.map-first-app .button.primary { background: #b82d2a; border-color: #b82d2a; color: #fff; }
body.map-first-app .button.primary:hover { background: #9f2522; border-color: #9f2522; }
body.map-first-app :is(.button.active,.button[aria-pressed="true"]) {
  background: #49494d; color: #fff; border-color: #c1c1c7;
}
body.map-first-app :is(.field input,.field select,.calculator-controls input,.calculator-controls select,
  .changes-filters input,.changes-filters select,.results-toolbar select,#shareLink) {
  background: #2c2c2e; border: 1px solid var(--control-border); border-radius: 12px; color: var(--text);
}
body.map-first-app :is(input,textarea)::placeholder { color: var(--muted); opacity: 1; }
body.map-first-app .persistent-map-search,
body.map-first-app .area-results-card,
body.map-first-app #searchSuggestions,
body.map-first-app #phoneStationPreview,
body.map-first-app #mapStationPicker,
body.map-first-app #mapLayersDock #mapDetailsPanel,
body.map-first-app .app-menu-drawer,
body.map-first-app :is(.share-dialog,#locationDialog,.startup-card) {
  background: var(--apple-glass);
  border: 1px solid var(--apple-glass-border); border-radius: var(--apple-panel-radius);
  box-shadow: var(--apple-glass-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
}
body.map-first-app .persistent-map-search { border-color: var(--control-border); border-radius: 999px; }
body.map-first-app .map-search-box input { background: transparent; border: 0; border-radius: 0; }
body.map-first-app .area-results-card { border-radius: 20px; }
body.map-first-app #searchSuggestions { padding: 7px; }
body.map-first-app .search-suggestion { border-radius: calc(var(--apple-panel-radius) - 8px); }
body.map-first-app .app-menu-drawer { border-radius: 0 var(--apple-panel-radius) var(--apple-panel-radius) 0; }
body.map-first-app .app-menu-drawer :is(.map-style-option,.mobile-overflow-tools > button) { border-radius: 14px; }
body.map-first-app .app-menu-drawer :is(.map-style-option.active,.map-style-option[aria-pressed="true"]) {
  background: #ffffff15; color: #fff;
}
body.map-first-app :is(.app-menu-section,.popover-head,.sheet-head,.dialog-head,.detail-navigation,
  .results-toolbar,.left-panel-footer,.mobile-sheet-controls) { border-color: var(--border); }

body.map-first-app #resultsPanel,
body.map-first-app #filtersPanel,
body.map-first-app #detailDialog,
body.map-first-app .map-sheet {
  background: var(--panel); border-color: var(--border); border-radius: var(--apple-panel-radius);
  box-shadow: 0 10px 30px #0004;
}
body.map-first-app :is(.results-toolbar,.left-panel-footer,.dialog-head,.sheet-head,.popover-head,.detail-navigation) {
  background: var(--panel); color: var(--text);
}
body.map-first-app .map-results-panel .result-card {
  margin: 10px; padding: calc(var(--apple-card-inset) - 1px); border: 1px solid #4b4b4e;
  border-radius: var(--apple-card-radius); background: var(--apple-surface); box-shadow: 0 2px 5px #0002;
}
body.map-first-app .map-results-panel .result-card:hover { background: #2c2c2f; }
body.map-first-app .map-results-panel .result-card.selected {
  background: #303034; border-color: #ff6961; box-shadow: inset 3px 0 0 #ff6961;
}
body.map-first-app .result-card .result-name { color: var(--text); font-weight: 650; }
body.map-first-app .result-card .result-card-actions > .button { border-radius: var(--apple-card-control-radius); }
body.map-first-app .result-primary-meta .chip { background: #39393c; border-color: #68686d; }
body.map-first-app .hardware-badge { background: #303033; border-color: #68686d; border-radius: 8px; color: #e5e5ea; }
body.map-first-app .result-secondary-meta .chip { background: transparent; border: 0; }
body.map-first-app .price-group-heading { background: #242426; border-color: var(--border); }
body.map-first-app .result-price-signs { background: transparent; padding: 8px 6px; }
body.map-first-app .result-distance, body.map-first-app .result-location { color: var(--muted); }
body.map-first-app :is(.result-feedback,.detail-load-feedback,.detail-secondary-actions,.compare-add-panel,
  .saved-station-row,.comparison-card,.metric,.detail-item,.hardware-details,.detail-disclosure,
  .raw-json-disclosure,.pricing-capture-details,.new-meaning-note) {
  background: var(--apple-surface); border-color: var(--border); border-radius: var(--apple-content-radius);
}
body.map-first-app #detailDialog :is(.detail-item,.hardware-details,.detail-disclosure,.raw-json-disclosure) {
  background: var(--apple-surface); border-color: var(--border); border-radius: var(--apple-content-radius);
}
body.map-first-app #detailDialog .charging-essentials .detail-item { border-radius: var(--apple-content-radius); }
body.map-first-app #detailDialog :is(.pricing-now,.pricing-hero > .non-tesla-sign) {
  background: var(--apple-surface); border: 1px solid #4b4b4e; border-radius: var(--apple-content-radius);
}
body.map-first-app #detailDialog .pricing-next { background: #2c2c2e; border-color: var(--border); border-radius: var(--apple-content-radius); }
body.map-first-app #detailDialog .detail-notice { border-radius: var(--apple-content-radius); }
body.map-first-app #detailDialog .detail-primary-actions :is(.button,summary) { border-radius: var(--apple-content-radius); }
body.map-first-app #detailBody { padding: calc(var(--apple-panel-inset) - 1px); }
body.map-first-app .sheet-scroll { padding: calc(var(--apple-panel-inset) - 1px); }
body.map-first-app #detailDialog .distance-origin-disclosure { background: transparent; }
body.map-first-app #detailDialog .distance-origin-disclosure > summary { background: transparent; }
body.map-first-app :is(.detail-disclosure > summary,.raw-json-disclosure > summary,.pricing-capture-details > summary) {
  border-radius: 16px; color: var(--text);
}
body.map-first-app :is(.detail-disclosure[open],.raw-json-disclosure[open]) > summary { border-radius: 16px 16px 0 0; }
body.map-first-app :is(.detail-disclosure-body,.detail-section) { border-color: var(--border); }
body.map-first-app .quick-filter-controls { padding: 4px; gap: 6px; border: 1px solid var(--border); border-radius: 18px; background: #151517; }
body.map-first-app .quick-filter-controls > .button { border-radius: 13px; }
body.map-first-app .quick-filter-controls > .button[aria-pressed="true"] { background: #49494d; color: #fff; border-color: #c1c1c7; }
body.map-first-app :is(.filter-section,.advanced-filters) { border-color: var(--border); }
body.map-first-app :is(.updates-view-switch,.compare-head-actions) { gap: 8px; }
body.map-first-app .comparison-card { border: 1px solid var(--border); }
body.map-first-app .comparison-prices { background: transparent; padding: 12px; }
body.map-first-app :is(.comparison-card-facts,.comparison-cost,.comparison-card-heading) { border-color: var(--border); }
body.map-first-app :is(.schedule-wrap,.compare-table-wrap,.raw-json) { border-color: var(--border); border-radius: 14px; }
body.map-first-app :is(.schedule-table,.compare-table,.calculator-table) th { background: #323235; }
body.map-first-app :is(.schedule-table,.compare-table,.calculator-table) :is(th,td) { border-color: var(--border); }
body.map-first-app :is(.raw-json,.raw-disclosure pre) { background: #141416; color: #e5e5ea; }
body.map-first-app #mapLayersDock #legendPanel { background: transparent; }
body.map-first-app #mapLayersDock .explorer-legend-head { background: var(--panel); }
body.map-first-app #mapLayersDock .layer-choice { border-radius: 14px; }
body.map-first-app #mapLayersDock .layer-preview { border-radius: 12px; }
body.map-first-app #mapLayersDock .layer-choice[aria-pressed="true"] { color: #fff; }
body.map-first-app .map-station-choice { background: #323235; border-color: #77777d; border-radius: 14px; }
body.map-first-app .maplibregl-popup.station-hover-popup .maplibregl-popup-content {
  background: var(--panel); border-color: var(--border); border-radius: 18px; box-shadow: var(--shadow);
}
body.map-first-app .map-status-stack > :not([hidden]) { background: var(--panel); border-color: var(--border); border-radius: 18px; }
body.map-first-app :is(.phone-preview-header,.phone-preview-actions) { background: var(--panel); border-color: var(--border); }
body.map-first-app :is(.share-dialog,#locationDialog)::backdrop { background: #0008; }

@media (max-width: 820px) {
  body.map-first-app #resultsPanel,
  body.map-first-app #detailDialog,
  body.map-first-app #filtersPanel,
  body.map-first-app .map-sheet { border: 1px solid #66666b; border-radius: var(--apple-panel-radius); }
  body.map-first-app #resultsPanel .mobile-sheet-controls,
  body.map-first-app #detailDialog .mobile-sheet-controls { background: #242426; border-color: #48484a; }
  body.map-first-app .mobile-sheet-controls { padding: 7px; }
  body.map-first-app .mobile-sheet-controls > button { border-radius: calc(var(--apple-panel-radius) - 8px); color: var(--muted); }
  body.map-first-app .mobile-sheet-controls > button[aria-pressed="true"] { background: #48484b; color: #fff; }
  body.map-first-app .sheet-drag-handle > span { width: 32px; height: 4px; border-radius: 4px; background: #9a9a9f; }
  body.map-first-app .mobile-nav {
    isolation: isolate; border: 0; background: transparent;
    padding: calc(3px + var(--apple-nav-inset)) calc(max(8px,env(safe-area-inset-right)) + var(--apple-nav-inset)) calc(max(4px,env(safe-area-inset-bottom)) + var(--apple-nav-inset)) calc(max(8px,env(safe-area-inset-left)) + var(--apple-nav-inset));
  }
  body.map-first-app, body.map-first-app.sidebar-hidden { --mobile-nav-height: calc(64px + env(safe-area-inset-bottom)); }
  body.map-first-app .mobile-nav::before {
    content: ''; position: absolute; z-index: -1; inset: 3px max(8px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
    border-radius: var(--apple-nav-radius); background: var(--apple-glass); border: 1px solid var(--apple-glass-border);
    box-shadow: var(--apple-glass-shadow); pointer-events: none;
    -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
  }
  body.map-first-app .mobile-nav button { min-height: 44px; border-radius: var(--apple-nav-control-radius); gap: 2px; color: #c7c7cc; }
  body.map-first-app .mobile-nav button.active { background: #ffffff1c; color: #fff; }
  body.map-first-app .mobile-nav button.active::after { display: none; }
  body.map-first-app .mobile-nav button.active svg { color: #ff6961; }
  body.map-first-app .mobile-nav button svg { stroke-width: 1.7; }
  body.map-first-app .app-menu-drawer { border-radius: 0 var(--apple-panel-radius) var(--apple-panel-radius) 0; }
  body.map-first-app .mobile-location-control { background: #2c2c2ee6; border-color: #a0a0a5; box-shadow: var(--shadow); }
  body.map-first-app .area-results-card { border-radius: 20px; }
  body.map-first-app :is(.detail-primary-actions,.phone-preview-actions,.popover-actions) > .button { border-radius: var(--apple-content-radius); }
}
@media (prefers-reduced-transparency: reduce) {
  body.map-first-app { --apple-glass: #242426; }
  body.map-first-app :is(.persistent-map-search,.area-results-card,#searchSuggestions,#phoneStationPreview,
    #mapStationPicker,.app-menu-drawer,.share-dialog,#locationDialog,.startup-card),
  body.map-first-app #mapLayersDock #mapDetailsPanel,
  body.map-first-app .mobile-nav::before { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  body.map-first-app { --border: #a0a0a5; --apple-glass-border: #a0a0a5; --muted: #d2d2d7; }
}
@media (forced-colors: active) {
  body.map-first-app .mobile-nav::before { background: Canvas; border-color: CanvasText; box-shadow: none; }
  body.map-first-app :is(.button,.mobile-nav button) { forced-color-adjust: auto; }
}

/* Separate desktop panels expose the map around every rounded edge. Search
   floats above the first panel, leaving its own gap rather than a filled rail. */
@media (min-width: 821px) {
  body.map-first-app #resultsPanel,
  body.map-first-app #filtersPanel,
  body.map-first-app #detailDialog.station-detail-sheet {
    top: calc(var(--search-dock-reserved) + 8px); bottom: 12px;
    height: auto; max-height: none; margin: 0;
    border: 1px solid var(--apple-glass-border);
    box-shadow: var(--apple-glass-shadow); overflow: hidden;
  }
  body.map-first-app #resultsPanel,
  body.map-first-app #detailDialog.station-detail-sheet { padding-top: 0; }
  body.map-first-app #filtersPanel { padding: 12px; overflow-y: auto; }
  body.map-first-app .maplibregl-ctrl-bottom-right { display: flex; align-items: center; gap: 8px; }
}
@media (min-width: 1181px) {
  body.map-first-app.detail-open:not(.results-collapsed) #detailDialog.station-detail-sheet {
    top: 12px; left: calc(var(--sidebar-width) + var(--results-width) + 12px);
  }
  body.detail-open:not(.results-collapsed) .compare-launcher {
    left: calc(50% + ((var(--sidebar-width) + var(--results-width) + var(--results-width) + 12px) / 2));
  }
}

/* Web materials inspired by Apple's regular glass and standard content
   materials. One backdrop per floating surface; content cards share that
   material instead of stacking independent glass effects. */
body.map-first-app[data-interface-material='glass'] {
  --apple-glass: #17191b70;
  --apple-content-material: #121416ad;
  --apple-surface: #ffffff08;
  --apple-raised: #ffffff15;
  --apple-glass-border: #ffffff28;
  --apple-glass-shadow: 0 12px 32px #0003, 0 2px 6px #0002;
  --muted: #d1d3d6;
}
/* Bright map tiles need a deeper regular material to protect labels and the
   illuminated price readouts, while retaining the map's shapes underneath. */
body.map-first-app[data-interface-material='glass']:is([data-basemap-style='light'],[data-basemap-style='bright'],[data-basemap-style='threeD'],[data-basemap-style='liberty']) {
  --apple-glass: #141618b8;
  --apple-content-material: #121416c7;
  --sign-tesla: #ff9992;
}
body.map-first-app[data-interface-material='glass'] :is(#mapSidebar,.persistent-map-search,.area-results-card,
  #searchSuggestions,#phoneStationPreview,#mapStationPicker,#mapDetailsPanel,.app-menu-drawer,
  .share-dialog,#locationDialog,.startup-card,#layersTray),
body.map-first-app[data-interface-material='glass'] #mapLayersDock #mapDetailsPanel,
body.map-first-app[data-interface-material='glass'] .mobile-nav::before {
  background: var(--apple-glass);
  border-color: var(--apple-glass-border); box-shadow: var(--apple-glass-shadow);
  -webkit-backdrop-filter: blur(16px) saturate(1.8); backdrop-filter: blur(16px) saturate(1.8);
}
body.map-first-app[data-interface-material='glass'] :is(#resultsPanel,#filtersPanel,#detailDialog,.map-sheet) {
  background: var(--apple-content-material);
  border-color: var(--apple-glass-border); box-shadow: var(--apple-glass-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
}
body.map-first-app[data-interface-material='glass'] :is(.results-toolbar,.left-panel-footer,.dialog-head,
  .sheet-head,.popover-head,.detail-navigation,.mobile-sheet-controls,.phone-preview-header,.phone-preview-actions,
  .price-group-heading,.results-price-context,.filter-side-sheet .popover-actions) {
  background: transparent; border-color: #ffffff1c;
}
body.map-first-app[data-interface-material='glass'] #resultsPanel :is(.mobile-sheet-controls,.left-panel-footer),
body.map-first-app[data-interface-material='glass'] #detailDialog .mobile-sheet-controls,
body.map-first-app[data-interface-material='glass'] #filtersPanel .popover-head { background: transparent; }
body.map-first-app[data-interface-material='glass'] #resultsPanel .result-card {
  background: transparent; border-color: transparent;
  box-shadow: none;
  margin-block: 4px;
}
body.map-first-app[data-interface-material='glass'] #resultsPanel .result-card + .result-card { border-top-color: #ffffff18; }
body.map-first-app[data-interface-material='glass'] #results { background: transparent; }
body.map-first-app[data-interface-material='glass'] #resultsPanel .result-card:hover { background: #ffffff0c; border-color: #ffffff20; }
body.map-first-app[data-interface-material='glass'] #resultsPanel .result-card.selected {
  background: #ffffff10; border-color: #ffffff30; box-shadow: inset 3px 0 0 #ff817a;
}
body.map-first-app[data-interface-material='glass'] #detailDialog :is(.detail-item,.hardware-details,.detail-disclosure,
  .raw-json-disclosure,.pricing-now,.pricing-hero > .non-tesla-sign,.pricing-next) { background: var(--apple-surface); border-color: transparent; }
body.map-first-app[data-interface-material='glass'] :is(.button,.small-button,.small-icon-button) {
  background: var(--apple-raised); border-color: #ffffff70; border-radius: var(--apple-content-radius);
  box-shadow: none;
}
body.map-first-app[data-interface-material='glass'] #mapSidebar > .sidebar-button.active { box-shadow: none; }
body.map-first-app[data-interface-material='glass'] .result-card .result-card-actions > .button { border-radius: var(--apple-card-control-radius); }
body.map-first-app[data-interface-material='glass'] #detailDialog .detail-primary-actions :is(.button,summary) { border-radius: var(--apple-content-radius); }
body.map-first-app[data-interface-material='glass'] .button.primary { background: #b82d2a; }
body.map-first-app[data-interface-material='glass'] :is(.button.active,.button[aria-pressed='true']) { background: #ffffff26; }
body.map-first-app[data-interface-material='glass'] :is(.button,.small-button,.small-icon-button):hover { background: #ffffff20; }
body.map-first-app[data-interface-material='glass'] .button.primary:hover { background: #9f2522; }
body.map-first-app[data-interface-material='glass'] :is(.field input,.field select,.calculator-controls input,
  .calculator-controls select,.changes-filters input,.changes-filters select,.results-toolbar select,#shareLink) { background: #00000024; border-radius: 18px; }
body.map-first-app[data-interface-material='glass'] select option { background: #242426; color: #f5f5f7; }
body.map-first-app[data-interface-material='glass'] .result-primary-meta .chip { background: #ffffff09; border-color: #ffffff28; }
body.map-first-app[data-interface-material='glass'] .hardware-badge { background: transparent; border-color: #ffffff28; }
body.map-first-app[data-interface-material='glass'] .quick-filter-controls { background: #0002; }
body.map-first-app[data-interface-material='glass'] #mapLayersDock .explorer-legend-head { background: #1b2028e8; }
body.map-first-app[data-interface-material='glass'] :is(.map-navigation .sidebar-button,.map-attribution-control,.mobile-location-control) {
  background: var(--apple-glass); border-color: #ffffff6b; box-shadow: var(--apple-glass-shadow);
  -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
}
body.map-first-app[data-interface-material='glass'] .map-attribution-control { border-radius: 10px; }
body.map-first-app[data-interface-material='glass'] .map-navigation .sidebar-button { border-radius: 10px; }
body.map-first-app[data-interface-material='glass'] #sidebarZoomIn { border-radius: 10px 10px 0 0; }
body.map-first-app[data-interface-material='glass'] #sidebarZoomOut { border-radius: 0 0 10px 10px; }
body.map-first-app[data-interface-material='glass'] #layersTray { border-radius: 20px; }
body.map-first-app[data-interface-material='glass'] .map-search-box input { background: transparent; }
body.map-first-app[data-interface-material='solid'] :is(#mapSidebar,.persistent-map-search,.area-results-card,
  #searchSuggestions,#phoneStationPreview,#mapStationPicker,#mapDetailsPanel,.app-menu-drawer,
  .share-dialog,#locationDialog,.startup-card,#resultsPanel,#filtersPanel,#detailDialog,.map-sheet,#layersTray),
body.map-first-app[data-interface-material='solid'] #mapLayersDock #mapDetailsPanel {
  background: #242426; -webkit-backdrop-filter: none; backdrop-filter: none;
}
body.map-first-app[data-interface-material='solid'] .mobile-nav::before {
  background: #242426; -webkit-backdrop-filter: none; backdrop-filter: none;
}
@media (prefers-contrast: more) {
  body.map-first-app[data-interface-material='glass'] { --apple-glass: #1b2028ed; --apple-content-material: #191e26ed; --apple-glass-border: #aaa; --muted: #e0e3e8; }
}
@media (prefers-reduced-motion: no-preference) {
  body.map-first-app[data-interface-material='glass'] :is(#mapSidebar > .sidebar-button,.mobile-nav button,.map-navigation .sidebar-button) {
    transition: background-color 160ms ease, box-shadow 160ms ease, scale 180ms ease;
  }
  body.map-first-app[data-interface-material='glass'] :is(#mapSidebar > .sidebar-button,.mobile-nav button,.map-navigation .sidebar-button):active { scale: .96; }
}
