/* ==========================================================
   POWER SCORE 테마 · 시안(power.css · game.css · set-7*.css)을 그누보드 테마로 쓰면서 더한 것
   power.css(와 게임 화면의 CSS) 다음, g5.css · sub.css 앞에 불러온다
   - 서브 화면(css/sub.css · g5.css)이 쓰는 색 이름을 이 테마의 색으로 이어 준다
   - 로고 그림(로고 16번) · 옆단의 자리 · 게임 3종에 맞춘 줄 · 주기 탭(1 · 3 · 5분)
   ========================================================== */
:root {
  --line-soft: var(--line-2);
  --brand: var(--ink); --brand-rgb: 16,18,51; --brand-ink: #fff;     /* 밝은 면 위의 주 단추 */
  --accent-text: #4A4FD6; --accent-line: #5B5FE0;                     /* 밝은 면 위의 강조 글자 · 활성 탭 선 */
  --amber: #F5B301;
}

/* ---------- 로고 ---------- */
.head .wrap { height: 76px; }
@media (max-width: 1040px) { .head .wrap { height: auto; } }
.logo img { display: block; width: auto; height: 62px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.foot__logo { display: block; width: auto; height: 48px; margin-left: -6px; }
.head__m .btn--ghost { border: 1px solid var(--ink-line); color: var(--on-ink-2); background: none; }

/* ---------- 한줄 공지: 여러 개면 몇 초마다 바꿔 보여 준다 (js/site.js) ---------- */
.util__notice .roll { display: block; flex: 1; min-width: 0; height: 20px; overflow: hidden; }
.util__notice .roll__item { display: block; height: 20px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.util__notice .roll__item[hidden] { display: none; }

/* ---------- 틀: 옆단은 글의 순서로는 본문 뒤(tail.php)지만 화면에서는 왼쪽 ---------- */
.layout { grid-template-areas: "side main"; }
.layout > .col-side { grid-area: side; }
.layout > .col-main { grid-area: main; }
.layout--plain { margin-top: 20px; }
.col-side, .col-main { align-content: start; }
@media (max-width: 1040px) {
  .layout { grid-template-areas: "main" "side"; }
}

/* ---------- 게임이 세 개일 때 ---------- */
.rail--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rail--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rail--1 { grid-template-columns: minmax(0, 1fr); }
.switch--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.switch--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.switch--1 { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 760px) {
  .rail--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .rail--3 .tile { padding: 10px 9px 13px; }
  .rail--3 .tile__ico, .rail--3 .tile__name small { display: none; }
  .rail--3 .tile__name { font-size: 13px; }
  .rail--3 .tile__bot { flex-direction: column; align-items: flex-start; gap: 6px; }
  .rail--3 .tile__time { font-size: 22px; }
  .switch--3 a { padding: 0 10px; gap: 6px; font-size: 13px; }
  .switch--3 a span { display: none; }
  .switch--3 a::after { content: attr(data-short); }
  .switch--3 b { font-size: 15px; }
}

/* ---------- 주기 탭 (게임 화면: 1분 · 3분 · 5분. 탭마다 그 주기의 남은 시간) ---------- */
.ptab { display: flex; align-items: center; gap: 6px; margin: -4px 0 14px; }
.ptab__k { margin-right: 6px; font-size: 12px; font-weight: 600; color: var(--on-ink-3); white-space: nowrap; }
.ptab a { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--ink-line); background: rgba(10,11,36,.35); color: var(--on-ink-2); font-size: 13px; font-weight: 700; white-space: nowrap; transition: border-color .15s, color .15s, background .15s; }
.ptab a:hover { color: #fff; border-color: rgba(var(--g-rgb), .6); }
.ptab a b { font-size: 14px; font-weight: 600; color: var(--on-ink-3); }
.ptab a[aria-current="page"] { background: var(--g); border-color: var(--g); color: var(--g-ink); }
.ptab a[aria-current="page"] b { color: var(--g-ink); opacity: .8; }
.ptab a b.is-soon { color: var(--volt); }
.ptab a[aria-current="page"] b.is-soon { color: var(--g-ink); opacity: 1; }
@media (max-width: 760px) {
  .ptab { gap: 5px; }
  .ptab__k { display: none; }
  .ptab a { flex: 1; justify-content: center; padding: 0 8px; }
}

/* ---------- 메인 무대의 주기 탭 ---------- */
.stage__tabs { display: flex; gap: 4px; margin-top: 12px; }
.stage__tabs:empty { display: none; }
.stage__tabs button { height: 26px; padding: 0 11px; border-radius: 13px; border: 1px solid var(--ink-line); font-size: 12px; font-weight: 700; color: var(--on-ink-2); background: rgba(10,11,36,.3); }
.stage__tabs button:hover { color: #fff; border-color: rgba(var(--g-rgb), .6); }
.stage__tabs button[aria-selected="true"] { background: var(--g); border-color: var(--g); color: var(--g-ink); }
.res__empty { flex: 1; display: grid; place-items: center; min-height: 150px; font-size: 13px; color: var(--on-ink-3); }
@media (max-width: 760px) {
  .stage__tabs { grid-column: 1; margin-top: 8px; }
}

/* ---------- 중계화면 제목: 1분이 아닌 주기 ----------
   제목 그림의 아래 띠에는 "1분마다 추첨"이 그려져 있다. 띠의 글자 자리(검은 면)를 같은 색으로 덮고 그 주기를 써 넣는다.
   --px · --py · --pw · --ph 는 그림에서 띠의 검은 면이 놓인 자리(그림 크기에 대한 %) */
.s7-logo--p { --px: 25.5%; --py: 66.6%; --pw: 49%; --ph: 14.6%; }
.s7-logo--p img { display: block; width: 100%; height: auto; }
.s7-logo__sub { position: absolute; left: var(--px); top: var(--py); width: var(--pw); height: var(--ph); display: flex; align-items: center; justify-content: center; gap: .5cqw; border-radius: .35cqw;
  background: #07070c; color: #fff; font-weight: 800; font-size: 1.62cqw; line-height: 1; letter-spacing: .02em; white-space: nowrap; }
.s7-logo__sub i { font-style: normal; opacity: .9; }
.s7-logo__sub b { color: #FFE14A; font-weight: 800; }
.s7 .cast[data-g="rl"] .s7-logo--p { --px: 23.6%; --py: 76.4%; --pw: 52.8%; --ph: 11.6%; }
.s7 .cast[data-g="rl"] .s7-logo__sub { font-size: 1.2cqw; border-radius: 1cqw; }
.s7 .cast[data-g="sb"] .s7-logo--p { --px: 19.6%; --py: 73.4%; --pw: 61%; --ph: 15.6%; }
.s7 .cast[data-g="sb"] .s7-logo__sub { font-size: 1.5cqw; border-radius: .9cqw; }

/* ---------- 서브 화면 스킨이 쓰는 단추 · 딱지 (css/sub.css 와 함께) ---------- */
.btn--brand { background: var(--ink); color: #fff; }
.btn--brand:hover { background: var(--ink-3); }
.badge { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 9px; font-size: 11px; font-weight: 700; line-height: 1; }
.badge--n { background: var(--volt); color: var(--volt-ink); padding: 0 5px; height: 15px; font-size: 10px; }
.login__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.login__links .btn { border-radius: 10px; }
.member__stats a, .member__admin { border-radius: 10px; }
.sub .btn, .auth .btn, .pop .btn { border-radius: 10px; }
.panel.sub { overflow: visible; }

/* ---------- 리그 순위 (운영 관리자가 모아 둔 순위 · js/site.js) ---------- */
.rank[hidden] { display: none; }
.rank__sports:empty, .rank__leagues:empty { display: none; }
.rank__table { overflow-x: auto; }
.rank__table[hidden], .rank__widget[hidden], .rank__groups[hidden] { display: none; }
.rank .rank__groups { padding-top: 10px; }

/* ---------- 중계화면 옆의 지난 회차 결과: 회차가 열 개가 안 될 때도 줄 높이를 그대로 둔다 (새 주기를 막 켰을 때 · 자정 직후) ---------- */
@media (min-width: 1041px) {
  .cast__list { grid-template-rows: repeat(10, minmax(0, 1fr)); grid-auto-rows: 0; }
}

/* ---------- 중계화면 아래 단추: 퍼가기 · 사운드 ---------- */
.cbtn { background: none; cursor: pointer; font-family: inherit; }
.cbtn--ico { gap: 6px; }
.cbtn--ico svg { width: 15px; height: 15px; flex: none; }
#btnSound .off { display: none; }
#btnSound[aria-pressed="false"] { color: var(--on-ink-3); }
#btnSound[aria-pressed="false"] .on { display: none; }
#btnSound[aria-pressed="false"] .off { display: inline; }
#btnSound[aria-pressed="true"] { color: var(--volt); border-color: rgba(255,225,74,.45); }

/* ---------- 퍼가기 창 ---------- */
.sheet { width: min(520px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--ink-line); border-radius: 16px; background: var(--ink-2); color: var(--on-ink); box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.sheet::backdrop { background: rgba(5,6,20,.66); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--ink-line); }
.sheet__head h2 { margin: 0; font-size: 16px; font-weight: 700; color: #fff; }
.sheet__head button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--on-ink-2); font-size: 22px; line-height: 1; cursor: pointer; }
.sheet__head button:hover { color: #fff; background: rgba(255,255,255,.08); }
.sheet__body { padding: 16px 20px 20px; }
.sheet__body p { margin: 0 0 12px; font-size: 13px; line-height: 1.6; color: var(--on-ink-2); }
.sheet__body textarea { display: block; width: 100%; box-sizing: border-box; margin-bottom: 12px; padding: 12px; border: 1px solid var(--ink-line); border-radius: 10px; background: rgba(5,6,20,.5); color: var(--on-ink); font: 12px/1.6 ui-monospace, Consolas, monospace; resize: none; word-break: break-all; }
.sheet__body .btn { width: 100%; justify-content: center; }

/* ---------- 퍼가기 화면 (game/_embed.php): 중계화면만 ---------- */
.is-embed, .is-embed body { margin: 0; background: var(--ink); }
.is-embed .band { padding: 0; background: none; border: 0; }
.is-embed .band > .wrap { max-width: none; padding: 0; }
.is-embed .cast { display: block; margin: 0; border-radius: 0; border: 0; }
.is-embed .cast__side, .is-embed #btnShare, .is-embed .cast__foot a.cbtn { display: none; }
