body {
  margin: 0;
  background: white;
  font-family: "Meiryo", sans-serif;
}

/* ===== 上 ===== */
.top-bar {
  background: #003366;
  color: white;
  display: flex;
  justify-content: space-between;
  padding: 18px 30px;
}

.title-ja { font-size: 46px; font-weight: bold; }
.title-en { font-size: 32px; }

.clock-area { text-align: right; }

.clock { font-size: 34px; }
.update-time { font-size: 20px; }

/* ===== PC（そのまま） ===== */
.header-row,
.bus-row {
  display: grid;
  grid-template-columns:
    14ch
    13ch
    minmax(10ch, 1fr)
    8ch
    9ch
    14ch;
}

.header-row {
  font-size: 32px;
  font-weight: bold;
  color: white;
}

.header-row div {
  padding: 14px;
  white-space: nowrap;
}

.h-stop { background:#2f2f2f; }
.h-company { background:#737373; }
.h-route { background:#2f2f2f; }
.h-dep { background:#737373; }
.h-remain { background:#2f2f2f; }
.h-note { background:#737373; }

.bus-row {
  font-size: 30px;
  color: white;
}

.bus-row div {
  padding: 14px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bus-row:nth-child(odd) { background: #4a659a; }
.bus-row:nth-child(even) { background: #1b2740; }

/* ===== スマホ：縦スクロールUI ===== */
@media screen and (max-width: 768px) {

  .top-bar {
    flex-direction: column;
    padding: 10px;
  }

  .title-ja { font-size: 20px; }
  .title-en { font-size: 12px; }

  .clock { font-size: 14px; }
  .update-time { font-size: 10px; }

  /* ヘッダ消す */
  .header-row {
    display: none;
  }

  /* ===== カード化 ===== */
  .bus-row {
    display: block;
    margin: 10px;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
  }

  .bus-row div {
    display: block;
    padding: 2px 0;
  }

  /* 上段 */
  .bus-row div:nth-child(1),
  .bus-row div:nth-child(2) {
    display: inline-block;
    width: 48%;
    font-weight: bold;
  }

  /* 行き先（主役） */
  .bus-row div:nth-child(3) {
    font-size: 18px;
    font-weight: bold;
    margin: 6px 0;
  }

  /* 出発 */
  .bus-row div:nth-child(4) {
    font-size: 14px;
  }

  /* 到着（強調） */
  .bus-row div:nth-child(5) {
    font-size: 20px;
    font-weight: bold;
    color: #ffff66;
  }

  /* 備考 */
  .bus-row div:nth-child(6) {
    font-size: 12px;
    opacity: 0.9;
  }

}

/* ===== その他 ===== */
.scroll {
  overflow: hidden;
}

.scroll span {
  display: inline-block;
  padding-left: 100%;
  animation: scroll-text 10s linear infinite;
}

@keyframes scroll-text {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.company.odakyu { color: #9f0a1e; font-weight: bold; }
.company.kawasaki { color: #00a2ff; font-weight: bold; }

.remain { font-weight: bold; }

@keyframes blink-red {
  0% { opacity: 1; }
  50% { opacity: 0.2; }
  100% { opacity: 1; }
}

.delay {
  color: red;
  font-weight: bold;
  animation: blink-red 1s infinite;
}
