﻿:root {
  --topbar-height: 65px;
  --ink: #15201b;
  --muted: #66746e;
  --soft: #edf3ef;
  --panel: #ffffff;
  --line: #dbe5df;
  --line-strong: #bdcbc4;
  --green: #08785f;
  --green-deep: #035642;
  --neutral: #7b8983;
  --coral: #c84d3d;
  --amber: #b87508;
  --violet: #6f63b7;
  --sky: #287c99;
  --shadow: 0 18px 42px rgba(21, 32, 27, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(8, 120, 95, 0.06), rgba(255, 255, 255, 0) 320px),
    #f5f8f6;
  font-family: "Nunito Sans", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-optical-sizing: auto;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  height: 100vh;
  height: 100svh;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 252, 250, 0.92);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--green-deep), var(--green) 58%, var(--sky));
  box-shadow: 0 10px 22px rgba(3, 86, 66, 0.2);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0;
  flex: 0 0 auto;
}

.brand-copy {
  display: grid;
  min-width: 0;
}

.brand-name {
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.1;
}

.brand-tag {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 3px;
}

.search-wrap {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(21, 32, 27, 0.06);
}

.search-kicker {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 1rem;
}

.search-wrap input::-webkit-search-cancel-button {
  display: none;
}

.search-clear {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.search-clear:hover,
.search-clear:focus-visible {
  color: var(--green-deep);
  background: var(--soft);
  border-color: var(--line);
  outline: 0;
}

.search-wrap:focus-within {
  border-color: var(--green);
  box-shadow:
    0 0 0 3px rgba(8, 120, 95, 0.12),
    0 10px 26px rgba(21, 32, 27, 0.06);
}

.window-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 8px;
}

.window-switch button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  white-space: nowrap;
}

.window-switch button.is-active {
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 8px 18px rgba(21, 32, 27, 0.08);
}

.detail-window-switch.is-positive button.is-active {
  color: var(--green-deep);
}

.detail-window-switch.is-negative button.is-active {
  color: var(--coral);
}

.app-grid {
  position: fixed;
  inset: var(--topbar-height) 0 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  overflow: hidden;
}

.app-grid.has-detail {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.map-pane,
.detail-pane {
  min-height: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.map-pane,
.detail-pane {
  border-radius: 8px;
}

.review-heading,
.detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.map-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 8px;
  overflow: hidden;
}

.map-head {
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  position: relative;
  z-index: 5;
  overflow: visible;
}

.search-box {
  min-width: 0;
  position: relative;
}

.map-search {
  box-shadow: none;
}

.search-results {
  position: absolute;
  inset: calc(100% + 6px) 0 auto;
  z-index: 30;
  display: grid;
  gap: 4px;
  max-height: min(360px, 54vh);
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 38px rgba(21, 32, 27, 0.16);
}

.search-results[hidden] {
  display: none;
}

.search-result {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 7px;
  padding: 9px 10px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.search-result:hover,
.search-result:focus-visible {
  background: var(--soft);
  outline: 0;
}

.search-result strong,
.search-result small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result strong {
  font-size: 0.92rem;
}

.search-result small,
.search-empty {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.search-score {
  min-width: 38px;
  padding: 4px 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 900;
}

.search-score.is-mid {
  background: var(--amber);
}

.search-score.is-low {
  background: var(--coral);
}

.search-score.is-neutral {
  background: var(--neutral);
}

.search-empty {
  padding: 10px;
}

.map-canvas {
  position: relative;
  overflow: hidden;
  min-height: 0;
  background: #e8f0e9;
}

.google-map-layer {
  position: absolute;
  inset: 0;
}

.marker {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 4px 8px 4px 4px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 12px 24px rgba(21, 32, 27, 0.18),
    0 0 0 1px rgba(189, 203, 196, 0.9);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.marker:hover,
.marker:focus-visible,
.marker.is-active {
  z-index: 10;
  transform: translate(-50%, -50%) scale(1.05);
  outline: 0;
  box-shadow:
    0 18px 34px rgba(21, 32, 27, 0.24),
    0 0 0 2px rgba(8, 120, 95, 0.7);
}

.marker-score {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--neutral);
  font-size: 0.78rem;
  font-weight: 900;
}

.marker-name {
  max-width: 128px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 800;
}
.marker.is-google-placeholder .marker-score {
  background: #5f6f68;
}

.google-detail-close-row {
  justify-content: flex-end;
  min-height: 34px;
}

.detail-pane {
  display: flex;
  min-height: 0;
  overflow: hidden;
  padding: 10px;
}

.detail-pane[hidden] {
  display: none;
}

.detail-shell {
  flex: 1;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.detail-title-row {
  align-items: flex-start;
}

.detail-window-switch {
  width: 100%;
}

.detail-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.detail-pane h2 {
  margin: 0;
  font-size: clamp(1.12rem, 1.65vw, 1.38rem);
  line-height: 1.08;
}

.detail-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 900;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--green);
  color: var(--green-deep);
  outline: 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.metric-card {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbf8;
}

.metric-card strong {
  display: block;
  font-size: 1.18rem;
  line-height: 1;
}

.trend-card.is-positive {
  border-color: rgba(8, 120, 95, 0.35);
  background: #f0f8f4;
}

.trend-card.is-positive strong {
  color: var(--green-deep);
}

.trend-card.is-negative {
  border-color: rgba(200, 77, 61, 0.35);
  background: #fff3f1;
}

.trend-card.is-negative strong {
  color: var(--coral);
}

.momentum-value.is-positive {
  color: var(--green-deep);
}

.momentum-value.is-negative {
  color: var(--coral);
}

.metric-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}
.google-detail-shell {
  grid-template-rows: auto auto minmax(0, 1fr);
}
.places-ui-detail-shell {
  grid-template-rows: auto minmax(0, 1fr);
}

.places-ui-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

.places-ui-details {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  background: var(--panel);
  --gmp-mat-color-on-surface: #17221c;
  --gmp-mat-color-surface: #ffffff;
  --gmp-mat-font-family: "Nunito Sans", "Segoe UI", sans-serif;
}

.places-ui-status {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #f9fbf8;
  font-size: 0.82rem;
  font-weight: 800;
}

.text-metric-card strong {
  font-size: 0.96rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.place-info {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
}

.place-info h3 {
  margin: 0;
  font-size: 0.96rem;
}

.place-info-list {
  display: grid;
  gap: 7px;
}

.place-info-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: #314039;
  font-size: 0.86rem;
  line-height: 1.28;
}

.place-info-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.place-info a {
  color: var(--green-deep);
  font-weight: 800;
  overflow-wrap: anywhere;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.distribution {
  display: grid;
  gap: 5px;
}

.dist-row {
  display: grid;
  grid-template-columns: 24px 1fr 34px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.dist-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ede8;
}

.dist-fill {
  display: block;
  width: var(--dist-width, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--green));
}

.review-section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  gap: 8px;
}

.review-heading h3 {
  margin: 0;
  font-size: 0.96rem;
}

.review-heading span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.review-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.review-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 9px;
}

.review-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.reviewer {
  min-width: 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.review-rating {
  flex: 0 0 auto;
  color: var(--green-deep);
  font-weight: 900;
}

.review-item p {
  margin: 0;
  color: #314039;
  line-height: 1.34;
}

.review-date {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    min-height: 100svh;
  }

  .app-grid,
  .app-grid.has-detail {
    position: static;
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    overflow: visible;
  }

  .map-canvas {
    min-height: 360px;
  }

  .detail-pane {
    grid-column: 1 / -1;
  }
}

@media (max-width: 880px) {
  .topbar {
    position: static;
  }

  .map-head {
    grid-template-columns: 1fr;
  }

  .window-switch {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
  }

  .app-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .map-pane {
    grid-row: 1;
  }

  .map-canvas {
    min-height: 440px;
  }

  .detail-pane {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 12px;
  }

  .search-wrap {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .window-switch {
    grid-template-columns: repeat(3, 1fr);
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .marker {
    grid-template-columns: auto;
    padding: 4px;
  }

  .marker-name {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}





