/* screens/train-control.css — CRX 運行管理盤 */
.sp-stage--train-control .sp-stage__canvas {
  background:
    linear-gradient(180deg, #0e1116 0%, #0a0d12 100%);
  color: #d8dae0;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  overflow: hidden;
}
.tc-wrap {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
}

/* ── ヘッダー ── */
.tc-head {
  flex: 0 0 auto;
  padding: 14px 24px;
  background: linear-gradient(180deg, #12161c 0%, #0e1116 100%);
  border-bottom: 2px solid #4ade80;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  letter-spacing: .05em;
}
.tc-head__left, .tc-head__right {
  display: flex; flex-direction: column; gap: 3px;
  color: #8b8d93;
}
.tc-head__right { align-items: flex-end; }
.tc-head__brand { color: #4ade80; font-weight: 700; letter-spacing: .12em; }
.tc-head__line { color: #d8dae0; font-size: 15px; }
.tc-head__center {
  text-align: center;
}
.tc-head__train {
  font-size: clamp(16px, 2.2vw, 22px);
  color: #f2f2f4; font-weight: 700; letter-spacing: .08em;
}
.tc-head__clock {
  color: #d8dae0; font-variant-numeric: tabular-nums; font-size: 15px;
}
.tc-head__status {
  color: #4ade80; font-size: 12px; letter-spacing: .12em;
  display: inline-flex; align-items: center; gap: 6px;
}
.tc-head__status::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: #4ade80; box-shadow: 0 0 6px rgba(74, 222, 128, .8);
}
.tc-head__status.is-warn { color: #ff4444; }
.tc-head__status.is-warn::before {
  background: #ff4444; box-shadow: 0 0 8px rgba(255, 68, 68, .9);
  animation: tc-warn-blink .5s ease-in-out infinite;
}
@keyframes tc-warn-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .2; }
}

/* ── メイン領域 ── */
.tc-panels {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr 280px;
  overflow: hidden;
}
.tc-map-wrap {
  overflow: hidden;
  padding: 20px;
  display: flex; align-items: center; justify-content: center;
}
.tc-map {
  width: 100%; height: 100%;
  max-height: 100%;
}
.tc-map.is-alert {
  animation: tc-alert-flash .6s ease-in-out;
}
@keyframes tc-alert-flash {
  0%   { filter: drop-shadow(0 0 0 rgba(255,68,68,0)); }
  50%  { filter: drop-shadow(0 0 12px rgba(255,68,68,.6)); }
  100% { filter: drop-shadow(0 0 0 rgba(255,68,68,0)); }
}
.tc-train-mark {
  transition: transform .35s cubic-bezier(.4,.2,.2,1), opacity .3s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.5));
}

/* ── ログ ── */
.tc-log {
  border-left: 1px solid #23262b;
  background: #0a0d12;
  padding: 16px;
  overflow-y: auto;
}
.tc-log h3 {
  font-size: 11px;
  color: #8b8d93;
  letter-spacing: .18em;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #23262b;
}
.tc-log ul { list-style: none; padding: 0; margin: 0; }
.tc-log__row {
  display: flex; gap: 8px;
  padding: 4px 0;
  font-size: 11px;
  color: #b0b2b7;
  border-bottom: 1px dashed #1a1d22;
  animation: tc-log-in .3s ease both;
}
@keyframes tc-log-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tc-log__ts { color: #6a6c72; font-variant-numeric: tabular-nums; }
.tc-log__msg { flex: 1; }
.tc-log__row--warn { color: #ff9c9c; }
.tc-log__row--warn .tc-log__ts { color: #ff6b6b; }
.tc-log__row--ok { color: #86efac; }
.tc-log__row--ok .tc-log__ts { color: #4ade80; }

@media (max-width: 800px) {
  .tc-head { grid-template-columns: 1fr; gap: 6px; text-align: center; padding: 10px 16px; }
  .tc-head__left, .tc-head__right { align-items: center; }
  .tc-panels { grid-template-columns: 1fr; grid-template-rows: 1fr 30%; }
  .tc-log { border-left: 0; border-top: 1px solid #23262b; }
}
