/* Consumer desktop layout (Rahyab — inspired by modern map apps, not Google assets) */
:root {
  /* Compact Google Maps desktop proportions — smaller cards so chips + search fit. */
  --nav-rail-width: 84px;
  --nav-rail-inset: 0px;
  --nav-edge-tab-w: 26px;
  --gm-surface: #ffffff;
  --gm-rail: #f7fafb;
  --gm-text: #202124;
  --gm-muted: #5f6368;
  --gm-divider: #e4e7eb;
  --gm-accent: #1a73e8;
  --gm-accent-soft: #e8f0fe;
  --search-pill-h: 48px;
  --search-menu-size: 48px;
  --search-chrome-gap: 8px;
  /* Google Maps desktop search card width (~368px). */
  --search-pill-w: min(368px, calc(100vw - var(--nav-rail-inset) - 72px));
  --search-sheet-radius: 8px;
  --search-sheet-shadow:
    0 1px 2px rgba(60, 64, 67, 0.3),
    0 2px 6px 2px rgba(60, 64, 67, 0.15);
  --side-panel-w: min(368px, calc(100vw - var(--nav-rail-inset) - 32px));
  --touch-min: 44px;
  --chrome-inline-gap: 10px;
  --chip-h: 32px;
}

html.consumer-ui {
  --nav-chrome-left: calc(var(--nav-edge-tab-w) + 10px);
}

html.consumer-ui.nav-rail-expanded {
  --nav-rail-inset: var(--nav-rail-width);
  --nav-chrome-left: calc(var(--nav-rail-inset) + 16px);
}

html.consumer-ui,
html.consumer-ui body {
  overflow: hidden;
  overflow-x: hidden;
  height: 100%;
  margin: 0;
  max-width: 100vw;
  font-family: var(--font-body);
  font-weight: var(--weight-body);
}

html.consumer-ui body {
  background: #f5f4f2;
}

/* Locale type: titles = SemiBold/Medium, body = Regular (fa / ps / en). */
html.consumer-ui h1,
html.consumer-ui h2,
html.consumer-ui h3,
html.consumer-ui .section-title,
html.consumer-ui .place-detail-title,
html.consumer-ui .place-detail-section-title,
html.consumer-ui .search-suggest-title,
html.consumer-ui .user-library-head .section-title,
html.consumer-ui .account-sheet-card h2,
html.consumer-ui .nav-rail-btn {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
}

html.consumer-ui input,
html.consumer-ui textarea,
html.consumer-ui select,
html.consumer-ui .search-omnibox input,
html.consumer-ui .od-edit,
html.consumer-ui .hint,
html.consumer-ui .banner,
html.consumer-ui .search-suggest-sub,
html.consumer-ui .place-detail-subtitle,
html.consumer-ui .map-pick-banner,
html.consumer-ui .chrome-toast,
html.consumer-ui footer.attribution {
  font-family: var(--font-body);
  font-weight: var(--weight-body);
}

html.consumer-ui #map {
  position: fixed;
  inset: 0;
  z-index: 0;
}

/* Google Maps Earth cold-open: black space around the photoreal globe. */
html.consumer-ui.globe-intro #map,
html.consumer-ui.globe-intro .maplibregl-canvas-container,
html.consumer-ui.globe-intro .maplibregl-canvas {
  background: #000 !important;
}

/* No loading chrome during Earth cold-open — space is the product surface. */
html.consumer-ui.globe-intro .map-load-overlay,
html.consumer-ui.globe-intro body.map-loading .map-load-overlay {
  display: none !important;
}

html.consumer-ui .nav-rail {
  position: fixed;
  z-index: 7;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--nav-rail-width);
  background: var(--gm-rail);
  border-right: 1px solid var(--gm-divider);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 max(12px, env(safe-area-inset-bottom));
  gap: 4px;
  transform: translateX(-100%);
  transition: transform 0.22s ease;
  box-shadow: none;
  /* Off-canvas rail must not intercept Directions/Search hit targets (e.g. #swap). */
  pointer-events: none;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* ☰ lives only in the left nav rail — never beside the search pill. */
html.consumer-ui .nav-menu-fab {
  display: none !important;
}

html.consumer-ui.nav-rail-expanded .search-chrome,
html.consumer-ui.mobile-rail-open .search-chrome {
  width: 100%;
  gap: 0;
}

html.consumer-ui.nav-rail-expanded .nav-rail,
html.consumer-ui.mobile-rail-open .nav-rail {
  transform: translateX(0);
  box-shadow: 2px 0 12px rgba(60, 64, 67, 0.12);
}

html.consumer-ui.mobile-rail-open .nav-rail {
  pointer-events: auto;
  z-index: 10;
}

html.consumer-ui .nav-rail-edge-toggle {
  position: fixed;
  z-index: 8;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: var(--nav-edge-tab-w);
  min-height: 72px;
  padding: 0;
  border: 1px solid var(--gm-divider);
  border-left: none;
  border-radius: 0 12px 12px 0;
  background: var(--gm-surface);
  box-shadow: 2px 0 8px rgba(60, 64, 67, 0.14);
  color: var(--gm-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: left 0.22s ease, opacity 0.18s ease;
}

html.consumer-ui .nav-rail-edge-toggle:hover {
  color: var(--gm-text);
  background: #f8f9fa;
}

html.consumer-ui.nav-rail-expanded .nav-rail-edge-toggle {
  left: calc(var(--nav-rail-width) - 1px);
  border-radius: 0 12px 12px 0;
  border-left: 1px solid var(--gm-divider);
  min-height: 56px;
}

/* When `>` panel is open: ALWAYS rail + full-height card as one sheet (image 2).
   Never a short floating card with empty map under it (image 1). */
@media (min-width: 901px) {
  html.consumer-ui.place-panel-open,
  html.consumer-ui.directions-panel-open,
  html.consumer-ui.library-panel-open,
  html.consumer-ui.contribute-panel-open {
    --side-panel-w: min(400px, calc(100vw - var(--nav-rail-width) - 24px));
    --nav-rail-inset: var(--nav-rail-width);
    --nav-chrome-left: var(--nav-rail-width);
  }

  html.consumer-ui.place-panel-open:not(.left-panel-collapsed) .nav-rail,
  html.consumer-ui.directions-panel-open:not(.left-panel-collapsed) .nav-rail,
  html.consumer-ui.library-panel-open:not(.left-panel-collapsed) .nav-rail,
  html.consumer-ui.contribute-panel-open:not(.left-panel-collapsed) .nav-rail {
    transform: translateX(0) !important;
    pointer-events: auto !important;
    box-shadow: none !important;
  }

  html.consumer-ui.place-panel-open:not(.left-panel-collapsed) .side-panel-stack,
  html.consumer-ui.directions-panel-open:not(.left-panel-collapsed) .side-panel-stack,
  html.consumer-ui.library-panel-open:not(.left-panel-collapsed) .side-panel-stack,
  html.consumer-ui.contribute-panel-open:not(.left-panel-collapsed) .side-panel-stack {
    left: var(--nav-rail-width) !important;
    top: 0 !important;
    bottom: 0 !important;
    height: auto !important;
    max-height: none !important;
  }

  html.consumer-ui.place-panel-open:not(.left-panel-collapsed) .side-panel-card.search-panel,
  html.consumer-ui.directions-panel-open:not(.left-panel-collapsed) .side-panel-card.directions-panel,
  html.consumer-ui.library-panel-open:not(.left-panel-collapsed) .side-panel-card.search-panel,
  html.consumer-ui.contribute-panel-open:not(.left-panel-collapsed) .side-panel-card.search-panel {
    border-radius: 0 !important;
    box-shadow: 2px 0 6px rgba(60, 64, 67, 0.15) !important;
    height: 100% !important;
    max-height: none !important;
    flex: 1 1 auto !important;
  }

  /* Closed wins over every open-sheet rail force-show. */
  html.consumer-ui.left-panel-collapsed .nav-rail {
    display: none !important;
    transform: translateX(-100%) !important;
    pointer-events: none !important;
    box-shadow: none !important;
  }

  html.consumer-ui.place-panel-open .search-panel-inner,
  html.consumer-ui.place-panel-open .place-hero,
  html.consumer-ui.place-panel-open .search-panel > .search-chrome,
  html.consumer-ui.directions-panel-open .side-panel-card.directions-panel .panel-inner {
    border-radius: 0 !important;
  }
}

/* Only one `<` / `>` toggle on screen: the side-panel toggle wins over the rail tab. */
html.consumer-ui.side-panel-toggle-active .nav-rail-edge-toggle {
  display: none !important;
}

@media (min-width: 901px) {
  html.consumer-ui.nav-rail-expanded .nav-rail {
    pointer-events: auto;
  }

  /*
   * Desktop state 2: floating omnibox only with open chrome (not clean/collapsed state 1).
   * State 1 (.left-panel-collapsed) keeps a clean map — only the expand tab.
   */
  html.consumer-ui.chrome-revealed:not(.left-panel-collapsed):not(.search-chrome-docked):not(.directions-panel-open) .search-chrome-float {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
  }

  /* Category chips sit under the floating omnibox whenever it is showing. */
  html.consumer-ui.chrome-revealed:not(.left-panel-collapsed):not(.search-chrome-docked):not(.directions-panel-open) .search-category-strip {
    display: flex !important;
  }

  /* When omnibox is visible but rail is collapsed, pin search to the left edge gap. */
  html.consumer-ui.chrome-revealed:not(.left-panel-collapsed):not(.nav-rail-expanded):not(.search-chrome-docked):not(.directions-panel-open) {
    --nav-chrome-left: calc(var(--nav-edge-tab-w) + 10px);
  }
}

html.consumer-ui[dir='rtl'] .nav-rail,
html.consumer-ui[dir='ltr'] .nav-rail {
  left: 0;
  right: auto;
}

html.consumer-ui .nav-rail-btn {
  width: 72px;
  min-height: 64px;
  border: none;
  background: transparent;
  border-radius: 12px;
  color: var(--gm-muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  font-size: 11px;
  line-height: 1.2;
  font-family: var(--font-body);
}

html.consumer-ui .nav-rail-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

html.consumer-ui .nav-rail-btn:hover {
  background: rgba(60, 64, 67, 0.06);
}

html.consumer-ui .nav-rail-btn.active,
html.consumer-ui .nav-rail-btn[aria-pressed='true'] {
  color: var(--gm-accent);
  background: var(--gm-accent-soft);
}

html.consumer-ui .nav-rail-spacer {
  flex: 1;
}

html.consumer-ui .nav-rail-sep {
  width: 48px;
  height: 1px;
  background: var(--gm-divider);
  margin: 6px 0;
}

/* Floating search: hidden until chrome is revealed (state 2). */
html.consumer-ui .search-chrome-float {
  position: fixed;
  z-index: 8;
  top: max(12px, env(safe-area-inset-top));
  left: var(--nav-chrome-left);
  direction: ltr;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  width: auto;
  max-width: calc(100vw - var(--nav-chrome-left) - var(--chrome-inline-gap) - env(safe-area-inset-right, 0px));
  box-sizing: border-box;
  pointer-events: none;
  transition: left 0.22s ease, opacity 0.18s ease, visibility 0.18s ease;
  opacity: 0;
  visibility: hidden;
}

html.consumer-ui.chrome-revealed:not(.left-panel-collapsed) .search-chrome-float,
html.consumer-ui.nav-rail-expanded:not(.left-panel-collapsed) .search-chrome-float,
html.consumer-ui.mobile-rail-open .search-chrome-float {
  opacity: 1;
  visibility: visible;
}

html.consumer-ui.search-chrome-docked .search-chrome-float,
html.consumer-ui.directions-panel-open .search-chrome-float {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

html.consumer-ui.directions-panel-open .search-category-strip {
  display: none !important;
}

/*
 * Mobile Google Maps: top omnibox is always on the clean map.
 * Desktop keeps state-1 hide via .left-panel-collapsed rules above 901px.
 */
@media (max-width: 900px) {
  html.consumer-ui .search-chrome-float,
  html.consumer-ui.left-panel-collapsed .search-chrome-float,
  html.consumer-ui.chrome-revealed .search-chrome-float,
  html.consumer-ui.country-focus-chrome-hidden .search-chrome-float {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    pointer-events: none !important;
  }

  html.consumer-ui.search-chrome-docked .search-chrome-float,
  html.consumer-ui.directions-panel-open .search-chrome-float {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

html.consumer-ui .search-chrome-float .search-chrome {
  position: relative;
  z-index: 2;
  top: auto;
  left: auto;
  direction: ltr;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--search-chrome-gap);
  width: var(--search-pill-w);
  max-width: var(--search-pill-w);
  box-sizing: border-box;
  pointer-events: auto;
  padding: 0;
  flex: 0 0 auto;
}

html.consumer-ui .search-chrome-float .search-omnibox {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: var(--search-pill-w);
  min-width: 0;
  position: relative;
  z-index: 2;
  max-height: calc(100dvh - max(12px, env(safe-area-inset-top, 0px)) - 100px);
  gap: 0;
}

html.consumer-ui .search-chrome-float .search-pill {
  border: none;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--search-sheet-shadow);
}

/* Open state: one Google Maps sheet — height follows content (no empty white gap).
   Caps at ~47vh when history/results are long; empty history stays compact. */
html.consumer-ui .search-omnibox.is-suggest-open {
  background: #fff;
  border-radius: var(--search-sheet-radius);
  box-shadow: var(--search-sheet-shadow);
  overflow: hidden;
  min-height: 0;
  max-height: min(47vh, calc(100dvh - max(12px, env(safe-area-inset-top, 0px)) - 100px));
}

html.consumer-ui .search-omnibox.is-suggest-open .search-pill {
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #e8eaed;
  box-shadow: none;
  background: #fff;
  height: 56px;
  flex: 0 0 auto;
  padding-inline: 16px 8px;
}

html.consumer-ui .search-omnibox.is-suggest-open .search-suggest {
  margin-top: 0;
  border-radius: 0;
  box-shadow: none;
  border: 0;
  max-height: none;
  min-height: 0;
  flex: 0 1 auto;
}

html.consumer-ui .search-omnibox.is-suggest-open .local-conditions-card {
  margin-top: 0;
  border-radius: 0;
  box-shadow: none;
  border: 0;
  border-top: 1px solid #e8eaed;
  flex: 0 0 auto;
}

/* Docked search: first strip of the same white place card (no floating gap). */
html.consumer-ui.search-chrome-docked .search-panel > .search-chrome {
  position: relative;
  z-index: 2;
  top: auto;
  left: auto;
  direction: inherit;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  pointer-events: auto;
  padding: 10px 12px 8px;
  margin: 0;
  flex: 0 0 auto;
  background: #fff;
  border-radius: 8px 8px 0 0;
  box-shadow: none;
}

html.consumer-ui.search-chrome-docked .search-panel > .search-chrome .search-omnibox {
  width: 100%;
  max-width: none;
  max-height: none;
}

html.consumer-ui.search-chrome-docked .search-panel > .search-chrome .search-pill {
  border: 1px solid #e8eaed;
  border-radius: 24px;
  box-shadow: none;
  background: #fff;
}

/* Hide suggest/conditions while the place card is open. */
html.consumer-ui.search-chrome-docked.place-panel-open .search-suggest,
html.consumer-ui.search-chrome-docked.place-panel-open .local-conditions-card,
html.consumer-ui.search-chrome-docked:has(#placeDetail:not([hidden])) .search-suggest,
html.consumer-ui.search-chrome-docked:has(#placeDetail:not([hidden])) .local-conditions-card {
  display: none !important;
}

/* Legacy join rules superseded by .is-suggest-open unified sheet above. */

/* ——— Place panel: full-height sheet joined to the nav rail (desktop only) ——— */
@media (min-width: 901px) {
html.consumer-ui.place-panel-open .side-panel-stack,
html.consumer-ui:has(#placeDetail:not([hidden])) .side-panel-stack {
  top: 0;
  bottom: 0;
  height: auto;
  max-height: none !important;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
}

@media (min-width: 901px) {
html.consumer-ui.place-panel-open .side-panel-card.search-panel,
html.consumer-ui .side-panel-card.search-panel:has(#placeDetail:not([hidden])) {
  flex: 1 1 auto;
  align-self: stretch;
  height: 100% !important;
  min-height: 0;
  max-height: none !important;
  /* visible so the right-edge collapse tab can stick out onto the map */
  overflow: visible;
  border-radius: 0;
  border: 0;
  box-shadow: 2px 0 6px rgba(60, 64, 67, 0.15);
  background: #fff;
  display: flex;
  flex-direction: column;
}
}

html.consumer-ui.place-panel-open .search-panel-inner,
html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) .search-panel-inner {
  padding: 0 !important;
  background: #fff;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}

html.consumer-ui.place-panel-open .place-detail,
html.consumer-ui .search-panel .place-detail:not([hidden]) {
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #fff;
  max-height: none !important;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

html.consumer-ui.place-panel-open .place-detail-scroll,
html.consumer-ui .search-panel .place-detail:not([hidden]) .place-detail-scroll {
  padding: 0;
  gap: 0;
  max-height: none;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

html.consumer-ui.place-panel-open .place-hero {
  flex: 0 0 auto;
  height: auto;
  max-height: 260px;
  aspect-ratio: 16 / 9;
  background: #dadce0;
}

html.consumer-ui.place-panel-open .place-hero.has-photo {
  max-height: 280px;
  aspect-ratio: 16 / 10;
}

html.consumer-ui.place-panel-open .place-hero .place-hero-img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: center;
}

/* Never let [hidden] body blocks reserve flex space. */
html.consumer-ui.place-panel-open .place-detail-main > [hidden],
html.consumer-ui.place-panel-open .place-detail-body[hidden],
html.consumer-ui.place-panel-open .place-detail-contact-actions[hidden],
html.consumer-ui.place-panel-open .place-facts[hidden] {
  display: none !important;
}

/* Search chrome flush on the joined sheet (no floating top radius). */
html.consumer-ui.place-panel-open .search-panel > .search-chrome,
html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) > .search-chrome {
  border-radius: 0;
  border-bottom: 1px solid #e8eaed;
}

html.consumer-ui.place-panel-open .place-detail-scroll {
  position: relative;
}

/* Skip layout/paint for off-screen panel bodies on long lists (weak devices). */
html.consumer-ui .search-suggest-list,
html.consumer-ui #results,
html.consumer-ui .user-library-list,
html.consumer-ui .contribute-edits-list {
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
}

/* Place-card ✕ stays off — dismiss with search clear / back-to-results. */
html.consumer-ui.place-panel-open .place-detail-close-overlay {
  display: none !important;
}

html.consumer-ui.place-panel-open .place-detail-main {
  gap: 12px;
  padding: 12px 18px 16px;
}

html.consumer-ui.place-panel-open .place-detail-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

html.consumer-ui.place-panel-open .place-detail-name {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: #202124;
}

html.consumer-ui.place-panel-open .place-detail-alt {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  color: #5f6368;
}

html.consumer-ui.place-panel-open .place-detail-meta,
html.consumer-ui.place-panel-open .place-location-meta {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: #70757a;
  letter-spacing: 0;
}

/* Quieter place card: hide noisy empty/technical blocks. */
html.consumer-ui.place-panel-open .place-detail-empty,
html.consumer-ui.place-panel-open .place-detail-identity,
html.consumer-ui.place-panel-open .place-detail-source,
html.consumer-ui.place-panel-open .place-detail-source-note {
  display: none !important;
}

/* Place OD actions: teal brand (Destination primary, Origin second) */
html.consumer-ui.place-panel-open .place-round-icon {
  width: 48px;
  height: 48px;
  background: #fff;
  border: 1px solid var(--m-border, #dadce0);
  color: var(--m-primary, #007F87);
}

html.consumer-ui.place-panel-open .place-round-action.is-primary .place-round-icon {
  background: var(--m-primary, #007F87);
  border-color: var(--m-primary, #007F87);
  color: #fff;
}

html.consumer-ui.place-panel-open .place-round-action.is-saved .place-round-icon {
  background: var(--m-selected, #BDEBF0);
  border-color: var(--m-primary, #007F87);
  color: var(--m-primary, #007F87);
}

html.consumer-ui.place-panel-open .place-round-label {
  color: var(--m-primary, #007F87);
  font-size: 12px;
  font-weight: 500;
}

html.consumer-ui.place-panel-open .place-detail-boundary-note {
  display: none !important;
}

html.consumer-ui.place-panel-open .place-facts-title,
html.consumer-ui.place-panel-open .place-photos-label {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 500;
  color: #202124;
}

html.consumer-ui.place-panel-open .place-facts {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

html.consumer-ui.place-panel-open .place-facts-text {
  font-size: 14px;
  line-height: 1.5;
  color: #3c4043;
}

html.consumer-ui.place-panel-open .place-round-actions {
  gap: 10px 8px;
  padding: 2px 0 4px;
}

html.consumer-ui.place-panel-open .place-detail-photos {
  gap: 8px;
}

html.consumer-ui.place-panel-open .place-photos-strip {
  gap: 8px;
}

html.consumer-ui.place-panel-open .place-photo-thumb {
  position: relative;
  width: min(100%, 280px);
  height: 148px;
  border-radius: 8px;
  border: 0;
}

html.consumer-ui.place-panel-open .place-photo-thumb.is-pending {
  outline: 2px solid #f9ab00;
  outline-offset: -2px;
}

html.consumer-ui .place-photo-status {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(32, 33, 36, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  pointer-events: none;
}

/* Flat names row — no gray card chrome. */
html.consumer-ui.place-panel-open .place-detail-names-wrap.place-detail-section {
  margin: 0;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid #e8eaed;
  border-radius: 0;
  background: transparent;
}

/* Hide empty “quick facts” chrome so the card stays tight. */
html.consumer-ui.place-panel-open .place-facts:empty,
html.consumer-ui.place-panel-open .place-detail-section:has(.place-facts-text:empty),
html.consumer-ui.place-panel-open #placeDetailFacts:empty {
  display: none !important;
}

html.consumer-ui.place-panel-open .place-detail-section-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 500;
  color: #80868b;
  letter-spacing: 0.01em;
}

html.consumer-ui.place-panel-open .place-detail-names {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 18px;
  font-size: 14px;
  width: 100%;
  justify-content: stretch;
}

html.consumer-ui.place-panel-open .place-detail-names dt {
  font-weight: 400;
  color: #80868b;
  white-space: nowrap;
}

/* Label at start, name value pinned to the trailing edge (marked side). */
html.consumer-ui.place-panel-open .place-detail-names dd,
html.consumer-ui.place-panel-open .place-detail-names .place-detail-name-value {
  text-align: end;
  direction: auto;
  unicode-bidi: plaintext;
  justify-self: end;
  color: #202124;
  font-weight: 500;
}

/* Google Maps: quiet text actions under the place body — no chip chrome. */
html.consumer-ui.place-panel-open .place-detail-footer-links {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-top: 2px;
  padding: 6px 0 2px;
  gap: 0;
  border-top: 1px solid #e8eaed;
  grid-template-columns: none;
}

/* Keep place footer lean: report + back only. */
html.consumer-ui.place-panel-open #placeDetailCopyCoords {
  display: none !important;
}

html.consumer-ui.place-panel-open .place-text-link {
  display: block;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 10px 2px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: start;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  color: #1a73e8;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

html.consumer-ui.place-panel-open .place-text-link:hover {
  background: transparent;
  color: #174ea6;
  text-decoration: underline;
}

html.consumer-ui.place-panel-open .place-text-link:active {
  transform: none;
}

html.consumer-ui.place-panel-open #placeDetailReport {
  background: transparent;
  color: #d93025;
  box-shadow: none;
}

html.consumer-ui.place-panel-open #placeDetailReport:hover {
  background: transparent;
  color: #a50e0e;
  box-shadow: none;
}

/* Physical right edge of the card (toward the map) — never the rail side.
   Do not use inset-inline-* here: in RTL it would flip the tab to the rail. */
html.consumer-ui.place-panel-open .side-panel-collapse,
html.consumer-ui.directions-panel-open .side-panel-collapse,
html.consumer-ui.search-chrome-docked .side-panel-collapse,
html.consumer-ui .side-panel-collapse {
  position: absolute;
  left: auto !important;
  /* Sits fully on the map just outside the card edge (Google Maps). */
  right: -23px !important;
  top: 50%;
  transform: translateY(-50%);
  z-index: 12;
  width: 23px;
  min-width: 23px;
  height: 48px;
  min-height: 48px;
  border-radius: 0 8px 8px 0;
  box-shadow: 1px 1px 2px rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
  pointer-events: auto !important;
  place-items: center;
}

html.consumer-ui.place-panel-open .side-panel-collapse:not([hidden]),
html.consumer-ui.directions-panel-open .side-panel-collapse:not([hidden]),
html.consumer-ui.search-chrome-docked .side-panel-collapse:not([hidden]),
html.consumer-ui .side-panel-collapse:not([hidden]) {
  display: grid !important;
}

/* Google Maps place card: search pill floats over the top of the hero photo. */
@media (min-width: 901px) {
  html.consumer-ui.place-panel-open .search-panel > .search-chrome {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 6;
    padding: 10px 12px 0;
    background: transparent;
    pointer-events: none;
  }

  html.consumer-ui.place-panel-open .search-panel > .search-chrome .search-omnibox,
  html.consumer-ui.place-panel-open .search-panel > .search-chrome .search-pill {
    pointer-events: auto;
  }

  html.consumer-ui.place-panel-open .search-panel > .search-chrome .search-pill {
    border: 0;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
  }

  html.consumer-ui.place-panel-open .search-panel-inner {
    border-radius: 0;
  }

  html.consumer-ui.place-panel-open .place-hero {
    border-radius: 0;
    height: auto;
    max-height: 260px;
    aspect-ratio: 16 / 9;
  }

  /* Scrollbar on the map side (right) and thin, so it never splits rail + card in RTL. */
  html.consumer-ui.place-panel-open .place-detail-scroll {
    direction: ltr;
    scrollbar-width: thin;
    scrollbar-color: #dadce0 transparent;
  }

  html.consumer-ui.place-panel-open[dir='rtl'] .place-detail-scroll > * {
    direction: rtl;
  }

  /* Real photo: taller landscape like before (fills card width cleanly). */
  html.consumer-ui.place-panel-open .place-hero.has-photo {
    height: auto;
    max-height: 280px;
    aspect-ratio: 16 / 10;
  }

  html.consumer-ui.place-panel-open .place-hero.has-photo .place-hero-img {
    object-fit: cover;
    object-position: center;
  }
}

/* Category chips: map-side strip to the right of search / panel.
   Always LTR so chips start just after the search card and overflow to the right —
   RTL document direction used to reverse the row and paint «درمانگاه» under the card. */
html.consumer-ui .search-category-strip {
  position: fixed;
  z-index: 6;
  top: max(14px, env(safe-area-inset-top));
  left: calc(var(--nav-chrome-left) + var(--search-pill-w) + 12px);
  right: auto;
  max-width: min(720px, calc(100vw - var(--nav-chrome-left) - var(--search-pill-w) - 36px));
  pointer-events: auto;
  direction: ltr;
  overflow: hidden;
}

html.consumer-ui.search-chrome-docked .search-category-strip {
  left: calc(var(--nav-chrome-left) + var(--side-panel-w) + 12px);
  max-width: min(720px, calc(100vw - var(--nav-chrome-left) - var(--side-panel-w) - 36px));
}

html.consumer-ui.left-panel-collapsed .search-category-strip {
  left: calc(var(--nav-chrome-left) + var(--search-pill-w) + 12px);
  max-width: min(720px, calc(100vw - var(--nav-chrome-left) - var(--search-pill-w) - 36px));
}

/* Contribute / library / place sheet owns the left chrome — hide map chips. */
html.consumer-ui.contribute-panel-open .search-category-strip,
html.consumer-ui.library-panel-open .search-category-strip,
html.consumer-ui.place-panel-open .search-category-strip {
  display: none !important;
}

/* ——— Saved & recent: one Google Maps card (search + library, no double sheet) ——— */
html.consumer-ui.library-panel-open .search-suggest,
html.consumer-ui.library-panel-open .local-conditions-card {
  display: none !important;
}

html.consumer-ui.library-panel-open .search-omnibox.is-suggest-open {
  min-height: 0 !important;
  max-height: none !important;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}

html.consumer-ui.library-panel-open .side-panel-stack {
  top: max(12px, env(safe-area-inset-top));
  bottom: auto;
  height: auto;
  max-height: min(72vh, calc(100dvh - 24px));
  width: var(--side-panel-w);
  left: var(--nav-chrome-left);
  right: auto;
}

html.consumer-ui.library-panel-open .side-panel-card.search-panel {
  display: flex;
  flex-direction: column;
  height: auto;
  max-height: min(72vh, calc(100dvh - 24px));
  min-height: 0;
  border-radius: var(--search-sheet-radius);
  border: 0;
  box-shadow: var(--search-sheet-shadow);
  background: #fff;
  overflow: hidden;
}

html.consumer-ui.library-panel-open.search-chrome-docked .search-panel > .search-chrome {
  flex: 0 0 auto;
  padding: 10px 12px 8px;
  margin: 0;
  border-radius: 0;
  border-bottom: 1px solid #e8eaed;
  box-shadow: none;
  background: #fff;
}

html.consumer-ui.library-panel-open.search-chrome-docked .search-panel > .search-chrome .search-pill {
  border: 0;
  box-shadow: none;
  background: #f1f3f4;
  border-radius: 24px;
  height: 48px;
}

html.consumer-ui.library-panel-open .search-panel-inner {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
}

html.consumer-ui.library-panel-open .search-panel-inner > .search-status,
html.consumer-ui.library-panel-open .search-panel-inner > .nearby-bar,
html.consumer-ui.library-panel-open .search-panel-inner > .search-categories,
html.consumer-ui.library-panel-open .search-panel-inner > .search-empty,
html.consumer-ui.library-panel-open .search-panel-inner > #results,
html.consumer-ui.library-panel-open .search-panel-inner > .place-detail,
html.consumer-ui.library-panel-open .search-panel-inner > .contribute-panel {
  display: none !important;
}

html.consumer-ui.library-panel-open .user-library {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 4px 0 8px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
}

html.consumer-ui.library-panel-open .user-library-head {
  padding: 12px 18px 4px;
  margin: 0;
}

html.consumer-ui.library-panel-open .user-library-head .section-title {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: #202124;
}

html.consumer-ui.library-panel-open .user-library-hint {
  display: none !important;
}

html.consumer-ui.library-panel-open .user-library-block {
  margin: 0;
  padding: 8px 0 4px;
}

html.consumer-ui.library-panel-open .user-library-block + .user-library-block {
  border-top: 1px solid #e8eaed;
  margin-top: 4px;
  padding-top: 12px;
}

html.consumer-ui.library-panel-open .user-library-block-head {
  padding: 0 18px;
  margin-bottom: 8px;
}

html.consumer-ui.library-panel-open .user-library-subtitle {
  font-size: 14px;
  font-weight: 500;
  color: #202124;
}

html.consumer-ui.library-panel-open .user-library-filter-label {
  display: block;
  padding: 0 18px;
  margin: 0 0 8px;
}

html.consumer-ui.library-panel-open .user-library-filter {
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 20px;
  background: #f1f3f4;
  color: #202124;
  font-size: 14px;
  box-sizing: border-box;
}

html.consumer-ui.library-panel-open .user-library-filter:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.28);
  background: #fff;
}

html.consumer-ui.library-panel-open .user-library-list {
  gap: 0;
  padding: 0;
}

html.consumer-ui.library-panel-open .user-library-row {
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #f1f3f4;
  background: transparent;
  min-height: 52px;
}

html.consumer-ui.library-panel-open .user-library-row:hover {
  background: #f1f3f4;
}

html.consumer-ui.library-panel-open button.user-library-main {
  padding: 10px 18px;
}

html.consumer-ui.library-panel-open button.user-library-main .name {
  font-size: 14px;
  font-weight: 500;
  color: #202124;
}

html.consumer-ui.library-panel-open button.user-library-main .meta {
  font-size: 12px;
  color: #70757a;
}

html.consumer-ui.library-panel-open button.user-library-remove {
  background: transparent;
  color: #70757a;
  border-radius: 50%;
  margin-inline-end: 8px;
}

html.consumer-ui.library-panel-open button.user-library-remove:hover {
  background: #fce8e6;
  color: #c5221f;
}

html.consumer-ui.library-panel-open .user-library-empty {
  padding: 8px 18px 12px;
  font-size: 13px;
  color: #70757a;
}

html.consumer-ui.library-panel-open button.text-btn {
  color: #1a73e8;
  font-size: 13px;
  font-weight: 500;
}

html.consumer-ui[dir='rtl'].library-panel-open .user-library,
html.consumer-ui[dir='rtl'].library-panel-open .user-library-head,
html.consumer-ui[dir='rtl'].library-panel-open .user-library-block-head,
html.consumer-ui[dir='rtl'].library-panel-open button.user-library-main {
  direction: rtl;
  text-align: right;
}

/* Keep the tall suggest/conditions card above any chip overflow. */
html.consumer-ui .search-chrome-float .search-omnibox.is-suggest-open {
  z-index: 9;
}

html.consumer-ui .search-suggest {
  margin-top: 8px;
  background: #fff;
  border-radius: var(--search-sheet-radius);
  box-shadow: var(--search-sheet-shadow);
  overflow: hidden;
  flex: 0 1 auto;
  min-height: 0;
  max-height: min(47vh, calc(100dvh - 200px));
  display: flex;
  flex-direction: column;
}

html.consumer-ui .search-suggest[hidden] {
  display: none !important;
}

html.consumer-ui .search-suggest-list {
  overflow-y: auto;
  overscroll-behavior: contain;
  /* Grow with rows only — empty history must not leave a blank band. */
  flex: 0 1 auto;
  min-height: 0;
  max-height: min(280px, 36vh);
  scrollbar-width: thin;
}

/* Desktop history shows ≤4 rows — no scrollbar on the recent list. */
@media (min-width: 901px) {
  html.consumer-ui .search-suggest-list.is-history {
    overflow-y: hidden;
    max-height: none;
    scrollbar-width: none;
  }

  html.consumer-ui .search-suggest-list.is-history::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
}

html.consumer-ui body.layout-desktop .search-suggest-list.is-history {
  overflow-y: hidden;
  max-height: none;
  scrollbar-width: none;
}

html.consumer-ui .search-suggest-list:empty {
  display: none;
  flex: 0 0 0;
  max-height: 0;
  overflow: hidden;
}

html.consumer-ui .search-suggest-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: start;
  padding: 12px 18px;
  cursor: pointer;
  color: #202124;
  font: inherit;
  min-height: 52px;
  transition: background 0.12s ease;
}

/* Persian/Pashto: icon at inline-start (right), then label — Google Maps RTL. */
html.consumer-ui[dir='rtl'] .search-suggest,
html.consumer-ui[dir='rtl'] .search-suggest-list,
html.consumer-ui[dir='rtl'] .search-suggest-row,
html.consumer-ui[dir='rtl'] .search-suggest-home,
html.consumer-ui[dir='rtl'] .search-suggest-more,
html.consumer-ui[dir='rtl'] .search-suggest-empty {
  direction: rtl;
  text-align: right;
}

html.consumer-ui[dir='ltr'] .search-suggest,
html.consumer-ui[dir='ltr'] .search-suggest-list,
html.consumer-ui[dir='ltr'] .search-suggest-row,
html.consumer-ui[dir='ltr'] .search-suggest-home,
html.consumer-ui[dir='ltr'] .search-suggest-more,
html.consumer-ui[dir='ltr'] .search-suggest-empty {
  direction: ltr;
  text-align: left;
}

html.consumer-ui .search-suggest-row:hover,
html.consumer-ui .search-suggest-row:focus-visible,
html.consumer-ui .search-suggest-row.is-active {
  background: #f1f3f4;
  outline: none;
}

html.consumer-ui .search-suggest-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  color: #70757a;
  display: grid;
  place-items: center;
}

html.consumer-ui .search-suggest-text {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: grid;
  gap: 2px;
  text-align: start;
}

html.consumer-ui .search-suggest-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #202124;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: start;
}

html.consumer-ui .search-suggest-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #70757a;
  font-size: 12px;
  font-weight: 400;
  text-align: start;
}

html.consumer-ui .search-suggest-icon.is-place-pin {
  color: #ea4335;
  display: grid;
  place-items: center;
}

html.consumer-ui .search-suggest-icon.is-place-pin .location-pin-svg {
  display: block;
}

html.consumer-ui .search-suggest-empty {
  padding: 16px 18px;
  color: #70757a;
  font-size: 14px;
  line-height: 1.4;
}

html.consumer-ui .result-icon.cat-place-pin {
  background: #fce8e6;
  border-color: #fad2cf;
  font-size: 0;
}

html.consumer-ui .result-icon.cat-place-pin .location-pin-svg {
  display: block;
}

/* Nearby discovery UI removed from Google Maps–style search chrome. */
html.consumer-ui .nearby-bar {
  display: none !important;
}

html.consumer-ui .search-suggest-home {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  width: 100%;
  border: 0;
  border-top: 1px solid #e8eaed;
  background: transparent;
  text-align: start;
  padding: 10px 16px;
  cursor: pointer;
  font: inherit;
  color: #202124;
  min-height: 52px;
  transition: background 0.12s ease;
}

html.consumer-ui .search-suggest-home:hover {
  background: #f1f3f4;
}

html.consumer-ui .search-suggest-home-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e8f0fe;
  color: #1a73e8;
  display: grid;
  place-items: center;
}

html.consumer-ui .search-suggest-home-icon svg {
  width: 18px;
  height: 18px;
}

html.consumer-ui .search-suggest-home-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: start;
}

html.consumer-ui .search-suggest-home-copy strong {
  font-size: 14px;
  font-weight: 500;
  color: #202124;
}

html.consumer-ui .search-suggest-home-meta {
  font-size: 12px;
  color: #1a73e8;
  font-weight: 500;
}

html.consumer-ui .search-suggest-more {
  border: 0;
  border-top: 1px solid #e8eaed;
  background: transparent;
  width: 100%;
  text-align: start;
  padding: 12px 16px;
  color: #1a73e8;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.12s ease;
}

html.consumer-ui .search-suggest-more:hover {
  background: #f1f3f4;
}

html.consumer-ui .local-conditions-card {
  margin-top: 8px;
  flex: 0 0 auto;
  background: #fff;
  border-radius: var(--search-sheet-radius);
  box-shadow: var(--search-sheet-shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  min-height: 64px;
  z-index: 2;
}

html.consumer-ui[dir='rtl'] .local-conditions-card {
  direction: rtl;
}

html.consumer-ui[dir='ltr'] .local-conditions-card {
  direction: ltr;
}

html.consumer-ui .local-conditions-card[hidden] {
  display: none !important;
}

html.consumer-ui .local-conditions-weather {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  border-inline-end: 1px solid #e8eaed;
  background: transparent;
  min-width: 92px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: background 0.12s ease;
}

html.consumer-ui .local-conditions-weather:hover {
  background: #f8f9fa;
}

html.consumer-ui .local-conditions-temp {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.5px;
  color: #202124;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

html.consumer-ui .local-conditions-sky {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  line-height: 0;
}

html.consumer-ui .local-conditions-sky svg {
  display: block;
  width: 24px;
  height: 24px;
}

html.consumer-ui .local-conditions-traffic {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  padding: 12px 14px 12px 16px;
  text-align: start;
  cursor: pointer;
  font: inherit;
  color: #202124;
  min-width: 0;
  width: 100%;
  transition: background 0.12s ease;
}

html.consumer-ui .local-conditions-traffic:hover {
  background: #f8f9fa;
}

html.consumer-ui .local-conditions-car {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  line-height: 0;
}

html.consumer-ui .local-conditions-car svg {
  width: 22px;
  height: 22px;
  display: block;
}

html.consumer-ui .local-conditions-traffic-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

html.consumer-ui .local-conditions-traffic-copy strong {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  color: #202124;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

html.consumer-ui .local-conditions-traffic-copy span {
  font-size: 12px;
  color: #70757a;
  line-height: 1.25;
}

html.consumer-ui .local-conditions-chevron {
  display: none;
}

html.consumer-ui[dir='ltr'] .local-conditions-chevron {
  transform: scaleX(-1);
}

/* Traffic level accent on the car cell (Google Maps color language). */
html.consumer-ui .local-conditions-card[data-traffic-level='heavy'] .local-conditions-car {
  filter: none;
}
html.consumer-ui .local-conditions-card[data-traffic-level='moderate'] .local-conditions-car {
  filter: none;
}
html.consumer-ui .local-conditions-card[data-traffic-level='free'] .local-conditions-car {
  filter: none;
}
html.consumer-ui .local-conditions-card[data-traffic-level='light'] .local-conditions-car {
  filter: none;
}

html.consumer-ui .search-category-strip {
  pointer-events: auto;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  margin-inline-start: 0;
  padding: 0 2px 4px 2px;
  box-sizing: border-box;
}

html.consumer-ui .search-category-strip-scroll {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-inline-end: 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  /* Inherit page dir so RTL starts chips on the right (Google Maps–style). */
  direction: inherit;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
}

html.consumer-ui .search-category-strip.is-overflowing .search-category-strip-scroll {
  mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 28px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 28px), transparent 100%);
}

html.consumer-ui[dir='rtl'] .search-category-strip.is-overflowing .search-category-strip-scroll {
  mask-image: linear-gradient(to left, #000 0%, #000 calc(100% - 28px), transparent 100%);
  -webkit-mask-image: linear-gradient(to left, #000 0%, #000 calc(100% - 28px), transparent 100%);
}

html.consumer-ui .search-category-strip-scroll::-webkit-scrollbar {
  display: none;
}

html.consumer-ui .search-category-strip[hidden] {
  display: none !important;
}

html.consumer-ui .search-category-strip .search-category-chip {
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #3c4043;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 5px 11px 5px 9px;
  box-shadow:
    0 1px 2px rgba(60, 64, 67, 0.3),
    0 1px 3px 1px rgba(60, 64, 67, 0.15);
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  scroll-snap-align: start;
  line-height: 1.15;
  min-height: var(--chip-h);
  height: var(--chip-h);
}

html.consumer-ui .search-category-strip .search-category-chip .chip-icon {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1;
  width: 1.1em;
  text-align: center;
}

html.consumer-ui .search-category-strip .search-category-chip .chip-label {
  flex: 0 1 auto;
}

html.consumer-ui .search-category-strip .search-category-chip.active {
  background: #e8f0fe;
  color: #1967d2;
}

html.consumer-ui .search-category-strip .search-category-more {
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #3c4043;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 5px 11px 5px 9px;
  box-shadow:
    0 1px 2px rgba(60, 64, 67, 0.3),
    0 1px 3px 1px rgba(60, 64, 67, 0.15);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.15;
  min-height: var(--chip-h);
  height: var(--chip-h);
}

html.consumer-ui .search-category-strip .search-category-more:hover {
  background: #f8f9fa;
}

html.consumer-ui .search-category-strip .search-category-more.is-open,
html.consumer-ui .search-category-strip .search-category-more.has-selection {
  background: #e8f0fe;
  color: #1967d2;
}

/* Google Maps «More» categories card */
html.consumer-ui .search-category-more-card {
  position: fixed;
  z-index: 12;
  display: flex;
  flex-direction: column;
  max-height: min(360px, calc(100vh - 96px));
  background: #fff;
  border-radius: 10px;
  box-shadow:
    0 1px 2px rgba(60, 64, 67, 0.3),
    0 2px 6px 2px rgba(60, 64, 67, 0.15);
  overflow: hidden;
  pointer-events: auto;
}

html.consumer-ui .search-category-more-card[hidden] {
  display: none !important;
}

html.consumer-ui .search-category-more-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 8px 8px 14px;
  flex: 0 0 auto;
  border-bottom: 1px solid #e8eaed;
}

html.consumer-ui .search-category-more-title {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #202124;
  line-height: 1.25;
}

html.consumer-ui .search-category-more-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5f6368;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
}

html.consumer-ui .search-category-more-close:hover {
  background: #f1f3f4;
  color: #202124;
}

html.consumer-ui .search-category-more-body {
  padding: 8px 8px 12px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

html.consumer-ui .search-category-more-section {
  padding: 6px 4px 10px;
}

html.consumer-ui .search-category-more-section-title {
  margin: 0 8px 8px;
  font-size: 12px;
  font-weight: 500;
  color: #5f6368;
  letter-spacing: 0.01em;
}

html.consumer-ui .search-category-more-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

html.consumer-ui .search-category-more-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #202124;
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  text-align: start;
  cursor: pointer;
  min-height: 40px;
}

html.consumer-ui .search-category-more-item:hover {
  background: #f1f3f4;
}

html.consumer-ui .search-category-more-item.active {
  background: #e8f0fe;
  color: #1967d2;
}

html.consumer-ui .search-category-more-item-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f1f3f4;
  display: grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
}

html.consumer-ui .search-category-more-item.active .search-category-more-item-icon {
  background: #d2e3fc;
}

html.consumer-ui .search-category-more-item-label {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.25;
}

@media (max-width: 900px) {
  html.consumer-ui .search-category-more-card {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-height: min(52vh, 380px);
  }

  html.consumer-ui .search-category-more-grid {
    grid-template-columns: 1fr;
  }
}

html.consumer-ui[dir='rtl'] .search-chrome-float,
html.consumer-ui[dir='ltr'] .search-chrome-float {
  left: var(--nav-chrome-left);
  right: auto;
}

html.consumer-ui.search-chrome-docked[dir='rtl'] .search-panel > .search-chrome,
html.consumer-ui.search-chrome-docked[dir='ltr'] .search-panel > .search-chrome {
  left: auto;
  right: auto;
}

html.consumer-ui .search-pill {
  pointer-events: auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  height: var(--search-pill-h);
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--gm-surface);
  border: 0;
  border-radius: 24px;
  /* In-panel pill: lighter shadow so it reads as part of the card (GM image 2). */
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.18);
  padding-block: 0;
  padding-inline: 14px 4px;
  gap: 0;
  overflow: hidden;
  position: relative;
  z-index: 3;
}

/* Persian/Pashto pill: search icon at inline-start (right), then field, then directions. */
html.consumer-ui[dir='rtl'] .search-pill {
  direction: rtl;
  padding-inline: 4px 14px;
}

html.consumer-ui[dir='rtl'] .search-pill > .search-pill-icon {
  order: 1;
}

html.consumer-ui[dir='rtl'] .search-pill > input#search {
  order: 2;
}

html.consumer-ui[dir='rtl'] .search-pill > .search-clear {
  order: 3;
}

html.consumer-ui[dir='rtl'] .search-pill > .search-pill-divider {
  order: 4;
}

html.consumer-ui[dir='rtl'] .search-pill > .search-pill-directions {
  order: 5;
}

html.consumer-ui[dir='ltr'] .search-pill {
  direction: ltr;
}

/* Desktop-only leading location pin in the omnibox (mobile keeps its own mark). */
html.consumer-ui .search-pill-icon {
  display: none;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #1a73e8;
  place-items: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  align-self: center;
}

html.consumer-ui .search-pill-icon:hover {
  background: #e8f0fe;
  color: #174ea6;
}

html.consumer-ui .search-pill-icon:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
}

html.consumer-ui .search-pill-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  display: block;
}

@media (min-width: 901px) {
  html.consumer-ui .search-pill-icon,
  html.consumer-ui #desktopSearchLocationIcon {
    display: grid !important;
  }

  html.consumer-ui[dir='ltr'] .search-pill > .search-pill-icon {
    order: 1;
  }

  html.consumer-ui[dir='ltr'] .search-pill > input#search {
    order: 2;
  }

  html.consumer-ui[dir='ltr'] .search-pill > .search-clear {
    order: 3;
  }

  html.consumer-ui .search-omnibox.is-suggest-open .search-pill {
    padding-inline-start: 8px;
  }
}

html.consumer-ui body.layout-desktop .search-pill-icon,
html.consumer-ui body.layout-desktop #desktopSearchLocationIcon {
  display: grid !important;
}

html.consumer-ui .search-pill input#search {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  height: 100%;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 400;
  color: var(--gm-text);
  padding: 0 6px 0 0;
  /* type=text — no native WebKit/MS clear X (only #searchClear). */
  -webkit-appearance: none;
  appearance: none;
}

html.consumer-ui[dir='rtl'] .search-pill input#search {
  direction: rtl;
  text-align: right;
}

html.consumer-ui[dir='ltr'] .search-pill input#search {
  direction: ltr;
  text-align: left;
}

html.consumer-ui .search-pill input#search::placeholder {
  color: #70757a;
  opacity: 1;
}

html.consumer-ui .search-pill input#search:focus {
  outline: none;
  box-shadow: none;
}

html.consumer-ui .search-pill:focus-within {
  box-shadow:
    0 1px 2px rgba(60, 64, 67, 0.3),
    0 2px 6px 2px rgba(60, 64, 67, 0.15),
    0 0 0 1px rgba(26, 115, 232, 0.18);
}

html.consumer-ui .search-pill-divider {
  width: 1px;
  height: 24px;
  margin: 0 2px;
  background: #dadce0;
  flex-shrink: 0;
  align-self: center;
}

html.consumer-ui .search-pill-directions {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--gm-accent);
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* Author display:grid otherwise beats UA [hidden] and leaves a hit-target diamond. */
html.consumer-ui .search-pill-directions[hidden],
html.consumer-ui .search-pill-divider[hidden] {
  display: none !important;
}

html.consumer-ui .search-pill-directions svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

html.consumer-ui .search-pill-directions:hover {
  background: var(--gm-accent-soft);
}

html.consumer-ui .search-pill .search-clear {
  /* Override legacy .search-clear { position:absolute; inset-inline-end } from styles.css —
     that rule parked Clear on top of Directions and stole pointer events. */
  position: static;
  inset: auto;
  inset-inline-end: auto;
  inset-inline-start: auto;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  transform: none;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: #70757a;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 50%;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}

html.consumer-ui .search-pill .search-clear svg {
  width: 20px;
  height: 20px;
  display: block;
  pointer-events: none;
}

html.consumer-ui .search-pill .search-clear:hover {
  background: #f1f3f4;
  color: #3c4043;
}

html.consumer-ui .search-pill .search-clear:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 1px;
}

/* Author `display: grid` otherwise beats UA [hidden] { display: none } and keeps hit-testing. */
html.consumer-ui .search-pill .search-clear[hidden] {
  display: none !important;
  pointer-events: none !important;
  position: static !important;
}

/*
 * One clear only: #searchClear. Kill every UA native cancel (Safari/Chrome
 * still paint ::-webkit-search-cancel-button when type=search sneaks back,
 * and some WebKit builds ignore display:none unless appearance is cleared).
 */
html.consumer-ui .search-pill input#search,
html.consumer-ui .search-pill input#search[type='search'],
html.consumer-ui .search-pill input#search[type='text'] {
  -webkit-appearance: none;
  appearance: none;
}

html.consumer-ui .search-pill input#search::-webkit-search-cancel-button,
html.consumer-ui .search-pill input#search::-webkit-search-decoration,
html.consumer-ui .search-pill input#search::-webkit-search-results-button,
html.consumer-ui .search-pill input#search::-webkit-search-results-decoration,
html.consumer-ui .search-pill input#search::-ms-clear,
html.consumer-ui .search-pill input#search::-ms-reveal {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  background: transparent !important;
  border: 0 !important;
}

html.consumer-ui .side-panel-stack {
  position: fixed;
  z-index: 6;
  top: max(12px, env(safe-area-inset-top));
  left: var(--nav-chrome-left);
  width: var(--side-panel-w);
  max-height: calc(100vh - max(12px, env(safe-area-inset-top)) - 24px);
  display: flex;
  flex-direction: column;
  gap: 0;
  pointer-events: none;
}

html.consumer-ui.left-panel-collapsed .side-panel-stack,
html.consumer-ui.chrome-revealed.left-panel-collapsed .side-panel-stack {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: none !important;
}

/* Closed (`<`): hide the whole left chrome — rail + floating search — clean map. */
html.consumer-ui.left-panel-collapsed .nav-rail,
html.consumer-ui.left-panel-collapsed.place-panel-open .nav-rail,
html.consumer-ui.left-panel-collapsed.directions-panel-open .nav-rail,
html.consumer-ui.left-panel-collapsed.nav-rail-expanded .nav-rail {
  display: none !important;
  transform: translateX(-100%) !important;
  pointer-events: none !important;
  box-shadow: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

html.consumer-ui.left-panel-collapsed .search-chrome-float,
html.consumer-ui.left-panel-collapsed .search-category-strip {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: none !important;
}

html.consumer-ui.left-panel-collapsed .nav-rail-edge-toggle {
  display: none !important;
}

html.consumer-ui.left-panel-collapsed .side-panel-expand-tab:not([hidden]) {
  left: 0 !important;
}

html.consumer-ui .side-panel-collapse {
  position: absolute;
  top: 50%;
  /* Always physical right (map side of left-docked panel). */
  right: -14px;
  left: auto;
  z-index: 8;
  transform: translateY(-50%);
  width: 22px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--gm-divider);
  border-left: none;
  border-radius: 0 10px 10px 0;
  background: #fff;
  color: #5f6368;
  box-shadow: 2px 0 6px rgba(60, 64, 67, 0.12);
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
}

html.consumer-ui .side-panel-collapse:hover {
  background: #f8f9fa;
  color: #202124;
}

html.consumer-ui .side-panel-collapse[hidden] {
  display: none !important;
}

html.consumer-ui .side-panel-expand-tab {
  position: fixed;
  z-index: 8;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 23px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--gm-divider);
  border-left: none;
  border-radius: 0 8px 8px 0;
  background: #fff;
  color: #5f6368;
  box-shadow: 1px 1px 2px rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
  display: none;
  place-items: center;
  cursor: pointer;
  transition: left 0.22s ease;
}

/* Keep `<` / `>` glyphs from mirroring under RTL bidi. */
html.consumer-ui .side-panel-expand-tab svg,
html.consumer-ui .side-panel-collapse svg,
html.consumer-ui .nav-rail-edge-toggle svg {
  unicode-bidi: isolate;
  direction: ltr;
  display: block;
}

html.consumer-ui.nav-rail-expanded .side-panel-expand-tab {
  left: var(--nav-rail-width);
}

html.consumer-ui .side-panel-expand-tab:hover {
  background: #f8f9fa;
  color: #202124;
}

html.consumer-ui.left-panel-collapsed .side-panel-expand-tab:not([hidden]) {
  display: grid;
}

html.consumer-ui.left-panel-collapsed .side-panel-expand-tab[hidden] {
  display: none !important;
}

html.consumer-ui .side-panel-stack > * {
  pointer-events: auto;
}

html.consumer-ui .side-panel-card {
  background: var(--gm-surface);
  border: 1px solid var(--gm-divider);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(60, 64, 67, 0.12);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* Nearby discovery: equal 3-up control cards inside the search panel */
html.consumer-ui .nearby-controls {
  gap: 12px;
}

html.consumer-ui .nearby-card-grid {
  gap: 8px;
}

html.consumer-ui .nearby-card,
html.consumer-ui .nearby-origin-btn,
html.consumer-ui .nearby-radius-btn {
  min-height: 76px;
  border-radius: 12px;
}

/* Place detail: Google Maps–style readable sheet */
html.consumer-ui .place-detail {
  border-color: #e8eaed;
  background: #fff;
}

html.consumer-ui .place-detail-name {
  font-size: 28px;
  font-weight: 400;
  color: #202124;
}

html.consumer-ui .place-detail-badge {
  display: inline-flex;
  align-items: center;
  margin: 6px 0 2px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
  background: #fef7e0;
  color: #8a6116;
  border: 1px solid #f9e4a5;
}

html.consumer-ui .place-detail-badge.is-live {
  background: #e6f4ea;
  color: #137333;
  border-color: #a8dab5;
}

html.consumer-ui .place-hero {
  border-radius: 0;
}

html.consumer-ui .place-round-action.is-saved .place-round-icon {
  background: #e8f0fe;
  border-color: #1a73e8;
  color: #174ea6;
}

html.consumer-ui .place-action-card.is-saved {
  background: #e8f0fe;
  border-color: #1a73e8;
  color: #174ea6;
}

html.consumer-ui .side-panel-card.search-panel:has(#placeDetail:not([hidden])) {
  max-height: min(78vh, 720px);
}

html.consumer-ui .side-panel-card.search-panel {
  position: relative;
  max-height: min(86vh, 820px);
  /* Scroll lives on #results / place-detail, not the outer card. */
  overflow: visible;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 8px;
  box-shadow:
    0 1px 2px rgba(60, 64, 67, 0.3),
    0 2px 6px 2px rgba(60, 64, 67, 0.15);
}

/* Full-height place card must win over the capped max-heights above. */
html.consumer-ui.place-panel-open .side-panel-card.search-panel,
html.consumer-ui.place-panel-open .side-panel-card.search-panel:has(#placeDetail:not([hidden])),
html.consumer-ui .side-panel-card.search-panel:has(#placeDetail:not([hidden])) {
  max-height: none !important;
  height: 100% !important;
  overflow: visible;
}

/* Place-open: hide Directions diamond in the search pill (GM place panel). */
html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) .search-pill-directions,
html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) .search-pill-divider {
  display: none !important;
}

/* Desktop + mobile: place panel replaces result list (Google Maps). */
html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) .search-categories,
html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) #searchEmpty,
html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) #results,
html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) #nearbyControls,
html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) #nearbyBar,
html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) #userLibrary,
html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) #searchStatus {
  display: none !important;
  pointer-events: none !important;
}

html.consumer-ui:has(#placeDetail:not([hidden])) .search-category-strip {
  display: none !important;
}

/* Author `display:flex` otherwise beats UA [hidden] and stacks place detail under directions. */
html.consumer-ui #searchPanel.search-panel[hidden] {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

html.consumer-ui .side-panel-card.directions-panel {
  position: relative;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

/* Full-height directions card (same treatment as place panel). */
html.consumer-ui.directions-panel-open .side-panel-stack {
  top: max(8px, env(safe-area-inset-top));
  bottom: max(8px, env(safe-area-inset-bottom));
  height: auto;
  max-height: none !important;
  display: flex;
  flex-direction: column;
}

html.consumer-ui.directions-panel-open .side-panel-card.directions-panel {
  flex: 1 1 auto;
  align-self: stretch;
  height: 100% !important;
  min-height: 0;
  max-height: none !important;
  overflow: hidden;
  border: 0;
  box-shadow:
    0 1px 2px rgba(60, 64, 67, 0.3),
    0 2px 6px 2px rgba(60, 64, 67, 0.15);
}

html.consumer-ui.directions-panel-open .side-panel-card.directions-panel .panel-inner {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  direction: ltr;
  scrollbar-width: thin;
  scrollbar-color: #dadce0 transparent;
}

html.consumer-ui.directions-panel-open[dir='rtl'] .side-panel-card.directions-panel .panel-inner > * {
  direction: rtl;
}

/* ——— Directions panel: calm Google Maps–style sheet (less clutter) ——— */
html.consumer-ui.directions-panel-open .directions-panel .panel-inner {
  position: relative;
  padding: 16px 16px 20px;
  background: #fff;
}

html.consumer-ui.directions-panel-open .directions-panel .panel-header,
html.consumer-ui.directions-panel-open .directions-panel .live-routing-hint,
html.consumer-ui.directions-panel-open .directions-panel .attribution,
html.consumer-ui.directions-panel-open .directions-panel .route-preview-badge,
html.consumer-ui.directions-panel-open .directions-panel .route-preview-hint {
  display: none !important;
}

/* Google Maps RTL: × close sits on the panel’s top-start edge (visual left). */
html.consumer-ui.directions-panel-open .directions-panel .panel-toolbar {
  display: flex !important;
  position: absolute;
  top: 10px;
  inset-inline-end: 8px;
  z-index: 4;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

html.consumer-ui.directions-panel-open .directions-panel .drawer-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5f6368;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}

html.consumer-ui.directions-panel-open .directions-panel .drawer-close:hover {
  background: #f1f3f4;
  color: #202124;
}

html.consumer-ui.directions-panel-open .directions-panel .route-section {
  margin: 0 0 20px;
}

html.consumer-ui.directions-panel-open .directions-panel .section-title {
  margin: 0 0 14px;
  padding-inline-end: 44px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: var(--weight-heading);
  color: #202124;
  letter-spacing: -0.01em;
}

/* Google Maps OD card: circle → line → square, swap on the trailing edge. */
html.consumer-ui.directions-panel-open .directions-panel .od-stack {
  position: relative;
  margin: 0 0 14px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  background: #fff;
  overflow: visible;
}

html.consumer-ui.directions-panel-open .directions-panel .od-stack::before {
  content: '';
  position: absolute;
  inset-inline-start: 18px;
  top: 30px;
  bottom: 54px;
  width: 2px;
  border-radius: 1px;
  background: #dadce0;
  z-index: 0;
  pointer-events: none;
}

html.consumer-ui.directions-panel-open .directions-panel .od-row {
  display: block;
  margin: 0;
  position: relative;
}

html.consumer-ui.directions-panel-open .directions-panel .od-chip {
  position: relative;
  z-index: 1;
  display: flex;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 14px 48px 14px 14px;
  min-height: 52px;
  align-items: center;
  gap: 14px;
}

/* Open OD suggest must stack above later chips (dest / add-stop), otherwise
   absolute suggestions paint underneath and text collides illegibly. */
html.consumer-ui.directions-panel-open .directions-panel .od-row:has(.od-suggest-list:not([hidden])),
html.consumer-ui.directions-panel-open .directions-panel .od-chip:has(.od-suggest-list:not([hidden])) {
  z-index: 12;
}

/* Desktop + mobile: while one OD field's menu is open, hide the other chips so
   placeholders ("Choose destination") never show through the suggestion rows. */
html.consumer-ui.directions-panel-open .od-stack.has-od-suggest.od-suggest-origin > .od-chip.dest,
html.consumer-ui.directions-panel-open .od-stack.has-od-suggest.od-suggest-origin > .via-stops-list,
html.consumer-ui.directions-panel-open .od-stack.has-od-suggest.od-suggest-origin > .via-stops-actions,
html.consumer-ui.directions-panel-open .od-stack.has-od-suggest.od-suggest-origin .swap-btn {
  display: none !important;
}

html.consumer-ui.directions-panel-open .od-stack.has-od-suggest.od-suggest-dest > .od-row,
html.consumer-ui.directions-panel-open .od-stack.has-od-suggest.od-suggest-dest > .via-stops-list,
html.consumer-ui.directions-panel-open .od-stack.has-od-suggest.od-suggest-dest > .via-stops-actions {
  display: none !important;
}

html.consumer-ui.directions-panel-open .od-stack.has-od-suggest.od-suggest-via > .od-chip.dest,
html.consumer-ui.directions-panel-open .od-stack.has-od-suggest.od-suggest-via .swap-btn {
  visibility: hidden;
}

html.consumer-ui.directions-panel-open .directions-panel .od-chip.dest {
  border-top: 1px solid #e8eaed;
}

html.consumer-ui.directions-panel-open .directions-panel .od-chip .label {
  display: none;
}

html.consumer-ui.directions-panel-open .directions-panel .od-chip .value,
html.consumer-ui.directions-panel-open .directions-panel .od-edit {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: var(--weight-body);
  color: #202124;
  line-height: 1.35;
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
  box-shadow: none;
}

html.consumer-ui.directions-panel-open .directions-panel .od-edit::placeholder {
  color: #70757a;
  font-weight: var(--weight-body);
  opacity: 1;
}

html.consumer-ui.directions-panel-open .directions-panel .od-chip .dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: #1a73e8;
  box-shadow: 0 0 0 2px #fff;
}

html.consumer-ui.directions-panel-open .directions-panel .od-chip.origin .dot {
  background: #34a853;
}

html.consumer-ui.directions-panel-open .directions-panel .od-chip.dest .dot {
  width: 9px;
  height: 9px;
  flex-basis: 9px;
  border-radius: 2px;
  background: #ea4335;
}

html.consumer-ui.directions-panel-open .directions-panel .od-chip.via .dot {
  width: 8px;
  height: 8px;
  flex-basis: 8px;
  border-radius: 50%;
  background: #9aa0a6;
}

html.consumer-ui.directions-panel-open .directions-panel .od-clear {
  position: absolute;
  inset-inline-end: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  color: #5f6368;
  font-size: 20px;
}

html.consumer-ui.directions-panel-open .directions-panel .od-clear:hover {
  background: #f1f3f4;
  color: #202124;
}

html.consumer-ui.directions-panel-open .directions-panel .swap-btn {
  position: absolute;
  inset-inline-end: -14px;
  top: calc(100% - 18px);
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #dadce0;
  background: #fff;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.25);
  font-size: 16px;
  color: #1a73e8;
  display: grid;
  place-items: center;
  padding: 0;
}

html.consumer-ui.directions-panel-open .directions-panel .swap-btn:hover {
  background: #f8f9fa;
}

html.consumer-ui.directions-panel-open .directions-panel .swap-btn svg {
  display: block;
}

html.consumer-ui.directions-panel-open .map-pick-row {
  display: none !important;
}

html.consumer-ui.directions-panel-open .directions-panel .route-actions .primary#route {
  background: #fff;
  color: #1a73e8;
  border: 1px solid #dadce0;
  box-shadow: none;
  font-weight: 500;
}

html.consumer-ui.directions-panel-open .directions-panel .route-actions .primary#route:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: #dadce0;
}

html.consumer-ui.directions-panel-open .directions-panel .od-chip.via {
  border-top: 1px solid #e8eaed;
  padding-inline-start: 8px;
  gap: 8px;
}

html.consumer-ui.directions-panel-open .directions-panel .via-drag {
  flex: 0 0 auto;
  width: 16px;
  color: #80868b;
  font-size: 12px;
  letter-spacing: -2px;
  cursor: grab;
  user-select: none;
  line-height: 1;
}

html.consumer-ui.directions-panel-open .directions-panel .od-chip.via.is-dragging {
  opacity: 0.55;
}

html.consumer-ui.directions-panel-open .directions-panel .od-chip.via.is-drag-over {
  background: #e8f0fe;
}

/* Google Maps: “Add stop” under destination, inside the OD card. */
html.consumer-ui.directions-panel-open .directions-panel .via-stops-actions {
  position: relative;
  z-index: 1;
  display: flex;
  margin: 0;
  padding: 0 14px 12px;
  padding-inline-start: 38px;
  border-top: 0;
  gap: 8px;
}

html.consumer-ui.directions-panel-open .directions-panel .via-stops-actions[hidden] {
  display: none !important;
}

/* While editing a via draft/suggest, keep destination readable under the solid menu. */
html.consumer-ui.directions-panel-open .od-stack.has-od-suggest.od-suggest-via > .via-stops-actions {
  visibility: hidden;
}

html.consumer-ui.directions-panel-open .directions-panel .via-stops-actions .secondary {
  border: 0;
  background: transparent;
  color: #1a73e8;
  padding: 0;
  min-height: 28px;
  box-shadow: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: var(--weight-body);
  text-align: start;
}

html.consumer-ui.directions-panel-open .directions-panel .via-stops-actions .secondary:hover {
  text-decoration: underline;
  background: transparent;
}

html.consumer-ui.directions-panel-open .directions-panel .route-profile-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0 0 14px;
  padding: 3px;
  border-radius: 999px;
  background: #f1f3f4;
  border: 0;
}

html.consumer-ui.directions-panel-open .directions-panel .route-profile-btn {
  border: 0;
  border-radius: 999px;
  background: transparent;
  min-height: 40px;
  font-size: 14px;
  font-weight: 500;
  color: #3c4043;
  box-shadow: none;
}

html.consumer-ui.directions-panel-open .directions-panel .route-profile-btn.is-active {
  background: #fff;
  color: #1a73e8;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.2);
}

html.consumer-ui.directions-panel-open .directions-panel .route-profile-btn[data-profile='transit'].is-active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}
html.consumer-ui.directions-panel-open .directions-panel .route-profile-btn[data-profile='walking'].is-active {
  color: #188038;
}

html.consumer-ui.directions-panel-open .directions-panel .map-pick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0 0 12px;
}

html.consumer-ui.directions-panel-open .directions-panel .map-pick-row .secondary {
  border: 0;
  background: transparent;
  color: #1a73e8;
  padding: 0;
  min-height: 32px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}

html.consumer-ui.directions-panel-open .directions-panel .route-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  margin: 0 0 10px;
  align-items: center;
}

html.consumer-ui.directions-panel-open .directions-panel .route-actions .primary {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 44px;
  border-radius: 24px;
  border: 0;
  background: #1a73e8;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  box-shadow: none;
}

html.consumer-ui.directions-panel-open .directions-panel .route-actions .primary:disabled {
  background: #e8eaed;
  color: #9aa0a6;
}

html.consumer-ui.directions-panel-open .directions-panel .route-actions .secondary {
  border: 0;
  background: transparent;
  color: #5f6368;
  min-height: 36px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
  justify-self: start;
  padding: 0;
}

html.consumer-ui.directions-panel-open .directions-panel .route-actions #shareLink {
  color: #1a73e8;
  justify-self: end;
}

html.consumer-ui.directions-panel-open .directions-panel .offline-nav-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  padding: 8px 0 0;
  border-top: 1px solid #f1f3f4;
  font-size: 13px;
  color: #5f6368;
}

html.consumer-ui.directions-panel-open .directions-panel .route-preview-block {
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}

html.consumer-ui.directions-panel-open .directions-panel .route-preview-head {
  margin: 0 0 10px;
}

html.consumer-ui.directions-panel-open .directions-panel .route-preview-head .section-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: var(--weight-heading);
  color: #5f6368;
  margin: 0;
}

html.consumer-ui.directions-panel-open .directions-panel .route-preview-cards {
  gap: 0;
  border: 1px solid #e8eaed;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

html.consumer-ui.directions-panel-open .directions-panel .route-preview-card {
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #e8eaed;
  background: #fff;
  padding: 12px 14px;
  box-shadow: none;
}

html.consumer-ui.directions-panel-open .directions-panel .route-preview-card:last-child {
  border-bottom: 0;
}

html.consumer-ui.directions-panel-open .directions-panel .route-preview-card:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: #e8eaed;
  box-shadow: none;
}

html.consumer-ui.directions-panel-open .directions-panel .route-preview-card[aria-selected='true'] {
  background: #e8f0fe;
  border-color: #e8eaed;
  box-shadow: none;
}

html.consumer-ui.directions-panel-open .directions-panel .route-preview-card-title {
  font-size: 14px;
  font-weight: 500;
  color: #202124;
}

html.consumer-ui.directions-panel-open .directions-panel .route-preview-card-meta {
  font-size: 12px;
  color: #80868b;
}

html.consumer-ui.directions-panel-open .directions-panel #message {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  border: 0;
}

html.consumer-ui .side-panel-card .panel-inner {
  padding: 12px 14px 14px;
}

html.consumer-ui .map-controls-br {
  position: fixed;
  z-index: 6;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  pointer-events: none;
}

html.consumer-ui .map-controls-br > *,
html.consumer-ui .map-controls-br .map-ctrl-stack,
html.consumer-ui .map-controls-br button {
  pointer-events: auto;
}

/* Google-style circular compass (above the stack). */
html.consumer-ui .map-ctrl-compass {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.86);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 7;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  touch-action: none; /* allow compass drag-rotate without page scroll */
  cursor: grab;
}

/* Collapsed when north-up so pegman / 3D stack has no empty gap above. */
html.consumer-ui .map-ctrl-compass:not(.is-rotated):not(.is-pitched) {
  display: none;
}

html.consumer-ui .map-ctrl-compass.is-rotated,
html.consumer-ui .map-ctrl-compass.is-pitched {
  display: grid;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
}

html.consumer-ui .map-ctrl-compass .map-compass-face,
html.consumer-ui .map-ctrl-compass .map-compass-needle,
html.consumer-ui .map-ctrl-compass .map-compass-n,
html.consumer-ui .map-ctrl-compass .map-compass-s {
  pointer-events: none;
}

html.consumer-ui .map-compass-ring {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 2px dashed transparent;
  pointer-events: none;
}

html.consumer-ui .map-ctrl-compass.is-rotated .map-compass-ring,
html.consumer-ui .map-ctrl-compass.is-pitched .map-compass-ring,
html.consumer-ui .map-ctrl-compass.is-dragging .map-compass-ring {
  border-color: rgba(26, 115, 232, 0.45);
}

html.consumer-ui .map-ctrl-compass.is-dragging {
  cursor: grabbing;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.35);
}

html.consumer-ui .map-compass-face {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  position: relative;
  display: block;
  z-index: 1;
}

html.consumer-ui .map-compass-needle {
  position: absolute;
  inset: 0;
  display: block;
  transform-origin: center center;
  transition: transform 0.12s linear;
}

html.consumer-ui .map-compass-n,
html.consumer-ui .map-compass-s {
  position: absolute;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
}

html.consumer-ui .map-compass-n {
  top: 1px;
  border-bottom: 12px solid #ea4335;
}

html.consumer-ui .map-compass-s {
  bottom: 1px;
  border-top: 12px solid #bdc1c6;
}

html.consumer-ui .map-ctrl-stack {
  display: flex;
  flex-direction: column;
  background: var(--gm-surface, #fff);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

html.consumer-ui .map-controls-br .map-ctrl-stack > button,
html.consumer-ui .map-controls-br .map-ctrl-zoom > button {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border: none;
  background: #fff;
  color: #5f6368;
  cursor: pointer;
  font-size: 18px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid #e8eaed;
}

html.consumer-ui .map-controls-br .map-ctrl-stack > button:last-child,
html.consumer-ui .map-controls-br .map-ctrl-zoom > button:last-child {
  border-bottom: none;
}

html.consumer-ui .map-controls-br .map-ctrl-stack > button:hover,
html.consumer-ui .map-controls-br .map-ctrl-zoom > button:hover,
html.consumer-ui .map-ctrl-compass:hover {
  background: #f8f9fa;
  color: #202124;
}

html.consumer-ui .map-ctrl-tilt .map-ctrl-tilt-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: 'SF UI Display', system-ui, sans-serif;
  color: #5f6368;
}

html.consumer-ui .map-ctrl-tilt[aria-pressed='true'] .map-ctrl-tilt-label {
  color: #1a73e8;
}

html.consumer-ui .map-ctrl-zoom {
  display: flex;
  flex-direction: column;
}

html.consumer-ui .layers-control-bl {
  position: fixed;
  z-index: 6;
  left: calc(var(--nav-rail-inset) + 12px);
  bottom: max(24px, env(safe-area-inset-bottom));
  width: 64px;
  height: 64px;
  border-radius: 10px;
  border: 1px solid var(--gm-divider);
  background: var(--gm-surface);
  box-shadow: 0 2px 6px rgba(60, 64, 67, 0.15);
  cursor: pointer;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  color: var(--gm-muted);
}

/* Place/directions panel open: sit at the start of the map (desktop only). */
@media (min-width: 901px) {
  html.consumer-ui.place-panel-open .layers-control-bl,
  html.consumer-ui.directions-panel-open .layers-control-bl,
  html.consumer-ui.search-chrome-docked .layers-control-bl,
  html.consumer-ui.library-panel-open .layers-control-bl,
  html.consumer-ui.contribute-panel-open .layers-control-bl {
    left: calc(var(--nav-chrome-left) + var(--side-panel-w) + 12px);
    right: auto;
    bottom: max(24px, env(safe-area-inset-bottom));
    transition: left 0.18s ease;
  }
}

html.consumer-ui .layers-thumb {
  width: 48px;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e4e7eb;
  background: #f8f6f0;
  display: block;
  flex-shrink: 0;
}

html.consumer-ui .layers-thumb-map {
  display: block;
  width: 100%;
  height: 100%;
}

html.consumer-ui .layers-menu {
  /* Keep Satellite/Hybrid controls readable on narrow phones. */
  max-width: min(280px, calc(100vw - 24px));
  position: fixed;
  z-index: 8;
  left: calc(var(--nav-rail-inset) + 12px);
  bottom: calc(max(24px, env(safe-area-inset-bottom)) + 72px);
  min-width: 200px;
  background: var(--gm-surface);
  border: 1px solid var(--gm-divider);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(60, 64, 67, 0.18);
  padding: 8px 0;
}

html.consumer-ui .layers-menu[hidden] {
  display: none !important;
}

html.consumer-ui .layers-menu button {
  display: block;
  width: 100%;
  text-align: start;
  padding: 10px 16px;
  border: none;
  background: transparent;
  font-size: 14px;
  cursor: pointer;
}

/* Farah Microsoft complement — fully hidden for now.
   Author `display:block` on .layers-menu button otherwise beats UA [hidden]. */
html.consumer-ui #layerFarahMsft,
html.consumer-ui #layerFarahMsftSep,
html.consumer-ui #layersFarahMsftNote,
#layerFarahMsft,
#layerFarahMsftSep,
#layersFarahMsftNote {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  clip: rect(0, 0, 0, 0) !important;
}

html.consumer-ui .layers-menu button:hover {
  background: #f1f3f4;
}

html.consumer-ui .layers-menu button[aria-pressed='true'] {
  background: var(--gm-accent-soft);
  color: var(--gm-accent);
}

html.consumer-ui .layers-menu button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  color: var(--gm-muted);
}

html.consumer-ui .layers-sat-note {
  margin: 4px 12px 10px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--gm-muted);
}

html.consumer-ui .layers-menu-sep {
  border: none;
  border-top: 1px solid var(--gm-divider);
  margin: 6px 0;
}

html.consumer-ui .layers-menu button[role='menuitemcheckbox'][aria-checked='true'] {
  background: var(--gm-accent-soft);
  color: var(--gm-accent);
}

html.consumer-ui #attribution .farah-msft-attribution,
html.consumer-ui .farah-msft-attribution {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

html.consumer-ui .maplibregl-ctrl-bottom-right {
  margin-bottom: max(8px, env(safe-area-inset-bottom)) !important;
  margin-right: max(72px, calc(env(safe-area-inset-right) + 56px)) !important;
}

html.consumer-ui .maplibregl-ctrl-scale {
  background: rgba(255, 255, 255, 0.86);
  border-color: #9aa0a6;
  color: #3c4043;
  font-size: 11px;
  height: 14px;
  line-height: 14px;
}

html.consumer-ui .maplibregl-ctrl-bottom-left {
  margin-left: calc(var(--nav-rail-inset) + 88px) !important;
  margin-bottom: max(8px, env(safe-area-inset-bottom)) !important;
}

/* Scale/attrib clear the open side card (same inset as Layers FAB). */
@media (min-width: 901px) {
  html.consumer-ui.place-panel-open .maplibregl-ctrl-bottom-left,
  html.consumer-ui.directions-panel-open .maplibregl-ctrl-bottom-left,
  html.consumer-ui.search-chrome-docked .maplibregl-ctrl-bottom-left,
  html.consumer-ui.library-panel-open .maplibregl-ctrl-bottom-left,
  html.consumer-ui.contribute-panel-open .maplibregl-ctrl-bottom-left {
    margin-left: calc(var(--nav-chrome-left) + var(--side-panel-w) + 88px) !important;
  }
}

html.consumer-ui .float-search-hub,
html.consumer-ui .map-dock {
  display: none !important;
}

html.consumer-ui .search-panel-inner {
  padding: 0 0 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  background: #fff;
  /* Categories stay put; only #results scrolls — prevents chips covering Origin/Dest. */
  overflow: hidden;
}

html.consumer-ui .search-panel .place-detail {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  max-height: none;
  flex: 1 1 auto;
}

html.consumer-ui .search-panel-inner:has(#placeDetail:not([hidden])) {
  padding-bottom: 0;
}

html.consumer-ui .search-panel-inner .search-categories {
  margin-top: 4px;
  flex: 0 0 auto;
}

/* Result rows need the sheet; chips must not remain as an overlapping hit layer. */
html.consumer-ui .search-categories.is-results-active {
  display: none;
}

html.consumer-ui .search-panel-inner #results {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 8px;
}

html.consumer-ui .search-panel-inner .search-status,
html.consumer-ui .search-panel-inner .search-empty {
  flex: 0 0 auto;
}

html.consumer-ui .search-panel-inner .place-detail {
  flex: 0 0 auto;
}

html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) .search-panel-inner .place-detail {
  flex: 1 1 auto;
  min-height: 0;
}

html.consumer-ui .search-panel-inner .search-status {
  margin: 0 0 8px;
}

html.consumer-ui #appPanel.panel.app-drawer {
  position: relative;
  inset: auto;
  transform: none !important;
  width: 100%;
  max-width: none;
  margin: 0;
  opacity: 1;
}

/* Collapsed drawer must not steal hits (author rules previously kept pointer-events:auto). */
html.consumer-ui #appPanel.panel.app-drawer[hidden],
html.consumer-ui body.panel-collapsed #appPanel.panel.app-drawer {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

html.consumer-ui body.drawer-open #appPanel.panel.app-drawer:not([hidden]) {
  display: flex;
  pointer-events: auto;
  visibility: visible;
}

html.consumer-ui .maplibregl-ctrl-bottom-left .maplibregl-ctrl-group {
  display: none !important;
}

html.consumer-ui .nav-rail-lang .nav-rail-btn {
  min-height: 48px;
  width: 68px;
  font-size: 11px;
}

html.consumer-ui .map-controls-br button svg {
  display: block;
  transition: transform var(--motion-fast, 120ms) ease;
  transform-origin: center center;
}

/* National/country-focus may hide the result stack; search follows chrome-revealed. */
html.consumer-ui.country-focus-chrome-hidden .side-panel-stack {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

/* User-opened directions/place/search sheet + its `<` toggle must win over national hide. */
html.consumer-ui.chrome-revealed .side-panel-stack,
html.consumer-ui.directions-panel-open .side-panel-stack,
html.consumer-ui.place-panel-open .side-panel-stack,
html.consumer-ui.search-chrome-docked .side-panel-stack,
html.consumer-ui.side-panel-toggle-active .side-panel-expand-tab:not([hidden]) {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: none !important;
}

html.consumer-ui.directions-panel-open .side-panel-collapse:not([hidden]),
html.consumer-ui.place-panel-open .side-panel-collapse:not([hidden]),
html.consumer-ui.search-chrome-docked .side-panel-collapse:not([hidden]) {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

html.consumer-ui.country-focus-chrome-hidden .nav-rail-edge-toggle {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

html.consumer-ui .maplibregl-ctrl-attrib {
  max-width: min(220px, calc(100vw - 160px));
  font-size: 10px;
  line-height: 1.25;
  background: rgba(255, 255, 255, 0.88);
}

html.consumer-ui .saved-recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

html.consumer-ui .saved-recent-list li button {
  width: 100%;
  text-align: start;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-bottom: 1px solid var(--gm-divider);
  cursor: pointer;
  font-size: 13px;
}

html.consumer-ui .saved-empty {
  padding: 16px 12px;
  color: var(--gm-muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  /* Google Maps mobile: no mid-left chevron — ☰ in the omnibox opens the rail. */
  html.consumer-ui .nav-rail-edge-toggle,
  html.consumer-ui.left-panel-collapsed .nav-rail-edge-toggle,
  html.consumer-ui.side-panel-toggle-active .nav-rail-edge-toggle,
  html.consumer-ui .side-panel-expand-tab,
  html.consumer-ui.left-panel-collapsed .side-panel-expand-tab:not([hidden]) {
    display: none !important;
  }

  /* Dim map while the hamburger drawer is open. */
  html.consumer-ui.mobile-rail-open body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 6;
    background: rgba(32, 33, 36, 0.36);
    pointer-events: auto;
  }

  /* Mobile redesign: no hamburger in the omnibox — account FAB owns the corner. */
  html.consumer-ui .search-chrome-float .nav-menu-fab,
  html.consumer-ui.left-panel-collapsed .search-chrome-float .nav-menu-fab,
  html.consumer-ui.mobile-rail-open .search-chrome .nav-menu-fab {
    display: none !important;
  }

  /* Unified white search bar: ☰ + field + directions (Google Maps mobile omnibox). */
  html.consumer-ui .search-chrome-float .search-chrome {
    background: #fff;
    border-radius: 28px;
    box-shadow:
      0 1px 2px rgba(60, 64, 67, 0.3),
      0 2px 6px 2px rgba(60, 64, 67, 0.15);
    padding: 0 6px 0 2px;
    align-items: center;
    gap: 0;
    min-height: 56px;
    width: 100%;
    max-width: none;
  }

  html.consumer-ui[dir='rtl'] .search-chrome-float .search-chrome {
    direction: rtl;
  }

  html.consumer-ui[dir='ltr'] .search-chrome-float .search-chrome {
    direction: ltr;
  }

  html.consumer-ui .search-chrome-float .search-omnibox,
  html.consumer-ui .search-chrome-float .search-pill {
    background: transparent;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    min-height: 56px;
  }

  html.consumer-ui .search-chrome-float .search-pill {
    --search-pill-h: 56px;
    height: 56px;
    padding-inline: 2px;
  }

  html.consumer-ui .search-chrome-float .search-pill input {
    font-size: 16px;
    font-weight: 400;
  }

  html.consumer-ui .search-chrome-float .search-pill-directions {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #1a73e8;
  }

  /* ☰ is the leading control — hide redundant magnifying glass on phones. */
  html.consumer-ui .search-chrome-float .search-pill-icon {
    display: none !important;
  }

  html.consumer-ui .search-chrome-float .search-pill-divider {
    display: none;
  }

  /* Match Google Maps BR stack: no fullscreen on phones. */
  html.consumer-ui #ctrlFullscreen {
    display: none !important;
  }

  /*
   * Google Maps mobile menu: wide slide-over sheet (not the skinny desktop rail).
   * LTR from left, RTL from right.
   */
  html.consumer-ui .nav-rail {
    width: min(304px, 86vw);
    padding: 10px 10px max(16px, env(safe-area-inset-bottom));
    gap: 2px;
    align-items: stretch;
    transform: translateX(-110%);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 9;
    background: #fff;
    border-inline-end: 1px solid #e8eaed;
    border-right: 0;
    box-shadow: none;
  }

  html.consumer-ui[dir='rtl'] .nav-rail {
    left: auto;
    right: 0;
    transform: translateX(110%);
  }

  html.consumer-ui[dir='ltr'] .nav-rail {
    left: 0;
    right: auto;
    transform: translateX(-110%);
  }

  html.consumer-ui.nav-rail-expanded .nav-rail {
    transform: translateX(-110%);
  }

  html.consumer-ui[dir='rtl'].nav-rail-expanded .nav-rail {
    transform: translateX(110%);
  }

  /* Snap open: Saved/Explore must be in-viewport and hittable as soon as
     .mobile-rail-open is set (do not leave controls off-canvas mid-transition). */
  html.consumer-ui.mobile-rail-open .nav-rail,
  html.consumer-ui.mobile-rail-open.nav-rail-expanded .nav-rail {
    transform: translateX(0) !important;
    pointer-events: auto;
    transition: none;
    box-shadow: 0 8px 28px rgba(60, 64, 67, 0.28);
  }

  /* Desktop-expanded class alone stays off-canvas on mobile — keep hits disabled. */
  html.consumer-ui.nav-rail-expanded .nav-rail {
    pointer-events: none;
  }

  html.consumer-ui.mobile-rail-open.nav-rail-expanded .nav-rail {
    pointer-events: auto;
  }

  /* Horizontal menu rows — Google Maps drawer, not icon-column rail. */
  html.consumer-ui .nav-rail-btn {
    width: 100%;
    min-height: 52px;
    padding: 10px 14px;
    border-radius: 26px;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
    font-size: 15px;
    font-weight: 500;
    color: #3c4043;
    text-align: start;
  }

  html.consumer-ui .nav-rail-btn svg {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
  }

  html.consumer-ui .nav-rail-btn.active,
  html.consumer-ui .nav-rail-btn[aria-pressed='true'] {
    color: #1a73e8;
    background: #e8f0fe;
  }

  html.consumer-ui .nav-rail-account-btn {
    min-height: 64px;
    margin-bottom: 6px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #f8f9fa;
  }

  html.consumer-ui .nav-rail-account-btn .nav-rail-account-menu-icon,
  html.consumer-ui .nav-rail-account-btn .nav-rail-account-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex: 0 0 auto;
  }

  html.consumer-ui .nav-rail-account-btn span[data-i18n],
  html.consumer-ui .nav-rail-account-btn > span:last-child {
    font-size: 16px;
    font-weight: 500;
    color: #202124;
  }

  /* Routes stay on desktop; mobile menu stays lean. */
  html.consumer-ui #navRoutePreviews {
    display: none !important;
  }

  html.consumer-ui .nav-rail-sep {
    width: auto;
    margin: 10px 12px;
    align-self: stretch;
  }

  html.consumer-ui .nav-rail-lang {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 8px 0;
    justify-content: stretch;
  }

  html.consumer-ui .nav-rail-lang .nav-rail-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 40px;
    width: auto;
    padding: 8px 6px;
    justify-content: center;
    gap: 0;
    font-size: 13px;
    border-radius: 999px;
    background: #f1f3f4;
  }

  html.consumer-ui .nav-rail-lang .nav-rail-btn[aria-pressed='true'] {
    background: #e8f0fe;
    color: #1a73e8;
  }

  /* Nearby origin/radius: meet mobile touch minimum without enlarging dense category chips. */
  html.consumer-ui .nearby-toggle {
    min-height: 44px;
  }

  html.consumer-ui .nearby-card,
  html.consumer-ui .nearby-origin-btn,
  html.consumer-ui .nearby-radius-btn {
    min-height: 68px;
  }

  /* Mobile floating search: full-width top chrome. */
  html.consumer-ui .search-chrome-float,
  html.consumer-ui[dir='rtl'] .search-chrome-float,
  html.consumer-ui[dir='ltr'] .search-chrome-float {
    left: max(10px, env(safe-area-inset-left, 0px));
    right: max(10px, env(safe-area-inset-right, 0px));
    top: max(10px, env(safe-area-inset-top, 0px));
    width: auto;
    max-width: none;
    direction: inherit;
  }

  html.consumer-ui .search-chrome-float .search-chrome {
    width: 100%;
    max-width: none;
  }

  /* Open suggest: one Google Maps card (menu overlays the field row). */
  html.consumer-ui .search-chrome-float:has(.is-suggest-open) .search-chrome {
    flex-direction: column;
    align-items: stretch;
    border-radius: 16px;
    padding: 0;
    position: relative;
    min-height: 0;
  }

  html.consumer-ui .search-chrome-float:has(.is-suggest-open) .nav-menu-fab {
    position: absolute;
    inset-inline-start: 4px;
    top: 4px;
    z-index: 4;
  }

  html.consumer-ui .search-omnibox.is-suggest-open {
    min-height: 0;
    max-height: min(47vh, calc(100dvh - 120px));
    border-radius: 16px;
    margin-top: 0;
    overflow: hidden;
    box-shadow: none;
    background: #fff;
  }

  html.consumer-ui .search-omnibox.is-suggest-open .search-pill {
    height: 56px;
    border-bottom: 1px solid #e8eaed;
    padding-inline-start: 52px;
  }

  html.consumer-ui.search-chrome-docked .search-panel > .search-chrome {
    width: 100%;
    max-width: none;
    padding: 10px 10px 6px;
  }

  html.consumer-ui .search-pill {
    width: 100%;
    flex: 0 0 auto;
  }

  html.consumer-ui .search-omnibox {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  html.consumer-ui .search-category-strip {
    left: max(var(--chrome-inline-gap), env(safe-area-inset-left, 0px));
    right: max(var(--chrome-inline-gap), env(safe-area-inset-right, 0px));
    top: auto;
    bottom: max(12px, env(safe-area-inset-bottom));
    max-width: none;
    width: auto;
    margin: 0;
    padding-inline-start: 0;
    z-index: 5;
  }

  /* Google Maps mobile: place/directions as a bottom sheet (map sliver on top). */
  html.consumer-ui .side-panel-stack,
  html.consumer-ui[dir='rtl'] .side-panel-stack,
  html.consumer-ui[dir='ltr'] .side-panel-stack {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    top: auto !important;
    bottom: 0 !important;
    height: auto;
    max-height: min(
      72vh,
      calc(100vh - max(12px, env(safe-area-inset-top)) - 56px),
      calc(100dvh - max(12px, env(safe-area-inset-top)) - 56px)
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -2px 12px rgba(60, 64, 67, 0.2);
    z-index: 8;
  }

  /* No empty white sheet when every panel is hidden. */
  html.consumer-ui .side-panel-stack:not(:has(.side-panel-card:not([hidden]))) {
    display: none !important;
    pointer-events: none !important;
    box-shadow: none !important;
  }

  /* Library on mobile: still one bottom sheet card. */
  html.consumer-ui.library-panel-open .side-panel-stack {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    top: auto !important;
    bottom: 0 !important;
    max-height: min(72vh, calc(100dvh - 64px)) !important;
    border-radius: 16px 16px 0 0;
  }

  html.consumer-ui.library-panel-open .side-panel-card.search-panel {
    max-height: 100% !important;
    border-radius: 16px 16px 0 0 !important;
  }

  /* Google Maps mobile: no mid-edge `<` — sheet has its own ×. */
  html.consumer-ui .side-panel-collapse,
  html.consumer-ui.directions-panel-open .side-panel-collapse,
  html.consumer-ui.place-panel-open .side-panel-collapse,
  html.consumer-ui.search-chrome-docked .side-panel-collapse,
  html.consumer-ui .side-panel-collapse:not([hidden]) {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  html.consumer-ui .side-panel-card.search-panel,
  html.consumer-ui .side-panel-card.directions-panel {
    max-height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    box-shadow: none;
  }

  /* Bottom-sheet place/directions: float above compact bottom nav (mobile-redesign owns geometry). */
  html.consumer-ui.place-panel-open .side-panel-stack,
  html.consumer-ui:has(#placeDetail:not([hidden])) .side-panel-stack {
    top: auto !important;
    bottom: calc(var(--af-bottom-chrome, 72px) + var(--mobile-keyboard-inset, 0px)) !important;
    height: auto !important;
    max-height: min(78vh, calc(100dvh - var(--af-bottom-chrome, 72px) - 64px)) !important;
    border-radius: var(--m-sheet-radius, 24px);
  }

  /* Directions: compact GM sheet — leave most of the map visible. */
  html.consumer-ui.directions-panel-open .side-panel-stack {
    top: auto !important;
    bottom: calc(var(--af-bottom-chrome, 72px) + var(--mobile-keyboard-inset, 0px)) !important;
    height: auto !important;
    max-height: min(48vh, calc(100dvh - var(--af-bottom-chrome, 72px) - 120px)) !important;
    border-radius: var(--m-sheet-radius, 24px);
  }

  html.consumer-ui.place-panel-open .side-panel-card.search-panel,
  html.consumer-ui .side-panel-card.search-panel:has(#placeDetail:not([hidden])),
  html.consumer-ui.directions-panel-open .side-panel-card.directions-panel {
    border-radius: 16px 16px 0 0 !important;
    box-shadow: none !important;
    height: auto !important;
    max-height: 100% !important;
  }

  /* Inactive search sheet must not paint over the directions bottom sheet. */
  html.consumer-ui #searchPanel.search-panel[hidden] {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }

  /* Lift map chrome above the measured bottom sheet (see --af-sheet-clearance). */
  html.consumer-ui body.drawer-open .map-controls-br,
  html.consumer-ui body:not(.panel-collapsed) .map-controls-br,
  html.consumer-ui body.drawer-open .layers-control-bl,
  html.consumer-ui body:not(.panel-collapsed) .layers-control-bl {
    bottom: max(
      28px,
      calc(env(safe-area-inset-bottom) + 12px + var(--af-sheet-clearance, min(42vh, 320px)))
    );
  }

  /* Open Layers menu must track the FAB above the sheet (not stay under it). */
  html.consumer-ui body.drawer-open .layers-menu,
  html.consumer-ui body:not(.panel-collapsed) .layers-menu {
    bottom: calc(
      max(28px, env(safe-area-inset-bottom) + 12px + var(--af-sheet-clearance, min(42vh, 320px)))
      + 72px
    );
  }

  html.consumer-ui .search-panel-inner,
  html.consumer-ui .side-panel-card .panel-inner {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
  }

  html.consumer-ui .search-panel-inner {
    overflow: hidden;
  }

  html.consumer-ui .side-panel-card .panel-inner {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  html.consumer-ui .search-panel-inner #results {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
  }

  /* Place-detail mode: one sheet — hide list/nearby chrome that steals height/hits. */
  html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) .search-categories,
  html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) #searchEmpty,
  html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) #results,
  html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) #nearbyControls,
  html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) #userLibrary {
    display: none !important;
    pointer-events: none !important;
  }

  html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) .place-detail {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    flex: 1 1 auto;
    max-height: none;
    overflow: hidden;
  }

  html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) .place-detail-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) .place-detail-body {
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
  }

  html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) .place-detail-actions-secondary {
    flex-shrink: 0;
    flex-grow: 0;
    max-height: none;
    overflow: visible;
    position: relative;
    bottom: auto;
    z-index: 1;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
    margin-top: 0;
    background: #fff;
  }

  /* Keep Exit nearby reachable without origin/radius chrome while detail is open. */
  html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) #nearbyBar {
    flex: 0 0 auto;
  }

  html.consumer-ui .layers-control-bl,
  html.consumer-ui.place-panel-open .layers-control-bl,
  html.consumer-ui.directions-panel-open .layers-control-bl,
  html.consumer-ui.search-chrome-docked .layers-control-bl,
  html.consumer-ui.library-panel-open .layers-control-bl,
  html.consumer-ui.contribute-panel-open .layers-control-bl,
  html.consumer-ui .layers-menu,
  html.consumer-ui.place-panel-open .layers-menu,
  html.consumer-ui.directions-panel-open .layers-menu,
  html.consumer-ui.search-chrome-docked .layers-menu,
  html.consumer-ui.library-panel-open .layers-menu,
  html.consumer-ui.contribute-panel-open .layers-menu {
    left: max(12px, env(safe-area-inset-left, 0px));
    right: auto;
  }

  html.consumer-ui .map-controls-br {
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: max(16px, env(safe-area-inset-bottom));
  }

  html.consumer-ui .maplibregl-ctrl-bottom-right {
    margin-right: max(64px, calc(env(safe-area-inset-right) + 52px)) !important;
    margin-bottom: max(8px, env(safe-area-inset-bottom)) !important;
  }

  /* Google Maps mobile: attribution stays a quiet compact chip. */
  html.consumer-ui .maplibregl-ctrl-attrib {
    max-width: min(112px, calc(100vw - 168px));
    font-size: 9px;
    line-height: 1.2;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.82);
  }

  html.consumer-ui .maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show) {
    min-height: 24px;
    min-width: 24px;
  }

  /*
   * Beat earlier .left-panel-collapsed { display:none } rules so mobile
   * always keeps the Google Maps top omnibox (and chips) on the clean map.
   */
  html.consumer-ui.left-panel-collapsed .search-chrome-float {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    pointer-events: none !important;
  }

  html.consumer-ui.search-chrome-docked .search-chrome-float,
  html.consumer-ui.directions-panel-open .search-chrome-float {
    display: none !important;
  }

  /* Chips under omnibox on clean map — beat desktop .left-panel-collapsed hide. */
  html.consumer-ui .search-category-strip,
  html.consumer-ui.left-panel-collapsed .search-category-strip {
    top: calc(max(10px, env(safe-area-inset-top)) + 64px) !important;
    bottom: auto !important;
    left: max(10px, env(safe-area-inset-left, 0px)) !important;
    right: max(10px, env(safe-area-inset-right, 0px)) !important;
    max-width: none !important;
    width: auto !important;
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 5;
  }

  html.consumer-ui .search-category-strip[hidden],
  html.consumer-ui.left-panel-collapsed .search-category-strip[hidden] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  html.consumer-ui .search-category-strip,
  html.consumer-ui.left-panel-collapsed .search-category-strip {
    flex-wrap: nowrap !important;
    align-items: center;
    min-height: 40px;
    max-height: 44px;
    overflow: hidden;
    padding: 0;
  }

  html.consumer-ui .search-category-strip .search-category-chip,
  html.consumer-ui .search-category-strip .search-category-more {
    min-height: 36px;
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
    border-radius: 999px;
    box-shadow:
      0 1px 2px rgba(60, 64, 67, 0.28),
      0 1px 3px 1px rgba(60, 64, 67, 0.12);
  }

  /* Hide chips while suggest/history card is open. */
  html.consumer-ui .search-omnibox.is-suggest-open ~ .search-category-strip,
  html.consumer-ui:has(.search-omnibox.is-suggest-open) .search-category-strip,
  html.consumer-ui.directions-panel-open .search-category-strip,
  html.consumer-ui.place-panel-open .search-category-strip {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Map controls clear of bottom sheet / safe area — compact GM stack. */
  html.consumer-ui .map-controls-br {
    right: max(10px, env(safe-area-inset-right, 0px));
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    gap: 8px;
  }

  html.consumer-ui .map-controls-br .map-ctrl-stack > button,
  html.consumer-ui .map-controls-br .map-ctrl-zoom > button {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  html.consumer-ui .layers-control-bl {
    left: max(10px, env(safe-area-inset-left, 0px));
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    border-radius: 10px;
    overflow: hidden;
    box-shadow:
      0 1px 2px rgba(60, 64, 67, 0.3),
      0 1px 3px 1px rgba(60, 64, 67, 0.15);
  }

  /* Contribute / library / place sheets: one clean bottom card. */
  html.consumer-ui.contribute-panel-open .side-panel-stack,
  html.consumer-ui.library-panel-open .side-panel-stack {
    max-height: min(78vh, calc(100dvh - 56px)) !important;
  }

  html.consumer-ui.contribute-panel-open .contribute-head {
    padding: 14px 16px 10px;
  }

  html.consumer-ui.contribute-panel-open .contribute-tabs {
    padding: 0 8px;
    min-height: 48px;
  }

  html.consumer-ui.contribute-panel-open .contribute-action {
    min-height: 52px;
    padding: 12px 14px;
  }

  html.consumer-ui .account-sheet-card {
    width: min(100vw - 24px, 400px);
    max-height: min(86vh, 640px);
    border-radius: 20px;
  }

  /*
   * Mobile directions — Google Maps bottom sheet:
   * OD + mode + one CTA. Map stays the hero; previews/offline stay on desktop.
   */
  html.consumer-ui.directions-panel-open .side-panel-card.directions-panel {
    position: relative;
    overflow: hidden !important;
  }

  html.consumer-ui.directions-panel-open .directions-panel .panel-inner {
    position: relative;
    padding: 4px 16px max(14px, env(safe-area-inset-bottom, 0px));
    max-height: min(44vh, calc(100dvh - 160px));
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  html.consumer-ui.directions-panel-open .directions-panel .panel-inner::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    margin: 2px auto 8px;
    border-radius: 999px;
    background: #dadce0;
  }

  html.consumer-ui.directions-panel-open .directions-panel .panel-toolbar {
    display: flex !important;
    position: absolute;
    top: 8px;
    inset-inline-end: 6px;
    z-index: 4;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  html.consumer-ui.directions-panel-open .directions-panel .drawer-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #5f6368;
    font-size: 22px;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
  }

  html.consumer-ui.directions-panel-open .directions-panel .drawer-close:hover {
    background: #f1f3f4;
    color: #202124;
  }

  html.consumer-ui.directions-panel-open .directions-panel .route-section {
    margin: 0;
  }

  html.consumer-ui.directions-panel-open .directions-panel .section-title {
    margin: 0 0 10px;
    padding-inline-end: 44px;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: var(--weight-heading);
  }

  html.consumer-ui.directions-panel-open .directions-panel .od-stack {
    margin: 0 0 10px;
  }

  html.consumer-ui.directions-panel-open .directions-panel .od-chip {
    min-height: 48px;
    padding: 10px 40px 10px 12px;
  }

  html.consumer-ui.directions-panel-open .directions-panel .via-stops-actions {
    margin: 0;
    padding: 0 12px 8px;
  }

  html.consumer-ui.directions-panel-open .directions-panel .via-stops-actions .secondary {
    min-height: 32px;
    padding: 0;
    font-size: 13px;
  }

  html.consumer-ui.directions-panel-open .directions-panel #pickViaMap {
    display: none !important;
  }

  html.consumer-ui.directions-panel-open .directions-panel .route-profile-switch {
    margin: 0 0 10px;
  }

  html.consumer-ui.directions-panel-open .directions-panel .route-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 0;
  }

  html.consumer-ui.directions-panel-open .directions-panel .route-actions .primary#route,
  html.consumer-ui.directions-panel-open .directions-panel .route-actions .primary {
    grid-column: 1;
    width: 100%;
    min-height: 48px;
    border-radius: 24px;
    border: 0;
    background: #1a73e8;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    box-shadow: none;
  }

  html.consumer-ui.directions-panel-open .directions-panel .route-actions .primary#route:hover:not(:disabled),
  html.consumer-ui.directions-panel-open .directions-panel .route-actions .primary:hover:not(:disabled) {
    background: #1765cc;
    border-color: transparent;
    color: #fff;
  }

  html.consumer-ui.directions-panel-open .directions-panel .route-actions .primary:disabled {
    background: #e8eaed;
    color: #9aa0a6;
  }

  html.consumer-ui.directions-panel-open .directions-panel .route-actions #reset,
  html.consumer-ui.directions-panel-open .directions-panel .route-actions #shareLink,
  html.consumer-ui.directions-panel-open .directions-panel .offline-nav-toggle,
  html.consumer-ui.directions-panel-open .directions-panel .offline-nav-hint,
  html.consumer-ui.directions-panel-open .directions-panel .route-preview-block,
  html.consumer-ui.directions-panel-open .directions-panel .route-profile-hint,
  html.consumer-ui.directions-panel-open .directions-panel .live-routing-hint,
  html.consumer-ui.directions-panel-open .directions-panel .attribution,
  html.consumer-ui.directions-panel-open .directions-panel .panel-header,
  html.consumer-ui.directions-panel-open .directions-panel #message {
    display: none !important;
  }

  html.consumer-ui.directions-panel-open .directions-panel .route-summary:empty {
    display: none;
  }

  html.consumer-ui.directions-panel-open .directions-panel .route-summary:not(:empty) {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8f9fa;
    font-size: 13px;
    line-height: 1.4;
  }

  html.consumer-ui.directions-panel-open .directions-panel .section-title {
    font-size: 17px;
    margin: 0 0 8px;
  }

  html.consumer-ui.directions-panel-open .directions-panel .od-stack {
    margin: 0 0 8px;
  }

  html.consumer-ui.directions-panel-open .directions-panel .route-profile-switch {
    margin: 0 0 8px;
  }

  /* Slightly taller only when a live route summary is showing. */
  html.consumer-ui.directions-panel-open .side-panel-stack:has(#routeSummary:not(:empty)) {
    max-height: min(56vh, calc(100dvh - 120px)) !important;
  }
}

/* Short landscape: keep the bottom sheet usable above the floating nav. */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
  html.consumer-ui .side-panel-stack,
  html.consumer-ui[dir='rtl'] .side-panel-stack,
  html.consumer-ui[dir='ltr'] .side-panel-stack {
    top: auto !important;
    bottom: var(--af-bottom-chrome, 72px) !important;
    max-height: min(
      88vh,
      calc(100vh - max(8px, env(safe-area-inset-top)) - var(--af-bottom-chrome, 72px) - 8px),
      calc(100dvh - max(8px, env(safe-area-inset-top)) - var(--af-bottom-chrome, 72px) - 8px)
    );
  }

  html.consumer-ui .search-panel:has(#placeDetail:not([hidden])) .place-detail-actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Place problem report dialog — simple Google-like sheet */
html.consumer-ui .place-report-dialog {
  border: 0;
  border-radius: 22px;
  padding: 0;
  width: min(440px, calc(100vw - 28px));
  max-height: min(88vh, 680px);
  overflow: auto;
  background: #fff;
  color: #202124;
  pointer-events: auto;
  box-shadow:
    0 1px 2px rgba(60, 64, 67, 0.18),
    0 16px 48px rgba(60, 64, 67, 0.28);
}
html.consumer-ui .place-report-dialog::backdrop {
  background: rgba(32, 33, 36, 0.48);
  backdrop-filter: blur(2px);
  pointer-events: auto;
}
html.consumer-ui .place-report-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}
html.consumer-ui .place-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #f1f3f4;
}
html.consumer-ui .place-report-head h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #202124;
  line-height: 1.3;
}
html.consumer-ui .place-report-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f3f4;
  color: #5f6368;
  font: inherit;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
  pointer-events: auto;
}
html.consumer-ui .place-report-close svg {
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
}
html.consumer-ui .place-report-close:hover {
  background: #e8eaed;
  color: #202124;
}
html.consumer-ui .place-report-close:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
}
html.consumer-ui .place-report-hint {
  margin: 0;
  padding: 12px 16px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #5f6368;
  background: #f8f9fa;
  border-bottom: 1px solid #f1f3f4;
}
html.consumer-ui .place-report-fields {
  display: grid;
  gap: 14px;
  padding: 16px;
}
html.consumer-ui .place-report-field {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #3c4043;
}
html.consumer-ui .place-report-field[hidden] {
  display: none !important;
}
html.consumer-ui .place-report-form input,
html.consumer-ui .place-report-form select,
html.consumer-ui .place-report-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #dadce0;
  border-radius: 12px;
  padding: 11px 13px;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  color: #202124;
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
html.consumer-ui .place-report-form input:focus,
html.consumer-ui .place-report-form select:focus,
html.consumer-ui .place-report-form textarea:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.18);
}
html.consumer-ui .place-report-form textarea {
  resize: vertical;
  min-height: 84px;
  line-height: 1.45;
}
html.consumer-ui .place-report-error {
  margin: 0 16px 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fce8e6;
  color: #c5221f;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
html.consumer-ui .place-report-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid #f1f3f4;
  background: #fff;
}
html.consumer-ui .place-report-btn {
  margin: 0;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease, filter 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
html.consumer-ui .place-report-btn:active {
  transform: scale(0.98);
}
html.consumer-ui .place-report-btn.ghost {
  background: #f1f3f4;
  color: #3c4043;
}
html.consumer-ui .place-report-btn.ghost:hover {
  background: #e8eaed;
}
html.consumer-ui .place-report-btn.primary {
  background: #1a73e8;
  color: #fff;
}
html.consumer-ui .place-report-btn.primary:hover {
  filter: brightness(1.05);
}

/* ——— Account sheet: Continue with Google (Menu) ——— */
html.consumer-ui .nav-rail-account-btn {
  position: relative;
}

html.consumer-ui .nav-rail-account-menu-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8f0fe;
  color: #1a73e8;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(26, 115, 232, 0.18);
}

html.consumer-ui .nav-rail-account-menu-icon use,
html.consumer-ui .nav-rail-account-btn .nav-rail-account-menu-icon {
  width: 28px;
  height: 28px;
}

html.consumer-ui .nav-rail-account-btn .nav-rail-account-menu-icon {
  flex: 0 0 auto;
}

html.consumer-ui .nav-rail-account-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: #e8f0fe;
  box-shadow: inset 0 0 0 1px rgba(60, 64, 67, 0.18);
  flex: 0 0 auto;
  display: none;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: #174ea6;
  overflow: hidden;
}

html.consumer-ui .nav-rail-account-btn.is-signed-in .nav-rail-account-menu-icon {
  display: none;
}

html.consumer-ui .nav-rail-account-btn.is-signed-in .nav-rail-account-avatar {
  display: grid;
}

/* Contribute moved into Profile — hide standalone rail item. */
html.consumer-ui #navContribute[hidden],
html.consumer-ui #navContribute {
  display: none !important;
}

html.consumer-ui .nav-rail-account-btn.active {
  color: var(--gm-accent);
  background: var(--gm-accent-soft);
}

html.consumer-ui .nav-rail-account-btn.active .nav-rail-account-menu-icon {
  background: #d2e3fc;
  box-shadow: inset 0 0 0 2px rgba(26, 115, 232, 0.35);
}

html.consumer-ui .nav-rail-account-btn.active .nav-rail-account-avatar {
  box-shadow: inset 0 0 0 2px #1a73e8;
}

html.consumer-ui .account-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  pointer-events: none;
}

html.consumer-ui .account-sheet[hidden] {
  display: none !important;
}

html.consumer-ui .account-sheet:not([hidden]) {
  pointer-events: auto;
}

html.consumer-ui .account-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(32, 33, 36, 0.46);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.22s ease;
}

html.consumer-ui .account-sheet:not([hidden]) .account-sheet-backdrop {
  opacity: 1;
}

/* Google Maps–style account panel */
html.consumer-ui .account-sheet-card.account-sheet-gmaps {
  --account-ink: #202124;
  --account-muted: #5f6368;
  --account-line: #e8eaed;
  --account-accent: #1a73e8;
  --account-surface: #f1f3f4;
  --account-card: #ffffff;
  position: relative;
  z-index: 1;
  width: min(440px, 100vw);
  max-height: min(920px, 100dvh);
  margin: 0;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: var(--account-surface);
  box-shadow: 0 8px 28px rgba(32, 33, 36, 0.28);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
  outline: none;
  transform: translateY(18px);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.2, 0, 0, 1), opacity 0.22s ease;
}

html.consumer-ui .account-sheet:not([hidden]) .account-sheet-card.account-sheet-gmaps {
  transform: none;
  opacity: 1;
}

html.consumer-ui .account-gmaps-close {
  position: absolute;
  top: max(8px, env(safe-area-inset-top));
  inset-inline-end: 8px;
  z-index: 3;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--account-muted);
  cursor: pointer;
}

html.consumer-ui .account-gmaps-close:hover {
  background: rgba(60, 64, 67, 0.08);
}

html.consumer-ui .account-gmaps-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  /* Leave room for the floating ✕ on the gray chrome (Google Maps). */
  padding: max(56px, calc(env(safe-area-inset-top) + 48px)) 12px max(20px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Exact Google Maps account identity card */
html.consumer-ui .account-gmaps-profile-card {
  background: var(--account-card);
  border-radius: 28px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

html.consumer-ui .account-gmaps-profile-row {
  appearance: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  min-height: 56px;
  /* Follow page dir so fa/ps are true RTL (avatar at inline-start). */
  text-align: start;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

html.consumer-ui .account-gmaps-profile-row:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 4px;
  border-radius: 16px;
}

html.consumer-ui .account-gmaps-avatar-wrap {
  position: relative;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
}

html.consumer-ui .account-gmaps-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: #e8f0fe;
  color: #1a73e8;
  overflow: hidden;
  box-shadow: none;
}

html.consumer-ui .account-gmaps-avatar.is-guest {
  background: #e8f0fe;
  color: #1a73e8;
}

html.consumer-ui .account-gmaps-avatar.is-fallback {
  background: #1a73e8;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1;
}

html.consumer-ui .account-gmaps-avatar[hidden],
html.consumer-ui .account-gmaps-avatar.is-fallback[hidden] {
  display: none !important;
}

html.consumer-ui .account-gmaps-avatar-edit {
  position: absolute;
  inset-inline-end: -2px;
  bottom: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.18);
  pointer-events: none;
}

html.consumer-ui .account-gmaps-identity-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0;
}

html.consumer-ui .account-gmaps-name,
html.consumer-ui .account-sheet-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--account-ink);
  letter-spacing: 0;
  text-align: start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

html.consumer-ui .account-gmaps-email,
html.consumer-ui .account-sheet-lead {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--account-muted);
  text-align: start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

html.consumer-ui[dir='rtl'] .account-gmaps-chevron {
  transform: scaleX(-1);
}

html.consumer-ui .account-gmaps-chevron {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid #dadce0;
  border-radius: 50%;
  background: #fff;
  color: #3c4043;
  display: grid;
  place-items: center;
  pointer-events: none;
  transition: transform 0.2s ease;
}


html.consumer-ui .account-user-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

html.consumer-ui .account-user-actions[hidden] {
  display: none !important;
}

/* GIS button stays mounted for programmatic click; never shown as its own pill. */
html.consumer-ui .account-gis-anchor {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 300px;
  height: 60px;
  overflow: hidden;
  opacity: 0.01;
  pointer-events: none;
  z-index: -1;
}

html.consumer-ui .account-gis-anchor .google-signin-host,
html.consumer-ui .account-gis-anchor .google-signin-host * {
  pointer-events: auto !important;
}

html.consumer-ui .account-gmaps-pill,
html.consumer-ui .account-gmaps-pill-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  background: var(--account-card);
  color: var(--account-ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

html.consumer-ui .account-gmaps-pill:hover,
html.consumer-ui .account-gmaps-pill-card:hover {
  background: #fafafa;
}

html.consumer-ui .account-gmaps-pill-icon {
  flex: 0 0 auto;
}

html.consumer-ui #googleSignInPill {
  padding: 8px 12px;
  cursor: default;
  min-height: 56px;
}

html.consumer-ui #googleSignInPill:hover {
  background: var(--account-card);
}

html.consumer-ui #googleSignInPill .google-signin-host iframe,
html.consumer-ui #googleSignInPill .google-signin-host div[role='button'] {
  max-width: 100% !important;
}

/* When GIS has not painted yet, keep the pill from looking like an empty field. */
html.consumer-ui #googleSignInPill:has(.google-signin-host:empty)::after {
  content: attr(data-signin-label);
  color: var(--account-ink);
  font-size: 0.95rem;
  font-weight: 500;
}

html.consumer-ui .account-gmaps-card {
  background: var(--account-card);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}

/* Exact Google Maps menu row metrics — honor page dir (RTL for fa/ps). */
html.consumer-ui .account-gmaps-card--menu .account-gmaps-row {
  appearance: none;
  width: 100%;
  min-height: 56px;
  margin: 0;
  padding: 14px 24px;
  border: 0;
  border-bottom: 0;
  background: transparent;
  color: #1f1f1f;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.01px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  text-align: start;
  cursor: pointer;
  position: relative;
}

html.consumer-ui .account-gmaps-card--menu .account-gmaps-row::after {
  content: '';
  position: absolute;
  inset-inline-start: 72px;
  inset-inline-end: 0;
  bottom: 0;
  height: 1px;
  background: #e8eaed;
  pointer-events: none;
}

html.consumer-ui .account-gmaps-card--menu > .account-gmaps-row:last-child::after,
html.consumer-ui .account-gmaps-card--menu > .account-gmaps-settings:last-child::after,
html.consumer-ui .account-gmaps-card--menu > .account-gmaps-settings .account-gmaps-row-static::after {
  display: none;
}

html.consumer-ui .account-gmaps-row-trail {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-inline-start: auto;
  color: #444746;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease;
}

html.consumer-ui .account-gmaps-row.is-expanded .account-gmaps-row-trail {
  transform: rotate(180deg);
}

html.consumer-ui .account-gmaps-card--menu .account-gmaps-row.is-expanded::after {
  display: none;
}

html.consumer-ui .account-gmaps-settings-panel {
  padding: 0 0 8px;
}

html.consumer-ui .account-gmaps-settings-panel[hidden] {
  display: none !important;
}

/* Google Maps settings: preference rows → choice sheet */
html.consumer-ui .account-settings-prefs {
  margin: 0;
  padding: 0;
  border-top: 0;
}

html.consumer-ui .account-settings-pref {
  appearance: none;
  box-sizing: border-box;
  width: 100%;
  min-height: 64px;
  margin: 0;
  padding-block: 12px;
  padding-inline: 72px 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1f1f1f;
  font: inherit;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: start;
  cursor: pointer;
}

html.consumer-ui .account-settings-pref:hover {
  background: #f2f2f2;
}

html.consumer-ui .account-settings-pref:active {
  background: #e8e8e8;
}

html.consumer-ui .account-settings-pref-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: start;
}

html.consumer-ui .account-settings-pref-label {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.35;
  color: #1f1f1f;
  text-align: start;
  width: 100%;
}

html.consumer-ui .account-settings-pref-value {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  color: #5f6368;
  text-align: start;
  width: 100%;
}

html.consumer-ui .account-settings-pref-chevron {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: #5f6368;
  display: grid;
  place-items: center;
}

html.consumer-ui .account-settings-pref-chevron svg {
  display: block;
}

html.consumer-ui[dir='rtl'] .account-settings-pref-chevron {
  transform: scaleX(-1);
}

html.consumer-ui .account-settings-toggles {
  margin: 4px 0 0;
  padding: 4px 0 0;
  border-top: 1px solid #e8eaed;
}

html.consumer-ui .account-settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding-block: 14px;
  padding-inline: 72px 24px;
  min-height: 56px;
  color: #1f1f1f;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.35;
  text-align: start;
  cursor: pointer;
}

html.consumer-ui .account-settings-toggle-row:hover {
  background: #f2f2f2;
}

html.consumer-ui .account-settings-toggle-row input[type='checkbox'] {
  appearance: none;
  flex: 0 0 52px;
  width: 52px;
  height: 32px;
  margin: 0;
  border-radius: 999px;
  background: #e0e0e0;
  position: relative;
  cursor: pointer;
  transition: background 0.15s ease;
}

html.consumer-ui .account-settings-toggle-row input[type='checkbox']::after {
  content: '';
  position: absolute;
  top: 4px;
  inset-inline-start: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}

html.consumer-ui .account-settings-toggle-row input[type='checkbox']:checked {
  background: #0b57d0;
}

html.consumer-ui .account-settings-toggle-row input[type='checkbox']:checked::after {
  transform: translateX(20px);
}

html.consumer-ui[dir='rtl'] .account-settings-toggle-row input[type='checkbox']:checked::after {
  transform: translateX(-20px);
}

html.consumer-ui .account-settings-action {
  appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding-block: 14px 16px;
  padding-inline: 72px 24px;
  border: 0;
  background: transparent;
  color: #0b57d0;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  text-align: start;
  cursor: pointer;
}

html.consumer-ui .account-settings-action:hover {
  background: #f2f2f2;
}

/* Settings choice dialog (Language / Distance / Scale) */
html.consumer-ui .settings-choice-dialog {
  width: min(420px, calc(100vw - 24px));
  max-height: min(560px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: #fff;
  color: #1f1f1f;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

html.consumer-ui .settings-choice-dialog::backdrop {
  background: rgba(32, 33, 36, 0.48);
}

html.consumer-ui .settings-choice-head {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid #e8eaed;
}

html.consumer-ui .settings-choice-back {
  appearance: none;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #444746;
  display: grid;
  place-items: center;
  cursor: pointer;
}

html.consumer-ui[dir='rtl'] .settings-choice-back {
  transform: scaleX(-1);
}

html.consumer-ui .settings-choice-back:hover {
  background: #f2f2f2;
}

html.consumer-ui .settings-choice-title {
  margin: 0;
  flex: 1 1 auto;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  padding-inline-end: 12px;
}

html.consumer-ui .settings-choice-list {
  padding: 4px 0 12px;
  max-height: min(420px, calc(100dvh - 120px));
  overflow: auto;
  overscroll-behavior: contain;
}

html.consumer-ui .settings-choice-option {
  appearance: none;
  box-sizing: border-box;
  width: 100%;
  min-height: 56px;
  margin: 0;
  padding: 14px 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1f1f1f;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: start;
  cursor: pointer;
}

html.consumer-ui .settings-choice-option:hover {
  background: #f2f2f2;
}

html.consumer-ui .settings-choice-option:active {
  background: #e8e8e8;
}

html.consumer-ui .settings-choice-option-label {
  flex: 1 1 auto;
  min-width: 0;
  text-align: start;
}

html.consumer-ui .settings-choice-option-check {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  color: #0b57d0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

html.consumer-ui .settings-choice-option-check svg {
  display: block;
}

html.consumer-ui .settings-choice-option[aria-checked='true'] .settings-choice-option-check {
  opacity: 1;
  transform: scale(1);
}

/* Scale bar: show only while zooming when preference is set */
html.consumer-ui.map-scale-on-zoom .maplibregl-ctrl-scale {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

html.consumer-ui.map-scale-on-zoom.map-scale-visible .maplibregl-ctrl-scale {
  opacity: 1;
}

/* Legal document dialog (Privacy / Terms) */
html.consumer-ui .legal-doc-dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: min(720px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: #fff;
  color: #1f1f1f;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

html.consumer-ui .legal-doc-dialog::backdrop {
  background: rgba(32, 33, 36, 0.48);
}

html.consumer-ui .legal-doc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid #e8eaed;
}

html.consumer-ui .legal-doc-title {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
}

html.consumer-ui .legal-doc-close {
  appearance: none;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #444746;
  display: grid;
  place-items: center;
  cursor: pointer;
}

html.consumer-ui .legal-doc-close:hover {
  background: #f2f2f2;
}

html.consumer-ui .legal-doc-body {
  padding: 8px 20px 24px;
  max-height: min(560px, calc(100dvh - 120px));
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

html.consumer-ui .legal-doc-body p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: #3c4043;
}

html.consumer-ui .legal-doc-body p:last-child {
  margin-bottom: 0;
}

html.consumer-ui .account-gmaps-row {
  appearance: none;
  width: 100%;
  min-height: 56px;
  margin: 0;
  padding: 14px 24px;
  border: 0;
  background: transparent;
  color: #1f1f1f;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 24px;
  text-align: start;
  cursor: pointer;
}

html.consumer-ui .account-gmaps-row:hover {
  background: #f2f2f2;
}

html.consumer-ui .account-gmaps-row:active {
  background: #e8e8e8;
}

html.consumer-ui .account-gmaps-row-static {
  cursor: default;
  border-bottom: 0;
}

html.consumer-ui .account-gmaps-row-static:hover {
  background: transparent;
}

html.consumer-ui .account-gmaps-row-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  color: #444746;
  display: grid;
  place-items: center;
}

html.consumer-ui .account-gmaps-row-icon svg {
  display: block;
  width: 24px;
  height: 24px;
}

html.consumer-ui .account-gmaps-row-label {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


html.consumer-ui .account-gmaps-settings .mobile-language-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

html.consumer-ui .account-gmaps-settings .dock-lang-btn {
  min-height: 42px;
  border: 1px solid #dadce0;
  border-radius: 999px;
  background: #fff;
  color: var(--account-ink);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

html.consumer-ui .account-gmaps-settings .dock-lang-btn[aria-pressed='true'] {
  background: #e8f0fe;
  color: #1967d2;
  border-color: transparent;
}

html.consumer-ui .account-gmaps-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px 8px;
  color: #5f6368;
  font-size: 12px;
  line-height: 1.4;
}

html.consumer-ui .account-gmaps-legal {
  appearance: none;
  border: 0;
  background: transparent;
  color: #5f6368;
  font: inherit;
  font-size: inherit;
  padding: 4px 2px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

html.consumer-ui .account-gmaps-legal:hover {
  color: #1f1f1f;
}

html.consumer-ui .account-signed-only[hidden] {
  display: none !important;
}

@media (min-width: 901px) {
  html.consumer-ui .account-sheet {
    align-items: center;
    justify-content: center;
    padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right))
      max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  }

  html.consumer-ui .account-sheet-card.account-sheet-gmaps {
    width: min(420px, calc(100vw - 48px));
    max-height: min(860px, calc(100dvh - 48px));
    border-radius: 28px;
  }
}

html.consumer-ui .account-guest,
html.consumer-ui .account-user {
  position: relative;
  z-index: 1;
  width: 100%;
}

html.consumer-ui .account-guest[hidden],
html.consumer-ui .account-user[hidden] {
  display: none !important;
}

html.consumer-ui .google-signin-host {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

html.consumer-ui .google-signin-host.is-busy {
  opacity: 0.72;
  pointer-events: none;
}

html.consumer-ui .account-auth-retry {
  min-height: 44px;
  margin-top: 12px;
  padding: 10px 18px;
  border: 1px solid #c7dfde;
  border-radius: 14px;
  background: #e4f3f1;
  color: #087f83;
  font: inherit;
  cursor: pointer;
}

html.consumer-ui .account-auth-retry[hidden] { display: none; }

html.consumer-ui .google-signin-host > div {
  margin-inline: auto;
}

html.consumer-ui .account-import-prompt {
  margin-top: 4px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(31, 111, 235, 0.05);
  border: 1px solid rgba(31, 111, 235, 0.12);
}

html.consumer-ui .account-import-text {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #3c4043;
  text-align: center;
}

html.consumer-ui .account-import-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

html.consumer-ui .account-import-confirm,
html.consumer-ui .account-import-skip {
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

html.consumer-ui .account-import-confirm {
  border: 0;
  background: var(--account-accent);
  color: #fff;
}

html.consumer-ui .account-import-skip {
  border: 1px solid #dadce0;
  background: #fff;
  color: #3c4043;
}

html.consumer-ui .account-sheet-note {
  margin: 0 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #8a949e;
  text-align: center;
}

html.consumer-ui .account-sheet-error {
  margin: 0;
  padding: 11px 13px;
  border-radius: 12px;
  background: #fce8e6;
  color: #c5221f;
  font-size: 13px;
  line-height: 1.4;
  text-align: start;
}

html.consumer-ui .account-contribute-btn {
  width: 100%;
  min-height: 46px;
  margin: 0 0 10px;
  border: 0;
  border-radius: 14px;
  background: #e8f0fe;
  color: #1a73e8;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease;
}

html.consumer-ui .account-contribute-btn:hover {
  background: #d2e3fc;
}

html.consumer-ui .account-signout-btn {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(27, 36, 44, 0.12);
  border-radius: 14px;
  background: #fff;
  color: var(--account-accent);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

html.consumer-ui .account-signout-btn:hover {
  background: #eef4ff;
  border-color: #c9dbfb;
}

@media (prefers-reduced-motion: reduce) {
  html.consumer-ui .account-sheet-backdrop,
  html.consumer-ui .account-sheet-card {
    transition: none;
  }

  html.consumer-ui .account-sheet-card {
    transform: none;
  }
}

/* ——— Desktop map context menu (exact Google Maps pattern) ——— */
html.consumer-ui .map-context-menu {
  position: fixed;
  z-index: 120;
  min-width: 260px;
  max-width: min(340px, calc(100vw - 24px));
  padding: 6px 0;
  margin: 0;
  border-radius: 8px;
  background: #fff;
  color: #202124;
  box-shadow:
    0 1px 2px rgba(60, 64, 67, 0.3),
    0 2px 6px 2px rgba(60, 64, 67, 0.15);
  display: flex;
  flex-direction: column;
  gap: 0;
  /* Menu chrome is LTR like Google Maps; Persian rows flip per-item. */
  direction: ltr;
  overflow: hidden;
}

html.consumer-ui .map-context-menu[hidden] {
  display: none !important;
}

html.consumer-ui .map-context-coords,
html.consumer-ui .map-context-item {
  appearance: none;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: start;
  font: inherit;
  cursor: pointer;
  color: #202124;
  padding: 11px 18px;
  line-height: 1.35;
  min-height: 40px;
}

/* Google Maps: lat/lng always Western digits (never FaNum glyphs). */
html.consumer-ui .map-context-coords {
  font-family: 'SF UI Display', 'Google Sans', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
  direction: ltr !important;
  unicode-bidi: isolate;
  color: #202124;
  text-align: start;
}

html.consumer-ui .map-context-coords:hover {
  color: #1a73e8;
  background: #f1f3f4;
}

html.consumer-ui .map-context-coords.is-copied {
  color: #188038;
}

html.consumer-ui .map-context-item {
  font-size: 14px;
  font-weight: 400;
}

html.consumer-ui .map-context-item:hover {
  background: #f1f3f4;
}

html.consumer-ui .map-context-coords:focus-visible,
html.consumer-ui .map-context-item:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: -2px;
}

html.consumer-ui .map-context-sep {
  height: 1px;
  margin: 5px 0;
  background: #e8eaed;
  flex: 0 0 auto;
}

html.consumer-ui[dir='rtl'] .map-context-item {
  text-align: right;
  direction: rtl;
}

html.consumer-ui[dir='rtl'] .map-context-coords {
  text-align: left;
  direction: ltr !important;
}

/* ——— Add a place dialog ——— */
html.consumer-ui .add-place-dialog {
  border: 0;
  border-radius: 28px;
  padding: 0;
  width: min(560px, calc(100vw - 24px));
  max-height: min(94vh, 860px);
  overflow: auto;
  background: #fff;
  color: #202124;
  box-shadow:
    0 1px 2px rgba(60, 64, 67, 0.18),
    0 24px 64px rgba(32, 33, 36, 0.3);
}

html.consumer-ui .add-place-dialog::backdrop {
  background: rgba(32, 33, 36, 0.48);
  backdrop-filter: blur(3px);
}

html.consumer-ui .add-place-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

html.consumer-ui .add-place-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 22px 24px 16px;
  background: #fff;
  border-bottom: 1px solid #f1f3f4;
}

html.consumer-ui .add-place-title {
  margin: 0;
  text-align: center;
  font-family: var(--font-heading);
  font-size: clamp(1.45rem, 2.2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #202124;
  grid-column: 1 / -1;
  grid-row: 1;
  pointer-events: none;
}

html.consumer-ui .add-place-close {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f1f3f4;
  color: #5f6368;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 1;
}

html.consumer-ui .add-place-close:hover {
  background: #e8eaed;
  color: #202124;
}

html.consumer-ui .add-place-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 26px 10px;
}

html.consumer-ui .add-place-lead {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: #5f6368;
}

html.consumer-ui .add-place-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: #5f6368;
}

html.consumer-ui .add-place-custom-cat[hidden] {
  display: none !important;
}

html.consumer-ui .add-place-custom-cat {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8f9fa;
  border: 1px solid #e8eaed;
}

html.consumer-ui .add-place-field input,
html.consumer-ui .add-place-field select,
html.consumer-ui .add-place-field textarea {
  appearance: none;
  border: 1px solid #dadce0;
  border-radius: 12px;
  padding: 13px 15px;
  font: inherit;
  font-size: 15.5px;
  font-weight: 400;
  color: #202124;
  background: #fff;
  min-height: 50px;
}

html.consumer-ui .add-place-field select {
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #5f6368 50%),
    linear-gradient(135deg, #5f6368 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-inline-end: 36px;
}

html.consumer-ui[dir='rtl'] .add-place-field select {
  background-position: 18px calc(50% - 3px), 12px calc(50% - 3px);
}

html.consumer-ui .add-place-field textarea {
  min-height: 72px;
  resize: vertical;
}

html.consumer-ui .add-place-field input:focus,
html.consumer-ui .add-place-field select:focus,
html.consumer-ui .add-place-field textarea:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.18);
}

html.consumer-ui .add-place-mini-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e8eaed;
  background: #eef1f4;
  min-height: 180px;
}

html.consumer-ui .add-place-mini-map {
  width: 100%;
  height: 180px;
}

html.consumer-ui .add-place-edit-loc {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: #1967d2;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  box-shadow:
    0 1px 2px rgba(60, 64, 67, 0.3),
    0 1px 3px 1px rgba(60, 64, 67, 0.15);
  cursor: pointer;
}

html.consumer-ui .add-place-edit-loc:hover {
  background: #e8f0fe;
}

html.consumer-ui .add-place-more-toggle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid #e8eaed;
  border-radius: 14px;
  background: #fafbfc;
  padding: 12px 14px;
  text-align: start;
  cursor: pointer;
  font: inherit;
  color: #202124;
}

html.consumer-ui .add-place-more-toggle[aria-expanded='true'] {
  border-radius: 14px 14px 0 0;
  border-bottom-color: transparent;
}

html.consumer-ui .add-place-more-copy {
  display: grid;
  gap: 2px;
}

html.consumer-ui .add-place-more-copy strong {
  font-size: 14px;
  font-weight: 600;
}

html.consumer-ui .add-place-more-copy small {
  font-size: 12px;
  color: #5f6368;
  line-height: 1.4;
}

html.consumer-ui .add-place-more-chevron {
  color: #5f6368;
  font-size: 14px;
  line-height: 1.4;
}

html.consumer-ui .add-place-more-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: -14px;
  padding: 4px 14px 14px;
  border: 1px solid #e8eaed;
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: #fafbfc;
}

html.consumer-ui .add-place-more-panel[hidden] {
  display: none !important;
}

html.consumer-ui .add-place-footnote {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #80868b;
}

html.consumer-ui .add-place-info-dot {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1px solid #80868b;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
}

html.consumer-ui .add-place-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fce8e6;
  color: #c5221f;
  font-size: 13px;
}

html.consumer-ui .add-place-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 26px 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), #fff 30%);
}

html.consumer-ui .add-place-btn {
  min-height: 44px;
  border-radius: 22px;
  padding: 0 22px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 0;
}

html.consumer-ui .add-place-btn.ghost {
  background: transparent;
  color: #1a73e8;
}

html.consumer-ui .add-place-btn.ghost:hover {
  background: #e8f0fe;
}

html.consumer-ui .add-place-btn.primary {
  background: #1a73e8;
  color: #fff;
}

html.consumer-ui .add-place-btn.primary:hover:not(:disabled) {
  background: #1765cc;
}

html.consumer-ui .add-place-btn.primary:disabled {
  background: #dadce0;
  color: #fff;
  cursor: default;
}

/* —— Google Maps–style category picker —— */
html.consumer-ui .add-place-cat-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid #dadce0;
  border-radius: 12px;
  background: #fff;
  color: #202124;
  font: inherit;
  font-size: 15.5px;
  font-weight: 400;
  text-align: start;
  cursor: pointer;
}

html.consumer-ui .add-place-cat-trigger:hover {
  background: #f8f9fa;
}

html.consumer-ui .add-place-cat-trigger:focus-visible {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.18);
}

html.consumer-ui .add-place-cat-trigger-icon {
  flex: 0 0 auto;
  width: 28px;
  text-align: center;
  font-size: 20px;
  line-height: 1;
}

html.consumer-ui .add-place-cat-trigger-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.consumer-ui .add-place-cat-trigger-chevron {
  flex: 0 0 auto;
  color: #5f6368;
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
  direction: ltr;
  unicode-bidi: isolate;
}

/* Base glyph is «<» (Persian); flip only in LTR so drill-in points forward. */
html.consumer-ui[dir='ltr'] .add-place-cat-trigger-chevron {
  transform: scaleX(-1);
}

html.consumer-ui .add-place-cat-dialog {
  width: min(440px, calc(100vw - 24px));
  max-height: min(720px, calc(100vh - 48px));
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #202124;
  box-shadow:
    0 1px 3px rgba(60, 64, 67, 0.3),
    0 4px 8px 3px rgba(60, 64, 67, 0.15);
  overflow: hidden;
}

html.consumer-ui .add-place-cat-dialog::backdrop {
  background: rgba(32, 33, 36, 0.48);
}

html.consumer-ui .add-place-cat-shell {
  display: flex;
  flex-direction: column;
  max-height: min(720px, calc(100vh - 48px));
}

html.consumer-ui .add-place-cat-head {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 4px;
  padding: 10px 12px 6px;
}

html.consumer-ui .add-place-cat-title {
  margin: 0;
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
}

html.consumer-ui .add-place-cat-back,
html.consumer-ui .add-place-cat-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5f6368;
  display: grid;
  place-items: center;
  cursor: pointer;
}

html.consumer-ui .add-place-cat-back:hover,
html.consumer-ui .add-place-cat-close:hover {
  background: #f1f3f4;
}

html.consumer-ui .add-place-cat-back[hidden] {
  visibility: hidden;
}

html.consumer-ui .add-place-cat-search-wrap {
  position: relative;
  margin: 4px 16px 10px;
}

html.consumer-ui .add-place-cat-search {
  width: 100%;
  min-height: 48px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 12px 44px 12px 14px;
  font: inherit;
  font-size: 15px;
  color: #202124;
  background: #fff;
}

html.consumer-ui[dir='rtl'] .add-place-cat-search {
  padding: 12px 14px 12px 44px;
}

html.consumer-ui .add-place-cat-search:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

html.consumer-ui .add-place-cat-search-icon {
  position: absolute;
  top: 50%;
  inset-inline-end: 14px;
  transform: translateY(-50%);
  color: #80868b;
  pointer-events: none;
  display: grid;
  place-items: center;
}

html.consumer-ui .add-place-cat-search-wrap.has-query .add-place-cat-search-icon {
  display: none;
}

html.consumer-ui .add-place-cat-search-clear {
  position: absolute;
  top: 50%;
  inset-inline-end: 6px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5f6368;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

html.consumer-ui .add-place-cat-search-clear:hover {
  background: #f1f3f4;
}

html.consumer-ui .add-place-cat-search-clear[hidden] {
  display: none !important;
}

html.consumer-ui .add-place-cat-section {
  margin: 4px 20px 6px;
  font-size: 13px;
  font-weight: 500;
  color: #5f6368;
}

html.consumer-ui .add-place-cat-section[hidden] {
  display: none !important;
}

html.consumer-ui .add-place-cat-list {
  flex: 1 1 auto;
  overflow: auto;
  padding: 0 8px 8px;
  min-height: 220px;
}

html.consumer-ui .add-place-cat-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #202124;
  font: inherit;
  font-size: 15px;
  text-align: start;
  cursor: pointer;
}

html.consumer-ui .add-place-cat-row:hover,
html.consumer-ui .add-place-cat-row[aria-selected='true'] {
  background: #f1f3f4;
}

html.consumer-ui .add-place-cat-row-icon {
  flex: 0 0 auto;
  width: 28px;
  text-align: center;
  font-size: 20px;
  line-height: 1;
}

html.consumer-ui .add-place-cat-row-label {
  flex: 1 1 auto;
  min-width: 0;
}

html.consumer-ui .add-place-cat-row-chevron {
  flex: 0 0 auto;
  color: #80868b;
  font-size: 20px;
  line-height: 1;
  font-weight: 400;
  direction: ltr;
  unicode-bidi: isolate;
}

html.consumer-ui[dir='ltr'] .add-place-cat-row-chevron {
  transform: scaleX(-1);
}

html.consumer-ui .add-place-cat-row-check {
  flex: 0 0 auto;
  color: #1a73e8;
  display: grid;
  place-items: center;
}

html.consumer-ui .add-place-cat-row.is-selected {
  background: #e8f0fe;
}

html.consumer-ui .add-place-cat-row.is-focused,
html.consumer-ui .add-place-cat-row:focus-visible {
  outline: none;
  background: #f1f3f4;
}

html.consumer-ui .add-place-cat-row.is-selected.is-focused,
html.consumer-ui .add-place-cat-row.is-selected:focus-visible {
  background: #d2e3fc;
}

html.consumer-ui .add-place-cat-empty {
  margin: 18px 12px;
  text-align: center;
  color: #80868b;
  font-size: 14px;
}

html.consumer-ui .add-place-cat-other {
  padding: 8px 16px 4px;
  border-top: 1px solid #e8eaed;
}

html.consumer-ui .add-place-cat-other[hidden] {
  display: none !important;
}

html.consumer-ui .add-place-cat-other-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #5f6368;
}

html.consumer-ui .add-place-cat-other-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

html.consumer-ui .add-place-cat-other-input {
  flex: 1 1 auto;
  min-height: 44px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
}

html.consumer-ui .add-place-cat-other-input:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

html.consumer-ui .add-place-cat-other-done {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 16px;
}

html.consumer-ui .add-place-cat-foot {
  display: flex;
  justify-content: flex-end;
  padding: 8px 12px 14px;
}

/* —— Google Maps–style thank-you after Add a place —— */
html.consumer-ui .add-place-thanks-dialog {
  width: min(420px, calc(100vw - 28px));
  padding: 0;
  margin: auto;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #202124;
  overflow: hidden;
  box-shadow:
    0 1px 3px rgba(60, 64, 67, 0.3),
    0 4px 8px 3px rgba(60, 64, 67, 0.15);
}

html.consumer-ui .add-place-thanks-dialog::backdrop {
  background: rgba(32, 33, 36, 0.46);
}

html.consumer-ui .add-place-thanks-shell {
  display: flex;
  flex-direction: column;
}

html.consumer-ui .add-place-thanks-hero {
  position: relative;
  height: 148px;
  background: #0b6b63;
  overflow: hidden;
}

html.consumer-ui .add-place-thanks-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background:
    radial-gradient(circle at 18% 72%, rgba(255, 255, 255, 0.14) 0 18px, transparent 19px),
    radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.1) 0 28px, transparent 29px),
    radial-gradient(circle at 72% 22%, rgba(255, 255, 255, 0.12) 0 22px, transparent 23px),
    radial-gradient(circle at 86% 68%, rgba(255, 255, 255, 0.1) 0 34px, transparent 35px),
    radial-gradient(circle at 52% 78%, rgba(255, 255, 255, 0.08) 0 40px, transparent 41px),
    linear-gradient(135deg, #0a5f58 0%, #0d7a70 45%, #0b6b63 100%);
}

html.consumer-ui .add-place-thanks-pattern::before,
html.consumer-ui .add-place-thanks-pattern::after {
  content: '';
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.16);
}

html.consumer-ui .add-place-thanks-pattern::before {
  top: 18px;
  left: 22px;
}

html.consumer-ui .add-place-thanks-pattern::after {
  right: 28px;
  bottom: 16px;
  width: 72px;
  height: 72px;
}

html.consumer-ui .add-place-thanks-check {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #34a853;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  z-index: 1;
}

html.consumer-ui .add-place-thanks-body {
  padding: 28px 28px 8px;
  text-align: center;
}

html.consumer-ui .add-place-thanks-title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.35;
  color: #202124;
}

html.consumer-ui .add-place-thanks-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #5f6368;
}

html.consumer-ui .add-place-thanks-points {
  margin: 14px 0 0;
  font-size: 15px;
  font-weight: 500;
  color: #188038;
  letter-spacing: 0.01em;
}

html.consumer-ui .add-place-thanks-points[hidden] {
  display: none !important;
}

html.consumer-ui .add-place-thanks-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
  padding: 20px 12px 14px;
}

html.consumer-ui[dir='rtl'] .add-place-thanks-actions {
  justify-content: flex-start;
}

html.consumer-ui .add-place-thanks-btn {
  border: 0;
  background: transparent;
  color: #1a73e8;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-radius: 4px;
  cursor: pointer;
}

html.consumer-ui .add-place-thanks-btn.is-primary {
  font-weight: 600;
}

html.consumer-ui .add-place-thanks-btn:hover {
  background: #e8f0fe;
}

html.consumer-ui .add-place-thanks-btn:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
}

/* —— Google Maps–style Contribute hub —— */
html.consumer-ui .contribute-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 0 20px;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

html.consumer-ui .contribute-panel[hidden] {
  display: none !important;
}

html.consumer-ui.contribute-panel-open .search-panel-inner > :not(.search-chrome):not(#contributePanel) {
  display: none !important;
}

html.consumer-ui.contribute-panel-open .search-panel-inner {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

html.consumer-ui .contribute-head {
  position: relative;
  padding: 16px 16px 12px;
  flex: 0 0 auto;
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 78%);
  border-bottom: 1px solid #e8eaed;
}

html.consumer-ui[dir='rtl'] .contribute-head {
  text-align: right;
}

html.consumer-ui .contribute-close {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5f6368;
  display: grid;
  place-items: center;
  cursor: pointer;
}

html.consumer-ui .contribute-close:hover {
  background: #f1f3f4;
}

html.consumer-ui .contribute-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-inline-end: 36px;
}

html.consumer-ui .contribute-avatar {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #dadce0;
  color: #3c4043;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 600;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 3px rgba(26, 115, 232, 0.22);
}

html.consumer-ui .contribute-avatar.has-photo {
  color: transparent;
}

html.consumer-ui .contribute-profile-copy {
  min-width: 0;
}

html.consumer-ui .contribute-name {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
  color: #202124;
}

html.consumer-ui .contribute-level {
  margin: 2px 0 0;
  font-size: 12px;
  color: #5f6368;
}

html.consumer-ui .contribute-profile-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

html.consumer-ui .contribute-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #dadce0;
  border-radius: 999px;
  background: #fff;
  color: #3c4043;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 12px;
  cursor: pointer;
}

html.consumer-ui .contribute-chip-btn:hover {
  background: #f8f9fa;
}

html.consumer-ui .contribute-chip-btn[hidden],
html.consumer-ui .contribute-signin-btn[hidden] {
  display: none !important;
}

html.consumer-ui .contribute-signin-btn {
  border-color: #1a73e8;
  color: #1a73e8;
}

html.consumer-ui .contribute-signin-btn:hover {
  background: #e8f0fe;
}

html.consumer-ui .contribute-icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #dadce0;
  border-radius: 50%;
  background: #fff;
  color: #5f6368;
  display: grid;
  place-items: center;
  cursor: pointer;
}

html.consumer-ui .contribute-icon-btn:hover {
  background: #f8f9fa;
}

html.consumer-ui .contribute-meta-row {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e8eaed;
}

html.consumer-ui .contribute-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
}

html.consumer-ui .contribute-stat {
  display: grid;
  gap: 1px;
  text-align: center;
  min-width: 0;
}

html.consumer-ui .contribute-stat strong {
  font-size: 16px;
  font-weight: 500;
  color: #202124;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

html.consumer-ui .contribute-stat span {
  font-size: 11px;
  color: #80868b;
  line-height: 1.2;
}

html.consumer-ui .contribute-progress {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8f9fa;
}

html.consumer-ui .contribute-points-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}

html.consumer-ui .contribute-points-total {
  font-size: 16px;
  font-weight: 500;
  color: #202124;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

html.consumer-ui .contribute-points-unit {
  font-size: 12px;
  color: #5f6368;
}

html.consumer-ui .contribute-progress-track {
  height: 5px;
  border-radius: 999px;
  background: #e8eaed;
  overflow: hidden;
}

html.consumer-ui .contribute-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: #00897b;
  transition: width 0.25s ease;
}

html.consumer-ui .contribute-progress-label {
  margin: 6px 0 0;
  font-size: 12px;
  color: #5f6368;
  line-height: 1.3;
}

html.consumer-ui .contribute-progress.is-celebrate .contribute-points-total {
  animation: contribute-points-pop 0.9s ease;
  color: #188038;
}

html.consumer-ui .contribute-progress.is-celebrate .contribute-progress-fill {
  animation: contribute-bar-pulse 0.9s ease;
}

@keyframes contribute-points-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes contribute-bar-pulse {
  0%, 100% { filter: brightness(1); }
  40% { filter: brightness(1.15); }
}

html.consumer-ui .contribute-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  border-bottom: 1px solid #e8eaed;
  padding: 0 10px;
  padding-inline-end: 18px;
  scrollbar-width: none;
  min-height: 44px;
}

html.consumer-ui .contribute-tabs::-webkit-scrollbar {
  display: none;
}

html.consumer-ui .contribute-tab {
  flex: 0 0 auto;
  scroll-snap-align: start;
  border: 0;
  background: transparent;
  color: #5f6368;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 12px 12px 10px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  min-height: 44px;
  min-width: 4.5rem;
  touch-action: manipulation;
}

html.consumer-ui .contribute-tab.is-active {
  color: #1a73e8;
  border-bottom-color: #1a73e8;
}

html.consumer-ui .contribute-tab:hover {
  background: #f8f9fa;
}

/* Answers is empty scaffolding — hide until real queue exists. */
html.consumer-ui .contribute-tab[data-contrib-tab='answers'],
html.consumer-ui .contribute-pane[data-contrib-pane='answers'] {
  display: none !important;
}

html.consumer-ui .contribute-body {
  padding: 4px 0 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

html.consumer-ui .contribute-actions {
  display: flex;
  flex-direction: column;
  padding: 2px 6px 4px;
}

html.consumer-ui .contribute-action {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: start;
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
  color: #202124;
  min-height: 48px;
}

html.consumer-ui .contribute-action:hover {
  background: #f1f3f4;
}

html.consumer-ui .contribute-action-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e8f5f3;
  color: #00897b;
  display: grid;
  place-items: center;
  line-height: 0;
}

html.consumer-ui .contribute-action-icon svg {
  display: block;
}

html.consumer-ui .contribute-action-icon.is-place {
  background: #fce8e6;
  color: #c5221f;
}

html.consumer-ui .contribute-action-icon.is-business {
  background: #e8f0fe;
  color: #1a73e8;
}

html.consumer-ui .contribute-action-icon.is-edit {
  background: #fef7e0;
  color: #f9ab00;
}

html.consumer-ui .contribute-action-icon.is-review {
  background: #fef7e0;
  color: #f9ab00;
}

html.consumer-ui .contribute-action-icon.is-photo {
  background: #e6f4ea;
  color: #188038;
}

html.consumer-ui .contribute-action-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 0;
}

html.consumer-ui .contribute-action-copy strong {
  font-size: 14px;
  font-weight: 500;
}

/* Keep leads/chevrons in DOM for a11y/i18n, hide for a quieter list. */
html.consumer-ui .contribute-action-copy small,
html.consumer-ui .contribute-action-chevron {
  display: none !important;
}

html.consumer-ui .contribute-hint {
  margin: 8px 18px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8f9fa;
  color: #5f6368;
  font-size: 13px;
  line-height: 1.4;
}

html.consumer-ui .contribute-section-label {
  display: none;
}

html.consumer-ui .contribute-empty-card {
  margin: 12px 16px;
  padding: 16px 14px;
  border: 0;
  border-radius: 12px;
  background: #f8f9fa;
  box-shadow: none;
}

html.consumer-ui .contribute-empty-illu {
  display: none;
}

html.consumer-ui .contribute-empty-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 500;
  color: #202124;
}

html.consumer-ui .contribute-empty-lead {
  margin: 0;
  font-size: 13px;
  color: #5f6368;
  line-height: 1.4;
}

html.consumer-ui .contribute-empty-cta {
  margin-top: 10px;
  border: 0;
  border-radius: 999px;
  background: #e8f0fe;
  color: #1967d2;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  cursor: pointer;
}

html.consumer-ui .contribute-empty-cta:hover {
  background: #d2e3fc;
}

html.consumer-ui .contribute-edits-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 8px 8px;
}

html.consumer-ui .contribute-edit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: inherit;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

html.consumer-ui .contribute-edit-row:hover {
  background: #f1f3f4;
}

html.consumer-ui .contribute-edit-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e8f0fe;
  color: #1a73e8;
  display: grid;
  place-items: center;
  line-height: 0;
}

html.consumer-ui .contribute-edit-icon.is-report {
  background: #fce8e6;
  color: #d93025;
  font-size: 18px;
}

html.consumer-ui .contribute-reports-list {
  display: grid;
  gap: 4px;
  padding: 4px 0 12px;
}

html.consumer-ui .contribute-edit-icon svg {
  display: block;
}

html.consumer-ui .contribute-edit-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 2px;
}

html.consumer-ui .contribute-edit-copy strong {
  font-size: 14px;
  font-weight: 500;
}

html.consumer-ui .contribute-edit-copy small {
  font-size: 12px;
  color: #5f6368;
}

html.consumer-ui .contribute-edit-status {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 500;
  color: #f9ab00;
}

html.consumer-ui .contribute-edit-status[data-status="pending"] {
  color: #f9ab00;
}

html.consumer-ui .contribute-edit-status[data-status="in_review"] {
  color: #1a73e8;
}

html.consumer-ui .contribute-edit-status[data-status="approved"],
html.consumer-ui .contribute-edit-status[data-status="published"] {
  color: #188038;
}

html.consumer-ui .contribute-edit-status[data-status="rejected"] {
  color: #d93025;
}

html.consumer-ui .contribute-edit-status[data-status="hidden"] {
  color: #5f6368;
}

html.consumer-ui body.map-measure-active #map,
html.consumer-ui body.map-add-place-pick #map {
  cursor: crosshair !important;
}

/* Google Maps–style my-location blue dot */
html.consumer-ui .gm-blue-dot {
  position: relative;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

html.consumer-ui .gm-blue-dot-core {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #1a73e8;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.4);
  z-index: 2;
}

html.consumer-ui .gm-blue-dot-heading {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 24px solid rgba(26, 115, 232, 0.38);
  transform: translate(-50%, -100%);
  transform-origin: 50% 100%;
  pointer-events: none;
  z-index: 1;
}

html.consumer-ui .gm-blue-dot-heading[hidden] {
  display: none !important;
}

html.consumer-ui .gm-blue-dot-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(26, 115, 232, 0.28);
  animation: gm-blue-dot-pulse 2.2s ease-out infinite;
  z-index: 0;
}

@keyframes gm-blue-dot-pulse {
  0% { transform: scale(0.55); opacity: 0.7; }
  70% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html.consumer-ui .gm-blue-dot-pulse {
    animation: none;
    opacity: 0.35;
    transform: scale(1);
  }
}

/* Locate control: locating / tracking / needs-recenter (GM) */
html.consumer-ui #ctrlLocate {
  color: #5f6368;
  transition: color 0.15s ease, opacity 0.15s ease;
}

html.consumer-ui #ctrlLocate[aria-pressed='true'],
html.consumer-ui #ctrlLocate.is-tracking {
  color: #1a73e8;
}

html.consumer-ui #ctrlLocate.is-locating {
  color: #1a73e8;
  opacity: 0.72;
}

html.consumer-ui #ctrlLocate.is-needs-recenter {
  color: #1a73e8;
}

html.consumer-ui #ctrlLocate.is-needs-recenter svg {
  filter: drop-shadow(0 0 0.5px #1a73e8);
}

/* Google Maps–style dropped pin card (bottom center) */
html.consumer-ui .dropped-pin-card {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 70;
  width: min(420px, calc(100vw - 32px));
  padding: 16px 16px 14px;
  border-radius: 8px;
  background: #fff;
  color: #202124;
  box-shadow:
    0 1px 2px rgba(60, 64, 67, 0.3),
    0 2px 6px 2px rgba(60, 64, 67, 0.15);
}

html.consumer-ui .dropped-pin-card[hidden] {
  display: none !important;
}

html.consumer-ui .dropped-pin-close {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5f6368;
  display: grid;
  place-items: center;
  cursor: pointer;
}

html.consumer-ui .dropped-pin-close:hover {
  background: #f1f3f4;
}

/* Clickable body expands to the left place panel (Google Maps). */
html.consumer-ui .dropped-pin-body {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  padding-inline-end: 28px;
  border: 0;
  background: transparent;
  text-align: start;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

html.consumer-ui .dropped-pin-body:hover .dropped-pin-title {
  color: var(--m-primary, #007F87);
}

html.consumer-ui .dropped-pin-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 500;
  color: #202124;
}

html.consumer-ui .dropped-pin-address {
  margin: 0 0 4px;
  font-size: 13px;
  color: #5f6368;
  line-height: 1.35;
}

html.consumer-ui .dropped-pin-coords {
  margin: 0;
  font-family: 'SF UI Display', Roboto, Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  direction: ltr;
  unicode-bidi: isolate;
  color: #202124;
}

/* Google Maps desktop grey dropped-pin marker */
html.consumer-ui .gm-dropped-pin-marker {
  position: relative;
  width: 28px;
  height: 36px;
  pointer-events: none;
}

html.consumer-ui .gm-dropped-pin-head {
  position: absolute;
  left: 50%;
  top: 0;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #70757a;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(60, 64, 67, 0.45);
}

html.consumer-ui .gm-dropped-pin-stem {
  display: none;
}

html.consumer-ui .dropped-pin-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

html.consumer-ui .dropped-pin-actions::-webkit-scrollbar {
  display: none;
}

html.consumer-ui .dropped-pin-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  border: 1px solid var(--m-border, #dadce0);
  border-radius: 999px;
  background: #fff;
  color: var(--m-primary, #007F87);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  min-height: 36px;
  cursor: pointer;
  white-space: nowrap;
}

html.consumer-ui .dropped-pin-action svg {
  flex: 0 0 auto;
  color: inherit;
}

html.consumer-ui .dropped-pin-action.is-primary {
  background: var(--m-primary, #007F87);
  border-color: var(--m-primary, #007F87);
  color: #fff;
}

html.consumer-ui .dropped-pin-action:hover {
  background: var(--m-selected, #BDEBF0);
}

html.consumer-ui .dropped-pin-action.is-primary:hover {
  filter: brightness(0.95);
  background: var(--m-primary, #007F87);
}

/* Floating map-pick HUD — origin / destination / via on the map */
html.consumer-ui .map-pick-hud {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 110;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(440px, calc(100vw - 24px));
  padding: 10px 10px 10px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--m-text, #202124);
  box-shadow: var(--m-shadow-float, 0 6px 24px rgba(16, 24, 40, 0.12));
  border: 1px solid var(--m-border, rgba(16, 24, 40, 0.08));
  pointer-events: auto;
}

html.consumer-ui .map-pick-hud[hidden] {
  display: none !important;
}

html.consumer-ui .map-pick-hud-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.18);
}

html.consumer-ui .map-pick-hud[data-role='dest'] .map-pick-hud-dot {
  background: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
}

html.consumer-ui .map-pick-hud[data-role='via'] .map-pick-hud-dot {
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

html.consumer-ui .map-pick-hud-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

html.consumer-ui .map-pick-hud-cancel {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--m-selected, #BDEBF0);
  color: var(--m-primary, #007F87);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  cursor: pointer;
  white-space: nowrap;
}

html.consumer-ui .map-pick-hud-cancel:hover {
  filter: brightness(0.97);
}

html.consumer-ui.map-pick-active #map.map-pick-active,
html.consumer-ui body.map-pick-origin #map,
html.consumer-ui body.map-pick-dest #map,
html.consumer-ui body.map-pick-via #map {
  cursor: crosshair;
}

/* Directions OD editable fields + suggest (Google Maps) */
html.consumer-ui .od-chip {
  position: relative;
}

html.consumer-ui .od-clear[hidden] {
  display: none !important;
}

html.consumer-ui .od-edit.value,
html.consumer-ui .directions-panel .od-edit.value {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #202124;
  outline: none;
}

html.consumer-ui .od-suggest-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  max-height: min(320px, 46vh);
  overflow: auto;
  overscroll-behavior: contain;
  isolation: isolate;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  box-shadow:
    0 1px 2px rgba(60, 64, 67, 0.3),
    0 2px 6px 2px rgba(60, 64, 67, 0.15);
}

html.consumer-ui .od-suggest-list[hidden] {
  display: none !important;
}

html.consumer-ui .od-suggest-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: start;
  border: 0;
  background: #fff;
  padding: 12px 14px;
  font: inherit;
  color: #202124;
  cursor: pointer;
  position: relative;
}

html.consumer-ui .od-suggest-row:hover,
html.consumer-ui .od-suggest-row.is-active {
  background: #f1f3f4;
}

html.consumer-ui .od-suggest-icon {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  color: #5f6368;
}

html.consumer-ui .od-suggest-glyph {
  font-size: 16px;
  line-height: 1;
}

html.consumer-ui .od-suggest-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
}

html.consumer-ui .od-suggest-title {
  display: block;
  position: static;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  color: #202124;
  white-space: normal;
}

html.consumer-ui .od-suggest-sub {
  display: block;
  position: static;
  font-size: 12px;
  line-height: 1.35;
  color: #70757a;
  white-space: normal;
}

/* Layers menu follows the control when a side panel is open (desktop). */
@media (min-width: 901px) {
  /* Desktop already has zoom / 3D on the bottom-right stack — hide the
     duplicate tools row inside the layers menu (mobile keeps it). */
  html.consumer-ui .layers-menu .map-tools-section,
  html.consumer-ui #mapToolsSection {
    display: none !important;
  }

  html.consumer-ui.place-panel-open .layers-menu,
  html.consumer-ui.directions-panel-open .layers-menu,
  html.consumer-ui.search-chrome-docked .layers-menu,
  html.consumer-ui.library-panel-open .layers-menu,
  html.consumer-ui.contribute-panel-open .layers-menu {
    left: calc(var(--nav-chrome-left) + var(--side-panel-w) + 12px);
    right: auto;
    bottom: calc(max(24px, env(safe-area-inset-bottom)) + 72px);
    transition: left 0.18s ease;
  }
}

/* JS layout class mirrors the breakpoint (resize without relying only on media). */
html.consumer-ui body.layout-desktop .layers-menu .map-tools-section,
html.consumer-ui body.layout-desktop #mapToolsSection {
  display: none !important;
}

/* Desktop search card: clean Google Maps omnibox — menu + account live in the
   left rail; voice/pin/directions are mobile-only. */
@media (min-width: 901px) {
  html.consumer-ui .nav-menu-fab,
  html.consumer-ui #navMenuBtn,
  html.consumer-ui .search-account-fab,
  html.consumer-ui #searchAccountBtn,
  html.consumer-ui .search-voice-btn,
  html.consumer-ui #searchVoiceBtn,
  html.consumer-ui .search-pill > .mobile-search-mark,
  html.consumer-ui .search-pill > #mobileSearchMark,
  html.consumer-ui .search-pill > .search-pill-directions,
  html.consumer-ui .search-pill > #searchPillDirections,
  html.consumer-ui .search-pill > .search-pill-divider {
    display: none !important;
  }

  /* Pashto rail label: Yekan Bakh often lacks ښ — use IRANSans for پښتو. */
  html.consumer-ui .dock-lang-btn[data-locale='ps'] {
    font-family: 'IRANSans FaNum', 'Noto Naskh Arabic', Tahoma, Arial, sans-serif;
    letter-spacing: 0;
    line-height: 1.35;
  }

  html.consumer-ui .dock-lang-btn[data-locale='fa'] {
    font-family: 'Yekan Bakh FaNum', Tahoma, Arial, sans-serif;
    line-height: 1.35;
  }

  html.consumer-ui .dock-lang-btn[data-locale='en'] {
    line-height: 1.35;
  }
}

html.consumer-ui body.layout-desktop .nav-menu-fab,
html.consumer-ui body.layout-desktop #navMenuBtn,
html.consumer-ui body.layout-desktop .search-account-fab,
html.consumer-ui body.layout-desktop #searchAccountBtn,
html.consumer-ui body.layout-desktop .search-voice-btn,
html.consumer-ui body.layout-desktop #searchVoiceBtn,
html.consumer-ui body.layout-desktop .search-pill > .mobile-search-mark,
html.consumer-ui body.layout-desktop .search-pill > #mobileSearchMark,
html.consumer-ui body.layout-desktop .search-pill > .search-pill-directions,
html.consumer-ui body.layout-desktop .search-pill > #searchPillDirections,
html.consumer-ui body.layout-desktop .search-pill > .search-pill-divider,
/*
 * Mobile shell chrome must never paint on desktop. These rules used to live only
 * inside mobile-redesign.css @media (min-width: 901px), but that file is linked
 * with media=(max-width: 900px) so the hide never applied — leaving the bottom
 * nav / dirs FAB as a stray “other section” strip on desktop Explore.
 */
html.consumer-ui body.layout-desktop .mobile-bottom-nav,
html.consumer-ui body.layout-desktop .mobile-dirs-fab,
html.consumer-ui body.layout-desktop .mobile-map-scrim,
html.consumer-ui body.layout-desktop .mobile-google-status,
html.consumer-ui body.layout-desktop .mobile-sheet-toolbar,
html.consumer-ui body.layout-desktop .mobile-layers-head,
html.consumer-ui body.layout-desktop .mobile-account-tools,
html.consumer-ui body.layout-desktop .mobile-account-close {
  display: none !important;
}

/* Also hide when layout class lags a resize — match viewport, not only body class. */
@media (min-width: 901px) {
  html.consumer-ui .mobile-bottom-nav,
  html.consumer-ui .mobile-dirs-fab,
  html.consumer-ui .mobile-map-scrim,
  html.consumer-ui .mobile-google-status,
  html.consumer-ui .mobile-sheet-toolbar,
  html.consumer-ui .mobile-layers-head,
  html.consumer-ui .mobile-account-tools,
  html.consumer-ui .mobile-account-close,
  html.consumer-ui .search-account-fab,
  html.consumer-ui .search-voice-btn,
  html.consumer-ui .search-pill-mark,
  html.consumer-ui .search-pill-mark-glyph {
    display: none !important;
  }
}

html.consumer-ui body.layout-desktop .dock-lang-btn[data-locale='ps'] {
  font-family: 'IRANSans FaNum', 'Noto Naskh Arabic', Tahoma, Arial, sans-serif;
  letter-spacing: 0;
  line-height: 1.35;
}

/* Google Maps–style measure distance card */
html.consumer-ui .measure-distance-card {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: min(320px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 8px;
  background: #fff;
  color: #202124;
  box-shadow:
    0 1px 2px rgba(60, 64, 67, 0.3),
    0 2px 6px 2px rgba(60, 64, 67, 0.15);
}

html.consumer-ui .measure-distance-card[hidden] {
  display: none !important;
}

html.consumer-ui .measure-distance-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 2px;
}

html.consumer-ui .measure-distance-copy strong {
  font-family: 'SF UI Display', Roboto, Arial, sans-serif;
  font-size: 18px;
  font-weight: 500;
  direction: ltr;
  unicode-bidi: isolate;
}

html.consumer-ui .measure-distance-secondary {
  display: block;
  font-family: 'SF UI Display', Roboto, Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #5f6368;
  direction: ltr;
  unicode-bidi: isolate;
}

html.consumer-ui .measure-distance-secondary[hidden] {
  display: none !important;
}

html.consumer-ui .measure-distance-copy span {
  font-size: 12px;
  color: #5f6368;
  line-height: 1.35;
}

html.consumer-ui .measure-distance-close {
  flex: 0 0 auto;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #1a73e8;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 10px;
  cursor: pointer;
}

html.consumer-ui .measure-distance-close:hover {
  background: #e8f0fe;
}

html.consumer-ui .map-data-report-coords {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8f9fa;
  font-family: 'SF UI Display', Roboto, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  direction: ltr;
  unicode-bidi: isolate;
  color: #202124;
}

@media (max-width: 900px) {
  html.consumer-ui .map-context-menu {
    display: none !important;
  }
}

/* Route results: readable metrics and actions on both phone and desktop. */
html.consumer-ui #routeSummary {
  padding: 20px;
  margin-block: 14px 0;
  border: 1px solid #e1eaea;
  border-radius: 20px;
  background: #fff;
  color: #203438;
  text-align: start;
  line-height: 1.6;
}
html.consumer-ui .route-traffic-badge {
  display: inline-flex;
  align-items: center;
  margin-inline-start: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  vertical-align: middle;
  background: #e8f0fe;
  color: #174ea6;
}
html.consumer-ui .route-traffic-badge[data-level="free"] {
  background: #e6f4ea;
  color: #137333;
}
html.consumer-ui .route-traffic-badge[data-level="light"] {
  background: #fef7e0;
  color: #b06000;
}
html.consumer-ui .route-traffic-badge[data-level="moderate"] {
  background: #feefc3;
  color: #e37400;
}
html.consumer-ui .route-traffic-badge[data-level="heavy"] {
  background: #fce8e6;
  color: #c5221f;
}
html.consumer-ui .route-traffic-level[data-level="free"] { color: #137333; }
html.consumer-ui .route-traffic-level[data-level="light"] { color: #1a73e8; }
html.consumer-ui .route-traffic-level[data-level="moderate"] { color: #e37400; }
html.consumer-ui .route-traffic-level[data-level="heavy"] { color: #c5221f; }
html.consumer-ui .route-result-label {
  font-size: 13px;
  color: #627579;
}
html.consumer-ui .route-result-metrics {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 4px;
}
html.consumer-ui .route-result-duration {
  color: #087f83;
  font-size: 27px;
  line-height: 1.5;
  font-weight: 700;
}
html.consumer-ui .route-result-distance {
  font-size: 15px;
  color: #52676b;
}
html.consumer-ui .route-result-arrival {
  margin: 6px 0 0;
  font-size: 14px;
}
html.consumer-ui .route-result-arrival bdi {
  margin-inline-start: 6px;
  font-weight: 600;
}
html.consumer-ui .route-result-note {
  margin: 8px 0 0;
  color: #627579;
  font-size: 12px;
}
html.consumer-ui #routeSummary .start-nav-row { margin: 18px 0; }
html.consumer-ui #routeSummary .start-nav-btn {
  min-height: 50px;
  border-radius: 15px;
  background: #087f83;
  box-shadow: none;
  font-size: 15px;
  font-weight: 600;
}
html.consumer-ui #routeSummary .route-alt-list {
  gap: 8px;
  margin: 16px 0;
}
html.consumer-ui #routeSummary .route-alt-card {
  min-height: 70px;
  padding: 12px 14px;
  border: 1px solid #e1eaea;
  border-radius: 15px;
  background: #fff;
  color: #203438;
  gap: 5px;
}
html.consumer-ui #routeSummary .route-alt-card[aria-pressed='true'] {
  border-color: #087f83;
  background: #edf8f6;
  box-shadow: inset 3px 0 #087f83;
}
html.consumer-ui[dir='rtl'] #routeSummary .route-alt-card[aria-pressed='true'] {
  box-shadow: inset -3px 0 #087f83;
}
html.consumer-ui .route-alt-label { font-size: 12px; color: #627579; }
html.consumer-ui .route-alt-card strong {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  font-size: 16px;
}
html.consumer-ui .route-alt-distance { font-weight: 400; font-size: 13px; color: #627579; }
html.consumer-ui #routeSummary details { border-top: 1px solid #e5ecec; }
html.consumer-ui #routeSummary summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding-block: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  list-style: none;
}
html.consumer-ui #routeSummary summary::-webkit-details-marker { display: none; }
html.consumer-ui #routeSummary summary::after {
  content: '';
  margin-inline-start: auto;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #627579;
  border-bottom: 1.5px solid #627579;
  transform: rotate(45deg);
}
html.consumer-ui #routeSummary details[open] > summary::after { transform: rotate(225deg); }
html.consumer-ui .route-step-count {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  padding: 1px 6px;
  border-radius: 8px;
  background: #f0f5f5;
  color: #627579;
  font-size: 12px;
}
html.consumer-ui #routeSummary .route-steps {
  max-height: none;
  overflow: visible;
  padding-inline-start: 24px;
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.8;
}
html.consumer-ui .route-steps li { padding: 12px 4px; border-top: 1px solid #edf2f2; }
html.consumer-ui .route-steps li::marker { color: #087f83; font-weight: 600; }
html.consumer-ui .route-step-road,
html.consumer-ui .route-step-distance { display: block; font-size: 12px; color: #627579; }
html.consumer-ui #routeSummary .route-eta-block {
  margin: 0 0 12px;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: #f5f8f8;
}
html.consumer-ui #routeSummary .route-eta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  margin: 0 0 10px;
  font-size: 13px;
}
html.consumer-ui .route-eta-note { margin: 0; color: #627579; font-size: 12px; line-height: 1.8; }
html.consumer-ui .transit-leg-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
html.consumer-ui .transit-leg {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8f5ff;
  border-inline-start: 4px solid var(--transit-line, #7c3aed);
}
html.consumer-ui .transit-leg--access,
html.consumer-ui .transit-leg--egress,
html.consumer-ui .transit-leg--transfer {
  background: #f8f9fa;
  border-inline-start-color: #5f6368;
}
html.consumer-ui .transit-leg-mode {
  font-size: 12px;
  font-weight: 700;
  color: #5b21b6;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
html.consumer-ui .transit-line-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
html.consumer-ui .transit-leg--access .transit-leg-mode,
html.consumer-ui .transit-leg--egress .transit-leg-mode,
html.consumer-ui .transit-leg--transfer .transit-leg-mode {
  color: #3c4043;
}
html.consumer-ui .transit-leg-instruction {
  font-size: 14px;
  font-weight: 600;
  color: #202124;
  line-height: 1.45;
}
html.consumer-ui .transit-leg-stops {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #3c4043;
}
html.consumer-ui .transit-leg-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 12px;
  color: #5f6368;
}
html.consumer-ui .transit-leg-wait {
  color: #1a73e8;
  font-weight: 600;
}
html.consumer-ui .transit-scope-chip {
  display: inline-block;
  margin-inline-end: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
html.consumer-ui .transit-scope-chip--urban {
  background: #e8f0fe;
  color: #174ea6;
}
html.consumer-ui .transit-scope-chip--intercity {
  background: #f3e8ff;
  color: #5b21b6;
}
html.consumer-ui .transit-disclaimer {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.5;
  color: #5f6368;
}

/* Local tips + ratings (lighter than full reviews) */
html.consumer-ui .place-community-summary {
  margin: 6px 0 2px;
}
html.consumer-ui .place-rating-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: #f8f9fa;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  cursor: pointer;
  color: #202124;
}
html.consumer-ui .place-rating-chip:hover { background: #e8eaed; }
html.consumer-ui .place-rating-stars {
  color: #f9ab00;
  letter-spacing: 1px;
  font-size: 13px;
}
html.consumer-ui .place-rating-avg {
  font-weight: 700;
  font-size: 14px;
}
html.consumer-ui .place-rating-count {
  font-size: 12px;
  color: #5f6368;
}
html.consumer-ui .place-tips-section {
  margin: 14px 0 8px;
  padding-top: 12px;
  border-top: 1px solid #e8eaed;
}
html.consumer-ui .place-tips-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
html.consumer-ui .place-tips-head .place-detail-section-title { margin: 0; }
html.consumer-ui .place-tips-add {
  border: 0;
  background: none;
  color: #1a73e8;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}
html.consumer-ui .place-tips-lead,
html.consumer-ui .place-tips-empty {
  margin: 0 0 10px;
  font-size: 12px;
  color: #5f6368;
  line-height: 1.45;
}
html.consumer-ui .place-tips-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
html.consumer-ui .place-tip-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8f9fa;
}
html.consumer-ui .place-tip-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 12px;
  color: #3c4043;
}
html.consumer-ui .place-tip-item-stars { color: #f9ab00; letter-spacing: 0.5px; }
html.consumer-ui .place-tip-item-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #202124;
  white-space: pre-wrap;
}
html.consumer-ui .place-tip-star-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 0;
  border: 0;
  padding: 0;
}
html.consumer-ui .place-tip-star-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #f9ab00;
  cursor: pointer;
}
html.consumer-ui .place-tip-counter {
  margin: -4px 0 0;
  text-align: end;
  font-size: 12px;
  color: #5f6368;
}

html.consumer-ui .place-report-details {
  display: grid;
  gap: 10px;
  margin: 0 0 4px;
}
html.consumer-ui .place-photo-preview {
  margin: 4px 0 8px;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f3f4;
  max-height: 220px;
}
html.consumer-ui .place-photo-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: cover;
}
html.consumer-ui .place-photo-file-field input[type="file"] {
  font: inherit;
  font-size: 13px;
}
html.consumer-ui .contribute-reviews-list,
html.consumer-ui .contribute-photos-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0 12px;
}
html.consumer-ui .contribute-edit-icon.is-review {
  background: #fef7e0;
  color: #f9ab00;
  font-size: 18px;
}
@media (max-width: 720px) {
  html.consumer-ui .contribute-meta-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  html.consumer-ui .contribute-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  html.consumer-ui .contribute-action {
    min-height: 52px;
    touch-action: manipulation;
  }
  html.consumer-ui .contribute-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
}
html.consumer-ui .contribute-photo-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 12px;
  background: #f8f9fa;
  text-align: start;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
html.consumer-ui .contribute-photo-row:hover {
  background: #f1f3f4;
}
html.consumer-ui .contribute-photo-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: #e8eaed;
}
html.consumer-ui .contribute-photo-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
html.consumer-ui .contribute-photo-copy strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.consumer-ui .contribute-photo-copy small {
  font-size: 12px;
  color: #5f6368;
}

html.consumer-ui .local-share-status {
  margin: 0 0 8px;
  font-size: 13px;
  color: #5f6368;
}
html.consumer-ui .local-share-preview {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8f9fa;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.45;
  min-height: 4.5em;
}
html.consumer-ui .local-share-url-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin: 0 0 14px;
}
html.consumer-ui .local-share-url {
  flex: 1;
  min-width: 0;
  border: 1px solid #dadce0;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  background: #fff;
  color: #202124;
}
html.consumer-ui .local-share-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
html.consumer-ui .local-share-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 16px;
  cursor: pointer;
}
html.consumer-ui .local-share-whatsapp:hover { filter: brightness(0.96); }
html.consumer-ui .local-share-whatsapp:disabled,
html.consumer-ui .local-share-dialog.is-busy .local-share-whatsapp {
  opacity: 0.65;
  cursor: wait;
}

html.consumer-ui .search-suggest-labels {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #e8eaed;
}
html.consumer-ui .search-suggest-label-row {
  display: flex;
  align-items: stretch;
}
html.consumer-ui .search-suggest-label-row .search-suggest-home {
  flex: 1;
  border: 0;
  border-radius: 0;
}
html.consumer-ui .search-suggest-label-go {
  border: 0;
  background: #fff;
  color: #1a73e8;
  padding: 0 14px;
  cursor: pointer;
}
html.consumer-ui .search-suggest-label-go:hover { background: #f8f9fa; }
html.consumer-ui .user-library-labels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 14px;
}
html.consumer-ui .user-library-label-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 14px;
  background: #f8f9fa;
  padding: 12px;
  text-align: start;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
html.consumer-ui .user-library-label-card:hover { background: #e8eaed; }
html.consumer-ui .user-library-label-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
html.consumer-ui .user-library-label-copy strong { font-size: 14px; }
html.consumer-ui .user-library-label-copy small {
  font-size: 12px;
  color: #5f6368;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.consumer-ui .user-library-label-go { color: #1a73e8; }
html.consumer-ui .user-library-list-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: #f8f9fa;
  padding: 12px 14px;
  text-align: start;
  cursor: pointer;
  font: inherit;
  margin-bottom: 8px;
}
html.consumer-ui .user-library-list-card:hover { background: #e8eaed; }
html.consumer-ui .user-library-list-card .name { font-weight: 600; font-size: 14px; }
html.consumer-ui .user-library-list-card .meta { font-size: 12px; color: #5f6368; }
html.consumer-ui .save-place-labels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 12px;
}
html.consumer-ui .save-place-label-btn {
  border: 0;
  border-radius: 999px;
  background: #e8f0fe;
  color: #174ea6;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 12px;
  cursor: pointer;
}
html.consumer-ui .save-place-lists {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 10px;
  max-height: 220px;
  overflow: auto;
}
html.consumer-ui .save-place-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
}
html.consumer-ui #routeSummary button:focus-visible,
html.consumer-ui #routeSummary summary:focus-visible {
  outline: 2px solid #087f83;
  outline-offset: 3px;
}
@media (max-width: 400px) {
  html.consumer-ui #routeSummary { padding: 16px; }
  html.consumer-ui .route-result-duration { font-size: 24px; }
}

/* —— Offline maps sheet (region pack download) —— */
html.consumer-ui .offline-maps-sheet {
  position: fixed;
  inset: 0;
  z-index: 12050;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
html.consumer-ui .offline-maps-sheet[hidden] { display: none !important; }
html.consumer-ui .offline-maps-sheet:not([hidden]) { pointer-events: auto; }
html.consumer-ui .offline-maps-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(32, 33, 36, 0.46);
  cursor: pointer;
}
html.consumer-ui .offline-maps-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(88vh, 760px);
  overflow: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
  padding: 14px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (min-width: 901px) {
  html.consumer-ui .offline-maps-sheet {
    align-items: center;
  }
  html.consumer-ui .offline-maps-card {
    border-radius: 16px;
    max-height: min(80vh, 720px);
  }
}
html.consumer-ui .offline-maps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
html.consumer-ui .offline-maps-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #202124;
}
html.consumer-ui .offline-maps-close {
  border: 0;
  background: transparent;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #5f6368;
  cursor: pointer;
  display: grid;
  place-items: center;
}
html.consumer-ui .offline-maps-close:hover { background: #f1f3f4; }
html.consumer-ui .offline-maps-mode,
html.consumer-ui .offline-maps-status,
html.consumer-ui .offline-maps-footnote {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #5f6368;
}
html.consumer-ui .offline-maps-force {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8f9fa;
}
html.consumer-ui .offline-maps-force strong {
  display: block;
  font-size: 14px;
  color: #202124;
}
html.consumer-ui .offline-maps-force small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #5f6368;
  line-height: 1.4;
}
html.consumer-ui .offline-maps-force input {
  width: 40px;
  height: 22px;
  accent-color: #1a73e8;
}
html.consumer-ui .offline-maps-progress {
  display: grid;
  gap: 8px;
}
html.consumer-ui .offline-maps-progress-track {
  height: 6px;
  border-radius: 999px;
  background: #e8eaed;
  overflow: hidden;
}
html.consumer-ui .offline-maps-progress-bar {
  height: 100%;
  width: 0;
  background: #1a73e8;
  transition: width 0.15s ease;
}
html.consumer-ui .offline-maps-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #5f6368;
}
html.consumer-ui .offline-maps-section-title {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #202124;
  text-transform: none;
}
html.consumer-ui .offline-maps-filter {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #dadce0;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  background: #fff;
}
html.consumer-ui .offline-maps-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
html.consumer-ui .offline-maps-list--catalog {
  max-height: 280px;
  overflow: auto;
  padding-bottom: 4px;
}
html.consumer-ui .offline-maps-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8f9fa;
  align-items: center;
}
html.consumer-ui .offline-maps-row.is-active {
  outline: 2px solid #1a73e8;
  background: #e8f0fe;
}
html.consumer-ui .offline-maps-row-title {
  grid-column: 1;
  grid-row: 1;
  font-size: 14px;
  font-weight: 600;
  color: #202124;
}
html.consumer-ui .offline-maps-row-sub {
  grid-column: 1;
  grid-row: 2;
  font-size: 12px;
  color: #5f6368;
}
html.consumer-ui .offline-maps-row-actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}
html.consumer-ui .offline-maps-btn {
  border: 1px solid #dadce0;
  background: #fff;
  color: #1a73e8;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
html.consumer-ui .offline-maps-btn:hover { background: #f1f3f4; }
html.consumer-ui .offline-maps-btn:disabled { opacity: 0.5; cursor: not-allowed; }
html.consumer-ui .offline-maps-btn-primary {
  background: #1a73e8;
  border-color: #1a73e8;
  color: #fff;
}
html.consumer-ui .offline-maps-btn-primary:hover { background: #1765cc; }
html.consumer-ui .offline-maps-btn-danger { color: #d93025; border-color: #f6aea9; }
html.consumer-ui .offline-maps-empty {
  margin: 0;
  padding: 8px 4px;
  font-size: 13px;
  color: #5f6368;
}
html.consumer-ui .offline-maps-open-link {
  display: inline-flex;
  align-items: center;
  margin: 6px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: #1a73e8;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
html.consumer-ui .offline-maps-open-link:hover { color: #174ea6; }

html.consumer-ui .local-share-status {
  margin: 0 0 8px;
  font-size: 13px;
  color: #5f6368;
}
html.consumer-ui .local-share-preview {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8f9fa;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.45;
  min-height: 4.5em;
}
html.consumer-ui .local-share-url-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin: 0 0 14px;
}
html.consumer-ui .local-share-url {
  flex: 1;
  min-width: 0;
  border: 1px solid #dadce0;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  background: #fff;
  color: #202124;
}
html.consumer-ui .local-share-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
html.consumer-ui .local-share-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 16px;
  cursor: pointer;
}
html.consumer-ui .local-share-whatsapp:hover { filter: brightness(0.96); }
html.consumer-ui .local-share-whatsapp:disabled {
  opacity: 0.65;
  cursor: wait;
}
