/* =========================
   リセット・CSS変数
========================= */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --white:   #ffffff;
  --black:   #0a0a0a;
  --gray-50: #f8f8f8;
  --gray-100:#f0f0f0;
  --gray-200:#e0e0e0;
  --gray-400:#999999;
  --gray-600:#555555;
  --gray-800:#222222;
  --accent:  #2563eb;
  --accent-dark: #1d4ed8;
  --danger:  #dc2626;
  --warn:    #d97706;
  --success: #16a34a;

  --font-en: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-ja: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.10);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.14);

  --nav-h: 72px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-ja);
  font-size: 16px;
  line-height: 1.8;
  background: var(--white);
  color: var(--black);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* =========================
   グローバルナビ
========================= */

.global-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--black);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 0;
}

.global-nav__logo {
  font-family: var(--font-en);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.global-nav__logo span {
  color: var(--accent);
}

.global-nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  list-style: none;
}

.global-nav__links a {
  display: block;
  padding: 10px 16px;
  font-family: var(--font-ja);
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.global-nav__links a:hover,
.global-nav__links a.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

@media (max-width: 640px) {
  .global-nav { padding: 0 20px; }
  .global-nav__logo { font-size: 16px; }
}

/* =========================
   ページラッパー
========================= */

.wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 56px 32px 100px;
}

@media (max-width: 640px) {
  .wrap { padding: 36px 20px 72px; }
}

/* =========================
   SNS リンク
========================= */

.sns-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 32px;
}

.sns-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  transition: transform 0.2s, opacity 0.2s;
  text-decoration: none;
  flex-shrink: 0;
}

.sns-link:hover { transform: translateY(-2px); opacity: 0.85; }
.sns-link img { width: 22px; height: 22px; display: block; }
.sns-link--line      { background: #06C755; }
.sns-link--x         { background: #000000; border: 1px solid #333; }
.sns-link--instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.sns-link--threads   { background: #000000; border: 1px solid #333; }
.sns-link--discord   { background: #5865F2; }
.sns-link--mail      { background: #333333; }

/* =========================
   ページヘッダー
========================= */

.page-header {
  margin-bottom: 56px;
  border-bottom: 3px solid var(--black);
  padding-bottom: 28px;
}

@media (max-width: 640px) {
  .page-header { margin-bottom: 32px; padding-bottom: 20px; }
}

.page-header__eyebrow {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.page-header__title {
  font-family: var(--font-en);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--black);
  margin-bottom: 14px;
}

.page-header__sub {
  font-size: 16px;
  color: var(--gray-600);
  line-height: 1.8;
}

#last-updated {
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 8px;
}

/* =========================
   セクションラベル
========================= */

.section-label {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 14px;
}

/* =========================
   カード
========================= */

.card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 16px;
}

.card--dark { background: var(--gray-50); }

/* =========================
   ボタン
========================= */

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: none;
  border-radius: var(--radius-md);
  padding: 18px 28px;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-ja);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}

button:hover, .btn:hover {
  background: var(--gray-800);
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn--accent { background: var(--accent); }
.btn--accent:hover { background: var(--accent-dark); }

.btn--outline {
  background: transparent;
  color: var(--black);
  border: 2px solid var(--black);
}
.btn--outline:hover { background: var(--black); color: var(--white); }

.btn--sm { width: auto; padding: 10px 20px; font-size: 13px; }

/* =========================
   フォーム
========================= */

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-600);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 14px 18px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: var(--font-ja);
  font-size: 16px;
  color: var(--black);
  background: var(--white);
  transition: border-color 0.2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus { border-color: var(--black); }
.form-input::placeholder { color: var(--gray-400); font-size: 14px; }

/* =========================
   ラジオ・チェックボックス
========================= */

.radio-group { display: flex; gap: 10px; flex-wrap: wrap; }

.radio-btn {
  flex: 1;
  min-width: 160px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--white);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-600);
  transition: border-color 0.2s, color 0.2s;
}

.radio-btn input[type="radio"] { width: 16px; height: 16px; cursor: pointer; }
.radio-btn:has(input:checked) { border-color: var(--black); color: var(--black); background: var(--gray-50); }

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--black);
  user-select: none;
}

.check-row input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--black); }

/* =========================
   距離ステージ
========================= */

.stage-container { display: flex; gap: 8px; width: 100%; }

.stage {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 14px 4px;
  cursor: pointer;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  transition: all 0.15s;
  user-select: none;
}

.stage:hover { border-color: var(--black); }
.stage.active { background: var(--black); border-color: var(--black); color: var(--white); }
.stage-km { font-family: var(--font-en); font-size: 22px; font-weight: 900; color: inherit; }
.stage-label { font-size: 11px; font-weight: 700; opacity: 0.7; color: inherit; }

/* =========================
   エラー・ローディング
========================= */

#error {
  display: none;
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: var(--danger);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
}

#loading {
  display: none;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  color: var(--gray-600);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 16px;
  font-weight: 700;
  text-align: center;
  font-size: 15px;
}

/* =========================
   配布ステータスバッジ
========================= */

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 12px;
}

/* 再開予告（バッジ直下に表示） */
.status-badge-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.resume-note {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-600);
  line-height: 1.4;
  padding-left: 2px;
}

/* smサイズ（カード一覧・ルートなど）は少しコンパクトに */
.status-badge-wrap--sm .resume-note {
  font-size: 10px;
}

/* =========================
   距離バッジ
========================= */

.dist-badge {
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  vertical-align: middle;
}

.dist-badge--road     { color: var(--success); background: #dcfce7; }
.dist-badge--estimate { color: var(--warn);    background: #fef3c7; }

/* =========================
   検索結果リスト
========================= */

.item {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.item:hover { border-color: var(--black); box-shadow: var(--shadow-md); }

/* =========================
   現在地情報
========================= */

#current-info { display: none; }

/* =========================
   パンくずリスト
========================= */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-400);
  margin-bottom: 28px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .breadcrumb { margin-bottom: 16px; }
}

.breadcrumb a { color: var(--gray-600); text-decoration: none; transition: color 0.15s; }
.breadcrumb a:hover { color: var(--black); }
.breadcrumb__sep { color: var(--gray-200); }

/* =========================
   レスポンシブ調整
========================= */

@media (max-width: 480px) {
  .radio-btn { min-width: 130px; font-size: 14px; }
}

/* =========================
   グローバルナビ SNS（ヘッダー内）
========================= */

.global-nav__sns {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 16px;
  flex-shrink: 0;
}

.global-nav__sns-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  opacity: 0.85;
  transition: opacity 0.2s, transform 0.2s;
  text-decoration: none;
  flex-shrink: 0;
}

.global-nav__sns-link:hover { opacity: 1; transform: translateY(-2px); }
.global-nav__sns-link svg   { width: 18px; height: 18px; display: block; fill: white; }

/* モバイルメニュー内SNS */
.mobile-menu__sns .global-nav__sns-link { width: 38px; height: 38px; }
.mobile-menu__sns .global-nav__sns-link svg { width: 20px; height: 20px; }

/* =========================
   ローディングテキスト
========================= */

.loading-text {
  text-align: center;
  color: var(--gray-400);
  font-size: 15px;
  padding: 40px;
}

/* =========================
   ハンバーガーメニュー
========================= */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  padding: 10px;
  cursor: pointer;
  margin-left: auto;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}

.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  right: 0;
  width: min(320px, 88vw);
  height: calc(100dvh - var(--nav-h));
  background: var(--black);
  z-index: 99;
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.mobile-menu.is-open { transform: translateX(0); }

.mobile-menu__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-menu__links a {
  display: block;
  padding: 16px 14px;
  font-family: var(--font-ja);
  font-size: 16px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.mobile-menu__links a:hover,
.mobile-menu__links a.active { color: var(--white); background: rgba(255,255,255,0.08); }

.mobile-menu__sns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.mobile-menu__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.mobile-menu__overlay.is-open { opacity: 1; pointer-events: auto; }

@media (max-width: 860px) {
  .hamburger { display: flex; }
  .global-nav__links { display: none; }
  .global-nav__sns { display: none; }
}

/* =========================
   出発時刻 input高さ統一
========================= */

input[type="time"].modern-input,
input[type="text"].modern-input,
select.modern-input { min-height: 50px; height: 50px; }

/* スクリーンリーダー専用（SEO用h1など） */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ヘッダーロゴアイコン */
.global-nav__logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  margin-right: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}
/* =========================
   開発中バッジ (feature-card--dev)
========================= */

.feature-card--dev {
  cursor: default;
  opacity: 0.75;
  border-style: dashed;
  pointer-events: none;
}

.feature-card__dev-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: var(--warn);
  color: white;
  border-radius: 4px;
  padding: 2px 7px;
  margin-left: 8px;
  vertical-align: middle;
}

/* =========================
   スマホ: モバイルメニュー重なり防止
========================= */

.about-sns {
  position: relative;
  z-index: 1;
}

/* モバイルメニューは必ず最前面 */
.mobile-menu {
  z-index: 200;
}
.mobile-menu__overlay {
  z-index: 199;
}

/* =========================
   営業時間テーブル (ScheduleBlock)
========================= */

.sch-wrap {
  overflow-x: auto;
  margin-top: 8px;
  -webkit-overflow-scrolling: touch;
}

.sch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 300px;
}

.sch-table thead th {
  font-size: 11px;
  font-weight: 700;
  color: #888;
  padding: 4px 2px;
  text-align: center;
  border-bottom: 1.5px solid #e8e8e8;
  white-space: nowrap;
}

.sch-table thead th.sch-th-period {
  text-align: left;
  padding-left: 0;
  width: 60px;
}

.sch-table thead th.sch-th-time {
  text-align: left;
  width: 110px;
  padding-right: 6px;
}

.sch-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
}

.sch-table tbody tr:last-child {
  border-bottom: none;
}

.sch-table tbody td {
  padding: 6px 2px;
  text-align: center;
  vertical-align: middle;
}

.sch-table tbody td.sch-period {
  text-align: left;
  padding-left: 0;
  font-size: 11px;
  color: #555;
  white-space: nowrap;
}

.sch-table tbody td.sch-time {
  text-align: left;
  font-size: 12px;
  color: #1a1a1a;
  font-weight: 600;
  white-space: nowrap;
  padding-right: 6px;
}

.day-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 900;
}

.day-closed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: #ccc;
  font-size: 12px;
}
