/* ==========================================================
   POWER SCORE — 게임 페이지 공통 (중계화면 · 패턴 · 통계 · 회차표)
   power.css 다음에 불러온다. 게임 고유색은 [data-g] 의 --g 를 쓴다.
   ========================================================== */
.band--game { padding: 14px 0 26px; }
.layout--plain { margin-top: 20px; }

/* ---------- 게임 바로가기 ---------- */
.switch { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.switch a { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 21px; background: var(--ink-2); border: 1px solid var(--ink-line); color: var(--on-ink-2); font-size: 14px; font-weight: 600; white-space: nowrap; transition: border-color .15s, color .15s; }
.switch a:hover { color: #fff; border-color: rgba(var(--g-rgb), .6); }
.switch a[aria-current="page"] { color: #fff; border-color: var(--g); background: linear-gradient(90deg, rgba(var(--g-rgb), .22), var(--ink-2)); }
.switch i { width: 8px; height: 8px; border-radius: 50%; background: var(--g); flex: none; }
.switch span { overflow: hidden; text-overflow: ellipsis; }
.switch b { margin-left: auto; font-size: 17px; font-weight: 700; color: var(--on-ink); }
.switch b.is-soon { color: var(--volt); }

/* ---------- 중계화면 ---------- */
.cast { display: grid; grid-template-columns: minmax(0, 1fr) 312px; overflow: hidden; color: var(--on-ink); background: var(--ink-2); border: 1px solid var(--ink-line); border-radius: var(--r); box-shadow: 0 18px 40px -22px rgba(10,11,36,.7); }
.cast__main { display: flex; flex-direction: column; min-width: 0; }
.cast__bar { height: 5px; margin: 14px 24px 0; border-radius: 3px; background: var(--ink-3); overflow: hidden; }
.cast__bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--g); transition: width .9s linear; }
.cast__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px 16px; }
.cast__foot > div { display: flex; gap: 6px; flex: none; }
.cast__state { font-size: 13px; color: var(--on-ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cast__state::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--g); vertical-align: 1px; }
.cast.is-soon .cast__state { color: var(--volt); }
.cast.is-soon .cast__state::before { background: var(--volt); animation: blink .7s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.cbtn { display: inline-flex; align-items: center; height: 32px; padding: 0 13px; border-radius: 16px; border: 1px solid var(--ink-line); font-size: 12px; font-weight: 600; color: var(--on-ink-2); white-space: nowrap; }
.cbtn:hover { color: #fff; border-color: var(--on-ink-3); }

.cast__side { display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--ink-line); background: rgba(10,11,36,.32); }
.cast__side h2 { padding: 18px 18px 12px; font-size: 15px; font-weight: 800; }
.cast__thead, .cast__list li { display: grid; grid-template-columns: 1fr 52px 52px 52px; align-items: center; justify-items: center; padding: 0 12px 0 18px; }
.cast__thead { height: 30px; font-size: 11px; color: var(--on-ink-3); background: rgba(10,11,36,.4); }
.cast__thead span:first-child, .cast__list li > :first-child { justify-self: start; }
.cast__list { flex: 1; display: grid; grid-auto-rows: 1fr; }
.cast__list li { min-height: 37px; border-top: 1px solid rgba(45,49,118,.6); font-size: 13px; color: var(--on-ink-2); }
.cast__list li:first-child { background: rgba(var(--g-rgb), .1); color: #fff; }
.cast__list b { font: 700 15px var(--num); color: var(--on-ink); }
.cast__list .chip { min-width: 34px; height: 24px; padding: 0 8px; border-radius: 12px; font-size: 12px; }

/* ---------- 무대(.scene): 900×540 비율. 배경 그림은 게임별 CSS 에서 지정, 글자 크기는 무대 폭 기준(cqw) ---------- */
.scene { position: relative; aspect-ratio: 900 / 540; overflow: hidden; container-type: inline-size; background: #070820 center / cover no-repeat; isolation: isolate; }
.scene > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene__count { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -52%); font: 800 22cqw/1 var(--num); color: var(--volt); text-shadow: 0 0 3cqw rgba(255,225,74,.7), 0 .6cqw 0 rgba(0,0,0,.35); opacity: 0; pointer-events: none; }
.cast.is-soon .scene__count { opacity: 1; }
.scene__count.is-beat { animation: beat .9s cubic-bezier(.2,.9,.3,1) 1; }
@keyframes beat { from { transform: translate(-50%, -52%) scale(1.5); opacity: .2; } to { transform: translate(-50%, -52%) scale(1); opacity: 1; } }
/* ---------- 무대 위 글자 ---------- */
.scene__title { position: absolute; left: 2.6cqw; top: 2.4cqw; display: flex; align-items: center; gap: 1.1cqw; }
.scene__title svg { width: 5cqw; height: 5cqw; flex: none; filter: drop-shadow(0 0 1.2cqw rgba(255,225,74,.55)); }
.scene__title h1 { font: 800 3.5cqw/1 var(--num); letter-spacing: -.01em; color: #fff; text-shadow: 0 .3cqw 0 rgba(0,0,0,.35); white-space: nowrap; }
.scene__title h1 em { font-style: normal; color: var(--g); margin-left: .5cqw; text-shadow: 0 0 1.6cqw rgba(var(--g-rgb), .7); }
.scene__title p { margin-top: .6cqw; font-size: max(11px, 1.5cqw); font-weight: 600; color: var(--on-ink-2); }
.scene__timer { position: absolute; right: 2.6cqw; top: 2.4cqw; display: grid; justify-items: end; gap: .3cqw; padding: 1.1cqw 1.6cqw 1.2cqw; border-radius: 1.6cqw; background: rgba(8,9,32,.62); border: 1px solid rgba(var(--g-rgb), .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.scene__timer span { font-size: max(11px, 1.4cqw); color: var(--on-ink-2); white-space: nowrap; }
.scene__timer span b { font-size: 1.25em; font-weight: 700; color: #fff; margin-right: 1px; }
.scene__timer > b { font-size: 5.6cqw; font-weight: 800; line-height: .95; color: #fff; }
.cast.is-soon .scene__timer { border-color: var(--volt); }
.cast.is-soon .scene__timer > b { color: var(--volt); }
.scene__banner { position: absolute; left: 0; right: 0; top: 41%; display: grid; place-items: center; height: 10cqw; background: linear-gradient(90deg, transparent, rgba(8,9,32,.88) 22%, rgba(8,9,32,.88) 78%, transparent); border-block: 2px solid var(--volt); font: 800 4.4cqw/1 "Pretendard Variable", sans-serif; letter-spacing: -.02em; color: #fff; animation: banner 1.5s cubic-bezier(.2,.9,.3,1) both; pointer-events: none; }
.scene__banner b { color: var(--volt); font-family: var(--num); margin-right: .4cqw; }
.scene__banner[hidden] { display: none; }
@keyframes banner { 0% { transform: scaleY(0); opacity: 0; } 14%, 80% { transform: none; opacity: 1; } 100% { transform: scaleY(0); opacity: 0; } }
.scene__verdict { position: absolute; left: 50%; bottom: 1.6cqw; transform: translateX(-50%); display: flex; align-items: center; gap: .9cqw; padding: .8cqw 1cqw .8cqw 1.8cqw; border-radius: 4cqw; background: rgba(8,9,32,.78); border: 1px solid var(--ink-line); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); white-space: nowrap; }
.scene__verdict:empty { display: none; }
.scene__verdict .k { font-size: max(11px, 1.5cqw); font-weight: 600; color: var(--on-ink-2); margin-right: .4cqw; }
.scene__verdict .k b { font-family: var(--num); font-size: 1.2em; color: #fff; }
.scene__verdict .chip { height: 3.9cqw; min-width: 6.4cqw; padding: 0 1.4cqw; border-radius: 2cqw; font-size: max(12px, 1.8cqw); }
.scene__verdict.is-pop { animation: rise .45s cubic-bezier(.2,1.3,.4,1) both; }
.scene__verdict.is-pop .chip { animation: pop .4s cubic-bezier(.2,1.5,.4,1) both; }
.scene__verdict.is-pop .chip:nth-of-type(2) { animation-delay: .1s; }
.scene__verdict.is-pop .chip:nth-of-type(3) { animation-delay: .2s; }
@keyframes rise { from { transform: translate(-50%, 140%); } to { transform: translateX(-50%); } }
@keyframes pop { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
.scene__flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.scene__flash.is-on { animation: flash .7s ease-out 1; }
@keyframes flash { from { opacity: .7; } to { opacity: 0; } }
@media (max-width: 760px) {
  .scene__title p { display: none; }
  .scene__verdict { bottom: 1cqw; }
}

/* ---------- 밝은 패널 안의 칩 ---------- */
.panel .chip { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.panel .chip--blue { background: #E6EFFF; color: #1D5FD6; box-shadow: none; }
.panel .chip--red  { background: #FFE7EA; color: #D42C44; box-shadow: none; }
.t-o { color: #1D5FD6; } .t-e { color: #D42C44; }

/* ---------- 게임 안내 ---------- */
.guide { padding: 14px 18px 18px; font-size: 13px; color: var(--text-2); }
.guide dl { margin: 12px 0; }
.guide dl div { display: flex; align-items: center; justify-content: space-between; height: 40px; border-bottom: 1px dashed var(--line); }
.guide dt { font-weight: 600; color: var(--text); }
.guide dd { display: flex; gap: 5px; }
.guide .chip { min-width: 40px; height: 26px; font-size: 12px; }
.guide__combo { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.guide__combo li { display: flex; align-items: center; justify-content: space-between; height: 34px; padding: 0 12px; border-radius: 9px; background: var(--panel-2); font-size: 12px; }
.guide__combo b { font-weight: 600; color: var(--text); }
.guide__combo span { font-weight: 800; }

/* ---------- 오늘 통계 ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.stat-box { padding: 18px 20px 20px; border-right: 1px solid var(--line-2); }
.stat-box:nth-child(3) { border-right: 0; }
.stat-box h3 { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.vs { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.vs div { display: grid; gap: 2px; }
.vs div:last-child { justify-items: end; text-align: right; }
.vs strong { font: 800 30px/1 var(--num); letter-spacing: -.01em; }
.vs strong small { font-size: 15px; font-weight: 700; margin-left: 1px; }
.vs span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.vs .a strong { color: #1D5FD6; } .vs .b strong { color: #D42C44; }
.split { display: flex; height: 8px; margin-top: 10px; border-radius: 4px; overflow: hidden; background: var(--line-2); gap: 2px; }
.split i { display: block; height: 100%; background: var(--blue); border-radius: 4px 0 0 4px; transition: width .4s; }
.split i + i { background: var(--red); border-radius: 0 4px 4px 0; }
.stat-box p { margin-top: 10px; font-size: 12px; color: var(--muted); }
.stat-box p b { color: var(--text-2); font-weight: 600; }
.combo { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 16px 20px 20px; border-top: 1px solid var(--line-2); background: var(--panel-2); }
.combo div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-radius: 11px; background: var(--panel); border: 1px solid var(--line); }
.combo span { font-size: 13px; font-weight: 700; white-space: nowrap; }
.combo span em { font-style: normal; margin-left: 5px; }
.combo b { font: 700 20px/1 var(--num); }
.combo b small { margin-left: 5px; font: 500 12px/1 var(--num); color: var(--muted); }

/* ---------- 패턴 분석 ---------- */
.pinfo { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px 0; }
.pinfo p { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 17px; background: var(--panel-2); font-size: 13px; color: var(--text-2); white-space: nowrap; }
.pinfo p b { font-weight: 700; color: var(--text); }
.pinfo .a { background: #E6EFFF; color: #1D5FD6; } .pinfo .a b { color: #1D5FD6; }
.pinfo .b { background: #FFE7EA; color: #D42C44; } .pinfo .b b { color: #D42C44; }
.pgrid { display: flex; gap: 3px; margin: 14px 18px 18px; padding-bottom: 10px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; min-height: 150px; }
.pgrid ol { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: none; width: 32px; }
.pgrid li { display: grid; place-items: center; width: 30px; height: 24px; border-radius: 7px; font: 600 11px/1 var(--num); font-variant-numeric: tabular-nums; }
.pgrid .hd { width: 32px; height: 26px; border-radius: 7px; font: 800 12px/1 "Pretendard Variable", sans-serif; color: #fff; }
.pgrid .a .hd { background: var(--blue); } .pgrid .b .hd { background: var(--red); }
.pgrid .a li:not(.hd):not(.ct) { background: #E6EFFF; color: #1D5FD6; }
.pgrid .b li:not(.hd):not(.ct) { background: #FFE7EA; color: #D42C44; }
.pgrid .ct { margin-top: auto; font-weight: 800; font-size: 13px; color: var(--text); }
.pgrid ol:last-child li:nth-last-child(2) { box-shadow: 0 0 0 2px var(--ink); }
.pgrid__empty { margin: auto; font-size: 13px; color: var(--muted); }

/* ---------- 회차별 결과 ---------- */
.hist { overflow-x: auto; }
.hist table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hist th { height: 36px; font-size: 12px; font-weight: 500; color: var(--muted); background: var(--panel-2); white-space: nowrap; }
.hist td { height: 44px; text-align: center; border-top: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; }
.hist td:first-child { font: 700 16px var(--num); color: var(--text); }
.hist td:nth-child(2) { font: 500 14px var(--num); font-variant-numeric: tabular-nums; }
.hist tbody tr:hover td { background: var(--panel-2); }
.hist .chip { min-width: 44px; height: 26px; font-size: 12px; }
.hist td:last-child { font-weight: 600; color: var(--text); }

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  .cast { grid-template-columns: minmax(0, 1fr); }
  .cast__side { border-left: 0; border-top: 1px solid var(--ink-line); }
  .cast__list li:nth-child(n+6) { display: none; }
}
@media (max-width: 760px) {
  .switch { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
  .switch a { height: 38px; padding: 0 12px; font-size: 13px; }
  .switch b { font-size: 15px; }
  .layout--plain { margin-top: 12px; }
  .cast__bar { margin: 12px 16px 0; }
  .cast__foot { padding: 10px 16px 14px; flex-wrap: wrap; }
  .cast__state { flex: 0 0 100%; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat-box { border-right: 0; border-bottom: 1px solid var(--line-2); padding: 14px 16px 16px; }
  .stat-box:nth-child(3) { border-bottom: 0; }
  .combo { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 14px 16px 16px; }
  .panel__head .seg { order: 3; flex: 0 0 100%; }
  .pinfo { padding: 12px 14px 0; gap: 6px; }
  .pinfo p { height: 30px; padding: 0 11px; font-size: 12px; }
  .pgrid { margin: 12px 14px 14px; }
}

/* ---------- 스크린샷용 (?shot): 게임 무대만 남긴다 ---------- */
.is-shot body { background: #070820; overflow: hidden; }
.is-shot body > *:not(.band), .is-shot .switch, .is-shot .cast__side, .is-shot .cast__bar, .is-shot .cast__foot { display: none !important; }
.is-shot .band { padding: 0; background: none; }
.is-shot .band > .wrap { max-width: none; padding: 0; }
.is-shot .cast { display: block; border: 0; border-radius: 0; box-shadow: none; }
