:root {
  --bg: #f5f8fb;
  --bg-deep: #dfeaf2;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --text: #17212b;
  --muted: #567084;
  --line: rgba(40, 71, 92, 0.12);
  --accent: #16738b;
  --accent-2: #f97316;
  --accent-3: #0f766e;
  --accent-soft: rgba(22, 115, 139, 0.12);
  --shadow: 0 22px 60px rgba(31, 56, 78, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(22, 115, 139, 0.18), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.14), transparent 24%),
    linear-gradient(180deg, #eef5fa 0%, #f8fbfd 46%, #eef4f8 100%);
  overflow-x: hidden;
}

a {
  color: inherit;
}

.bg-glow {
  position: fixed;
  z-index: -1;
  filter: blur(50px);
  opacity: 0.7;
  pointer-events: none;
}

.bg-glow-a {
  top: 40px;
  left: -60px;
  width: 260px;
  height: 260px;
  background: rgba(15, 118, 110, 0.22);
}

.bg-glow-b {
  right: -60px;
  top: 300px;
  width: 300px;
  height: 300px;
  background: rgba(249, 115, 22, 0.16);
}

.shell {
  width: min(1240px, calc(100vw - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.8fr);
  gap: 24px;
  padding: 32px 0 18px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.panel,
.insight-card {
  backdrop-filter: blur(14px);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-panel,
.panel {
  border-radius: var(--radius-xl);
}

.hero-copy {
  padding: 30px;
  animation: rise-in 0.8s ease both;
}

.hero-panel {
  padding: 28px;
  background:
    linear-gradient(160deg, rgba(12, 74, 110, 0.93), rgba(18, 110, 126, 0.9)),
    var(--panel);
  color: #eff9ff;
  animation: rise-in 0.95s ease both;
}

.eyebrow,
.panel-kicker,
.insight-kicker {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  font-family: "Space Grotesk", sans-serif;
  color: var(--muted);
}

.hero-panel .eyebrow,
.hero-panel .panel-kicker,
.hero-panel p,
.hero-panel span {
  color: rgba(239, 249, 255, 0.82);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  max-width: 10ch;
}

.hero-text {
  margin: 18px 0 0;
  max-width: 62ch;
  font-size: 1.04rem;
  line-height: 1.75;
  color: var(--muted);
}

.stat-row,
.hero-panel-grid,
.safety-grid,
.insight-grid {
  display: grid;
  gap: 14px;
}

.stat-row {
  margin-top: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
}

.stat-card span,
.hero-panel-grid span,
.day-meta,
.detail-meta,
.safety-card span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.stat-card strong,
.hero-panel-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 1.02rem;
}

.toggle-wrap {
  margin-top: 26px;
}

.toggle-label {
  display: inline-block;
  margin-bottom: 10px;
  font-weight: 700;
}

.toggle-group {
  display: inline-flex;
  padding: 6px;
  border-radius: 999px;
  background: rgba(19, 46, 65, 0.08);
  gap: 6px;
}

.toggle-btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.toggle-btn:hover,
.toggle-btn:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.toggle-btn.is-active {
  background: linear-gradient(135deg, var(--accent), #0f4f67);
  color: #fff;
  box-shadow: 0 10px 18px rgba(22, 115, 139, 0.2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.primary-action,
.ghost-action,
.detail-actions a,
.safety-card {
  text-decoration: none;
}

.primary-action,
.ghost-action,
.detail-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.primary-action {
  background: linear-gradient(135deg, var(--accent-2), #fb923c);
  color: #fff;
  box-shadow: 0 14px 26px rgba(249, 115, 22, 0.24);
}

.ghost-action {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
}

.primary-action:hover,
.ghost-action:hover,
.detail-actions a:hover,
.day-card:hover {
  transform: translateY(-2px);
}

.hero-panel-top p,
.hero-panel-note {
  margin: 0;
}

.hero-panel-top h2 {
  margin-top: 8px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.hero-panel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
}

.hero-panel-grid > div {
  padding: 14px 0;
  border-top: 1px solid rgba(239, 249, 255, 0.14);
}

.hero-panel-note {
  margin-top: 20px;
  line-height: 1.7;
}

.planner-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 390px);
  gap: 24px;
  align-items: start;
  margin-top: 6px;
}

.main-stack {
  display: grid;
  gap: 24px;
  align-content: start;
}

.panel {
  padding: 22px;
  background: var(--panel-strong);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-head.compact {
  margin-bottom: 10px;
}

.panel-head h2 {
  font-size: 1.5rem;
}

.map-hint {
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(22, 115, 139, 0.08);
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
}

#map {
  width: 100%;
  height: clamp(420px, 58vh, 640px);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(18, 63, 91, 0.12);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(19, 46, 65, 0.06);
  font-size: 0.9rem;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.sidebar {
  display: grid;
  gap: 24px;
  align-content: start;
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(22, 115, 139, 0.34) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(22, 115, 139, 0.26);
}

.detail-panel {
  min-height: 380px;
}

.detail-panel h2 {
  margin-top: 4px;
  font-size: 2rem;
}

.detail-summary {
  margin: 16px 0 18px;
  color: var(--muted);
  line-height: 1.72;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.detail-metrics div {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(22, 115, 139, 0.07);
}

.detail-metrics strong {
  display: block;
  margin-top: 6px;
  font-size: 1.05rem;
}

.detail-inline-note {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(22, 115, 139, 0.07);
  color: #315d74;
  line-height: 1.65;
}

.detail-highlights {
  display: grid;
  gap: 10px;
}

.detail-stop {
  padding: 14px 14px 14px 16px;
  border-left: 4px solid var(--accent);
  border-radius: 0 16px 16px 0;
  background: rgba(245, 249, 251, 0.92);
}

.detail-stop strong {
  display: block;
  margin-bottom: 4px;
}

.detail-stop-en {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.detail-stop-meta {
  display: block;
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
}

.detail-stop-booking {
  display: block;
  margin-bottom: 5px;
  color: #315d74;
  font-size: 0.88rem;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-actions a {
  background: rgba(19, 46, 65, 0.08);
}

.detail-actions a.primary {
  background: linear-gradient(135deg, var(--accent), #0f4f67);
  color: #fff;
}

.poi-panel[hidden] {
  display: none !important;
}

.poi-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.poi-panel-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.poi-close,
.map-reset-control,
.map-style-toggle {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  color: var(--accent);
  background: rgba(22, 115, 139, 0.1);
  box-shadow: 0 10px 22px rgba(22, 115, 139, 0.14);
}

.poi-detail-card {
  display: grid;
  gap: 14px;
}

.poi-detail-image {
  display: block;
  width: 100%;
  height: 220px;
  border-radius: 18px;
  object-fit: cover;
}

.poi-detail-body {
  display: grid;
  gap: 12px;
}

.poi-detail-score {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(22, 115, 139, 0.12);
  color: var(--accent);
  font-weight: 800;
}

.poi-detail-tagline,
.poi-detail-note {
  margin: 0;
  color: #315d74;
  line-height: 1.65;
}

.poi-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.poi-detail-item {
  padding: 12px 13px;
  border-radius: 16px;
  background: rgba(22, 115, 139, 0.07);
}

.poi-detail-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.84rem;
  color: var(--muted);
}

.poi-detail-item span {
  color: var(--text);
  line-height: 1.5;
}

.poi-detail-item--wide {
  grid-column: 1 / -1;
}

.map-reset-control {
  min-height: 42px;
}

.map-style-toggle {
  min-height: 42px;
  min-width: 78px;
}

.map-reset-control:focus-visible,
.map-style-toggle:focus-visible,
.poi-close:focus-visible {
  outline: 2px solid rgba(22, 115, 139, 0.34);
  outline-offset: 2px;
}

.day-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.day-card {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.day-card.is-active {
  border-color: rgba(22, 115, 139, 0.42);
  box-shadow: 0 18px 28px rgba(22, 115, 139, 0.14);
}

.day-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.day-badge {
  display: inline-flex;
  min-width: 58px;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 999px;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.84rem;
}

.day-card h3 {
  margin-top: 12px;
  font-size: 1.15rem;
}

.day-meta {
  margin-top: 10px;
  line-height: 1.6;
}

.insight-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.insight-card {
  padding: 24px;
  border-radius: var(--radius-lg);
}

.insight-card h3 {
  font-size: 1.45rem;
  margin-top: 6px;
}

.insight-card p:last-child {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.safety-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.safety-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(245, 249, 251, 0.84);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.safety-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(31, 56, 78, 0.08);
}

.warning-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.warning-strip div {
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.12), rgba(22, 115, 139, 0.08));
  line-height: 1.65;
}

.footer {
  padding: 22px 0 42px;
  color: var(--muted);
}

.marker-dot {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(20, 30, 40, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  box-shadow: 0 20px 35px rgba(20, 30, 40, 0.18);
}

.leaflet-popup-content-wrapper {
  max-width: 320px;
}

.leaflet-popup-content {
  margin: 12px 14px;
}

.popup-card {
  width: min(276px, 72vw);
}

.popup-card strong {
  display: block;
  font-size: 1rem;
}

.popup-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.popup-title-row span {
  flex: none;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(22, 115, 139, 0.12);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

.popup-english {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.85rem;
}

.popup-image,
.popup-card img {
  display: block;
  width: 100%;
  height: 132px;
  margin-bottom: 10px;
  border-radius: 14px;
  object-fit: cover;
}

.popup-meta {
  margin: 8px 0 6px;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 700;
}

.popup-info-grid {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.popup-info {
  padding: 10px 11px;
  border-radius: 12px;
  background: rgba(22, 115, 139, 0.07);
  color: #315d74;
  font-size: 0.84rem;
  line-height: 1.45;
}

.popup-card p {
  margin: 8px 0;
  color: #4a6576;
  line-height: 1.55;
}

.popup-card a {
  color: var(--accent);
  font-weight: 700;
}

.poi-tooltip {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  max-width: none;
  white-space: normal;
}

.poi-tooltip::before {
  display: none;
}

.poi-tooltip-card {
  width: min(272px, 70vw);
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 40px rgba(20, 30, 40, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.88);
}

.poi-tooltip-card img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.poi-tooltip-body {
  padding: 12px 13px 13px;
}

.poi-tooltip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.poi-tooltip-top strong {
  font-size: 0.95rem;
  line-height: 1.3;
}

.poi-tooltip-en {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.poi-tooltip-top span {
  flex: none;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(22, 115, 139, 0.12);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

.poi-tooltip-body p {
  margin: 8px 0 0;
  color: #4a6576;
  font-size: 0.86rem;
  line-height: 1.5;
  white-space: normal;
  overflow: visible;
}

.poi-tooltip-meta {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.poi-tooltip-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.09);
  color: #215f5b;
  font-size: 0.75rem;
  font-weight: 700;
}

.poi-tooltip-note {
  color: #4a6576;
  font-size: 0.78rem;
  line-height: 1.45;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .hero,
  .insight-grid,
  .safety-grid,
  .warning-strip {
    grid-template-columns: 1fr;
  }

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

  .sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .hero-panel-grid,
  .stat-row,
  .detail-metrics,
  .day-list,
  .poi-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100vw - 18px, 1240px);
  }

  .hero {
    padding-top: 18px;
  }

  .hero-copy,
  .hero-panel,
  .panel {
    padding: 18px;
    border-radius: 22px;
  }

  h1 {
    max-width: 12ch;
  }

  .stat-row,
  .hero-panel-grid,
  .detail-metrics,
  .day-list,
  .poi-detail-grid {
    grid-template-columns: 1fr;
  }

  #map {
    height: 58vh;
  }

  .panel-head {
    flex-direction: column;
  }
}
