    body {
      font-family: "Noto Sans JP", sans-serif;
      background: #f8f9fa;
      margin: 0;
      padding: 0;
    }

nav {
  background: #c62828;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 20px 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header-left {
  font-size: 12px;
  font-weight: bold;
}

.header-toplink {
  text-align: center;
  text-decoration: none;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.header-toplink svg.icon {
  width: 20px;
  height: 20px;
  margin-bottom: 1px;
  stroke: white;
  transition: 0.2s;
}

.header-toplink .label {
  font-size: 9px;
  font-weight: normal;
  opacity: 0.9;
  margin-top: 0;
  letter-spacing: 0.5px;
}

.header-toplink:hover svg.icon {
  stroke: #ffeeee; /* ホバー時に少し明るく */
}

.header-toplink img {
  width: 20px;
  height: 20px;
  margin-bottom: 1px;
}

.header-toplink .label {
  font-size: 9px;
  font-weight: normal;
  opacity: 0.9;
  margin-top: 0;
  letter-spacing: 0.5px;
}

    nav .title {
      font-size: 12px;
      font-weight: bold;
    }

    main {
      padding: 20px 15px;
      max-width: 1200px;
      margin: 0 auto;
    }

    h1 {
      font-size: 19px;
      margin-bottom: 13px;
    }

    #nextBlock {
      background: #fff59d;
      padding: 20px 25px;
      border-radius: 12px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.2);
      margin-bottom: 10px;
    }

    #nextMain {
      font-size: 20px;
      font-weight: bold;
      color: #000;
      margin-bottom: 5px;
      line-height: 1.5;
    }

    #upcoming {
      font-size: 17px;
      color: #333;
      line-height: 1.6;
    }

    #upcoming div {
      font-size: 13px;
      color: #444;
      margin-top: 3px;
    }

    #time {
      margin-top: 7px;
      color: #555;
      font-size: 11px;
    }

    .layout {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    .time-row {
      font-family: monospace;
      font-size: 12px;
    }

    @media (min-aspect-ratio: 4/3) {
      .layout {
        flex-direction: row;
        align-items: flex-start;
      }
      .left-side {
        flex: 1.2;
        max-width: 700px;
      }
      .right-side {
        flex: 1;
        margin-left: 30px;
      }
    }

/* 時刻表テーブル風 */
.schedule {
  background: #fff;
  border: 1px solid #aaa;
  border-radius: 8px;
  padding: 12px 12px 14px 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  font-family: "Noto Sans JP", sans-serif;
}

.schedule-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 8px;
  border-bottom: 3px solid #333;
  padding-bottom: 4px;
}

.day-title {
  font-weight: bold;
  font-size: 14px;
  padding: 6px 0 4px 0;
  border-bottom: 2px solid #000;
  margin: 8px 0 8px 0;
}

.timetable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  border: 1px solid #ccc;
}

.timetable th, .timetable td {
  border: 1px solid #ccc;
  padding: 4px 6px;
  text-align: left;   /* ← 左揃えに変更 */
}

.timetable th.hour-col {
  width: 40px;
  text-align: right;  /* 時の列だけ右揃え */
  background: #f7f7f7;
  font-weight: bold;
}



.timetable thead th {
  background: #f3f3f3;
  font-weight: bold;
  text-align: center;
  padding: 6px 0;
  border-bottom: 1px solid #ccc;
  position: sticky;
  top: 0;
  z-index: 1;
}

.timetable td.has-train {
  background: #fffde7;        /* 薄い黄色で列車ありを強調 */
  font-weight: bold;
  color: #000;
  box-shadow: inset 0 0 0 1px #e0d98f;
}

.timetable td.now-hour {
  background: #e8f5e9;        /* 現在時刻の時間行を淡緑でハイライト */
}

.timetable-wrapper {
  max-height: 420px;          /* 必要に応じて調整 */
  overflow: auto;
  border: 1px solid #ddd;
  border-radius: 6px;
}

/* ヘッダーの分表示（5分刻みの目印を少し強調） */
.timetable thead th.minute-head[data-min5="true"] {
  color: #333;
  font-weight: bold;
}

.switch-container {
  display: flex;
  flex-direction: column;
  gap: 8px; /* 上下の間隔 */
  margin-bottom: 8px;
}

.day-switch, .track-switch {
  display: flex;
  gap: 6px;
}

.switch-container button {
  padding: 6px 12px;
  border: 1px solid #c62828;
  border-radius: 4px;
  background: #fff;
  color: #c62828;
  font-weight: bold;
  cursor: pointer;
}

/* アクティブ状態を路線カラーで塗りつぶし */
.switch-container button.active {
  background: #c62828;
  color: #fff;
}

/* 京都市営地下鉄風 小野駅名標（簡易版） */
.ono-sign {
  background: #fff;
  border: 1.5px solid #c62828;
  border-radius: 4px;
  width: 95%;
  max-width: 520px;
  margin: 10px auto 18px;
  text-align: center;
  font-family: "Noto Sans JP", sans-serif;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ono-sign .main {
  padding: 10px 10px 6px;
}

.ono-sign .jp {
  font-size: 22px;
  font-weight: bold;
  color: #000;
  margin-bottom: 3px;
}

.ono-sign .kana {
  font-size: 13px;
  color: #333;
}

.ono-sign .bar {
  background: #c62828;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 12px;
  font-size: 13px;
  border-radius: 0 0 3px 3px;
}

.ono-sign .left {
  text-align: left;
}

.ono-sign .right {
  text-align: right;
}

.ono-sign .bar a.neighbor {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  transition: 0.2s;
}

.dest-blue {
  color: #1565c0;
  font-weight: bold;
}

.dest-gray {
  color: #808080;
  font-weight: bold;
}

.dest-under {
  font-weight: bold;
  text-decoration: underline; 
}

.remarks {
  margin-top: 8px;
  font-size: 12px;
  color: #333;
}

/* --- モーダル用CSS（最終調整版） --- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #fff;
  width: 92%;
  max-width: 400px;
  height: 85vh;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
  flex-shrink: 0;
  background: #fff;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.train-info-title {
  font-size: 16px;
  font-weight: bold;
  color: #333;
}

.train-info-sub {
  font-size: 13px;
  color: #666;
  margin-top: 4px;
}

.close-btn {
  width: 32px;
  height: 32px;
  background: #f0f0f0;
  border-radius: 50%;
  border: none;
  color: #666;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.close-btn:hover {
  background: #e0e0e0;
  color: #333;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex-grow: 1;
  -webkit-overflow-scrolling: touch;
}

.stop-item {
  display: flex;
  min-height: 55px; /* 高さを少し確保 */
  position: relative;
}

.stop-time {
  width: 55px;
  font-family: 'Consolas', monospace;
  font-size: 14px;
  color: #333;
  padding-top: 5px;
}

.stop-line-container {
  width: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* 垂直ライン（隙間を埋めるため絶対配置） */
.line-bar {
  position: absolute;
  top: 5px; /* 丸の中心から開始 */
  bottom: -5px; /* 次の要素まで伸ばす */
  width: 6px;
  background-color: #c62828;
  z-index: 1;
}

.line-bar.passed {
  background-color: #ccc;
}

.line-node {
  width: 12px;
  height: 12px;
  background-color: #fff;
  border: 3px solid #c62828;
  border-radius: 50%;
  z-index: 2;
  margin-top: 5px;
}

.line-node.passed {
  border-color: #999;
}

.stop-name-box {
  padding: 0 0 25px 15px;
  font-size: 16px;
  flex-grow: 1;
}

.stop-link {
  text-decoration: none;
  color: #1565c0;
  font-weight: bold;
}

/* 最後の駅は棒を表示しない */
.stop-item:last-child .line-bar {
  display: none;
}

/* お知らせ欄の共通デザイン */
.osirase-outer-box {
  width: 90%; max-width: 520px;
  margin: 10px auto 18px;
  padding: 10px;
  background: #f9f9f9;
  border: 1.5px solid #c62828;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.osirase-title-row {
  font-size: 17px; font-weight: bold; margin-bottom: 10px;
  color: #c62828; border-bottom: 2px solid #c62828; padding-bottom: 4px;
}
.fav-btn-style {
  background:#fff; border:2px solid #c62828; color:#c62828;
  font-weight:bold; padding:6px 14px; border-radius:6px; cursor:pointer;
}
.fav-btn-style:disabled { opacity: 0.6; cursor: default; }

/* --- モーダル内のタイムラインデザイン --- */
.stop-item {
  display: flex;
  min-height: 55px; /* 各駅の高さ確保 */
  position: relative;
}

.stop-time {
  width: 55px;
  font-family: 'Consolas', monospace;
  font-size: 14px;
  color: #333;
  padding-top: 5px;
  text-align: right;
  padding-right: 10px;
  box-sizing: border-box;
}

.stop-line-container {
  width: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* 縦の線（絶対配置で隙間なく繋げる） */
.line-bar {
  position: absolute;
  top: 5px;     /* 丸の中心から開始 */
  bottom: -5px; /* 次の要素まで伸ばす */
  width: 6px;
  background-color: #c62828;
  z-index: 1;
}

.line-bar.passed {
  background-color: #ccc;
}



.line-node.passed {
  border-color: #999;
}

.stop-name-box {
  padding: 0 0 25px 15px;
  font-size: 16px;
  flex-grow: 1;
  display: flex;
  align-items: flex-start;
}

.stop-link {
  text-decoration: none;
  color: #333;
  transition: color 0.2s;
}







/* --- 駅施設案内（最終調整版） --- */
.guide-container { 
    background: #f0f0f0; 
    font-family: sans-serif; 
    border: 1px solid #ccc;
    overflow: hidden;
}

.guide-header { 
    background: #ee3c23; 
    color: white; 
    padding: 8px 15px; 
    font-weight: bold; 
    font-size: 16px; 
}

/* 凡例ブロック：文字をさらに小さく */
.legend-block {
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 5px 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
}
.legend-item {
    display: flex;
    align-items: center;
    font-size: 10px; /* 11px -> 10pxに縮小 */
    color: #444;
    font-weight: bold;
}
.l-icon { 
    width: 14px; height: 14px; 
    margin-right: 3px; 
    background: #fff; 
    border: 1px solid #999; 
    padding: 1px; 
}

.guide-body { padding: 15px; }

/* グリッド設定 */
.guide-grid {
    display: grid; 
    grid-template-columns: repeat(6, 1fr);
    column-gap: 4px; 
    margin-bottom: 10px; 
    align-items: end;
}
.grid-col { display: flex; flex-direction: column; align-items: center; }

/* 改札ラベル */
.row-gate { height: 22px; width: 100%; position: relative; display: flex; justify-content: center; }
.gate-banner-container { position: absolute; top: 0; z-index: 5; }
.gate-banner {
    background: #ee3c23; color: white; font-size: 10px; font-weight: bold;
    padding: 1px 10px; border-radius: 10px; white-space: nowrap;
}

/* アイコンエリア：中央揃え */

.f-icon {
    width: 22px; height: 22px;
    object-fit: contain; background: #fff; 
    border: 1px solid #999; border-radius: 3px; 
    padding: 1px;
}

/* 車両デザイン：縦幅22px */
.row-car { width: 100%; position: relative; }
.train-car {
    background: #ed7d31; 
    border: 2px solid #c55a1e; 
    height: 22px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: #000; 
    font-weight: bold; 
    font-size: 14px; 
    position: relative;
    z-index: 2;
}

/* 先頭車：鼻先の枠線問題を解決 */
.head-car { 
    border-left: none; 
    margin-left: 10px; 
    width: calc(100% - 10px); 
}
.head-car::before {
    content: ''; 
    position: absolute; 
    left: -8px; /* 突き出し量の調整 */
    top: 50%;
    width: 15.5px; /* 高さ22pxに合わせた対角線サイズ */
    height: 15.5px;
    background: #ed7d31;
    border-left: 2px solid #c55a1e;
    border-bottom: 2px solid #c55a1e;
    transform: translateY(-50%) rotate(45deg); /* 45度回転させて鼻先を作る */
    z-index: -1; /* 本体背面に配置 */
}

/* フッター：方向のみ */
.guide-footer { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-size: 12px; 
    font-weight: bold;
    border-top: 1px solid #ccc; 
    padding-top: 8px; 
}
.direction { color: #333; }

/* --- レイアウト設定 (style.cssの該当箇所を修正) --- */

.layout {
  display: flex;
  flex-direction: column; /* スマホでは縦並び */
  gap: 25px;
}

@media (min-width: 900px) { /* PC・タブレット表示 */
  .layout {
    flex-direction: row; /* 記述順通り、左：info / 右：schedule */
    align-items: flex-start;
  }

  /* 左側（駅名標・案内）の幅調整 */
  .info-side {
    flex: 1;
    max-width: 480px;
    position: sticky; /* スクロールしても駅名標が追いかけてくる設定（任意） */
    top: 20px;
  }

  /* 右側（時刻表・次発）の幅調整 */
  .schedule-side {
    flex: 1.5;
    min-width: 0;
  }

  /* パーツの横幅をエリアいっぱいに広げる */
  .ono-sign, .osirase-outer-box {
    width: 100%;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
  }
}

/* 施設案内の枠も調整 */
.facility-details {
  width: 100%;
  margin-top: 10px;
}

/* --- 駅施設案内（details）を周りのデザインに合わせる --- */

.facility-details {
  width: 90%;
  max-width: 520px;
  margin: 10px auto 18px;
  background: #fff;
  border: 1.5px solid #c62828;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  overflow: hidden;
  cursor: pointer;
}

.facility-summary {
  padding: 10px;
  font-size: 17px;
  font-weight: bold;
  color: #c62828;
  list-style: none; /* デフォルトの三角を消す */
  outline: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* デフォルトの三角を消す（Safari/Chrome用） */
.facility-summary::-webkit-details-marker {
  display: none;
}

/* 右側に展開用のマークを追加 */
.facility-summary::after {
  content: '▼';
  font-size: 12px;
  transition: transform 0.3s;
}

/* 開いている時はマークを回転させる */
.facility-details[open] .facility-summary::after {
  transform: rotate(180deg);
}

/* 開いている時のタイトル下に境界線を追加 */
.facility-details[open] .facility-summary {
  border-bottom: 2px solid #c62828;
}

/* 中身のコンテナ（元々の背景色などをリセットして馴染ませる） */
.guide-container {
  background: #fff;
  border: none;
}

/* PCレイアウト用の調整 */
@media (min-width: 900px) {
  .layout {
    display: flex;
    flex-direction: row;
    gap: 25px;
    align-items: flex-start;
  }
  .info-side {
    flex: 1;
    max-width: 480px;
  }
  .schedule-side {
    flex: 1.5;
  }
  /* PC時は横幅いっぱいにする */
  .ono-sign, .osirase-outer-box, .facility-details {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}
/* --- レイアウトと折り畳みの制御 --- */

.layout {
  display: flex;
  flex-direction: column; /* スマホでは縦並び */
  gap: 20px;
}

/* 共通パーツの幅設定（スマホ時） */
.ono-sign, .osirase-outer-box, .facility-details {
  width: 95%;
  max-width: 520px;
  margin: 10px auto 18px;
  box-sizing: border-box;
}

/* PC・タブレット表示（左右並び） */
@media (min-width: 900px) {
  .layout {
    flex-direction: row; /* 左：情報 / 右：運行 */
    align-items: flex-start;
  }

  /* 左側エリアの幅 */
  .info-side {
    flex: 1;
    max-width: 480px;
  }

  /* 右側エリアの幅 */
  .schedule-side {
    flex: 1.5;
    min-width: 0;
  }

  /* PC時は左右の余白をなくしてエリアいっぱいに広げる */
  .ono-sign, .osirase-outer-box, .facility-details {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  /* --- PC表示での折り畳み機能の無効化 --- */
  .facility-summary {
    pointer-events: none; /* クリック（折り畳み）を禁止 */
    cursor: default;
    border-bottom: 2px solid #c62828; /* お知らせタイトルと同じ線 */
    margin-bottom: 10px;
    padding-bottom: 4px;
  }

  .facility-summary::after {
    display: none; /* 折り畳み矢印を消す */
  }
}

/* スマホ用の折り畳み矢印（既存のdetails marker非表示とあわせて追加） */
.facility-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  outline: none;
}
.facility-summary::-webkit-details-marker { display: none; }

.facility-summary::after {
  content: '▼';
  font-size: 11px;
}
.facility-details[open] .facility-summary::after {
  transform: rotate(180deg);
}
/* --- 駅施設案内のアイコンを縦並びにする設定 --- */



.f-icon {
    width: 20px;            /* 縦に並べるため少しだけサイズ調整 */
    height: 20px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #999;
    border-radius: 3px;
    padding: 1px;
}

/* --- PCレイアウトと折り畳み解除の設定 --- */

.layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 900px) {
  .layout {
    flex-direction: row; /* 左：駅情報 / 右：運行情報 */
    align-items: flex-start;
  }

  .info-side {
    flex: 1;
    max-width: 480px;
  }

  .schedule-side {
    flex: 1.5;
    min-width: 0;
  }

  /* PC時は左右の余白をなくしてエリアいっぱいに広げる */
  .ono-sign, .osirase-outer-box, .facility-details {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* PC表示での折り畳み機能の無効化 */
  .facility-summary {
    pointer-events: none;
    cursor: default;
    border-bottom: 2px solid #c62828;
    margin-bottom: 10px;
    padding-bottom: 4px;
  }
  .facility-summary::after { display: none; }
}

/* スマホ用の折り畳みデザイン */
.facility-details {
  width: 95%;
  max-width: 520px;
  margin: 10px auto 18px;
  background: #fff;
  border: 1.5px solid #c62828;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  overflow: hidden;
}
.facility-summary {
  padding: 10px;
  font-size: 17px;
  font-weight: bold;
  color: #c62828;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  outline: none;
  cursor: pointer;
}
.facility-summary::-webkit-details-marker { display: none; }
.facility-summary::after { content: '▼'; font-size: 11px; }
.facility-details[open] .facility-summary::after { transform: rotate(180deg); }
/* --- style.css の該当箇所を修正 --- */

/* アイコンエリア：縦に積み上げる設定 */
.row-icon { 
    /* height: 30px;  ←固定高さを削除 */
    min-height: 30px; /* 最低限の高さは確保 */


    flex-direction: column; /* 下（車両側）から上に向かって並べる */

    justify-content: flex-start;
    gap: 3px;          /* アイコン同士の上下の隙間 */
    padding-bottom: 4px; 
}

/* アイコン自体のサイズはそのまま */
.f-icon {
    width: 22px; 
    height: 22px;
    object-fit: contain; 
    background: #fff; 
    border: 1px solid #999; 
    border-radius: 3px; 
    padding: 1px;
}
/* --- アイコンを縦に積み上げる (車両の上に並べる) --- */
.row-icon { 
    min-height: 40px; /* アイコンが複数あっても余裕を持たせる */
    display: flex; 
    flex-direction: column-reverse; /* 下から上に積む */
    align-items: center; 
    gap: 2px; 
    padding-bottom: 4px;
}

.f-icon {
    width: 20px; 
    height: 20px;
    background: #fff;
    border: 1px solid #999;
    border-radius: 3px;
}

/* 施設案内の方面表示ヘッダー */
.guide-header {
    background: #eee;
    padding: 5px 10px;
    font-weight: bold;
    font-size: 14px;
    border-bottom: 1px solid #ccc;
    text-align: center;
    color: #333;
}

/* 左右表示時の設定 (再掲) */
@media (min-width: 900px) {
  .facility-summary {
    pointer-events: none; /* 折り畳み禁止 */
    border-bottom: 2px solid #c62828;
  }
  .facility-summary::after { display: none; }
}
/* 時刻表側のボタンエリア（右側） */
.track-switch {
  display: flex;
  gap: 5px;
  margin-top: 5px;
}

.track-switch button {
  padding: 5px 10px;
  border: 1px solid #c62828;
  background: #fff;
  color: #c62828;
  cursor: pointer;
  font-weight: bold;
  border-radius: 4px;
}

.track-switch button.active {
  background: #c62828;
  color: #fff;
}

/* 施設案内側のタブ（左側）は前回のスタイルを維持 */
.guide-tabs {
  display: flex;
  background: #e0e0e0;
}
/* --- 1. 駅施設案内のボタンデザインを時刻表と同じにする --- */

/* 施設案内側のタブのスタイルを、時刻表のボタン (.track-switch button) に合わせる */
.guide-tabs {
    display: flex;
    gap: 5px; /* ボタン間の隙間 */
    margin-bottom: 10px; /* 下との余白 */
    padding: 0 10px;
}

.guide-tab-btn {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #c62828; /* 赤い枠線 */
    background: #fff; /* 白背景 */
    color: #c62828; /* 赤い文字 */
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px; /* 角丸 */
    transition: background-color 0.2s, color 0.2s;
}

/* 選択中のボタンデザイン */
.guide-tab-btn.active {
    background: #c62828; /* 赤背景 */
    color: #fff; /* 白文字 */
}

/* 以前のスタイル（border-bottom など）は削除または上書きされます */


/* --- 2. 6号車前の「三角」問題を修正 --- */

/* 問題の原因は、.grid-col の `justify-content: space-between` によって、
  中身の要素（改札、アイコン、車両番号）が上下に広がって配置される際に、
  余計な隙間が生まれている可能性があります。
*/

/* .grid-col のスタイルを調整（既存の記述を修正） */
.grid-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end; /* 下揃えに変更 (車両番号を基準にする) */
  min-width: 45px;
  position: relative;
  padding-bottom: 5px; /* 下に少し余白 */
  height: auto; /* 高さは固定しない */
  /* border-left: 1px dashed #ccc;  ←もし枠線が不要なら削除 */
}

/* アイコン列の下マージンを削除（隙間を詰める） */
.row-icon { 
    min-height: 50px;
    display: flex; 
    flex-direction: column-reverse; 
    align-items: center; 
    gap: 2px;
    /* padding-bottom: 4px; ← これを削除 */
}

/* --- style.css に追加 --- */

/* 青い車両（京急線直通車）の基本色 */
.train-car.blue {
    background: #83AEFC; /* 京津線ブルー */
    border-color: #516B9F;
    color: #000;
}

/* 青い車両の先頭形状（1号車） */
.train-car.blue.head-car::before {
    background: #83AEFC;
    border-left: 2px solid #516B9F;
    border-bottom: 2px solid #516B9F;
}

/* 車両が重なる際の余白調整 */
.row-car + .row-car {
    margin-top: 4px;
}

/* --- モーダル内の番線・ドア方向バッジ --- */
.stop-track-info {
  font-size: 11px;
  color: #333;
  background: #f0f0f0;
  border: 1px solid #ccc;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 10px;
  display: inline-block;
  white-space: nowrap;
}

/* 過ぎた駅のバッジはグレーアウト */
.stop-track-info.passed {
  color: #999;
  background: #f9f9f9;
  border-color: #e0e0e0;
}

/* ドア方向部分の文字色調整 */
.door-dir {
  color: #1565c0; /* 少し青くして目立たせる */
  font-weight: bold;
}
.stop-track-info.passed .door-dir {
  color: #999;
}

/* --- モーダル内の番線・ドア方向表示（枠なし） --- */
.stop-track-info {
  font-size: 12px;
  color: #555;
  white-space: nowrap;
}

/* 過ぎた駅の表示はグレーアウト */
.stop-track-info.passed {
  color: #bbb; 
}

/* ドア方向部分の文字色調整 */
.door-dir {
  color: #1565c0; /* 青字で少し強調 */
  font-weight: bold;
}
.stop-track-info.passed .door-dir {
  color: #bbb;
}

/* --- 固定ヘッダー（お気に入り駅用） --- */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 既存の nav の影を消す（sticky-header側に影をつけるため） */
nav {
  box-shadow: none !important; 
}

/* お気に入り駅バー */
.my-stations-bar {
  display: flex;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 15px 10px 15px;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
}

.my-stations-bar::-webkit-scrollbar {
  height: 4px;
}
.my-stations-bar::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.my-station-btn {
  display: inline-block;
  background: #fff;
  border: 2px solid #1a73e8; /* 各駅画面の色に合わせる */
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 13px;
  color: #1a73e8;
  text-decoration: none;
  font-weight: bold;
  transition: 0.2s;
  flex-shrink: 0;
}

.my-station-btn:hover {
  background: #1a73e8;
  color: #fff;
}


/* ========================================================
   ここから下は今回の「お気に入り共通化」の追加・差分CSSです
   ======================================================== */

/* 🔹 マイ駅セクション (index.html, station-engine共通) */
#myStations {
  background: #fff;
  border-bottom: 1px solid #ddd;
  text-align: center;
  padding: 10px 10px 14px 10px;
}

#myStations h2 {
  margin: 0 0 6px 0;
  font-size: 12px;
  color: #c62828;
}

/* 縦幅を取りすぎないよう横スクロールに変更 */
.my-station-list {
  display: flex;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 5px;
  overflow-x: auto;
  padding: 0 10px 5px 10px;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
}

.my-station-list::-webkit-scrollbar {
  height: 4px;
}

.my-station-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

/* お気に入り登録ボタンのトグル用スタイル */
.fav-btn-style.registered {
  background: #c62828;
  color: #fff;
}
