﻿:root {
  --bg: #eef4f8;
  --surface: #f7fbffcc;
  --surface2: #ffffffd4;
  --text: #1a2a38;
  --muted: #607387;
  --border: #d7e4ee;
  --shadow-soft: 0 8px 22px rgba(46, 86, 112, 0.1);
  --shadow-lift: 0 16px 36px rgba(38, 79, 103, 0.16);
  --radius-lg: 20px;
  --radius-md: 12px;
  --accent: #2f8ece;
  --accent2: #2bbf90;
  --blur: blur(10px);
  --sp-4: 4px;
  --sp-8: 8px;
  --sp-12: 12px;
  --sp-16: 16px;
  --sp-24: 24px;
  --sp-32: 32px;
  --sp-48: 48px;
  --sp-64: 64px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.68;
  min-height: 100vh;
  padding-bottom: 118px;
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 520px at 88% -8%, #bbe2ffb3, transparent 70%),
    radial-gradient(900px 520px at -10% 8%, #bff6d9a8, transparent 70%),
    linear-gradient(160deg, #f3faff 0%, #eff7fb 50%, #f7fffb 100%);
}

a {
  color: #2f8ece;
  text-decoration: none;
  transition: color 180ms ease;
}

a:hover {
  color: #256f9f;
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid #56ace8;
  outline-offset: 2px;
}

.hero-shell {
  max-width: 1380px;
  margin: 0 auto;
  padding: 18px 16px 0;
}

.hero-host {
  position: relative;
}

.site-header {
  position: absolute;
  left: 24px;
    right: 24px;
    top: 24px;
  z-index: 30;
  margin: 0;
  padding: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-12);
  border: 1px solid var(--border);
  border-radius: 999px;
  min-height: 64px;
  padding: 14px 22px;
  background: #0e4f5e75;
  border-color: #ffffff4a;
  color: #ecfbff;
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-lift);
}

.brand-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: var(--sp-8);
}

.eyebrow {
  margin: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: #dbf5ff;
}

.brand-title {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f4feff;
}

.controls {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  padding-right: var(--sp-8);
}

.controls label {
  color: #d8f4ff;
  font-size: 0.82rem;
}

select {
  border: 1px solid #ffffff5a;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.9rem;
  background: #ffffffed;
  color: #1f3a4f;
}

.hero-card {
  position: relative;
  min-height: clamp(340px, 50vh, 560px);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-md) var(--radius-md);
  border: 1px solid #cfdfea;
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  display: flex;
  align-items: flex-end;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(8, 32, 56, 0.62)),
    linear-gradient(120deg, rgba(43, 191, 144, 0.2), rgba(47, 142, 206, 0.24));
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  padding: clamp(18px, 3.2vw, 34px);
  max-width: 760px;
}

.hero-badge {
  display: inline-flex;
  border: 1px solid #ffffffd9;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: #ffffffee;
  backdrop-filter: var(--blur);
  color: #2f6f9b;
  box-shadow: 0 6px 16px rgba(14, 38, 58, 0.16);
}

.hero-badge-top {
  position: absolute;
  bottom: 20px;
  right: clamp(14px, 2.2vw, 24px);
  z-index: 3;
}

.hero-title {
  margin: 12px 0 6px;
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 3.1rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #f8fcff;
  text-shadow: 0 2px 12px rgba(11, 30, 44, 0.36);
}

.hero-subtitle {
  margin: 0;
  color: #eff7ff;
  max-width: 64ch;
  font-size: 0.98rem;
  text-shadow: 0 1px 8px rgba(11, 30, 44, 0.3);
}

.menu-toggle {
  width: 100%;
  border: 1px solid #c9dde9;
  border-radius: 999px;
  background: #f2fbff;
  color: #2e5675;
  font: inherit;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
  margin-bottom: 8px;
}

.menu-wrap {
  overflow: hidden;
  transition: max-height 220ms ease, opacity 220ms ease;
  max-height: 700px;
  opacity: 1;
}

.menu-wrap.is-collapsed {
  max-height: 0;
  opacity: 0;
}

.map-section-inner,
.sidepanel,
.day-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  backdrop-filter: var(--blur);
}

.map-section-inner {
  border-radius: var(--radius-md);
}

.map-top {
  display: flex;
  align-items: center;
  gap: var(--sp-12);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.map-top h2 {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #29425a;
  letter-spacing: 0.02em;
}

.current-day-chip {
  margin-left: auto;
  border: 1px solid #c5d9e7;
  border-radius: 999px;
  padding: 6px 12px;
  background: #f7fcff;
  max-width: 46ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.81rem;
  color: #44627d;
}

.map-shell { position: relative; }

.trip-map {
  height: 300px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: #dbe7f0;
}

.content-wrap {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 16px;
  margin-top: 24px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
}

.sidepanel {
  position: sticky;
  top: 14px;
  align-self: start;
  padding: 14px;
  background: var(--surface2);
}

.sidepanel h2,
.sidepanel h3 {
  margin: 0 0 8px;
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #2a4157;
}

.small {
  color: var(--muted);
  font-size: 0.84rem;
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
}

.toc-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d0e1ed;
  border-radius: 999px;
  padding: 7px 12px;
  color: #38566f;
  background: #ffffff;
  font-size: 0.82rem;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.toc-link:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.toc-link.is-active {
  border-color: #79b8e8;
  background: #e9f5ff;
  color: #236491;
}

.route-day-label {
  font-weight: 700;
  color: var(--accent);
}

.route-place {
  color: #59768f;
}

.day-content {
  padding: 10px 14px 14px;
  overflow-x: auto;
  background: var(--surface2);
}

.day-map-heading {
  margin: 2px 6px 10px;
  font-family: "Outfit", sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  color: #2f475e;
}

.map-section-inline {
  margin-bottom: 14px;
}

#day-markdown {
  padding: 0 6px 4px;
}

.current-day-chip-map {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  margin: 0;
  z-index: 401;
  background: linear-gradient(140deg, #ffffffc7, #f3fbffb0);
  border-color: #9ecae3;
  color: #2f6f9b;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 16px rgba(33, 67, 92, 0.14);
}

.day-content h1,
.day-content h2,
.day-content h3 {
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0.95em 0 0.45em;
  color: #243a50;
}

.day-content h1 { font-size: clamp(1.7rem, 2.8vw, 2.5rem); }
.day-content h2 { font-size: clamp(1.22rem, 2.2vw, 1.7rem); }
.day-content h3 { font-size: clamp(1.02rem, 1.8vw, 1.3rem); }

.day-content p {
  margin: 0 0 14px;
  color: #314b60;
}

#day-markdown img {
  display: none;
}

/* Keep Leaflet tile images visible inside the map container. */
.trip-map img {
  display: block;
}

.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #f5fbff;
  overflow-x: auto;
  margin: 14px 0 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.sidepanel table { min-width: 0; font-size: 0.8rem; }

th, td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #deebf3;
  vertical-align: top;
}

th {
  color: #24435a;
  background: #e9f5fe;
  font-weight: 600;
}

tr:nth-child(even) td { background: #f8fcff; }

blockquote {
  margin: 14px 0;
  border: 1px solid #cfe2ee;
  border-left: 3px solid var(--accent2);
  border-radius: 11px;
  padding: 12px 14px;
  background: #f2fbf7;
  color: #32536a;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 10px 0 18px;
}

.pill-list li {
  border: 1px solid #d2e3ee;
  border-radius: 999px;
  padding: 7px 11px;
  background: #f8fcff;
  color: #2f4c64;
  font-size: 0.9rem;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  border: 1px solid #d0e1ed;
  background: #ffffffdb;
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-soft);
}

.bottom-nav button {
  min-width: 150px;
  border: 1px solid #c9ddea;
  border-radius: 999px;
  padding: 10px 14px;
  background: #ffffff;
  color: #2b455d;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 170ms ease, box-shadow 170ms ease;
}

.bottom-nav button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.bottom-nav button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.day-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #5f93bd;
  background: #9bc5e24d;
  box-shadow: 0 0 0 2px #ffffff;
}

.day-marker.day-marker-visited {
  border-color: #e3863f;
  background: #f2a46b9f;
}

.day-marker.day-marker-upcoming {
  border-color: #5fa4d2;
  background: #bbe0f566;
}

.leaflet-popup-content-wrapper {
  background: #ffffff;
  color: #20364b;
  border: 1px solid #cddfea;
}

.leaflet-popup-tip { background: #ffffff; }

.map-popup h4 { margin: 0 0 6px; font-size: 1rem; }

.map-popup p {
  margin: 0 0 10px;
  color: #4c6780;
  line-height: 1.4;
}

.map-popup-btn {
  display: inline-flex;
  border-radius: 999px;
  background: #2f8ece;
  color: #ffffff;
  font-weight: 700;
  padding: 6px 12px;
}

@media (max-width: 1080px) {
  .content-wrap { grid-template-columns: 1fr; }
  .sidepanel { position: static; }
}

@media (max-width: 860px) {
  .topbar { border-radius: 16px; flex-wrap: wrap; }
  .controls { width: 100%; justify-content: space-between; }
  .trip-map { height: 260px; }
  .hero-shell { padding-top: 12px; }
  .site-header {
    left: 16px;
    right: 16px;
    top: 18px;
  }
  .hero-card { min-height: clamp(300px, 46vh, 500px); }
  .hero-badge-top { bottom: 132px; }
}

@media (max-width: 640px) {
  body { padding-bottom: 140px; }
  .hero-title { font-size: 1.65rem; }
  .hero-card { min-height: 420px; }
  .hero-badge-top { bottom: 152px; }
  .current-day-chip-map {
    max-width: calc(100% - 24px);
    text-align: center;
  }
  .map-top {
    padding: 8px 10px;
  }
  .trip-map { height: 240px; }
  .day-content { padding: 12px; }
  .bottom-nav {
    width: calc(100% - 20px);
    justify-content: center;
    padding: 8px;
  }
  .bottom-nav button {
    min-width: 0;
    flex: 1;
    padding: 10px 12px;
  }
}

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