/* LiveCG2 — アプリだけで要る追加のスタイル
 *
 * ワイヤー（wire.css）はそのまま使い、本物にするために足りない分だけここに書く。
 *   ① モニター・サムネを canvas（描画エンジン）で描く
 *   ② トップバーのタブが <a>（ワイヤーは <button>）
 *   ③ ログイン画面・「番組を起動する」画面
 * ワイヤーにある寸法（誤押し対策の余白・モニターの大きさ・チップの高さ）はここでは変えない。
 */

/* ---- ① canvas のステージ（.stage の中いっぱい・16:9 は .stage 側が持っている） ---- */
.stage > canvas.cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cue .tb > canvas.cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* 種別が image / video のページは S4／S5 で描く。今は名前だけ出す */
.stage .later, .cue .tb .later {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  font-size: 10px; font-family: var(--mono); letter-spacing: .06em; color: #7d858e; background: #101215;
}
.cue .tb .later { font-size: 9px; }

/* ---- ② トップバー（ワイヤーの .nav button と同じ見た目の <a>） ---- */
.nav a {
  display: flex; flex-direction: column; justify-content: center; text-decoration: none;
  padding: 11px 20px 9px; font-size: 13px; color: var(--dim); border-bottom: 2px solid transparent;
  border-right: 1px solid var(--line); letter-spacing: .02em;
}
.nav a .pth { display: block; font-size: 10px; color: var(--dim2); font-family: var(--mono); margin-top: 1px; }
.nav a:hover { color: var(--text); background: #1f2328; }
.nav a.on { color: #fff; background: var(--panel); border-bottom-color: var(--accent); }
.nav a.on .pth { color: var(--accent); }
.topbar .st .pn { font-size: 12px; color: var(--dim); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .st .lo { display: flex; }

/* ---- ③ ログイン ---- */
.loginWrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.loginBox { width: 420px; max-width: 100%; background: var(--panel); border: 1px solid var(--line2); border-radius: 8px; padding: 22px 24px 20px; }
.loginBox .brand { padding: 0 0 12px; border: 0; }
.loginBox h1 { font-size: 17px; letter-spacing: .04em; margin-bottom: 8px; }
.loginBox .lead { font-size: 12px; color: var(--dim); margin-bottom: 14px; }
.loginBox code { font-family: var(--mono); color: #9fb6e8; }
.loginBox input[type=password] { width: 100%; background: var(--well); border: 1px solid var(--line2); border-radius: 4px; padding: 9px 10px; font-size: 14px; margin-bottom: 12px; }
.loginBox input[type=password]:focus { outline: none; border-color: var(--accent); }
.loginBox .btn { width: 100%; padding: 9px; font-size: 14px; }
.loginBox .note { font-size: 11px; color: var(--dim2); margin-top: 14px; line-height: 1.7; }
.loginErr { font-size: 12px; color: #ffb3b0; background: #3a1512; border: 1px solid #7d3a36; border-radius: 4px; padding: 7px 10px; margin-bottom: 12px; }

/* ---- ③ 番組を起動する（番組ページが出来るまでの最小画面） ---- */
.bootWrap { position: fixed; inset: var(--chromeH, 44px) 0 0 0; z-index: 120; background: rgba(12, 14, 16, .93); display: grid; place-items: center; padding: 20px; }
.bootBox { width: 860px; max-width: 100%; max-height: 100%; overflow: auto; background: var(--panel); border: 1px solid var(--line2); border-radius: 8px; }
.bootHd { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.bootHd h2 { font-size: 15px; letter-spacing: .06em; }
.bootHd .sp { flex: 1; }
.bootBody { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; padding: 16px; }
.bootCol { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.bootList { border: 1px solid var(--line); border-radius: 4px; max-height: 320px; overflow: auto; }
.bootList button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid #202429; text-align: left; }
.bootList button:hover { background: #1f242a; }
.bootList button.on { background: #24506e; }
.bootList .nm { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bootList .meta { font-size: 10.5px; color: var(--dim2); font-family: var(--mono); }
.bootList .live { font-size: 10px; font-weight: 800; color: #fff; background: var(--live); border-radius: 2px; padding: 1px 5px; }
.bootList .empty { padding: 14px; font-size: 12px; color: var(--dim2); }
.bootNew { display: flex; gap: 6px; }
.bootNew input { flex: 1; }
.bootStarts { display: flex; flex-direction: column; gap: 6px; }
.bootStarts label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); }
.bootStarts select { flex: 1; min-width: 0; }
.bootNote { font-size: 11px; color: var(--dim2); line-height: 1.7; }
.bootOut { font-size: 11.5px; color: #ffb3b0; min-height: 16px; }
.bootWrap.hide { display: none !important; }

/* 接続が切れている間の目印（タリーの WebSocket）。押せない小さな札 */
.linkBad { position: fixed; right: 12px; bottom: 12px; z-index: 130; pointer-events: none;
  font-size: 11px; font-weight: 800; letter-spacing: .06em; color: #241a00; background: var(--warn);
  border-radius: 3px; padding: 4px 10px; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }

/* ---- ④ 番組ページ（S4）: サムネは canvas（描画エンジン）で描く ----
 * ワイヤーは絵が無かったので CSS のグラデーションで「それらしく」見せていた。
 * 本物は実サムネを貼るので、その飾り（::after の帯）は消す。
 */
.card .th > canvas.cv { display: block; width: 100%; height: 100%; }
.card .th .later, .thumb .later {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; white-space: pre-line;
  font-size: 10px; font-family: var(--mono); letter-spacing: .06em; color: #7d858e; background: #101215;
}
.thumb .later { font-size: 8px; letter-spacing: 0; }
.thumb > canvas.cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.thumb:has(> canvas.cv) { background: #101215; }
.thumb:has(> canvas.cv)::after { content: none; }
/* 印刷用の枠（実サムネが無い種別＝フリー・動画） */
.cs-t td.th .ph, .tg-th .ph { display: grid; place-items: center; font: 7pt/1 "Hiragino Sans", "Yu Gothic", sans-serif; color: #666; }

/* ---- ⑤ 番組の一覧 /programs ---- */
.plWrap { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px 26px; }
.plList { border: 1px solid var(--line); border-radius: 5px; overflow: hidden; background: var(--panel); }
.plRow { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid #202429; }
.plRow:last-child { border-bottom: 0; }
.plRow:hover { background: #1f242a; }
.plRow.onair { box-shadow: inset 3px 0 0 var(--live); }
.plRow .nm { font-size: 14px; font-weight: 700; color: var(--text); text-decoration: none; max-width: 330px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plRow .nm:hover { color: #fff; text-decoration: underline; }
.plRow .meta { font-size: 11px; color: var(--dim2); font-family: var(--mono); }
.plRow .live { font-size: 10px; font-weight: 800; color: #fff; background: var(--live); border-radius: 2px; padding: 1px 6px; }
.plRow .sp { flex: 1; }
.plRow a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.plEmpty { padding: 20px; font-size: 12.5px; color: var(--dim2); }
.plNote { font-size: 11.5px; color: var(--dim2); line-height: 1.9; }
