/* =========================
   基本リセット & 共通
========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "BIZ UDGothic", "BIZ UDPGothic", "Yu Gothic UI", "Yu Gothic", "Meiryo",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", sans-serif;
  background: #f2f3f5;
  color: #222;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

input, select, button, textarea {
  font-family: inherit;
}

a {
  color: #1a73e8;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1 {
  margin: 0 0 12px;
  font-size: 24px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  margin-bottom: 16px;
}

.heroTitle {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

label {
  font-size: 13px;
  color: #555;
}

input[type="text"],
input[type="number"],
select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 14px;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  outline: none;
  border-color: #1a73e8;
}

button {
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
}

.btnPrimary {
  background: #1a73e8;
  color: #fff;
}
.btnPrimary:hover {
  background: #155fc5;
}

/* index.php 内で使う可能性があるボタン */
.btnGhost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #d7dce5;
  background: #f6f7f9;
  color: #111;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
.btnGhost:hover {
  background: #eef1f5;
  text-decoration: none;
}

.status {
  margin-top: 10px;
  font-size: 13px;
  color: #555;
}

/* サジェスト（今は未使用でも残してOK） */
.suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 1000;
  width: 100%;
  max-width: 360px;
  display: none;
}
.sbtn {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: #fff;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
}
.sbtn:hover {
  background: #f2f3f5;
}

.tableWrap {
  overflow-x: auto;
}

table.listTable {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

table.listTable th,
table.listTable td {
  border-bottom: 1px solid #e0e0e0;
  padding: 10px 8px;
  text-align: center;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

table.listTable th {
  background: #f7f8fa;
  font-size: 13px;
  font-weight: 700;
  color: #444;
}

table.listTable tr:last-child td {
  border-bottom: none;
}

table.listTable td.colHeading {
  white-space: normal;
  text-align: left;
}

.platCell {
  font-weight: 700;
  border-radius: 10px;
}

.bigPlat {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
}

.center {
  text-align: center;
}

.mainLine {
  font-weight: 700;
}

.mutedSmall {
  opacity: 0.75;
  font-size: 12px;
  margin-top: 2px;
}

.empty {
  text-align: center;
  padding: 20px;
  color: #666;
}

/* =========================================================
   スマホ最適化（カード表示 / JSアコーディオン）
========================================================= */
@media (max-width: 640px) {
  body {
    background: #eef0f3;
  }

  .container {
    padding: 12px;
  }

  h1 {
    font-size: 20px;
  }

  .row {
    flex-direction: column;
    gap: 10px;
  }

  .field {
    width: 100% !important;
    max-width: none !important;
  }

  #searchBtn {
    width: 100%;
    height: 44px;
    font-size: 15px;
  }

  .tableWrap {
    overflow-x: visible;
  }

  table.listTable,
  table.listTable thead,
  table.listTable tbody,
  table.listTable th,
  table.listTable td,
  table.listTable tr {
    display: block;
    width: 100%;
  }

  table.listTable thead {
    display: none;
  }

  table.listTable tbody tr.mCardRow {
    margin: 10px 0;
  }

  table.listTable td.mCardCell {
    border: none;
    padding: 0;
  }

  .mItem {
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    background: #f5f6f8;
    overflow: hidden;
  }

  .mToggle {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    text-align: left;
    color: inherit;
    font: inherit;
    cursor: pointer;
  }

  .mToggle:focus {
    outline: none;
  }
  .mToggle:focus-visible {
    outline: 2px solid rgba(0,0,0,0.25);
    outline-offset: 2px;
    border-radius: 14px;
  }

  .mSummary {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    background: #f5f6f8;
  }

  .mBadge {
    display: inline-block;
    min-width: 72px;
    text-align: center;
    border-radius: 12px;
    padding: 6px 10px;
    background: #fff;
    color: #222;
    flex: 0 0 auto;
  }

  .mHeading {
    flex: 1 1 auto;
    text-align: left;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.35;
    word-break: break-word;
  }

  .mRouteCode {
    display: block;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    opacity: 0.85;
    margin: 0 0 2px 0;
  }

  .mChevron {
    flex: 0 0 auto;
    font-size: 12px;
    opacity: 0.75;
    margin-left: 8px;
    transition: transform 0.15s ease;
  }

  .mToggle[aria-expanded="true"] .mChevron {
    transform: rotate(180deg);
  }

  .mDetail {
    padding: 10px 12px 12px;
    border-top: 1px solid rgba(0,0,0,0.10);
    background: #ffffff;
  }

  .mRow {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(0,0,0,0.08);
  }
  .mRow:last-child {
    border-bottom: none;
  }

  .mLabel {
    font-size: 12px;
    opacity: 0.75;
  }

  .mVal {
    font-size: 14px;
    text-align: left;
    word-break: break-word;
  }

  .mLink {
    display: inline-block;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(0,0,0,0.05);
  }

  .mMuted {
    opacity: 0.6;
    font-size: 13px;
  }

  .bigPlat {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
  }
}

/* =========================
   フッター（誤リロード防止用）
========================= */
.siteFooter{
  margin-top: 24px;
  padding: 20px 12px 40px; /* ★下を厚めに */
  background: #e6e8ec;
  text-align: center;
}

.footerInner{
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #555;
}

.siteFooter a{
  color: #333;
  text-decoration: underline;
}

.siteFooter a:hover{
  opacity: 0.8;
}

.siteFooter .sep{
  opacity: 0.4;
}

/* スマホ対策：下スワイプ時の誤リロードを避ける余白 */
@media (max-width: 640px){
  body{
    padding-bottom: 80px;
  }
}