:root {
  --forest: #234435;
  --green-dark: #006D3D;
  --green: #00864C;
  --lime: #79BE35;
  --lime-dark: #65A92A;
  --orange: #F47714;
  --orange-bright: #FF8A00;
  --sky: #93C9EF;
  --sky-dark: #78B8E5;
  --water: #034C83;
  --water-light: #0A639E;
  --surface: #ffffff;
  --surface-soft: #f6f8f7;
  --surface-raised: #ffffff;
  --text: #18221d;
  --text-soft: #64736b;
  --border: #dfe7e2;
  --shadow: 0 18px 45px rgba(25, 48, 36, .18);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;

  --gmp-mat-color-primary: #006D3D;
  --gmp-mat-color-on-primary: #ffffff;
  --gmp-mat-color-secondary: #79BE35;
  --gmp-mat-color-on-secondary: #18221d;
  --gmp-mat-color-tertiary: #F47714;
  --gmp-mat-color-surface: #ffffff;
  --gmp-mat-color-on-surface: #18221d;
  --gmp-mat-color-surface-container: #ffffff;
  --gmp-mat-color-surface-container-low: #f6f8f7;
  --gmp-mat-color-outline: #dfe7e2;
  --gmp-mat-color-outline-variant: #edf2ef;
  --gmp-mat-color-on-surface-variant: #64736b;
  --gmp-mat-color-positive: #006D3D;
  --gmp-mat-color-negative: #b42318;
  --gmp-mat-font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --gmp-mat-shape-corner-extra-large: 18px;
  --gmp-mat-shape-corner-large: 14px;
  --gmp-mat-shape-corner-medium: 12px;
  --gmp-mat-shape-corner-small: 8px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; color-scheme: light; }
body {
  overflow: hidden;
  background: var(--surface);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
button { cursor: pointer; }
img { display: block; }
[hidden] { display: none !important; }

.app-shell { height: 100dvh; min-height: 100%; display: flex; flex-direction: column; background: var(--surface); }
.topbar {
  height: 78px;
  flex: 0 0 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 18px;
  background: var(--surface-raised);
  border-bottom: 4px solid var(--lime);
  box-shadow: 0 2px 14px rgba(21, 47, 34, .08);
  position: relative;
  z-index: 60;
}
.topbar-brand { min-width: 0; display: flex; align-items: center; gap: 18px; }
.topbar-logo { width: auto; height: 57px; max-width: min(265px, 42vw); object-fit: contain; flex: 0 0 auto; }
.topbar-context { display: flex; align-items: center; gap: 8px; padding-left: 18px; border-left: 1px solid var(--border); color: var(--text-soft); font-size: 12px; white-space: nowrap; }
.topbar-context strong { color: var(--green-dark); }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.button {
  border: 0;
  border-radius: 14px;
  min-height: 44px;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 800;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: scale(.98); }
.button-green { background: var(--green-dark); color: #fff; box-shadow: 0 8px 20px rgba(0,109,61,.22); }
.button-green:hover { background: var(--green); }
.button-light { background: #fff; color: var(--green-dark); border: 1px solid #cfe0d6; box-shadow: none; }
.button-light:hover { background: #f2f7f4; border-color: #a9c9b7; }
.download-icon { font-size: 17px; line-height: 1; font-weight: 900; }
.qr-download-short { display: none; }
.button-small { min-height: 38px; padding: 8px 13px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.button-block { width: 100%; }
.button-icon { width: 18px; height: 18px; border: 1.5px solid currentColor; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; }

.map-stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: #e9efeb; }
.map-canvas { position: absolute; inset: 0; }

.sidebar {
  position: absolute;
  z-index: 30;
  left: 16px;
  top: 16px;
  bottom: 20px;
  width: 384px;
  max-width: calc(100% - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(223,231,226,.9);
  background: var(--surface-raised);
  box-shadow: var(--shadow);
  transform: translateX(calc(-100% - 40px));
  opacity: 0;
  pointer-events: none;
  transition: transform .22s ease, opacity .22s ease;
}
.sidebar.open { transform: translateX(0); opacity: 1; pointer-events: auto; }
body.streetview-active .sidebar { transform: translateX(calc(-100% - 40px)); opacity: 0; pointer-events: none; }

.sidebar-brand-panel { padding: 12px 14px 14px; background: var(--forest); color: #fff; border-bottom: 1px solid rgba(0,109,61,.8); }
.sidebar-search-row { display: flex; align-items: stretch; gap: 8px; margin-bottom: 11px; }
.place-autocomplete-host { flex: 1 1 auto; min-width: 0; min-height: 44px; }
.search-placeholder { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 12px; background: #fff; color: #66746d; font-size: 12px; font-weight: 650; }
.search-placeholder span { color: var(--green-dark); font-size: 18px; line-height: 1; }
.place-autocomplete-host gmp-place-autocomplete { display: block; width: 100%; min-height: 44px; color-scheme: light; --gmp-mat-color-surface: #fff; --gmp-mat-color-on-surface: #202124; --gmp-mat-color-on-surface-variant: #5f6368; --gmp-mat-color-outline: #d8e3dc; --gmp-mat-color-primary: #006D3D; --gmp-mat-font-family: inherit; }
.sidebar-close-button { flex: 0 0 44px; width: 44px; min-height: 44px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 12px; background: rgba(255,255,255,.10); color: #fff; font-size: 25px; line-height: 1; }
.sidebar-close-button:hover { background: rgba(255,255,255,.18); }
.sidebar-close-button:focus-visible { outline: 3px solid rgba(255,255,255,.85); outline-offset: 2px; }
.region-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.eyebrow { display: block; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .11em; color: #d8f0e2; }
.eyebrow.muted { color: var(--text-soft); }
.text-button { border: 0; background: transparent; color: var(--lime); font-weight: 800; font-size: 11px; padding: 3px 0; }
.text-button:hover { color: #fff; }
.region-info { font-size: 11px; line-height: 1.45; background: rgba(0,0,0,.22); border: 1px solid rgba(121,190,53,.25); padding: 9px 10px; border-radius: 12px; margin-bottom: 8px; color: #eaf7ef; }
.region-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 4px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
.region-strip::-webkit-scrollbar { display: none; }
.region-button {
  flex: 0 0 auto;
  min-width: 112px;
  border: 1px solid rgba(147,201,239,.15);
  border-radius: 11px;
  background: rgba(0,109,61,.92);
  color: #fff;
  padding: 8px 13px;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
  scroll-snap-align: start;
}
.region-button:hover { background: var(--green); }
.region-button.active { background: var(--lime); color: #10261a; border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.9); }
.tab-strip { display: flex; gap: 4px; padding: 4px; margin-top: 7px; background: rgba(0,0,0,.32); border: 1px solid rgba(0,109,61,.6); border-radius: 12px; }
.tab-button { flex: 1; border: 0; border-radius: 9px; padding: 7px 8px; background: transparent; color: #cce4d7; font-size: 11px; font-weight: 850; }
.tab-button.active { background: #fff; color: var(--forest); box-shadow: 0 3px 10px rgba(0,0,0,.12); }

.sidebar-content { flex: 1 1 auto; min-height: 0; background: var(--surface-soft); }
.panel-section { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.filter-panel { flex: 0 0 auto; padding: 10px 11px 8px; border-bottom: 1px solid var(--border); background: var(--surface-raised); }
.category-strip { display: flex; gap: 6px; overflow-x: auto; padding: 6px 1px 3px; scrollbar-width: thin; }
.category-button { flex: 0 0 auto; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-soft); color: var(--text); padding: 7px 9px; font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.category-button:hover { border-color: rgba(0,109,61,.45); }
.category-button.active { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.place-search-host {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}
.place-search-host gmp-place-search {
  display: block;
  width: 100%;
  height: 100%;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background-color: #fff;
  color-scheme: light;
  --gmp-card-border-radius: 8px;
  --gmp-dialog-border-radius: 8px;
  --gmp-thumbnail-border-radius: 8px;
  --gmp-mat-color-surface: #fff;
  --gmp-mat-color-on-surface: #202124;
  --gmp-mat-color-on-surface-variant: #5f6368;
  --gmp-mat-color-outline-decorative: #e1e4e8;
  --gmp-mat-color-neutral-container: #f8f9fa;
  --gmp-mat-color-on-neutral-container: #5f6368;
  --gmp-mat-color-secondary-container: #f1f3f4;
  --gmp-mat-color-on-secondary-container: #3c4043;
}

.loading-list { padding: 16px; display: grid; gap: 13px; }
.loading-line { height: 70px; border-radius: 13px; background: linear-gradient(90deg, rgba(100,115,107,.08), rgba(100,115,107,.16), rgba(100,115,107,.08)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.loading-line.wide { height: 94px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.saved-panel { overflow-y: auto; padding: 12px; }
.empty-state { text-align: center; margin: auto; padding: 34px 22px; max-width: 300px; color: var(--text-soft); }
.empty-state strong { display: block; color: var(--text); font-size: 14px; margin-top: 10px; }
.empty-state p { margin: 7px 0 0; font-size: 12px; line-height: 1.5; }
.empty-icon { width: 48px; height: 48px; margin: 0 auto; display: grid; place-items: center; border-radius: 15px; background: rgba(121,190,53,.16); color: var(--green-dark); font-size: 22px; }
.saved-list { display: grid; gap: 10px; }
.saved-card {
  position: relative;
  border: 1px solid #e1e4e8;
  background: #fff;
  border-radius: 11px;
  overflow: hidden;
  box-shadow: none;
}
.saved-card:hover { border-color: #bdc1c6; }
.saved-card-main { padding: 4px 36px 4px 4px; cursor: pointer; }
.saved-card-main:focus-visible { outline: 3px solid rgba(0,109,61,.28); outline-offset: -3px; }
.saved-card gmp-place-details-compact {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: #fff;
  color-scheme: light;
  --gmp-mat-color-surface: #fff;
  --gmp-mat-color-on-surface: #202124;
  --gmp-mat-color-on-surface-variant: #5f6368;
  --gmp-mat-color-outline-decorative: #e1e4e8;
}
.saved-remove { position: absolute; top: 8px; right: 8px; z-index: 2; width: 28px; height: 28px; border: 1px solid #dadce0; border-radius: 50%; background: #fff; color: #3c4043; font-weight: 900; box-shadow: 0 1px 3px rgba(60,64,67,.2); }
.saved-remove:hover { background: #f1f3f4; }

.sidebar-footer { flex: 0 0 auto; display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--border); background: var(--surface-raised); color: var(--text-soft); font-size: 10.5px; }
.culture-lab { color: var(--green-dark); font-weight: 800; }

.mobile-menu-button { display: block; position: absolute; z-index: 40; left: 16px; top: 16px; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.34); border-radius: 50%; background: var(--green-dark); color: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.20); }
.mobile-menu-button:hover { background: var(--green); }
.mobile-menu-button:focus-visible { outline: 3px solid rgba(255,255,255,.9); outline-offset: 2px; }
.hamburger, .hamburger::before, .hamburger::after { content: ""; display: block; width: 18px; height: 2px; background: #fff; border-radius: 3px; position: absolute; left: 12px; top: 20px; }
.hamburger::before { left: 0; top: -6px; }
.hamburger::after { left: 0; top: 6px; }
body.streetview-active .mobile-menu-button { top: 76px; }

.setup-required { position: absolute; z-index: 45; inset: 0; display: grid; place-items: center; align-content: center; text-align: center; padding: 30px; background: rgba(246,248,247,.96); color: var(--text); }
.setup-icon { width: 84px; height: 84px; margin-bottom: 10px; }
.setup-required h1 { font-size: clamp(22px, 3vw, 31px); margin: 4px 0 7px; color: var(--forest); }
.setup-required p { max-width: 560px; margin: 0 0 18px; color: var(--text-soft); line-height: 1.55; }
.map-error { position: absolute; z-index: 55; left: 50%; top: 20px; transform: translateX(-50%); width: min(92%, 650px); padding: 13px 16px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; border-radius: 14px; background: #fff2ef; border: 1px solid #eeb9af; color: #7a271a; box-shadow: 0 12px 30px rgba(0,0,0,.16); font-size: 12px; }
.map-error a { color: inherit; font-weight: 900; }

.app-footer { flex: 0 0 auto; min-height: 38px; padding: 8px 14px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: var(--forest); color: #d7e7df; font-size: 10.5px; }
.footer-brand, .footer-meta { display: flex; align-items: center; gap: 8px; }
.footer-icon { width: 22px; height: 22px; border-radius: 50%; }
.footer-brand strong { color: #fff; }
.footer-destinations { padding-left: 8px; border-left: 1px solid rgba(255,255,255,.17); }
.footer-meta strong:first-of-type { color: #fff; }
.footer-meta .culture-lab { color: var(--sky); }

.modal-layer { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 18px; }
.modal-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(4,15,9,.74); backdrop-filter: blur(5px); }
.modal-card { position: relative; z-index: 1; width: min(100%, 520px); max-height: 92dvh; overflow-y: auto; border: 1px solid var(--border); border-radius: 28px; padding: 28px; background: var(--surface-raised); box-shadow: 0 26px 80px rgba(0,0,0,.34); }
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(100,115,107,.1); color: var(--text-soft); font-size: 25px; line-height: 1; }
.modal-close:hover { background: rgba(100,115,107,.18); color: var(--text); }
.modal-logo { width: min(100%, 390px); margin: 0 auto 10px; height: auto; }
.modal-title { margin: 2px 42px 8px; text-align: center; color: var(--text); font-size: clamp(20px, 4vw, 26px); line-height: 1.15; }
.modal-intro { margin: 4px auto 20px; max-width: 430px; text-align: center; color: var(--text-soft); line-height: 1.55; font-size: 13px; }
.modal-region-card { padding: 14px; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 17px; margin-bottom: 16px; }
.modal-region-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 9px; font-size: 12px; font-weight: 750; color: var(--text); }
.modal-region-grid span { display: block; }
.modal-region-grid span::first-letter { color: var(--green-dark); }
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--border); color: var(--text-soft); font-size: 10.5px; }

/* Places UI Kit styling uses documented host properties/custom properties only. */
gmp-place-search,
gmp-place-details-compact { --gmp-mat-font-family: inherit; }

/* Place result: one clean white surface with an app-owned, high-contrast close control. */
.place-popup {
  position: relative;
  width: 320px;
  max-width: 100%;
  overflow: hidden;
  background: #fff;
  color: #202124;
  border-radius: 10px;
  --gmp-mat-color-surface: #fff;
  --gmp-mat-color-on-surface: #202124;
  --gmp-mat-color-on-surface-variant: #5f6368;
  --gmp-mat-color-outline-decorative: #e1e4e8;
  --gmp-mat-color-secondary-container: #f1f3f4;
  --gmp-mat-color-on-secondary-container: #3c4043;
}
.place-popup gmp-place-details-compact { display: block; border: 0; border-radius: 0; background: #fff; color-scheme: light; }
.place-popup-close {
  position: absolute;
  z-index: 5;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #dadce0;
  border-radius: 50%;
  background: rgba(255,255,255,.98);
  color: #202124;
  box-shadow: 0 1px 4px rgba(60,64,67,.28);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}
.place-popup-close:hover { background: #f1f3f4; }
.place-popup-close:focus-visible { outline: 3px solid rgba(0,109,61,.28); outline-offset: 2px; }
.place-popup-actions { padding: 8px 10px 10px; border-top: 1px solid #eceff1; background: #fff; }
.place-popup-save { width: 100%; min-height: 39px; border: 0; border-radius: 8px; background: var(--green-dark); color: #fff; font-weight: 850; }
.place-popup-save:hover { background: var(--green); }
.place-popup-save.saved { background: var(--lime-dark); color: #132419; }

.marker-pin { width: 34px; height: 34px; border: 2px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--green-dark); box-shadow: 0 4px 12px rgba(0,0,0,.28); display: grid; place-items: center; transition: transform .14s ease, background .14s ease; }
.marker-pin::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.marker-pin:hover { transform: rotate(-45deg) scale(1.1); }
.marker-pin.selected { background: var(--orange); transform: rotate(-45deg) scale(1.2); box-shadow: 0 0 0 5px rgba(244,119,20,.22), 0 5px 14px rgba(0,0,0,.3); }
.marker-pin.saved { background: var(--lime-dark); }

.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

@media (max-width: 1100px) {
  .topbar-context { display: none; }
  .footer-destinations { display: none; }
}

@media (max-width: 640px) {
  .topbar { height: 64px; flex-basis: 64px; padding: 6px 9px; border-bottom-width: 3px; gap: 8px; }
  .topbar-logo { height: 50px; max-width: min(205px, 49vw); }
  .topbar-actions { gap: 5px; }
  .button-small { min-height: 34px; padding: 7px 9px; font-size: 9px; letter-spacing: .055em; }
  .button-small .button-icon { display: none; }
  .qr-download-button { padding-inline: 9px; }
  .qr-download-label { display: none; }
  .qr-download-short { display: inline; }
  .download-icon { font-size: 18px; }
  .app-footer { display: none; }
  .sidebar { top: 12px; bottom: 12px; left: 12px; width: calc(100% - 24px); max-width: 410px; transform: translateX(calc(-100% - 30px)); }
  .sidebar.open { transform: translateX(0); }
  body.streetview-active .sidebar { transform: translateX(calc(-100% - 40px)); }
  .mobile-menu-button { left: 14px; top: 14px; }
  .modal-card { padding: 22px 18px 18px; border-radius: 23px; }
  .modal-logo { max-width: 350px; }
  .modal-region-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
}

@media (max-width: 390px) {
  .topbar-logo { max-width: 184px; }
  .button-small { padding-inline: 8px; }
  .sidebar-brand-panel { padding: 10px 11px 11px; }
  .sidebar-search-row { margin-bottom: 9px; }
  .region-button { min-width: 108px; font-size: 10px; padding-inline: 11px; }
  .modal-region-grid { grid-template-columns: 1fr; }
}
