/* 香港・深圳・マカオ旅行計画アプリ スタイルシート */
:root {
  --bg-main: #f4f7fb;
  --bg-card: #ffffff;
  --bg-subtle: #edf2f9;
  --bg-dark: #0f172a;
  --bg-sidebar: #111827;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-strong: #cbd5e1;

  /* ブランド・アクセントカラー */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #dbeafe;
  --accent-tech: #0d9488;
  --accent-tech-light: #ccfbf1;
  --accent-purple: #7c3aed;
  --accent-purple-light: #ede9fe;

  /* ステータスカラー（未確認・参考・試算・確定を厳格に区別） */
  --status-confirmed-bg: #dcfce7;
  --status-confirmed-text: #166534;
  --status-confirmed-border: #86efac;

  --status-ref-bg: #e0f2fe;
  --status-ref-text: #075985;
  --status-ref-border: #7dd3fc;

  --status-sim-bg: #f3e8ff;
  --status-sim-text: #6b21a8;
  --status-sim-border: #d8b4fe;

  --status-unconfirmed-bg: #fef3c7;
  --status-unconfirmed-text: #92400e;
  --status-unconfirmed-border: #fcd34d;

  --status-critical-bg: #fee2e2;
  --status-critical-text: #991b1b;
  --status-critical-border: #fca5a5;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.14);
}

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

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo", -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* アプリ全体レイアウト */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* サイドバー（PC用） */
.sidebar {
  width: 268px;
  background: var(--bg-sidebar);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-brand {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-badge {
  display: inline-block;
  background: linear-gradient(135deg, #2563eb, #0d9488);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.sidebar-brand h1 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: #ffffff;
}

.sidebar-brand p {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 4px;
}

/* アクティブプラン切替ボックス（サイドバー内） */
.sidebar-plan-switcher {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-plan-switcher label {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 6px;
  font-weight: 600;
}

.plan-select-control {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #1e293b;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.sidebar-route-toggle {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.sidebar-route-toggle .toggle-label {
  font-size: 11px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.route-mode-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.route-mode-btn {
  font-size: 11px;
  padding: 5px 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.6);
  color: #cbd5e1;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.route-mode-btn.active {
  background: var(--accent-tech);
  color: #fff;
  border-color: #14b8a6;
  font-weight: 700;
}

/* ナビゲーションメニュー */
.nav-menu {
  list-style: none;
  padding: 12px 10px;
  flex: 1;
}

.nav-item {
  margin-bottom: 4px;
}

.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-btn.active {
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.nav-icon {
  font-size: 16px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #f8fafc;
}

.nav-badge.warn {
  background: #f59e0b;
  color: #111827;
  font-weight: 700;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: #94a3b8;
}

/* メインコンテンツ領域 */
.main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: 72px; /* モバイル下部ナビ用余白 */
}

/* トップヘッダーバー */
.top-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 80;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.header-trip-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.trip-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--text-main);
  font-weight: 600;
}

.trip-chip.route {
  background: var(--primary-light);
  color: var(--primary-hover);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ステータスバッジ共通 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-confirmed, .badge-booked {
  background: var(--status-confirmed-bg);
  color: var(--status-confirmed-text);
  border-color: var(--status-confirmed-border);
}

.badge-reference {
  background: var(--status-ref-bg);
  color: var(--status-ref-text);
  border-color: var(--status-ref-border);
}

.badge-simulated {
  background: var(--status-sim-bg);
  color: var(--status-sim-text);
  border-color: var(--status-sim-border);
}

.badge-unconfirmed {
  background: var(--status-unconfirmed-bg);
  color: var(--status-unconfirmed-text);
  border-color: var(--status-unconfirmed-border);
}

.badge-critical {
  background: var(--status-critical-bg);
  color: var(--status-critical-text);
  border-color: var(--status-critical-border);
}

.badge-tech {
  background: var(--accent-tech-light);
  color: #0f766e;
  border-color: #5eead4;
}

/* コンテンツコンテナ */
.content-container {
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 24px;
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
  animation: fadeIn 0.18s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ページ見出し */
.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.section-title-group h2 {
  font-size: 21px;
  font-weight: 800;
  color: var(--bg-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title-group p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ボタン */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  background: var(--bg-subtle);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-tech {
  background: var(--accent-tech);
  color: #fff;
  border-color: var(--accent-tech);
}
.btn-tech:hover {
  background: #0f766e;
}

.btn-sim {
  background: var(--status-sim-bg);
  color: var(--status-sim-text);
  border-color: var(--status-sim-border);
}
.btn-sim:hover {
  background: #e9d5ff;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-danger {
  background: #fff;
  color: #dc2626;
  border-color: #fca5a5;
}
.btn-danger:hover {
  background: #fef2f2;
}

/* アラート・ポリシーバナー */
.policy-banner {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.policy-banner.critical {
  background: #fef2f2;
  border-color: #fecaca;
  border-left-color: #ef4444;
}

.policy-banner.info {
  background: #f0f9ff;
  border-color: #bae6fd;
  border-left-color: #0284c7;
}

.policy-banner-text h4 {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.policy-banner-text p {
  font-size: 12.5px;
  color: #334155;
}

/* グリッド＆カード */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--bg-dark);
  display: flex;
  align-items: center;
  gap: 7px;
}

/* KPI カード */
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.kpi-value {
  font-size: 23px;
  font-weight: 800;
  color: var(--bg-dark);
  margin: 8px 0 4px;
  letter-spacing: -0.02em;
}

.kpi-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* プログレス・予算バー */
.budget-meter {
  margin-top: 10px;
}

.budget-bar-track {
  height: 10px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
}

.budget-bar-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.fill-confirmed { background: #16a34a; }
.fill-reference { background: #0284c7; }
.fill-simulated { background: #9333ea; }

.budget-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 4px;
}

/* テーブル共通 */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.data-table th,
table.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  vertical-align: middle;
}

table.data-table th {
  background: var(--bg-subtle);
  font-weight: 700;
  color: #334155;
  font-size: 12px;
  white-space: nowrap;
}

table.data-table tr:hover td {
  background: #f8fafc;
}

table.data-table tr.selected-row td {
  background: #eff6ff;
}

.num-col {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}

/* フィルタバー */
.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-group label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.form-control {
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: #fff;
  color: var(--text-main);
}

.form-control:focus {
  outline: 2px solid var(--primary-light);
  border-color: var(--primary);
}

/* ホテルカード・ロボット施設カード */
.stay-slot-section {
  margin-bottom: 24px;
}

.stay-slot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #1e293b, #334155);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.stay-slot-body {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 16px;
}

.candidate-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}

.candidate-card {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 15px;
  background: #fff;
  position: relative;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.candidate-card.selected {
  border-color: var(--primary);
  background: #f8fbff;
  box-shadow: 0 3px 12px rgba(37, 99, 235, 0.12);
}

.candidate-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--bg-dark);
  margin-bottom: 6px;
}

.meta-list {
  list-style: none;
  font-size: 12.5px;
  color: #475569;
  margin: 8px 0 12px;
}

.meta-list li {
  margin-bottom: 4px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.meta-list li strong {
  color: #1e293b;
  min-width: 72px;
  flex-shrink: 0;
}

/* ロボット視察マップ＆カード */
.robotics-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}

.map-box {
  background: #0f172a;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  min-height: 430px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.map-tabs {
  display: flex;
  background: #1e293b;
  padding: 8px 12px;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.map-tab-btn {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
}

.map-tab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.leaflet-container-box {
  width: 100%;
  height: 400px;
  background: #e2e8f0;
}

.svg-schematic-box {
  width: 100%;
  height: 400px;
  background: radial-gradient(circle at 50% 45%, #1e293b 0%, #0f172a 100%);
  position: relative;
}

/* 日別タイムライン */
.day-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.day-tab-btn {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  cursor: pointer;
  text-align: left;
  min-width: 145px;
  transition: all 0.15s;
}

.day-tab-btn:hover {
  border-color: var(--primary);
}

.day-tab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
}

.day-tab-btn .day-num {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.85;
}

.day-tab-btn .day-date {
  font-size: 13.5px;
  font-weight: 800;
  margin: 2px 0;
}

.day-tab-btn .day-city {
  font-size: 11.5px;
  opacity: 0.9;
}

.timeline-list {
  position: relative;
  padding-left: 26px;
  margin-top: 14px;
}

.timeline-list::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #cbd5e1;
}

.timeline-item {
  position: relative;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-item.cat-robotics {
  border-left: 4px solid var(--accent-tech);
  background: #f0fdfa;
}
.timeline-item.cat-robotics::before {
  background: var(--accent-tech);
  box-shadow: 0 0 0 2px var(--accent-tech);
}

.timeline-item.cat-border {
  border-left: 4px solid #f59e0b;
}
.timeline-item.cat-border::before {
  background: #f59e0b;
  box-shadow: 0 0 0 2px #f59e0b;
}

.timeline-item.cat-flight {
  border-left: 4px solid var(--primary);
  background: #f8fbff;
}

.timeline-item.cat-sightseeing {
  border-left: 4px solid var(--accent-purple);
}
.timeline-item.cat-sightseeing::before {
  background: var(--accent-purple);
  box-shadow: 0 0 0 2px var(--accent-purple);
}

.timeline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.timeline-time {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--bg-dark);
  background: var(--bg-subtle);
  padding: 2px 8px;
  border-radius: 4px;
}

.timeline-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--bg-dark);
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* 3プラン比較カード */
.plan-compare-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.plan-col-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.plan-col-card.active-plan {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.metric-bar-row {
  margin-bottom: 10px;
}

.metric-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 3px;
}

.metric-bar-bg {
  height: 7px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
}

.metric-bar-fill {
  height: 100%;
  border-radius: 999px;
}

/* モーダル */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 22px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

/* スマートフォン下部ナビゲーション */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-sidebar);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 200;
  padding: 4px 6px;
  justify-content: space-around;
}

.mobile-nav-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 6px 2px;
  font-size: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  border-radius: 6px;
}

.mobile-nav-btn.active {
  color: #fff;
  background: rgba(37, 99, 235, 0.35);
  font-weight: 700;
}

.mobile-nav-btn .m-icon {
  font-size: 15px;
}

/* トースト通知 */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #0f172a;
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--accent-tech);
}

/* レスポンシブ対応（タブレット・スマートフォン） */
@media (max-width: 1100px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .robotics-layout {
    grid-template-columns: 1fr;
  }
  .plan-compare-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .sidebar {
    display: none;
  }
  .main-area {
    padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  }
  .mobile-bottom-nav {
    display: flex;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .content-container {
    padding: 14px 12px;
  }
  .top-header {
    padding: 10px 12px;
    gap: 8px;
  }
  .header-trip-chips .trip-chip:not(.route) {
    display: none;
  }
  .header-right {
    width: 100%;
    justify-content: space-between;
  }
  #headerPlanSelect {
    flex: 1;
    max-width: none !important;
  }
  /* iOS Safariでの入力時自動ズーム防止＆タッチ操作性向上 */
  .form-control, select, input, textarea {
    font-size: 16px !important;
  }
  .candidate-cards {
    grid-template-columns: 1fr;
  }
  .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .toast-container {
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    right: 12px;
    left: 12px;
  }
}

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

/* 印刷用スタイル */
@media print {
  .sidebar, .mobile-bottom-nav, .top-header .header-right, .section-actions, .btn {
    display: none !important;
  }
  .main-area {
    padding-bottom: 0;
  }
  .view-section {
    display: block !important;
    page-break-after: always;
  }
  body {
    background: #fff;
  }
}
