*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #05070c;
  --panel: #151821;
  --panel-border: #2b3140;
  --text-main: #ffffff;
  --text-sub: #c7ccd8;
  --accent-green: #00b050;
  --accent-blue: #29a8ff;
  --accent-jh: #00b050;
  --accent-jk: #00b0ff;
  --clock: #c7ccd8;
  --danger: #ff4f6a;
  --bound: #ffffff;
  --time: #ffffff;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: radial-gradient(circle at top, #101426 0, #05070c 55%, #020308 100%);
  color: var(--text-main);
  font-family: var(--font-main);
}

body {
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.page {
  width: 100%;
  max-width: 1200px;
  padding: 12px 10px 20px;
}

.page-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 10px;
}

.clock {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--clock);
}

.board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.track {
  background: radial-gradient(circle at top left, #1d2236 0, #11141f 40%, #080a10 100%);
  border-radius: 22px;
  border: 1px solid var(--panel-border);
  padding: 10px 18px 12px;
  box-shadow:
    0 18px 35px rgba(0, 0, 0, 0.75),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.track-header {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.track-no {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  border: 3px solid #4b5165;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 700;
  margin-right: 14px;
  background: radial-gradient(circle at 30% 0, #555a70 0, #222633 55%, #141722 100%);
}

.track-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.line-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  padding: 4px 14px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 16px;
  color: #061208;
}

.line-badge--jh {
  background: linear-gradient(135deg, #00e26f, #00b050);
}

.line-badge--jk {
  background: linear-gradient(135deg, #48c5ff, #00a0ff);
}

.track-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.row:first-of-type {
  border-top: none;
  margin-top: 2px;
}

.row-time {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--time);
}

.row-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.row-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: baseline;
  column-gap: 8px;
}

.dest {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: 0.14em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bound {
  font-size: 24px;
  font-weight: 700;
  color: var(--bound);
  padding-right: 4px;
}

.code {
  min-width: 70px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  background: linear-gradient(135deg, #00e26f, #00b050);
  color: #050b06;
}

.code--jk {
  background: linear-gradient(135deg, #54d1ff, #00a0ff);
}

.page-footer {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-sub);
}

.page-footer p {
  margin: 4px 0;
}

.engine {
  opacity: 0.7;
}

/* blink for departing soon */
.blink {
  animation: blink 0.8s steps(2, jump-none) infinite;
}

@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0.2; }
  100% { opacity: 1; }
}

/* responsive */
@media (min-width: 880px) {
  .board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .page {
    padding: 16px 14px 22px;
  }

  .row {
    grid-template-columns: 120px minmax(0, 1fr);
    padding: 10px 0;
  }

  .row-time {
    font-size: 42px;
  }

  .dest {
    font-size: 58px;
  }
}

@media (max-width: 480px) {
  .track {
    padding-inline: 10px;
  }

  .track-title {
    font-size: 14px;
  }

  .row {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .row-time {
    font-size: 30px;
  }

  .dest {
    font-size: 40px;
    letter-spacing: 0.12em;
  }

  .code {
    font-size: 16px;
    min-width: 60px;
  }
}
