* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #0b0d12;
  color: #f0f2f5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", Meiryo, sans-serif;
  height: 100vh;
  overflow: hidden;
  user-select: none;
}

.signage-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 16px 20px;
  gap: 16px;
}

/* 路線カラー定数 */
:root {
  --color-namboku: #00ac9b; /* 南北線 エメラルドグリーン */
  --color-mita: #007ac1;    /* 三田線 ブルー */
  --bg-card: #151922;
  --border-card: #283040;
}

/* メイン領域 */
.main-content {
  display: flex;
  flex: 1;
  gap: 20px;
  min-height: 0; /* flex縮み防止 */
}

/* 左側：駅名ブランディング */
.station-branding {
  width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.station-signs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.line-badge {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}
.line-badge span {
  font-size: 0.8rem;
}
.namboku-bg { background-color: var(--color-namboku); }
.mita-bg { background-color: var(--color-mita); }

.station-name-ja {
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: 4px;
  margin-bottom: 4px;
  text-align: center;
}

.station-name-en {
  font-size: 0.85rem;
  color: #8c9ba5;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 右側：発車標エリア */
.boards-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.board-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.board-header {
  padding: 10px 18px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.north-header {
  background: linear-gradient(90deg, #1b3735 0%, #151922 100%);
  border-left: 6px solid var(--color-namboku);
}
.south-header {
  background: linear-gradient(90deg, #142e47 0%, #151922 100%);
  border-left: 6px solid var(--color-mita);
}

.board-dir-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}
.board-dir-sub {
  font-size: 0.85rem;
  color: #a4b3c6;
}

/* テーブルスタイル */
.departure-table-container {
  flex: 1;
  padding: 4px 12px;
}

.departure-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.departure-table th {
  color: #6d7d93;
  font-size: 1.25rem;
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid #232b3b;
}

.departure-table td {
  padding: 8px 8px;
  border-bottom: 1px solid #1a202c;
  font-size: 1.15rem;
  vertical-align: middle;
}

/* カラム幅指定 */
.col-line   { width: 14%; }
.col-order  { width: 12%; }
.col-type   { width: 14%; }
.col-time   { width: 18%; }
.col-dest   { width: 24%; }
.col-status { width: 18%; text-align: right; }

.cell-time {
  font-family: "SF Pro Text", "Roboto Mono", monospace;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 1px;
}

.badge-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: bold;
}
.tag-namboku { background: rgba(0, 172, 155, 0.2); color: #00d6c2; border: 1px solid var(--color-namboku); }
.tag-mita { background: rgba(0, 122, 193, 0.2); color: #3aa6ff; border: 1px solid var(--color-mita); }

.type-local { color: #ffffff; font-weight: bold; }
.type-exp { color: #ff9800; font-weight: bold; }

.status-ok { color: #2ecc71; font-size: 0.95rem; }
.status-delay { color: #ff4757; font-weight: bold; font-size: 0.95rem; }

/* フッター（運行情報テロップ ＋ 時計） */
.footer-bar {
  height: 54px;
  background: #11141b;
  border: 1px solid var(--border-card);
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
}

.ticker-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 100%;
}

.ticker-badge {
  background: #e67e22;
  color: #fff;
  font-size: 0.85rem;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 4px;
  margin-right: 14px;
  white-space: nowrap;
}

.ticker-content {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-text {
  display: inline-block;
  font-size: 1.05rem;
  color: #e0e6ed;
  animation: marquee 25s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.clock-display {
  width: 140px;
  font-family: "SF Pro Text", "Roboto Mono", monospace;
  font-size: 1.6rem;
  font-weight: 700;
  color: #66fcf1;
  text-align: right;
  letter-spacing: 1px;
}