* {
  box-sizing: border-box;
}

:root{
  --ink:#0e1220; --muted:#6b7280;
  --bg:#f6fbff; --line:#cce7ff; --cell:#e8f6ff;
  --pill-bg:#fff; --pill-border:#dbe5ef; --pill-shadow:0 2px 6px rgba(0,0,0,.06);

  /* 甲休の色（セル＝濃いめ／ボタン＝薄め） */
  --holiday-cell-strong:#ffd3de;   /* td 背景（濃いめピンク） */
  --holiday-pill-soft:#fff0f4;     /* ルート pill 背景（薄めピンク） */
  --holiday-border:#e8b0c0;

  --accent:#0c5abf; --accent-weak:#daf2ff; --thead-bg:#dff4ff;
}
body.theme-holiday{
  --bg:#fff7f7; --line:#ffd3d3; --cell:#ffecec;
  --accent:#c91d47; --accent-weak:#ffe1e8; --thead-bg:#ffe6ea;

  /* テーマ切替時も同じトーンで見えるよう固定 */
  --holiday-cell-strong:#ffd3de;
  --holiday-pill-soft:#fff0f4;
  --holiday-border:#e8b0c0;
}

/* ヘッダー */
.page-header{padding:14px 12px 8px}
.title{margin:0 0 6px 0;font-size:18px;line-height:1.3}
.notes{margin:0;color:#6b7280;font-size:11px;line-height:1.5}
.wrap{padding:0 8px 84px 8px}

/* タブ */
.tabs{display:flex;gap:8px;padding:8px}
.tab{
  appearance:none;border:1px solid var(--pill-border);
  background:#fff;border-radius:999px;padding:8px 10px;font-size:16px
}
.tab.is-active{background:var(--accent);border-color:var(--accent);color:#fff}

/* タイトル帯：下だけ直角＆少し余白 */
.grid-header{padding:8px 10px;margin-top:4px}
.grid-title{
  margin:0 0 6px 0;
  padding:8px 10px;
  border-radius:12px;
  border-bottom-left-radius:0;
  border-bottom-right-radius:0;
  background:var(--cell);
  color:#0a2038;font-weight:700;text-align:center
}

/* テーブル：上だけ直角（下は丸） */
.route-table{
  width:100%;border-collapse:separate;border-spacing:0;
  box-shadow:none;border-radius:0 0 12px 12px;
  overflow:hidden;
}
.route-table th,.route-table td{
  padding:6px;border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  background:var(--cell);
  background-clip:padding-box;
  height:50px;
}
.route-table td:last-child,.route-table th:last-child{border-right:none}

/* 角丸セル：下側のみ丸く（上は直角のまま） */
.route-table thead tr:first-child th:first-child{border-top-left-radius:0}
.route-table thead tr:first-child th:last-child{border-top-right-radius:0}
.route-table tbody tr:last-child td:first-child{border-bottom-left-radius:12px}
.route-table tbody tr:last-child td:last-child{border-bottom-right-radius:12px}

/* セクション行 */
.section-row td{background:var(--cell)}
.section-title-cell{
  font-weight:800;text-align:center;
  color:#0a2038;background:var(--cell);
}

/* 甲休：セルは濃いめピンク／ボタンは薄めピンク */
.route-table td.is-holidaycell{
  background:var(--holiday-cell-strong);
  border-color:var(--holiday-border);
}
.route-table td.is-holidaycell .route-pill{
  background:var(--holiday-pill-soft);
}

/* Pill（中央寄せ＋改行保持） */
.route-cell{
  display:flex;align-items:center;justify-content:center;
  height:100%;width:100%;
}
.route-pill{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:46px;max-width:90%;
  padding:6px 9px;border-radius:16px;
  border:1px solid var(--pill-border);
  background:var(--pill-bg);
  box-shadow:var(--pill-shadow);
  text-decoration:none;color:#111827;font-weight:600;
  font-size:13px;letter-spacing:-0.2px;
  white-space:pre-line;
  text-align:center;
}
.route-pill[aria-disabled="true"]{opacity:.45;pointer-events:none}

@media (max-width:414px){
  .route-pill{min-width:40px;padding:5px 7px;border-radius:14px;font-size:12px}
  .route-table td{height:46px}
}

/* express.js で1列表示の際にボタン幅を広げるためのスタイル */
.route-pill.is-fullwidth {
  width: 80%;
  max-width: 400px;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* ▼▼▼ 修正点：ここから下を追加 ▼▼▼ */
/* フッターメニューの縦幅を微調整 */
.bottom-nav a {
  padding-top: 8px;
  padding-bottom: 8px;
}