:root {
  --red: #e60012;
  --red-dark: #c10010;
  --navy: #0d1b2a;
  --ink: #1b1b1b;
  --muted: #5c6570;
  --line: #e4e0d8;
  --paper: #f6f4ef;
  --white: #fff;
  --gold: #b8860b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.topbar {
  background: var(--navy);
  color: #fff;
  font-size: 12px;
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  flex-wrap: wrap;
}
.topbar a { color: #fff; text-decoration: none; }

header.site {
  background: #fff;
  border-bottom: 3px solid var(--red);
  position: sticky;
  top: 0;
  z-index: 40;
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}
.logo {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.logo strong { font-size: 22px; letter-spacing: 0.04em; color: var(--navy); }
.logo span { font-size: 11px; color: var(--muted); }
nav.main { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; }
nav.main a { text-decoration: none; color: var(--navy); font-weight: 500; }
nav.main a:hover { color: var(--red); }
.lang {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.lang button {
  border: 0;
  background: #fff;
  padding: 6px 12px;
  cursor: pointer;
  font: inherit;
}
.lang button.active { background: var(--navy); color: #fff; }

.hero {
  position: relative;
  min-height: 520px;
  color: #fff;
  display: grid;
  align-items: end;
}
.hero img.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero .shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,27,42,.25), rgba(13,27,42,.78));
}
.hero .content { position: relative; padding: 48px 0 56px; }
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: 0.02em;
  max-width: 16ch;
}
.hero p.lead { margin: 0 0 24px; font-size: 16px; max-width: 40ch; }

.search-card {
  background: #fff;
  color: var(--ink);
  border-radius: 16px;
  padding: 20px;
  display: grid;
  gap: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
}
.search-card .row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
}
.search-card .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
label.field { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.date-picker-wrap { position: relative; margin-top: 4px; }
.date-trigger {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
  font-size: 16px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%235c6570' stroke-width='1.8'%3E%3Crect x='3' y='4' width='14' height='13' rx='2'/%3E%3Cpath d='M3 8h14M7 2v4M13 2v4'/%3E%3C/svg%3E") no-repeat right 12px center;
  text-align: left;
  cursor: pointer;
}
.cal-pop {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 70;
  background: #fff;
  color: var(--ink);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,.22);
  padding: 12px;
  width: min(340px, calc(100vw - 24px));
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.cal-head strong { font-size: 15px; }
.cal-nav {
  width: 44px;
  height: 44px;
  border: 0;
  background: #f3efe6;
  border-radius: 10px;
  font-size: 22px;
  cursor: pointer;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-grid .dow {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 0;
  font-weight: 700;
}
.cal-day {
  height: 44px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
}
.cal-day:disabled { opacity: .28; cursor: default; }
.cal-day.sel { background: var(--red); color: #fff; font-weight: 700; }
.cal-day.today:not(.sel) { box-shadow: inset 0 0 0 1px var(--navy); }

label.field input, label.field select {
  width: 100%;
  margin-top: 4px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
  font-size: 16px;
  background: #fff;
}
.swap {
  align-self: end;
  height: 48px;
  width: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--red-dark); }
.btn.wide { width: 100%; }
.btn.ghost {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
}

section { padding: 56px 0; }
h2 { font-size: 28px; margin: 0 0 8px; color: var(--navy); }
.sub { color: var(--muted); margin: 0 0 24px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.card img { height: 180px; width: 100%; object-fit: cover; }
.card .pad { padding: 16px; }
.card h3 { margin: 0 0 8px; font-size: 18px; }

.train {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}
.times { font-size: 32px; font-weight: 700; color: var(--navy); letter-spacing: -0.03em; }
.meta { color: var(--muted); font-size: 14px; }
.price { font-size: 24px; font-weight: 700; text-align: right; }

.form-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  display: grid;
  gap: 14px;
}
.note {
  background: #fff7e8;
  border-left: 4px solid var(--gold);
  padding: 12px 14px;
  font-size: 14px;
}

.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
.gallery img { height: 220px; object-fit: cover; width: 100%; border-radius: 12px; }
.gallery img:first-child { height: 450px; grid-row: span 2; }

footer.site {
  background: var(--navy);
  color: #d7dde4;
  padding: 40px 0 24px;
  font-size: 13px;
}
footer.site a { color: #fff; }
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.copy { margin-top: 24px; opacity: .75; }

.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; }
.info-table { width: 100%; border-collapse: collapse; background: #fff; }
.info-table th, .info-table td { border: 1px solid var(--line); padding: 12px; text-align: left; }
.info-table th { width: 34%; background: #f3efe6; }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 20px;
}
.head-tools { display: flex; gap: 10px; align-items: center; }
.user-chip { font-size: 13px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn.ghost { min-height: 40px; padding: 0 14px; }

.hero-apps {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hero-apps a {
  display: block;
  width: 200px;
  height: 60px;
  background: #000;
  border: 2px solid #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
}
.hero-apps img {
  width: 200px;
  height: 60px;
  object-fit: contain;
  background: #000;
}
.footer-apps {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.footer-apps a {
  display: block;
  width: 156px;
  height: 48px;
  background: #000;
  border: 1px solid #fff;
  border-radius: 10px;
  overflow: hidden;
}
.footer-apps img {
  width: 156px;
  height: 48px;
  object-fit: contain;
  background: #000;
}
.stops {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.ssl-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1f7a4d;
  font-weight: 700;
  font-size: 14px;
  background: #eef8f1;
  border: 1px solid #b7e0c4;
  border-radius: 10px;
  padding: 10px 12px;
}
.ssl-badge svg { flex-shrink: 0; }
.x-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  text-decoration: none;
}

@media (max-width: 800px) {
  .wrap { width: min(1120px, calc(100% - 20px)); }
  header.site .wrap { flex-wrap: wrap; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  nav.main {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    background: #fff;
  }
  nav.main.open { display: flex; }
  nav.main a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .search-card .row, .search-card .grid2, .cards, .train, .gallery, footer.site .cols, .contact-grid {
    grid-template-columns: 1fr;
  }
  .times { font-size: 24px; }
  .hero { min-height: 100svh; align-items: stretch; }
  .hero .content { padding: 88px 0 28px; }
  .hero h1 { font-size: 28px; max-width: none; }
  .hero-apps {
    position: absolute;
    left: 12px;
    top: 38%;
    transform: translateY(-50%);
    flex-direction: column;
    margin: 0;
  }
  .hero-apps a, .hero-apps img {
    width: 156px;
    height: 48px;
  }
  .swap {
    display: flex;
    margin: 0 auto;
  }
  .search-card .row { grid-template-columns: 1fr; }
  section { padding: 32px 0; }
  .gallery img, .gallery img:first-child { height: 180px; grid-row: auto; }
  .train { grid-template-columns: 1fr; }
  .price, .train .btn { width: 100%; text-align: left; }
  .btn.wide, .train .btn { min-height: 54px; font-size: 17px; }
  .topbar { font-size: 11px; }
  .cal-pop {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 12px;
    width: auto;
  }
}
