:root {
  --bg: #0d1412;
  --bg2: #142420;
  --ink: #eef5f1;
  --mute: #9fb3aa;
  --green: #22b573;   /* 田園都市線のラインカラーに寄せた緑 */
  --green2: #5ee0a0;
  --amber: #ffb02e;
  --led: #ff9a1f;
  --line: rgba(255, 255, 255, .14);
  --card: rgba(255, 255, 255, .06);
  --steel: #2a3331;
  --steel2: #1a2220;
  --display: "DotGothic16", "Zen Kaku Gothic New", monospace;
  --body: "Zen Kaku Gothic New", system-ui, -apple-system, "Hiragino Sans", "Yu Gothic", sans-serif;
  --bar: 52px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(120% 70% at 50% -10%, #1f3b32 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 500;
  line-height: 1.6;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--green2); }
[hidden] { display: none !important; }

/* 上のバー */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: var(--bar); padding: 0 16px;
  background: rgba(10, 16, 14, .84);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.home { color: var(--mute); text-decoration: none; font-size: 14px; white-space: nowrap; }
.home:hover { color: var(--ink); }
.bar__title { margin: 0; font-weight: 900; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bar__clock { margin: 0; font-family: var(--display); font-size: 16px; color: var(--green2); white-space: nowrap; }
.bar__tools { margin-left: auto; display: flex; gap: 6px; }
.tool {
  display: inline-flex; align-items: center; gap: 4px;
  height: 34px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  font-size: 14px;
}
.tool:hover { background: rgba(255, 255, 255, .12); }
@media (max-width: 560px) { .home span, .tool span { display: none; } }

main { max-width: 1100px; margin: 0 auto; padding: 16px 16px 60px; }

/* 運転席 */
.cab {
  position: relative;
  border-radius: 18px;
  background: linear-gradient(180deg, #313c39 0%, var(--steel) 40%, var(--steel2) 100%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .12);
  padding: 10px 12px 12px;
  overflow: hidden;
}
.cab:fullscreen { border-radius: 0; padding: 0; display: flex; flex-direction: column; background: #000; }
.cab:fullscreen .screen { flex: 1; border-radius: 0; }
.cab:fullscreen .screen__box { position: absolute; inset: 0; padding: 0; }
.cab:fullscreen .led { border-radius: 0; margin: 0; }
.cab:fullscreen .dash { border-radius: 0; margin: 0; }

/* 案内表示（LED） */
.led {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0 14px;
  background: #0a0a0a;
  border-radius: 10px;
  padding: 8px 14px;
  margin-bottom: 10px;
  box-shadow: inset 0 0 0 1px #1d1d1d, inset 0 0 30px rgba(0, 0, 0, .8);
  font-family: var(--display);
  text-shadow: 0 0 8px currentColor;
  min-height: 62px;
}
.led p { margin: 0; white-space: nowrap; }
.led__kind { display: flex; gap: 8px; align-items: center; }
.led__type { color: #000; background: var(--green2); padding: 1px 8px; border-radius: 3px; font-size: 14px; text-shadow: none; }
.led__dest { color: var(--green2); font-size: 16px; }
.led__main { display: flex; align-items: baseline; gap: 12px; justify-self: center; overflow: hidden; }
.led__label { color: var(--led); font-size: 15px; }
.led__name { color: var(--led); font-size: clamp(22px, 4.6vw, 34px); letter-spacing: .06em; }
.led__sub { display: flex; flex-direction: column; align-items: flex-end; color: var(--green2); font-size: 13px; line-height: 1.3; }
.led__num { opacity: .8; }
@media (max-width: 640px) {
  .led { grid-template-columns: 1fr auto; padding: 8px 10px; }
  .led__kind { grid-row: 1; }
  .led__sub { grid-row: 1; }
  .led__main { grid-column: 1 / -1; justify-self: start; }
}

/* 窓 */
.screen {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: inset 0 0 0 2px #0b0f0e;
}
.screen__box { position: relative; width: 100%; padding-top: 56.25%; }
.screen__box #player, .screen__box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.glass {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .28) 0%, transparent 18%, transparent 86%, rgba(0, 0, 0, .35) 100%),
    radial-gradient(120% 90% at 50% 50%, transparent 60%, rgba(0, 0, 0, .45) 100%);
}
.pillar {
  position: absolute; top: 0; bottom: 0; width: 5%; pointer-events: none;
  background: linear-gradient(90deg, #1b2422, #2b3533 60%, rgba(43, 53, 51, 0));
}
.pillar--r { right: 0; transform: scaleX(-1); }
.pillar--l { left: 0; }

/* 出発前のカバー */
.cover {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: clamp(14px, 4vw, 48px);
  background:
    linear-gradient(90deg, rgba(8, 14, 12, .96) 0%, rgba(8, 14, 12, .86) 55%, rgba(8, 14, 12, .6) 100%),
    url("https://i.ytimg.com/vi/N5mQq00bEj0/hqdefault.jpg") center / cover no-repeat;
  transition: opacity .5s ease;
}
.cover.is-gone { opacity: 0; pointer-events: none; }
.cover__kicker { margin: 0 0 6px; color: var(--green2); font-weight: 700; font-size: clamp(12px, 1.6vw, 14px); }
.cover__title { margin: 0 0 8px; font-size: clamp(20px, 3.8vw, 38px); line-height: 1.25; font-weight: 900; }
.cover__lead { margin: 0 0 14px; color: var(--ink); font-size: clamp(12px, 1.6vw, 15px); max-width: 32em; }
.cover__row { display: flex; flex-wrap: wrap; gap: 8px; }
.go {
  border: 0; border-radius: 999px;
  padding: 12px 22px;
  background: var(--green);
  color: #06130d; font-weight: 900; font-size: clamp(14px, 1.8vw, 17px);
  box-shadow: 0 8px 24px rgba(34, 181, 115, .35);
}
.go:hover { background: var(--green2); }
.go--sub { background: rgba(255, 255, 255, .12); color: var(--ink); box-shadow: none; border: 1px solid var(--line); }
.go--sub:hover { background: rgba(255, 255, 255, .2); }
.cover__resume { margin: 10px 0 0; font-size: 14px; }
.link { background: none; border: 0; padding: 0; color: var(--green2); text-decoration: underline; }
.cover__note { margin: 10px 0 0; color: var(--mute); font-size: 12px; }
@media (max-width: 640px) {
  .cover__lead, .cover__note, .cover__kicker { display: none; }
  .cover { justify-content: flex-end; padding: 12px; }
  .cover__title { font-size: 17px; margin-bottom: 6px; }
  .cover__title br { display: none; }
  .go { padding: 8px 14px; font-size: 13px; }
  .cover__resume { margin-top: 6px; font-size: 12px; }
}

/* 計器 */
.dash {
  display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 8px;
  margin-top: 10px;
}
.dash__gauge {
  display: flex; align-items: baseline; gap: 6px;
  background: #0a0d0c; border-radius: 8px; padding: 6px 10px;
  box-shadow: inset 0 0 0 1px #1d2422;
  font-family: var(--display);
  min-width: 0;
}
.dash__k { color: var(--mute); font-size: 11px; white-space: nowrap; }
.dash__v { color: var(--green2); font-size: 20px; margin-left: auto; text-shadow: 0 0 8px rgba(94, 224, 160, .6); }
.dash__v--text { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash__u { color: var(--mute); font-size: 11px; }
@media (max-width: 640px) {
  .dash { grid-template-columns: 1fr 1fr; }
  .dash__gauge--wide { grid-column: 1 / -1; }
}

/* 路線図 */
.route { position: relative; margin: 26px 4px 8px; padding: 18px 0 44px; }
.route__line { position: absolute; left: 0; right: 0; top: 26px; height: 8px; border-radius: 4px; background: #253330; }
.route__done { height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--green), var(--green2)); transition: width .3s linear; }
.route__train {
  position: absolute; top: 2px; left: 0; transform: translateX(-50%);
  font-size: 22px; line-height: 1; transition: left .3s linear;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6));
}
.route__stops { list-style: none; margin: 0; padding: 0; position: relative; height: 10px; }
.route__stop {
  position: absolute; top: 0; transform: translateX(-50%);
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--green); background: var(--bg);
  padding: 0; cursor: pointer;
}
.route__stop:hover, .route__stop:focus-visible { background: var(--green2); outline: none; transform: translateX(-50%) scale(1.2); }
.route__stop.is-passed { background: var(--green); }
.route__stop.is-here { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 0 6px rgba(255, 176, 46, .25); }
.route__stop.is-major { width: 18px; height: 18px; top: -2px; border-width: 3px; }
.route__label {
  position: absolute; top: 20px; left: 50%;
  transform: translateX(-50%);
  font-size: 11px; color: var(--mute); white-space: nowrap;
  writing-mode: vertical-rl; text-orientation: upright; letter-spacing: .05em;
}
.route__stop.is-major .route__label { color: var(--ink); font-weight: 700; }
.route__stop.is-here .route__label { color: var(--amber); font-weight: 700; }
@media (max-width: 900px) { .route__label { display: none; } .route__stop.is-major .route__label { display: block; } }
@media (max-width: 560px) { .route { display: none; } }

/* 駅一覧 */
.board { margin-top: 28px; }
.board__head h2 { margin: 0 0 4px; font-size: 20px; }
.board__head p { margin: 0 0 14px; color: var(--mute); font-size: 14px; }
.stations {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px;
}
.st {
  width: 100%; text-align: left;
  display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--card);
  transition: background .15s, border-color .15s;
}
.st:hover { background: rgba(255, 255, 255, .1); border-color: var(--green); }
.st.is-here { border-color: var(--amber); background: rgba(255, 176, 46, .1); }
.st.is-passed { opacity: .7; }
.st__num {
  grid-column: 1; grid-row: 1 / 3;
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--green); display: grid; place-items: center;
  font-size: 10px; font-weight: 900; line-height: 1; background: var(--bg);
}
.st.is-here .st__num { border-color: var(--amber); }
.st__name { grid-column: 2; grid-row: 1; font-weight: 900; font-size: 16px; line-height: 1.2; }
.st__kana { grid-column: 2; grid-row: 2; color: var(--mute); font-size: 11px; line-height: 1.2; }
.st__time { grid-column: 3; grid-row: 1 / 3; font-family: var(--display); color: var(--green2); font-size: 14px; }
.st__xfer { grid-column: 2 / 4; color: var(--mute); font-size: 11px; line-height: 1.3; }
.st__flag { grid-column: 2 / 4; color: var(--amber); font-size: 11px; }

/* 説明 */
.about { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--mute); font-size: 14px; }
.about h2 { color: var(--ink); font-size: 18px; margin: 0 0 8px; }
.about p { margin: 0 0 10px; }
