:root {
  --bg: #f5efe2;
  --paper: rgba(255, 250, 240, 0.72);
  --paper-strong: rgba(255, 247, 233, 0.9);
  --ink: #16110f;
  --muted: #67574f;
  --line: rgba(22, 17, 15, 0.1);
  --red: #cf3c2f;
  --gold: #f0b44d;
  --forest: #31574a;
  --night: #19243a;
  --shadow: 0 20px 60px rgba(30, 22, 18, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(207, 60, 47, 0.18), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(240, 180, 77, 0.22), transparent 22%),
    radial-gradient(circle at bottom right, rgba(49, 87, 74, 0.16), transparent 25%),
    linear-gradient(180deg, #f7f1e5 0%, #efe7d5 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(22, 17, 15, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 17, 15, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 90%);
}

.page-shell {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero,
.section,
.footer {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--paper);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero {
  min-height: 92vh;
  padding: 28px;
}

.hero::after,
.city-card::after {
  content: "";
  position: absolute;
  inset: auto -10% -30% auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55), transparent 70%);
  pointer-events: none;
}

.topbar,
.hero-grid,
.section,
.footer {
  width: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-family: "Unbounded", sans-serif;
  font-size: 1rem;
  color: #fff8ee;
  background: linear-gradient(135deg, var(--red), #8f1f16);
}

.brand-title {
  margin: 0;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--red);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.topbar-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.topbar-links a,
.footer a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(22, 17, 15, 0.1);
  background: rgba(255, 255, 255, 0.68);
  font-size: 0.92rem;
  font-weight: 700;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 28px;
  align-items: stretch;
}

.hero-copy,
.hero-poster,
.route-stop,
.city-card,
.highlights-grid article,
.day-card,
.info-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.hero-copy {
  padding: 28px;
  background:
    linear-gradient(145deg, rgba(255, 252, 247, 0.92), rgba(248, 238, 220, 0.76)),
    linear-gradient(45deg, rgba(240, 180, 77, 0.08), transparent);
}

.hero-copy h1 {
  max-width: 10ch;
  margin: 0 0 18px;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(2.2rem, 5.4vw, 5rem);
  line-height: 0.94;
  text-wrap: balance;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.hero-lead {
  max-width: 58ch;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
}

.button-primary {
  color: #fff7ef;
  background: linear-gradient(135deg, var(--red), #9c291e);
}

.button-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(22, 17, 15, 0.08);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.hero-stats li {
  padding: 18px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
}

.hero-stats strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.7rem;
  font-weight: 800;
}

.hero-stats span {
  color: var(--muted);
}

.hero-poster {
  min-height: 560px;
  padding: 28px;
  display: flex;
  align-items: end;
  justify-content: stretch;
  isolation: isolate;
  background:
    radial-gradient(circle at 20% 20%, rgba(240, 180, 77, 0.68), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(207, 60, 47, 0.64), transparent 28%),
    radial-gradient(circle at 50% 80%, rgba(25, 36, 58, 0.9), transparent 36%),
    linear-gradient(160deg, #201513 0%, #2a1d1a 44%, #0f1a29 100%);
}

.hero-note-row {
  display: contents;
}

.poster-card-main {
  width: 100%;
  min-height: 100%;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 26px;
  border: 1px solid rgba(255, 248, 238, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    linear-gradient(155deg, rgba(255, 255, 255, 0.08), transparent 40%);
  color: #fff7ef;
}

.poster-kicker,
.poster-meta {
  margin: 0;
  color: rgba(255, 247, 239, 0.78);
}

.poster-meta {
  max-width: 20ch;
}

.poster-card-main h2 {
  margin: 18px 0 18px;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.85rem, 3vw, 3.35rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  overflow-wrap: anywhere;
}

.floating-note {
  position: absolute;
  max-width: calc(100% - 32px);
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 248, 238, 0.88);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
}

.floating-note span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.note-one {
  top: 18px;
  right: 18px;
}

.note-two {
  left: 18px;
  bottom: 18px;
}

.section {
  margin-top: 26px;
  padding: 30px 26px;
  scroll-margin-top: 12px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.6rem, 2.4vw, 2.7rem);
}

.route-line {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.route-stop {
  padding: 20px;
  min-height: 220px;
  background: var(--paper-strong);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.route-stop.is-dim,
.city-card.is-dim,
.day-card.is-dim {
  opacity: 0.35;
}

.route-stop.is-highlighted,
.city-card.is-highlighted,
.day-card.is-highlighted {
  box-shadow: 0 20px 40px rgba(30, 22, 18, 0.14);
  transform: translateY(-4px);
}

.route-day {
  display: inline-block;
  margin-bottom: 18px;
  padding: 8px 10px;
  border-radius: 999px;
  color: #fff7ef;
  background: var(--night);
  font-size: 0.78rem;
  font-weight: 800;
}

.route-stop h3,
.city-card h3,
.highlights-grid h3,
.day-head h3,
.info-card h3,
.split-plan h4 {
  margin: 0 0 10px;
}

.route-stop p,
.city-card p,
.highlights-grid p,
.day-head p,
.info-card p,
.poster-meta,
.split-plan li {
  margin: 0;
  line-height: 1.65;
  color: var(--muted);
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.city-card {
  min-height: 320px;
  padding: 22px;
  color: #fff7ef;
  overflow: hidden;
}

.city-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 10, 16, 0.08) 0%, rgba(8, 10, 16, 0.42) 62%, rgba(8, 10, 16, 0.68) 100%);
}

.city-card > * {
  position: relative;
  z-index: 1;
}

.city-index {
  display: inline-block;
  margin-bottom: 90px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 248, 238, 0.3);
  border-radius: 999px;
  font-weight: 800;
}

.card-osaka {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), transparent 36%),
    linear-gradient(135deg, #2f1211, #c8412d 52%, #f3a63e);
}

.card-kyoto {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), transparent 36%),
    linear-gradient(145deg, #162f28, #325f4d 55%, #d7c694);
}

.card-nara {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), transparent 36%),
    linear-gradient(145deg, #4d1f12, #8f5530 58%, #e4b67a);
}

.card-tokyo {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), transparent 36%),
    linear-gradient(140deg, #111827, #1d3c66 58%, #f4565f);
}

.city-card h3 {
  color: #fff9f1;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.28);
}

.city-card p {
  color: rgba(255, 247, 239, 0.88);
  max-width: 22ch;
}

.highlights-grid,
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.map-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 14px;
}

.map-copy,
.map-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.62);
}

.map-copy p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.8;
}

.map-legend {
  display: grid;
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.legend-osaka {
  background: #cf3c2f;
}

.legend-kyoto {
  background: #31574a;
}

.legend-nara {
  background: #b97730;
}

.legend-tokyo {
  background: #2a65b8;
}

#trip-map {
  width: 100%;
  min-height: 460px;
  border-radius: 18px;
  overflow: hidden;
}

.leaflet-popup-content-wrapper {
  border-radius: 16px;
}

.leaflet-container {
  font-family: "Manrope", sans-serif;
}

.leaflet-control-attribution {
  font-size: 11px;
}

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

.map-popup strong {
  display: block;
  margin-bottom: 6px;
  color: var(--red);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-popup p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.highlights-grid article,
.info-card {
  padding: 20px;
  background: rgba(255, 255, 255, 0.6);
}

.brief-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.explorer-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.explorer-chip {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(22, 17, 15, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.explorer-chip:hover {
  transform: translateY(-1px);
}

.explorer-chip.is-active {
  background: linear-gradient(135deg, var(--red), #9c291e);
  color: #fff7ef;
  border-color: transparent;
}

.explorer-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(240, 180, 77, 0.14), transparent 28%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.82), rgba(250, 240, 222, 0.74));
}

.explorer-kicker,
.meta-label {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.explorer-panel h3 {
  margin: 0 0 10px;
}

.explorer-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.explorer-meta {
  display: grid;
  gap: 14px;
  align-content: start;
}

.explorer-meta strong {
  font-size: 1.05rem;
}

.brief-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.82), rgba(250, 240, 222, 0.74)),
    linear-gradient(120deg, rgba(240, 180, 77, 0.08), transparent);
}

.brief-card h3 {
  margin: 0 0 10px;
}

.brief-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.66);
}

.metric-card-strong {
  background:
    radial-gradient(circle at top right, rgba(207, 60, 47, 0.14), transparent 30%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.82), rgba(250, 240, 222, 0.74));
}

.metric-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin-bottom: 10px;
  font-family: "Unbounded", sans-serif;
  font-size: 3rem;
  line-height: 0.95;
}

.metric-card p,
.metric-card li {
  color: var(--muted);
  line-height: 1.65;
}

.metric-card ul {
  margin: 0;
  padding-left: 18px;
}

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

.day-card {
  padding: 20px;
  background: rgba(255, 252, 248, 0.84);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.day-card-wide {
  grid-column: span 2;
}

.day-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  height: 74px;
  padding: 0 12px;
  border-radius: 22px;
  font-family: "Unbounded", sans-serif;
  font-size: 0.95rem;
  color: #fff8ee;
  background: linear-gradient(145deg, var(--night), #304468);
}

.day-card ul,
.split-plan ul {
  margin: 0;
  padding-left: 18px;
}

.day-card li,
.split-plan li {
  margin: 0 0 10px;
  line-height: 1.6;
}

.split-plan {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.split-plan > div {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.footer {
  margin-top: 26px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer p {
  margin: 0;
  font-weight: 800;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1220px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    min-height: 420px;
  }
}

@media (max-width: 1100px) {
  .hero-grid,
  .route-line,
  .map-layout,
  .poster-grid,
  .brief-grid,
  .metrics-grid,
  .explorer-panel,
  .highlights-grid,
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .route-stop.return,
  .city-card:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 860px) {
  .page-shell {
    width: min(var(--max-width), calc(100% - 18px));
    padding-top: 10px;
  }

  .hero,
  .section,
  .footer {
    border-radius: 24px;
  }

  .topbar,
  .hero-grid,
  .days-grid,
  .split-plan,
  .map-layout,
  .metrics-grid,
  .explorer-panel,
  .highlights-grid,
  .info-grid,
  .poster-grid,
  .route-line {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 22px;
  }

  .topbar-links {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .topbar-links::-webkit-scrollbar {
    display: none;
  }

  .topbar-links a {
    flex: 0 0 auto;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(22, 17, 15, 0.08);
  }

  .hero {
    min-height: auto;
    padding: 18px;
  }

  .hero-copy,
  .hero-poster,
  .route-stop,
  .city-card,
  .day-card,
  .highlights-grid article,
  .info-card {
    border-radius: 20px;
  }

  .hero-poster {
    min-height: auto;
    padding: 16px;
    display: grid;
    align-items: stretch;
    gap: 12px;
  }

  #trip-map {
    min-height: 360px;
  }

  .hero-copy {
    padding: 20px;
  }

  .hero-copy h1 {
    font-size: clamp(2rem, 12vw, 3.4rem);
    max-width: 8ch;
    line-height: 0.92;
  }

  .hero-lead {
    font-size: 1rem;
    line-height: 1.65;
  }

  .hero-tags {
    margin-top: 18px;
  }

  .hero-tags span {
    font-size: 0.82rem;
    min-height: 32px;
    padding: 0 12px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-stats li {
    padding: 16px 14px;
  }

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

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

  .explorer-toolbar {
    gap: 8px;
  }

  .explorer-chip {
    min-height: 38px;
    padding: 0 14px;
    font-size: 0.9rem;
  }

  .day-card-wide,
  .route-stop.return,
  .city-card:last-child {
    grid-column: auto;
  }

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

  .date {
    width: fit-content;
    min-width: 84px;
    height: 56px;
    border-radius: 16px;
  }

  .note-one {
    top: 12px;
    right: 12px;
  }

  .note-two {
    left: 12px;
    bottom: 12px;
  }

  .poster-card-main {
    padding: 18px;
    min-height: 0;
    aspect-ratio: 1 / 1.02;
  }

  .poster-card-main h2 {
    font-size: clamp(1.55rem, 9vw, 2.45rem);
  }

  .poster-meta {
    display: none;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(var(--max-width), calc(100% - 12px));
  }

  .hero,
  .section,
  .footer {
    border-radius: 20px;
  }

  .hero-copy {
    padding: 18px 16px;
  }

  .hero-copy h1 {
    max-width: 7ch;
    font-size: clamp(1.6rem, 10.2vw, 2.65rem);
    line-height: 0.9;
    letter-spacing: -0.045em;
  }

  .hero-actions {
    gap: 10px;
    margin: 20px 0 22px;
  }

  .button {
    width: 100%;
  }

  .explorer-panel {
    padding: 18px;
  }

  .hero-poster {
    padding: 12px;
  }

  .hero-note-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .floating-note {
    position: static;
    max-width: none;
    width: 100%;
    box-shadow: none;
  }

  .poster-card-main {
    aspect-ratio: auto;
    min-height: 260px;
  }

  .poster-card-main h2 {
    font-size: clamp(1.45rem, 12vw, 2.15rem);
  }

  .city-card {
    min-height: 260px;
  }

  .city-index {
    margin-bottom: 52px;
  }
}
