/* 쇼부카지노 - 스포츠 중계(/sportsbook/broadcast).
   틀: 탭 줄 → TV 칸(폭 전체 검정 띠) → 방송 목록.
   PC: 페이지가 스크롤되어 TV 칸이 위로 올라가고, 목록 칸은 자기 스크롤을 따로 가진다. 목록 칸의 최대 높이는 머리줄 아래 화면 높이라 페이지를 내리면 화면을 꽉 채운다.
       목록 끝에서 페이지로 이어져야 하므로 overscroll-behavior 를 쓰지 않는다.
   760px 이하: 목록 칸의 안쪽 스크롤을 없애고 페이지 스크롤 하나만 쓴다(중첩 스크롤은 손가락 끌기가 갇힌다). */

/* ───────── 탭 줄(스포츠북과 같은 모양, 전부 주소 이동) ───────── */
.sbc-tabw { padding-top: 6px; }
.sbc-tabs { margin-top: 0; }
.sbc-tabs a { display: inline-flex; align-items: center; gap: 7px; font-size: 16px; }
.sbc-tabs .dot { width: 7px; height: 7px; }
.sbc-tabs .tab-compact { display: none; }

/* ───────── TV 칸 ─────────
   --sbc-tv-h 는 칸 전체 높이(머리줄 + 16:9 영상)다. 재생 전에도 같은 높이를 잡아 재생을 시작해도 아래 목록이 밀리지 않는다. */
.sbc { --sbc-bar: 46px; --sbc-tv-h: min(58vh, calc(100vw * 9 / 16 + var(--sbc-bar))); padding-bottom: clamp(48px, 6vw, 88px); }
@supports (height: 1dvh) {
  .sbc { --sbc-tv-h: min(58dvh, calc(100vw * 9 / 16 + var(--sbc-bar))); }
}
.sbc-tv { background: #000; border-block: 1px solid var(--line); }
.sbc-tv-in { position: relative; display: grid; grid-template-rows: var(--sbc-bar) minmax(0, 1fr); width: min(100%, calc((var(--sbc-tv-h) - var(--sbc-bar)) * 16 / 9)); height: var(--sbc-tv-h); margin-inline: auto; }
.sbc-tv[data-phase="idle"] .sbc-tv-in { width: 100%; grid-template-rows: minmax(0, 1fr); }
.sbc-tv[data-phase="idle"] .sbc-bar, .sbc-tv[data-phase="idle"] .sbc-stage { display: none; }
.sbc-tv:not([data-phase="idle"]) .sbc-idle { display: none; }

.sbc-idle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; background: radial-gradient(ellipse 42% 58% at 50% 44%, rgba(217, 177, 101, .15), transparent 74%); text-align: center; }
.sbc-idle img { width: clamp(168px, 17vw, 250px); height: auto; filter: drop-shadow(0 8px 22px rgba(0, 0, 0, .6)); }
.sbc-idle p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ivory-2); }

.sbc-bar { display: flex; align-items: center; gap: 10px; min-width: 0; padding-inline: 10px 8px; background: linear-gradient(180deg, #1b150e, #120e09); }
.sbc-bar .bdg { flex: none; }
.sbc-now { flex: 1 1 auto; min-width: 0; overflow: hidden; font: 700 15px/1.3 var(--sans); color: var(--ivory); text-overflow: ellipsis; white-space: nowrap; }
.sbc-x { flex: none; gap: 5px; padding-inline: 10px 12px; }
.sbc-x svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.sbc-stage { position: relative; min-height: 0; background: #000; }
.sbc-stage video { width: 100%; height: 100%; object-fit: contain; background: #000; }

/* ───────── 방송 목록 ───────── */
.sbc-list { display: flex; flex-direction: column; max-height: calc(100vh - var(--hd-h)); max-height: calc(100dvh - var(--hd-h)); margin-top: 16px; overflow: hidden; border-radius: var(--radius); background: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.sbc-top { flex: none; padding: 16px 18px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(217, 177, 101, .1), rgba(217, 177, 101, .02)); }
.sbc-top h2 { margin: 0; font: 700 18px/1.2 var(--serif); letter-spacing: -.03em; color: var(--champagne); }
.sbc-chips { gap: 6px; margin-top: 12px; }
.sbc-chips .chip { height: 36px; padding: 0 12px; font-size: 13.5px; }
.sbc-chips svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* 맨 아래 줄 단추가 오른쪽 아래 상담 단추에 가리지 않게 끝까지 올라오게 한다 */
.sbc-sc { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-bottom: 88px; scrollbar-width: thin; scrollbar-color: rgba(217, 177, 101, .3) transparent; }
.sbc-h { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; margin: 0; padding: 13px 18px 10px; background: var(--ink); box-shadow: 0 1px 0 rgba(217, 177, 101, .1); font: 700 14.5px/1.2 var(--serif); color: var(--champagne); }
.sbc-h b { min-width: 26px; height: 22px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: rgba(217, 177, 101, .1); font: 600 12px/1 var(--sans); color: var(--ivory-2); font-variant-numeric: tabular-nums; }
.sbc-rows { margin: 0; padding: 0; list-style: none; }

.sbc-r { display: grid; grid-template-columns: 22px 46px minmax(0, 120px) minmax(0, 1fr) 92px; align-items: center; gap: 12px; min-height: 54px; padding: 7px 18px; border-top: 1px solid rgba(217, 177, 101, .08); transition: background-color .2s; }
.sbc-r:hover { background: rgba(217, 177, 101, .05); }
.sbc-r[data-on] { background: rgba(217, 177, 101, .13); box-shadow: inset 2px 0 0 var(--gold); }
.sbc-ic { display: inline-flex; color: var(--gold); }
.sbc-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.sbc-tm { font: 600 13.5px/1 var(--sans); color: var(--ivory-2); font-variant-numeric: tabular-nums; }
.sbc-lg { min-width: 0; overflow: hidden; font-size: 13px; line-height: 1.4; color: var(--ivory-3); text-overflow: ellipsis; white-space: nowrap; }
.sbc-vs { min-width: 0; overflow: hidden; font: 600 14.5px/1.35 var(--sans); color: var(--ivory); text-overflow: ellipsis; white-space: nowrap; }
.sbc-r[data-on] .sbc-vs { color: var(--gold-hi); }
.sbc-go { width: 100%; height: 36px; padding-inline: 6px; }
.sbc-soon { font-size: 12.5px; line-height: 1.2; color: var(--ivory-3); text-align: center; white-space: nowrap; }

.sbc-msg { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 0; padding: 44px 20px; color: var(--ivory-2); font-size: 14.5px; line-height: 1.6; text-align: center; }
.sbc-msg p { margin: 0; }

/* ───────── 휴대폰 ───────── */
@media (max-width: 760px) {
  .sbc { --sbc-bar: 50px; --sbc-tv-h: min(calc(100vw * 9 / 16 + var(--sbc-bar)), 72vh); padding-bottom: 28px; }
  .sbc-tabw { padding-top: 0; }
  .sbc-tabs a { padding-inline: 12px; font-size: 15px; }
  .sbc-tabs .tab-full { display: none; }
  .sbc-tabs .tab-compact { display: inline; }
  .sbc-idle p { font-size: 14px; }
  .sbc-now { font-size: 14px; }
  .sbc-x { height: 44px; }

  /* 안쪽 스크롤 없음: 줄이 페이지 흐름에 그대로 놓인다 */
  .sbc-list { max-height: none; margin-top: 12px; overflow: visible; }
  .sbc-top { padding: 14px 14px 12px; border-radius: var(--radius) var(--radius) 0 0; }
  .sbc-chips { flex-wrap: nowrap; margin-inline: -14px; padding-inline: 14px; overflow-x: auto; scrollbar-width: none; }
  .sbc-chips::-webkit-scrollbar { display: none; }
  .sbc-chips .chip { height: 44px; }
  /* 맨 아래 줄 단추가 하단 메뉴·상담 단추에 가리지 않게 여백을 둔다 */
  .sbc-sc { overflow: visible; padding-bottom: 76px; }
  .sbc-h { position: static; padding: 12px 14px 9px; }

  /* 줄 두 칸: 위 종목 · 시각 · 리그, 아래 대진, 오른쪽 단추 */
  .sbc-r { grid-template-columns: 20px 42px minmax(0, 1fr) 86px; grid-template-areas: "ic tm lg go" "vs vs vs go"; gap: 4px 8px; padding: 10px 12px 10px 14px; }
  .sbc-ic { grid-area: ic; }
  .sbc-ic svg { width: 18px; height: 18px; }
  .sbc-tm { grid-area: tm; }
  .sbc-lg { grid-area: lg; font-size: 12.5px; }
  .sbc-vs { grid-area: vs; font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
  .sbc-go, .sbc-soon { grid-area: go; }
  .sbc-go { height: 44px; }
}
/* 여섯 탭이 한 줄에 다 보이게 폭을 나눈다(스포츠북 휴대폰 탭과 같은 크기). "스포츠 중계"는 두 줄이 된다 */
@media (max-width: 600px) {
  .sbc-tabs a { position: relative; flex: 1 1 0; min-width: 0; justify-content: center; padding: 11px 2px 9px; font-size: 14px; line-height: 1.15; text-align: center; white-space: normal; }
  .sbc-tabs .dot { position: absolute; top: 3px; left: calc(50% - 3.5px); }
}
@media (max-width: 400px) {
  .sbc-tabs a { font-size: 13px; }
}
