:root {
  --primary: oklch(79.1% 0.132 196.8);
  --primary-soft: oklch(92% 0.05 196.8);
  --primary-deep: oklch(48% 0.1 210);
  --ink: oklch(28% 0.03 230);
  --ink-muted: oklch(45% 0.025 230);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(255, 255, 255, 0.65);
  --shadow-soft: 0 12px 40px rgba(20, 50, 70, 0.14);
  --radius-card: 1.35rem;
  --radius-pill: 999px;
  --panel-width: min(380px, calc(100vw - 1.5rem));
  --font: "Hanken Grotesk", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, oklch(90% 0.06 196.8), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, oklch(93% 0.04 160), transparent 55%),
    oklch(96% 0.015 210);
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
}

#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.maplibregl-ctrl-attrib,
.maplibregl-ctrl-logo {
  opacity: 0.75;
}

.maplibregl-popup-content {
  padding: 0;
  border-radius: 1.1rem;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  font-family: var(--font);
  max-width: 260px;
}

.maplibregl-popup-close-button {
  font-size: 1.15rem;
  color: var(--ink-muted);
  padding: 0.35rem 0.55rem;
  z-index: 2;
}

.popup-card {
  display: flex;
  flex-direction: column;
  background: var(--glass-strong);
}

.popup-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  background: var(--primary-soft);
}

.popup-card__body {
  padding: 0.85rem 1rem 1rem;
}

.popup-card__body h4 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.popup-card__body p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--ink-muted);
}

.glass-panel {
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
}

.national-banner {
  position: absolute;
  z-index: 2;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(420px, calc(100vw - 1.5rem));
  padding: 1rem 1.25rem 1.1rem;
  border-radius: 1.5rem;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.national-banner.is-hidden {
  opacity: 0;
  transform: translate(-50%, -12px);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-deep);
}

.national-banner h1,
.city-panel__header h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.subtitle {
  margin: 0.3rem 0 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

.city-panel {
  position: absolute;
  z-index: 3;
  top: 1rem;
  left: 1rem;
  bottom: 1rem;
  width: var(--panel-width);
  border-radius: 1.75rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(calc(-100% - 2rem));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.city-panel.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.city-panel__handle {
  display: none;
}

.city-panel__header {
  padding: 1.1rem 1.15rem 0.75rem;
  border-bottom: 1px solid rgba(20, 50, 70, 0.08);
  flex-shrink: 0;
}

.city-panel__scroll {
  padding: 1rem 1.15rem 1.35rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1;
}

.section-label {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-deep);
}

.discover-section {
  margin-top: 1.35rem;
  padding-top: 1.1rem;
  border-top: 1px dashed rgba(20, 50, 70, 0.15);
}

.discover-label {
  color: oklch(45% 0.08 160);
}

.discover-hint {
  margin: -0.35rem 0 0.75rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.card-stack {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: none;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-pill:active {
  transform: scale(0.97);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.55);
  color: var(--primary-deep);
  padding: 0.45rem 0.9rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 2px 10px rgba(20, 50, 70, 0.06);
}

.btn-ghost:hover {
  background: var(--primary-soft);
}

.stop-card,
.discover-card {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-card);
  background: var(--glass-strong);
  box-shadow: 0 6px 18px rgba(20, 50, 70, 0.08);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stop-card:hover,
.discover-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(20, 50, 70, 0.14);
}

.stop-card:focus-visible,
.discover-card:focus-visible,
.btn-pill:focus-visible,
.city-marker:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.stop-card__media {
  height: 88px;
  background:
    linear-gradient(135deg, var(--primary-soft), oklch(88% 0.04 180)),
    var(--primary-soft);
  background-size: cover;
  background-position: center;
}

.stop-card__body,
.discover-card__body {
  padding: 0.75rem 0.9rem 0.9rem;
}

.stop-card__body h4,
.discover-card__body h4 {
  margin: 0 0 0.3rem;
  font-size: 0.98rem;
  font-weight: 700;
}

.stop-card__body p,
.discover-card__body p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--ink-muted);
}

.discover-card {
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.92),
    oklch(96% 0.03 160 / 0.85)
  );
  border-color: oklch(85% 0.05 160 / 0.6);
  cursor: default;
}

.discover-card__tag {
  display: inline-block;
  margin-bottom: 0.4rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: oklch(40% 0.08 160);
  background: oklch(90% 0.04 160);
}

.city-marker {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  filter: drop-shadow(0 8px 16px rgba(15, 45, 60, 0.28));
  transition: transform 0.2s ease;
}

.city-marker:hover {
  transform: translateY(-3px) scale(1.04);
}

.city-marker__dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--primary) 55%, var(--primary-deep));
  border: 3px solid #fff;
  box-shadow: 0 0 0 4px oklch(79.1% 0.132 196.8 / 0.35);
  animation: pulse-ring 2.4s ease-out infinite;
}

.city-marker__label {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--glass-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(15, 45, 60, 0.12);
}

.stop-marker {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary-deep);
  border: 2.5px solid #fff;
  box-shadow: 0 4px 12px rgba(15, 45, 60, 0.3);
  cursor: pointer;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 oklch(79.1% 0.132 196.8 / 0.45);
  }
  70% {
    box-shadow: 0 0 0 12px oklch(79.1% 0.132 196.8 / 0);
  }
  100% {
    box-shadow: 0 0 0 0 oklch(79.1% 0.132 196.8 / 0);
  }
}

@media (max-width: 720px) {
  .national-banner {
    top: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 1.25rem;
  }

  .city-panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: min(58vh, 520px);
    border-radius: 1.5rem 1.5rem 0 0;
    transform: translateY(110%);
  }

  .city-panel.is-open {
    transform: translateY(0);
  }

  .city-panel__handle {
    display: block;
    width: 42px;
    height: 5px;
    border-radius: var(--radius-pill);
    background: rgba(20, 50, 70, 0.18);
    margin: 0.65rem auto 0;
  }

  .city-panel__header {
    padding-top: 0.65rem;
  }
}
