:root {
  --ink: #12232b;
  --ink-soft: #2a4149;
  --paper: #f3efe6;
  --surface: #fffdf8;
  --surface-muted: #ebe7dd;
  --line: #d7d1c5;
  --muted: #6b7779;
  --accent: #ee6c4d;
  --accent-dark: #cb4c31;
  --teal: #278f8b;
  --teal-soft: #dcecea;
  --blue: #d9e9ef;
  --shadow: 0 16px 42px rgba(18, 35, 43, .10);
  --radius: 14px;
  color: var(--ink);
  background: var(--paper);
  font-family: "Hiragino Sans", "Yu Gothic", "YuGothic", Meiryo, system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.site-header {
  min-height: 76px;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 14px clamp(18px, 4vw, 56px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 900; font-size: clamp(20px, 2vw, 28px); letter-spacing: -.04em; white-space: nowrap; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 2px solid var(--accent); border-radius: 50%; font-size: 22px; background: rgba(255,255,255,.08); }
.mode-nav { display: flex; align-items: center; gap: 8px; }
.mode-link { display: inline-flex; align-items: center; gap: 8px; padding: 12px 17px; color: #fff; text-decoration: none; border-radius: 8px; font-weight: 800; font-size: 15px; }
.mode-link[aria-current="page"], .mode-link.is-active { background: var(--accent); }
.header-spacer { flex: 1; }
.header-link { color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; opacity: .92; }
.menu-button { display: none; border: 0; color: #fff; background: transparent; font-weight: 700; }

.app-shell { min-height: calc(100vh - 76px); }
.hero { min-width: 0; display: grid; grid-template-columns: minmax(360px, .88fr) minmax(520px, 1.12fr); min-height: 660px; }
.hero-copy { min-width: 0; padding: clamp(38px, 5vw, 72px) clamp(22px, 5vw, 70px) 42px; display: flex; flex-direction: column; justify-content: center; }
.hero-title { margin: 0 0 18px; font-size: clamp(34px, 4.2vw, 64px); line-height: 1.08; letter-spacing: -.075em; max-width: 12ch; }
.hero-title .accent-line { color: var(--accent); display: block; }
.hero-lede { margin: 0 0 28px; font-size: clamp(15px, 1.4vw, 18px); line-height: 1.8; color: var(--ink-soft); max-width: 38rem; }
.origin-note { margin: 0 0 18px; font-size: 15px; font-weight: 800; }
.filter-panel { min-width: 0; border-top: 1px solid var(--line); }
.filter-row { min-width: 0; display: grid; grid-template-columns: 116px 1fr; align-items: stretch; border-bottom: 1px solid var(--line); min-height: 52px; }
.filter-label { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 13px; color: var(--ink-soft); }
.filter-options { min-width: 0; display: flex; gap: 6px; padding: 7px 0 7px 8px; flex-wrap: wrap; }
.filter-option { flex: 1 1 94px; min-height: 36px; padding: 6px 10px; background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 6px; font-weight: 800; font-size: 13px; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.filter-option:hover, .filter-option:focus-visible { border-color: var(--accent); }
.filter-option[aria-pressed="true"] { color: #fff; background: var(--accent); border-color: var(--accent); }
.quick-section { padding-top: 20px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin: 0 0 10px; font-size: 15px; }
.quick-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.quick-action { min-height: 75px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.25); color: var(--ink); padding: 9px 5px 7px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 5px; font-weight: 800; font-size: 11px; line-height: 1.25; }
.quick-action:hover, .quick-action:focus-visible { background: var(--surface); border-color: var(--teal); }
.quick-icon { font-size: 24px; color: var(--teal); line-height: 1; }
.quick-action:last-child .quick-icon { color: var(--accent); }

.map-panel { min-width: 0; position: relative; min-height: 660px; background: var(--blue); overflow: hidden; border-bottom-left-radius: 0; }
.map-panel::before { content: ""; position: absolute; inset: 0; opacity: .42; background-image: linear-gradient(rgba(39,143,139,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(39,143,139,.12) 1px, transparent 1px); background-size: 48px 48px; pointer-events: none; }
.map-panel::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 38% 48%, transparent 0 14%, rgba(217,233,239,.35) 44%, rgba(217,233,239,.85) 100%); }
.map-canvas { position: absolute; inset: 0; z-index: 1; }
.fallback-map { width: 100%; height: 100%; display: block; }
.maplibre-map { position: absolute; inset: 0; display: none; }
.maplibre-map.is-ready { display: block; }
.map-status { position: absolute; top: 18px; left: 20px; z-index: 5; background: rgba(255,253,248,.9); border: 1px solid rgba(18,35,43,.18); border-radius: 999px; padding: 7px 12px; font-size: 12px; font-weight: 800; }
.map-legend { position: absolute; z-index: 5; right: 18px; bottom: 18px; width: min(250px, calc(100% - 36px)); padding: 15px; background: rgba(255,253,248,.94); border: 1px solid rgba(18,35,43,.16); border-radius: 10px; font-size: 12px; box-shadow: 0 8px 22px rgba(18,35,43,.08); }
.legend-row { display: flex; align-items: center; gap: 10px; margin: 5px 0; font-weight: 700; }
.legend-line { width: 36px; height: 4px; border-radius: 4px; background: var(--teal); }
.legend-line.muted { background: repeating-linear-gradient(90deg, #8a9391 0 9px, transparent 9px 14px); }
.map-disclaimer { margin: 10px 0 0; color: var(--muted); line-height: 1.5; }
.route { fill: none; stroke: var(--teal); stroke-width: 4; stroke-linecap: round; opacity: .95; }
.route.muted { stroke: #8a9391; stroke-dasharray: 8 8; opacity: .45; }
.map-node { fill: var(--teal); stroke: #fff; stroke-width: 3; }
.map-origin { fill: var(--accent); stroke: #fff; stroke-width: 5; }
.map-label rect { fill: rgba(255,253,248,.96); stroke: rgba(18,35,43,.32); stroke-width: 1; rx: 8; }
.map-label { opacity: 1; }
.map-label text { fill: #12232b; stroke: #12232b; stroke-width: .22px; paint-order: stroke fill; font-size: 14px; font-weight: 900; }
.map-label .small { font-size: 10px; font-weight: 700; stroke-width: .16px; }
.origin-label rect { fill: var(--accent); stroke: var(--accent); }
.origin-label text { fill: #fff; }

.results-section { padding: 32px clamp(22px, 5vw, 70px) 54px; background: var(--paper); }
.results-inner { max-width: 1480px; margin: 0 auto; }
.results-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.results-heading h2 { font-size: 22px; margin: 0; letter-spacing: -.04em; }
.results-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.sort-select { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 8px 10px; color: var(--ink); font-weight: 700; font-size: 12px; }
.results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.destination-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 4px 12px rgba(18,35,43,.04); }
.card-body { padding: 20px; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-title { margin: 0; font-size: 25px; letter-spacing: -.06em; }
.card-region { color: var(--muted); font-size: 12px; font-weight: 700; margin-left: 5px; }
.status { color: var(--teal); font-size: 12px; font-weight: 900; white-space: nowrap; }
.status::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 50%; background: currentColor; }
.status.static { color: #94764b; }
.status.outbound { color: #7b697c; }
.card-summary { display: grid; grid-template-columns: repeat(3, 1fr); margin: 18px 0 14px; border-block: 1px solid var(--line); padding: 12px 0; }
.summary-item { padding: 0 12px; border-left: 1px solid var(--line); }
.summary-item:first-child { border-left: 0; padding-left: 0; }
.summary-label { display: block; font-size: 10px; color: var(--muted); font-weight: 800; margin-bottom: 4px; }
.summary-value { font-size: 18px; font-weight: 900; letter-spacing: -.04em; }
.schedule-list { display: grid; gap: 6px; }
.schedule-row { display: grid; grid-template-columns: 48px 1fr auto 1fr auto; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; }
.schedule-tag { background: var(--teal); color: #fff; padding: 4px 6px; border-radius: 4px; font-weight: 900; text-align: center; }
.schedule-row strong { font-size: 15px; }
.arrow { color: var(--muted); }
.card-cta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; }
.data-note { color: var(--muted); font-size: 11px; line-height: 1.5; }
.booking-link { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 16px; border-radius: 7px; background: var(--accent); color: #fff; text-decoration: none; font-size: 13px; font-weight: 900; white-space: nowrap; }
.booking-link:hover, .booking-link:focus-visible { background: var(--accent-dark); }
.empty-state { padding: 34px 16px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; background: rgba(255,255,255,.2); }

.detail-page { max-width: 1120px; margin: 0 auto; padding: 42px 22px 64px; }
.breadcrumbs { color: var(--muted); font-size: 12px; margin-bottom: 24px; }
.detail-hero { display: grid; grid-template-columns: 1fr .75fr; gap: 28px; align-items: end; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.detail-hero h1 { margin: 0 0 12px; font-size: clamp(34px, 5vw, 66px); letter-spacing: -.08em; line-height: 1.05; }
.detail-hero p { max-width: 52ch; color: var(--ink-soft); line-height: 1.8; }
.detail-stat { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.detail-stat div { background: var(--surface); padding: 18px; }
.detail-stat small { display: block; color: var(--muted); font-size: 11px; font-weight: 800; margin-bottom: 6px; }
.detail-stat strong { font-size: 20px; }
.detail-section { padding-top: 30px; }
.detail-section h2 { margin: 0 0 14px; font-size: 21px; }
.source-box { padding: 16px; border-left: 4px solid var(--teal); background: var(--teal-soft); font-size: 13px; line-height: 1.7; }
.source-box a { color: var(--ink); font-weight: 800; }
.notice { margin: 18px 0; padding: 14px 16px; background: #f8e6d7; border-radius: 9px; color: #704a37; font-size: 12px; line-height: 1.7; }
.back-link { display: inline-flex; gap: 7px; color: var(--ink); font-weight: 800; text-decoration: none; margin-top: 25px; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px clamp(22px, 5vw, 70px); background: var(--ink); color: #d9e2e3; font-size: 12px; }
.site-footer a { color: #fff; }
.noscript { max-width: 680px; margin: 100px auto; padding: 24px; }

@media (max-width: 980px) {
  .site-header { gap: 16px; }
  .header-link { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 30px; }
  .map-panel { min-height: 560px; border-radius: 0; }
  .results-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .site-header { min-height: 64px; padding: 10px 15px; gap: 6px; }
  .brand { font-size: 18px; gap: 7px; }
  .brand-mark { width: 34px; height: 34px; font-size: 17px; }
  .mode-nav { margin-left: auto; gap: 2px; }
  .mode-link { padding: 9px 6px; font-size: 10px; gap: 3px; }
  .menu-button { display: none; }
  .hero-copy { padding: 34px 16px 22px; }
  .hero-title { font-size: 38px; }
  .hero-lede { font-size: 14px; margin-bottom: 22px; }
  .filter-row { grid-template-columns: 1fr; padding: 8px 0 0; }
  .filter-label { margin-bottom: 2px; }
  .filter-options { padding: 4px 0 7px; gap: 5px; }
  .filter-option { min-width: 0; font-size: 12px; min-height: 34px; }
  .filter-option[data-filter-key="date"] { flex: 0 0 calc((100% - 10px) / 3); }
  .filter-option[data-filter-key="trip"], .filter-option[data-filter-key="budget"], .filter-option[data-filter-key="duration"] { flex: 0 0 calc((100% - 5px) / 2); }
  .quick-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .quick-action { min-height: 69px; font-size: 10px; }
  .quick-icon { font-size: 20px; }
  .map-panel { min-height: 480px; }
  .map-legend { right: 10px; bottom: 10px; padding: 10px; }
  .results-section { padding: 28px 16px 42px; }
  .results-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .results-heading h2 { font-size: 20px; }
  .sort-select { width: 100%; }
  .card-body { padding: 16px; }
  .card-title { font-size: 23px; }
  .card-summary { gap: 0; }
  .summary-item { padding: 0 8px; }
  .summary-value { font-size: 15px; }
  .schedule-row { grid-template-columns: 42px 1fr auto 1fr auto; gap: 4px; font-size: 10px; }
  .schedule-row strong { font-size: 13px; }
  .card-cta { align-items: stretch; flex-direction: column; }
  .booking-link { width: 100%; }
  .site-footer { align-items: flex-start; flex-direction: column; padding: 20px 16px; }
  .detail-page { padding: 28px 16px 46px; }
  .detail-hero { grid-template-columns: 1fr; gap: 18px; }
  .detail-hero h1 { font-size: 40px; }
}

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