/* ==========================================================
   POWER SCORE — 게임 시안 세트 7 : 네온 골드 스튜디오 (클라이언트가 준 완성 예시 그림을 따라 만든 세트)
   세트 1 의 스타일(game.css + 게임별 css) 위에 덮어쓴다. html 에 class="s7".
   - 배경(박사와 번개 구슬 장치가 함께 그려져 있다) · 타이틀 로고 · 사다리 부품은 클라이언트가 준 이미지(img/s7/)를 쓰고, 타이머 · 결과 줄은 코드로 그린다
   - 금테는 "검은 판 + 금빛 그라디언트 테두리"를 겹쳐서 낸다 (--gold-frame)
   ========================================================== */
.s7 { --gold-frame: linear-gradient(180deg, #FFF3B0, #E9B43A 28%, #8A5A12 52%, #F4CE62 76%, #FFE9A0); --gold-text: linear-gradient(180deg, #FFF6C8 8%, #FFD23F 45%, #E08A12 92%); }

/* ---------- 파워사다리 ---------- */
.s7 .cast[data-g="ld"] .scene { background-image: url(../img/s7/ladder-bg.webp); background-color: #06061E; }
.s7 .cast[data-g="ld"] { --g: #FFD23F; --g-rgb: 255,210,63; --g-ink: #1A1204; }
/* 세트 1 의 밤 무대 효과와 글자 타이틀은 끈다 (타이틀은 로고 그림으로 바꾼다) */
.s7 .scene__floor, .s7 .scene__sky, .s7 .scene__motes, .s7 .cast[data-g="ld"] .scene > svg[aria-hidden] { display: none; }
.s7 .scene__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }      /* 화면 낭독용으로만 남긴다 */

/* 타이틀 로고: 위쪽 가운데 */
.s7-logo { position: absolute; left: 50%; top: -1.8cqw; width: 46cqw; margin-left: -23cqw; pointer-events: none; filter: drop-shadow(0 .5cqw .8cqw rgba(0,0,0,.6)); animation: s7logo 3.2s ease-in-out infinite alternate; }
@keyframes s7logo { from { filter: drop-shadow(0 .5cqw .8cqw rgba(0,0,0,.6)) brightness(1); } to { filter: drop-shadow(0 0 1.6cqw rgba(255,200,60,.55)) brightness(1.08); } }

/* 타이머: 검은 판에 금테, 시간은 금빛 기울임 숫자 */
.s7 .scene__timer { right: 2cqw; top: 2cqw; justify-items: center; gap: .2cqw; padding: .9cqw 2cqw 1cqw; border-radius: 1.4cqw; border: .3cqw solid transparent; background: linear-gradient(#0A0A16, #0A0A16) padding-box, var(--gold-frame) border-box; box-shadow: 0 0 1.6cqw rgba(255,190,60,.55), inset 0 0 1.2cqw rgba(255,190,60,.18); -webkit-backdrop-filter: none; backdrop-filter: none; }
.s7 .scene__timer span { color: #fff; font-weight: 700; }
.s7 .scene__timer > b { font-size: 4.3cqw; padding: 0 .5cqw; font-style: italic; letter-spacing: .02em; background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 .8cqw rgba(255,190,60,.7)); }
.s7 .cast.is-soon .scene__timer { box-shadow: 0 0 2.6cqw rgba(255,90,60,.9), inset 0 0 1.2cqw rgba(255,90,60,.3); }
.s7 .cast.is-soon .scene__timer > b { background: linear-gradient(180deg, #FFF, #FFB3A0 45%, #FF4A2A 92%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 박사 손 위의 구슬 (그림에서 왼쪽 80.5%, 위 48%): 빛이 맥박처럼 뛴다 */

/* 사다리 위치: 배경 그림의 원형 받침 위에 서도록 줄여서 올린다 (홀·짝 받침의 아랫변이 받침 윗면에 닿고, 좌·우 표지는 타이틀 로고 바로 아래에 온다) */
.s7 #board, .s7 #runnerLayer { transform: scale(1, 0.76); transform-origin: 50% 33.9%; }   /* 세로만 줄인다. 가로는 그대로 두어 기둥 사이를 넓게 쓰고, 부품 그림은 js/ladder-s7.js 가 가로를 같은 만큼 줄여 찌그러지지 않게 한다 */
/* 세로 기둥: 왼쪽은 파란 네온관, 오른쪽은 빨간 네온관 (사다리는 기둥 두 개 → 가로대 순으로 그려진다) */
.s7 #board .tube__c { stroke: rgba(4,4,20,.75); stroke-width: 16; }
.s7 #board .rail .tube__c { stroke-width: 20; }
.s7 #board .rail .tube__l { stroke-width: 6; }
.s7 #board > .rail:nth-child(1) .tube__c { stroke: rgba(31,107,255,.45); }
.s7 #board > .rail:nth-child(1) .tube__l { stroke: #BFE2FF; filter: drop-shadow(0 0 3px #4FA8FF) drop-shadow(0 0 9px #1F6BFF) drop-shadow(0 0 16px #1F6BFF); }
.s7 #board > .rail:nth-child(2) .tube__c { stroke: rgba(255,42,58,.45); }
.s7 #board > .rail:nth-child(2) .tube__l { stroke: #FFC9C2; filter: drop-shadow(0 0 3px #FF6A5A) drop-shadow(0 0 9px #FF2A3A) drop-shadow(0 0 16px #FF2A3A); }
/* 가로대: 금빛 번개. 선이 지글거리도록 페이지의 #s7Zap 필터로 흔든다 */
.s7 #board .rung { filter: url(#s7Zap); }
.s7 #board .rung .tube__c { stroke: rgba(255,170,30,.28); stroke-width: 15; }
.s7 #board .rung .tube__l { stroke: #FFF6C8; stroke-width: 5; filter: drop-shadow(0 0 3px #FFD23F) drop-shadow(0 0 9px #FFA41C); }
.s7 #board .rung.is-flick { animation: s7zapin .34s steps(1) 1; }
@keyframes s7zapin { 0% { opacity: 0; } 15% { opacity: 1; } 35% { opacity: .15; } 55% { opacity: 1; } 75% { opacity: .5; } 100% { opacity: 1; } }
/* 지나간 길: 흰 빛줄기 */
.s7 #board .path--glow { stroke: #FFD23F; stroke-width: 16; opacity: .55; filter: blur(5px); }
.s7 #board .path--core { stroke: #fff; stroke-width: 6; filter: drop-shadow(0 0 5px #FFD23F) drop-shadow(0 0 12px #FF9A1E); }
.s7 #board .path--flow { stroke: #fff; stroke-width: 5; filter: drop-shadow(0 0 4px #7FD0FF) drop-shadow(0 0 8px #1F6BFF); }
/* 좌·우 표지: 알약 모양 네온 판 (좌 파랑 · 우 빨강) */
.s7 #board text { fill: #fff; font-weight: 800; }
.s7 #board .term__box { stroke-width: 3.5; }
.s7 #board .term[data-t="l"] .term__box { fill: #0A1E7A; stroke: #8FD0FF; filter: drop-shadow(0 0 6px #1F6BFF) drop-shadow(0 0 14px #1F6BFF); }
.s7 #board .term[data-t="r"] .term__box { fill: #7A0A14; stroke: #FFB0A6; filter: drop-shadow(0 0 6px #FF2A3A) drop-shadow(0 0 14px #FF2A3A); }
.s7 #board .term[data-t="l"] .term__coil { stroke: #8FD0FF; } .s7 #board .term[data-t="r"] .term__coil { stroke: #FFB0A6; }
.s7 #board .term.is-on .term__box { stroke: #FFE9A0; stroke-width: 5; }
.s7 #board .term[data-t="l"].is-on .term__box { fill: #1F5BFF; filter: drop-shadow(0 0 8px #FFD23F) drop-shadow(0 0 20px #4FA8FF); }
.s7 #board .term[data-t="r"].is-on .term__box { fill: #F0283A; filter: drop-shadow(0 0 8px #FFD23F) drop-shadow(0 0 20px #FF6A5A); }
.s7 #board .term.is-on text { fill: #fff; }
.s7 #board .term.is-on .term__coil { stroke: #FFE9A0; filter: none; }
.s7 #board .term.is-scan .term__box { fill: #FFD23F; stroke: #fff; }
.s7 #board .term.is-scan text { fill: #1A1204; }
/* 홀·짝 표지: 둥근 네온 판 (홀 파랑 · 짝 빨강) */
.s7 #board .bulb__core { stroke-width: 3.5; }
.s7 #board .bulb[data-b="o"] .bulb__core { fill: #0A1E7A; stroke: #8FD0FF; filter: drop-shadow(0 0 8px #1F6BFF); }
.s7 #board .bulb[data-b="e"] .bulb__core { fill: #7A0A14; stroke: #FFB0A6; filter: drop-shadow(0 0 8px #FF2A3A); }
.s7 #board .bulb[data-b="o"] .bulb__ring { stroke: #4FA8FF; } .s7 #board .bulb[data-b="e"] .bulb__ring { stroke: #FF6A5A; }
.s7 #board .bulb.is-on .bulb__core { stroke: #FFE9A0; stroke-width: 5; animation: none; }
.s7 #board .bulb[data-b="o"].is-on .bulb__core { fill: #1F5BFF; filter: drop-shadow(0 0 10px #FFD23F) drop-shadow(0 0 24px #4FA8FF); }
.s7 #board .bulb[data-b="e"].is-on .bulb__core { fill: #F0283A; filter: drop-shadow(0 0 10px #FFD23F) drop-shadow(0 0 24px #FF6A5A); }
.s7 #board .bulb.is-on .bulb__ring { stroke: #FFD23F; }

.s7 .scene__count { background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 0 2cqw rgba(255,190,60,.8)); }

/* ---------- 파워사다리: 사다리를 클라이언트가 준 부품 그림으로 입힌다 (위 규칙을 덮어쓴다) ----------
   기둥 · 가로대 · 좌우 표지 · 홀짝 구슬은 js/ladder-s7.js 가 그림(.s7i)으로 끼워 넣고, 여기서는 원래의 선과 도형을 감춘다.
   좌우 · 홀짝은 평소(.s7i--off) · 선택됨(.s7i--on) 두 장을 겹쳐 두고 is-on 에 맞춰 바꿔 보여 준다. 글자는 그림에 들어 있어 따로 쓰지 않는다 */
.s7 #board .rail line, .s7 #board .rung line { opacity: 0; }
.s7 #board .rung { filter: none; }
.s7 #board .term__box, .s7 #board .term__coil, .s7 #board .term text, .s7 #board .bulb__core, .s7 #board .bulb__ring, .s7 #board .bulb text { opacity: 0; }
.s7 #board .s7i { pointer-events: none; }
.s7 #board .s7i--on { opacity: 0; transition: opacity .25s; }
.s7 #board .s7i--off { transition: opacity .25s; }
.s7 #board .is-on .s7i--on, .s7 #board .term.is-scan .s7i--on { opacity: 1; }
.s7 #board .is-on .s7i--off, .s7 #board .term.is-scan .s7i--off { opacity: 0; }
/* 선택된 표지 · 구슬 둘레의 번개가 지글거린다 */
.s7 #board .is-on .s7i--on { animation: s7lit .32s steps(2) infinite; }
@keyframes s7lit { from { filter: brightness(1); } to { filter: brightness(1.22); } }
/* 가로대(번개 광선): 가볍게 떨리며 빛난다. 켜질 때는 깜빡이며 들어온다 */
.s7 #board .rung .s7i { transform-box: fill-box; transform-origin: center; animation: s7rung .22s steps(2) infinite; filter: drop-shadow(0 0 5px rgba(255,190,40,.9)); }
@keyframes s7rung { from { transform: scaleY(1); filter: drop-shadow(0 0 4px rgba(255,190,40,.8)) brightness(1); } to { transform: scaleY(1.14); filter: drop-shadow(0 0 8px rgba(255,200,60,1)) brightness(1.15); } }
.s7 #board .rung.is-flick { animation: s7zapin .34s steps(1) 1; }
/* 지나간 길: 가로대 그림이 보이도록 가늘게 */
.s7 #board .path--glow { stroke: #FFFFFF; stroke-width: 10; opacity: .22; filter: blur(4px); }
.s7 #board .path--core { stroke: rgba(255,255,255,.5); stroke-width: 2.5; filter: drop-shadow(0 0 4px #fff); }
.s7 #board .path--flow { stroke: #1F6BFF; stroke-width: 4; }

/* ---------- 결과 줄 · POWER SCORE 현판: 클라이언트가 준 그림을 쓴다 ----------
   결과 줄: 금테 판 그림(verdict-frame.webp, 양 끝에 번개)을 뒤에 깔고, 단추는 빈 단추 그림(btn-blue · btn-red) 위에 글자를 올린다.
   그림들에는 둘레에 투명한 여백이 있어서, 실제 판 · 단추가 있는 부분이 글자 상자에 맞도록 크기를 키워 놓는다 */
.s7 .scene__verdict { bottom: 1.5cqw; min-width: 43cqw; justify-content: center; gap: 1.1cqw; padding: .75cqw 2.4cqw; border: 0; border-radius: 0; background: none; box-shadow: none; }
/* 판 그림(2000×667)에서 검은 안쪽은 x 230~1790, y 275~400 */
.s7 .scene__verdict::before { content: ""; position: absolute; left: -14.74%; width: 128.2%; top: -220%; height: 533.6%; background: url(../img/s7/verdict-frame.webp) center / 100% 100% no-repeat; z-index: -1; pointer-events: none; filter: drop-shadow(0 0 .8cqw rgba(255,180,40,.45)); }
.s7 .scene__verdict .k { color: #FFE9A0; font-weight: 700; }
/* 단추 그림(1774×887)에서 단추는 가운데에 가로 82.6% · 세로 57% 를 차지한다 */
.s7 .scene__verdict .chip { height: 3.4cqw; min-width: 8.6cqw; padding: 0 1.6cqw; border: 0; border-radius: 2cqw; box-shadow: none; color: #fff; font-weight: 800; background: url(../img/s7/btn-blue.webp) center / 121% 176% no-repeat; text-shadow: 0 .1cqw .3cqw rgba(0,0,20,.7); }
.s7 .scene__verdict .chip--red { background-image: url(../img/s7/btn-red.webp); }
/* 줄 수 단추(3줄 · 4줄)는 색 구분이 없어, 파란 단추의 색을 금빛으로 돌려 따로 보이게 한다 */
.s7 .scene__verdict .chip:not(.chip--blue):not(.chip--red) { filter: hue-rotate(178deg) saturate(1.2) brightness(1.1); }
/* 현판 그림(2000×667): 원형 받침 앞쪽(홀·짝 아래)에 놓는다 */
.s7-plate { position: absolute; left: 50%; top: 41.9cqw; width: 31cqw; margin-left: -15.5cqw; pointer-events: none; filter: drop-shadow(0 .3cqw .5cqw rgba(0,0,0,.6)); }
.s7-plate img { display: block; width: 100%; height: auto; }

/* ---------- 번개 구슬이 사다리를 탄다 (드래곤볼 사다리와 같은 흐름, js/ladder-s3.js 를 그림만 바꿔 쓴다) ----------
   대기 중: 아래 홀·짝 사이를 좌우로 오간다 → 추첨 직전: 가운데로 와서 위로 올라간다 → 추첨: 정해진 쪽(좌·우)으로 가서 길을 따라 내려간다 → 도착한 자리에서 통통 뛴다.
   구슬 그림은 방향이 따로 없어 네 모습(뒤·좌·우·정면)에 같은 그림을 쓴다 */
#runnerLayer { pointer-events: none; }
/* 대기 중에는 직전 결과의 가로대와 길을 감추고, 빈 사다리(흐린 가로대)만 보여 준다 */
.s7 #board.s3-wait .rung, .s7 #board.s3-wait .res { opacity: 0 !important; transition: opacity .4s; }
.s7 #runnerLayer .ghost { stroke: #FFE27A; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 12 12; opacity: 0; filter: drop-shadow(0 0 4px #FFB300); }
.s7 #runnerLayer.is-wait .ghost { opacity: .4; animation: ghost7 1.6s ease-in-out infinite alternate; }
@keyframes ghost7 { from { opacity: .2; } to { opacity: .5; } }
/* 구슬이 사다리 가운데를 타고 올라가므로, 가운데를 가리는 큰 카운트다운 숫자는 쓰지 않는다 (타이머가 붉게 바뀐다) */
.s7 .scene__count { display: none; }
#runner .rn-shadow { display: none; }                                                                  /* 빛나는 구슬이라 그림자는 두지 않는다 */
#runner .rn-img { display: none; filter: drop-shadow(0 0 6px rgba(255,220,120,.9)) drop-shadow(0 0 16px rgba(160,120,255,.8)); }
#runner.is-back .rn-img--back, #runner.is-right .rn-img--right, #runner.is-left .rn-img--left,
#runner.is-front .rn-img--front, #runner.is-cheer .rn-img--front { display: block; }
.s7 #runner .rn-flip { transform: none; }                                                              /* 구슬은 좌우로 뒤집지 않는다 */
#runner .rn-bob { transform-box: fill-box; transform-origin: 50% 50%; }
#runner.is-right .rn-bob, #runner.is-left .rn-bob { animation: hop7 .22s ease-in-out infinite alternate; }     /* 오갈 때: 통통 튄다 */
#runner.is-back .rn-bob { animation: climb7 .2s ease-in-out infinite alternate; }                        /* 올라갈 때 · 내려올 때: 빛이 떨린다 */
#runner.is-back .rn-shadow { display: none; }
#runner.is-front .rn-bob { animation: idle7 1.2s ease-in-out infinite alternate; }
#runner.is-cheer .rn-bob { animation: cheer7 .4s cubic-bezier(.3,0,.5,1) infinite alternate; }           /* 도착: 통통 */
@keyframes hop7 { from { transform: translateY(0); } to { transform: translateY(-7px); } }
@keyframes climb7 { from { transform: scale(.95); filter: brightness(1); } to { transform: scale(1.06); filter: brightness(1.25); } }
@keyframes idle7 { from { transform: scale(.97); } to { transform: scale(1.04); } }
@keyframes cheer7 { from { transform: translateY(0) scale(.96); } to { transform: translateY(-7px) scale(1.06); filter: brightness(1.25); } }
@media (prefers-reduced-motion: reduce) { #runner * { animation: none !important; } }

/* ==========================================================
   파워섯다 (세트 7) — 달밤의 궁궐 배경에 금테 섯다판. 배경 · 타이틀 로고 · 섯다판 틀 · 화투 뒷면은 클라이언트가 준 이미지
   패와 승패 표시는 sutda.js 가 그대로 맡는다. 타이머 · 결과 줄은 세트 7 공통 모양(위쪽 규칙)을 쓴다
   ========================================================== */
.s7 .cast[data-g="sd"] .scene { background-image: url(../img/s7/sutda-bg.webp); background-color: #0A0A1E; }
.s7 .cast[data-g="sd"] { --g: #FFD23F; --g-rgb: 255,210,63; --g-ink: #1A1204; }
.s7 .sd-moon, .s7 #lanterns { display: none; }                      /* 달과 등은 배경 그림에 있다. 흩날리는 꽃잎은 그대로 둔다 */
/* 타이틀 로고: 왼쪽 위 */
.s7 .cast[data-g="sd"] .s7-logo { left: 1.6cqw; top: .6cqw; width: 37cqw; margin-left: 0; }
/* 섯다판 틀 (2000×667): 패가 놓이는 자리 뒤에 깐다 */
.s7-mat { position: absolute; left: 5cqw; top: 21.6cqw; width: 90cqw; pointer-events: none; filter: drop-shadow(0 1cqw 1.6cqw rgba(0,0,0,.6)); }
.s7-mat img { display: block; width: 100%; height: auto; }
.s7 .sd-table { top: 25.2cqw; gap: 4.6cqw; }
/* 청 · 홍 이름판: 검은 판에 금테, 안쪽에 청 · 홍 빛 */
.s7 .sd-plate { height: 3.5cqw; padding: 0 1.6cqw 0 .5cqw; border: .22cqw solid transparent; background: linear-gradient(#0C0A14, #0C0A14) padding-box, var(--gold-frame) border-box; box-shadow: 0 0 1.2cqw var(--side), inset 0 0 1cqw color-mix(in srgb, var(--side) 45%, transparent); }
.s7 .sd-hand--l { --side: #2F6BFF; --side-l: #A9C8FF; }
.s7 .sd-hand--r { --side: #E8283A; --side-l: #FFB0A6; }
.s7 .sd-hand.is-win .sd-plate { background: linear-gradient(var(--side), var(--side)) padding-box, var(--gold-frame) border-box; box-shadow: 0 0 2.4cqw var(--side); }
.s7 .sd-plate em { background: var(--gold-text); color: #2A1400; }
/* 화투 뒷면 (1003×1568 그림에서 카드는 가운데에 가로 82% · 세로 83.5% 를 차지한다) */
.s7 .sd-card__b, .s7 .sd-deck i { border: 0; border-radius: .9cqw; background: url(../img/s7/card-back.webp) 50% 50% / 122% 119.8% no-repeat; box-shadow: 0 .6cqw 1cqw rgba(0,0,0,.55); }
/* 가운데 패 더미: 금빛 고리 안에 놓는다 */
.s7 .sd-deck { margin-top: 6.2cqw; }
.s7 .sd-deck::before { content: ""; position: absolute; left: 50%; top: 50%; width: 15.4cqw; height: 15.4cqw; margin: -7.7cqw 0 0 -7.7cqw; border-radius: 50%; border: .3cqw solid transparent; background: radial-gradient(closest-side, #3A1A14, #170709 92%) padding-box, var(--gold-frame) border-box; box-shadow: 0 0 1.6cqw rgba(255,190,60,.6), inset 0 0 1.4cqw rgba(255,190,60,.35); animation: s7ring 2.4s ease-in-out infinite alternate; }
@keyframes s7ring { from { box-shadow: 0 0 1cqw rgba(255,190,60,.45), inset 0 0 1cqw rgba(255,190,60,.25); } to { box-shadow: 0 0 2.4cqw rgba(255,200,80,.9), inset 0 0 1.8cqw rgba(255,190,60,.5); } }
.s7 .cast.is-soon .sd-deck::before { animation-duration: .4s; }
.s7 .sd-deck span { top: -6.5cqw; font-style: italic; font-weight: 800; background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.s7 .sd-deck span b { color: inherit; }
.s7 .cast[data-g="sd"] .scene__verdict { bottom: 1.2cqw; }
.s7 .cast[data-g="sd"] .scene__banner { top: 13cqw; height: 7cqw; font-size: 3.4cqw; }
@media (prefers-reduced-motion: reduce) { .s7 .sd-deck::before { animation: none !important; } }

/* ---------- 파워섯다: 이름판 · 패 더미 고리 · 타이머 판을 클라이언트가 준 그림으로 (위 규칙을 덮어쓴다) ---------- */
/* 청 · 홍 이름판 (2000×667 그림에서 판은 가운데에 가로 84% · 세로 43.5%). 양 끝의 꽃 장식을 피해 글자는 가운데에 모은다. 이기면 빛나는 판(-on)으로 바뀐다 */
.s7 .sd-plate { height: 3.9cqw; min-width: 21cqw; justify-content: center; gap: .7cqw; padding: 0 3.6cqw; border: 0; border-radius: 2cqw; background: url(../img/s7/plate-blue.webp) 50% 49% / 119% 230% no-repeat; box-shadow: none; }
.s7 .sd-hand--r .sd-plate { background-image: url(../img/s7/plate-red.webp); }
.s7 .sd-hand.is-win .sd-plate { background: url(../img/s7/plate-blue-on.webp) 50% 49% / 119% 230% no-repeat; box-shadow: none; filter: brightness(1.15); }
.s7 .sd-hand--r.is-win .sd-plate { background-image: url(../img/s7/plate-red-on.webp); }
.s7 .sd-plate b, .s7 .sd-hand.is-win .sd-plate b { width: auto; height: auto; background: none; color: #fff; font-size: max(12px, 1.9cqw); font-style: italic; }
.s7 .sd-plate span { min-width: 0; font-size: max(12px, 1.9cqw); font-style: italic; text-shadow: 0 .1cqw .3cqw rgba(0,0,0,.7); }
/* 가운데 패 더미의 고리 (1254×1254 그림에서 고리는 중심 (625, 610), 반지름 약 470). 천천히 돈다 */
.s7 .sd-deck::before { width: 21.4cqw; height: 21.4cqw; margin: -10.4cqw 0 0 -10.66cqw; border: 0; border-radius: 0; background: url(../img/s7/deck-ring.webp) center / 100% 100% no-repeat; box-shadow: none; transform-origin: 49.8% 48.6%; animation: s7ringspin 18s linear infinite; }
@keyframes s7ringspin { to { transform: rotate(360deg); } }
.s7 .sd-deck::after { content: ""; position: absolute; left: 50%; top: 50%; width: 15cqw; height: 15cqw; margin: -7.5cqw 0 0 -7.5cqw; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,190,70,.28), rgba(255,150,40,.08) 70%, transparent); z-index: -1; animation: s7ringglow 2.2s ease-in-out infinite alternate; }
@keyframes s7ringglow { from { opacity: .5; } to { opacity: 1; } }
.s7 .cast.is-soon .sd-deck::before { animation-duration: 3s; }
.s7 .sd-deck { z-index: 0; }
/* 타이머 판: 금테와 꽃 장식이 달린 판 그림을 뒤에 깐다 (--tx · --ty · --tw · --th 는 그림에서 검은 안쪽이 있는 자리로, 페이지 생성 때 재서 넣었다) */
.s7 .cast[data-g="sd"] .scene__timer { right: 3.2cqw; top: 2.6cqw; padding: .9cqw 2.2cqw 1cqw; border: 0; border-radius: 0; background: none; box-shadow: none; }
.s7 .cast[data-g="sd"] .scene__timer::before { content: ""; position: absolute; left: -13.6%; top: -30.5%; width: 124.6%; height: 163%; background: url(../img/s7/timer-frame.webp) center / 100% 100% no-repeat; z-index: -1; filter: drop-shadow(0 .4cqw .8cqw rgba(0,0,0,.6)); }
.s7 .cast[data-g="sd"].is-soon .scene__timer { box-shadow: none; }
.s7 .cast[data-g="sd"].is-soon .scene__timer::before { filter: drop-shadow(0 0 1.4cqw rgba(255,90,60,.95)); }
@media (prefers-reduced-motion: reduce) { .s7 .sd-deck::before, .s7 .sd-deck::after { animation: none !important; } }

/* ---------- 파워섯다: 입체 화투패 (클라이언트 제공, img/s7/hwatu/mNN-a|b.webp · 1024×1536) ----------
   그림 둘레에 투명한 여백이 있어(카드는 가운데에 가로 약 90% · 세로 약 93%) 카드가 패 자리에 꽉 차도록 키워 넣는다 */
.s7 .sd-card__f img { position: absolute; left: -5.4%; top: -3.9%; width: 110.8%; height: 107.8%; max-width: none; }

/* ==========================================================
   파워룰렛 (세트 7) — 별밤의 전망대 배경, 전구가 박힌 금테 휠. 배경 · 타이틀 로고 · 휠 틀(받침대와 위쪽 바늘 포함) · 타이머 판 · 결과 줄 판과 단추는 클라이언트가 준 이미지
   휠의 칸과 숫자, 도는 움직임은 roulette.js 가 그대로 맡는다. 휠은 틀의 구멍에 맞게 줄여서 올려 놓는다
   ========================================================== */
.s7 .cast[data-g="rl"] .scene { background-image: url(../img/s7/roulette-bg.webp); background-color: #06061E; }
.s7 .cast[data-g="rl"] { --g: #FFD23F; --g-rgb: 255,210,63; --g-ink: #1A1204; }
.s7 .rl-beam, .s7 #fx { display: none; }
/* 타이틀 로고: 왼쪽 위 */
.s7 .cast[data-g="rl"] .s7-logo { left: 1cqw; top: .4cqw; width: 30cqw; margin-left: 0; }
/* 휠: 틀의 구멍(무대 좌표에서 중심 (450, 203), 반지름 약 137)에 맞춘다 */
.s7 .cast[data-g="rl"] #wheel { transform: translateY(-7.22cqw) scale(.735); transform-origin: 50% 49.63%; }
.s7-wheel { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.s7-wheel image { filter: drop-shadow(0 6px 8px rgba(0,0,0,.55)); }
.s7 .cast.is-soon .s7-wheel image, .scene:has(#wheel.is-spin) .s7-wheel image { animation: s7frame .3s steps(2) infinite; }
@keyframes s7frame { from { filter: drop-shadow(0 6px 8px rgba(0,0,0,.55)) brightness(1); } to { filter: drop-shadow(0 0 14px rgba(255,200,80,.9)) brightness(1.2); } }
.s7 #wheel .rim { fill: #0A0A16; stroke: none; }
.s7 #wheel .rim2, .s7 #wheel .bulb, .s7 #wheel .pin { display: none; }              /* 전구와 위쪽 바늘은 틀 그림에 있다 */
.s7 #wheel .w { stroke: #F4CE62; stroke-width: 2.5; }
.s7 #wheel .w--gold { fill: #F2A91C; } .s7 #wheel .w--purple { fill: #7A22D8; }
.s7 #wheel .w--odd { fill: #1F5BFF; } .s7 #wheel .w--even { fill: #E0202A; }
.s7 #wheel .n { font-size: 22px; }
.s7 #wheel .n--gold { fill: #1A1204; }
.s7 #wheel .sep { stroke: #F4CE62; stroke-width: 6; filter: drop-shadow(0 0 5px rgba(255,190,60,.8)); }
.s7 #wheel .hub { fill: #0A0A16; stroke: #F4CE62; stroke-width: 6; filter: drop-shadow(0 0 8px rgba(255,190,60,.7)); }
.s7 #wheel .hub__n.is-gold { fill: #FFD23F; } .s7 #wheel .hub__n.is-purple { fill: #D9B8FF; }
.s7 #wheel .pin2 { fill: #FFF3B0; stroke: #8A5A12; }
.s7 #wheel .w.is-hit { stroke: #fff; stroke-width: 4; filter: drop-shadow(0 0 8px #FFE9A0); }
/* 타이머 판 (1536×1024 그림에서 검은 안쪽은 x 150~1385, y 255~745) */
.s7 .cast[data-g="rl"] .scene__timer { right: 3.4cqw; top: 3cqw; padding: 1cqw 2.2cqw 1.1cqw; border: 0; border-radius: 0; background: none; box-shadow: none; }
.s7 .cast[data-g="rl"] .scene__timer::before { content: ""; position: absolute; left: -12.1%; top: -52%; width: 124.4%; height: 209%; background: url(../img/s7/rl-timer.webp) center / 100% 100% no-repeat; z-index: -1; filter: drop-shadow(0 .4cqw .8cqw rgba(0,0,0,.6)); }
.s7 .cast[data-g="rl"].is-soon .scene__timer { box-shadow: none; }
.s7 .cast[data-g="rl"].is-soon .scene__timer::before { filter: drop-shadow(0 0 1.4cqw rgba(255,90,60,.95)); }
/* 결과 줄: 금테 판(2000×667 그림에서 검은 안쪽은 x 110~1890, y 245~420) + 단추 그림(1536×1024, 단추는 가로 84.6% · 세로 65.4%) */
.s7 .cast[data-g="rl"] .scene__verdict { bottom: 1.3cqw; min-width: 50cqw; gap: 1.2cqw; padding: .8cqw 3cqw; }
.s7 .cast[data-g="rl"] .scene__verdict::before { left: -6.18%; width: 112.36%; top: -140%; height: 381%; background-image: url(../img/s7/rl-verdict.webp); }
.s7 .cast[data-g="rl"] .scene__verdict .chip { height: 3.5cqw; min-width: 7.6cqw; background: url(../img/s7/rl-btn-blue.webp) 49.8% 52% / 118% 153% no-repeat; filter: none; }
.s7 .cast[data-g="rl"] .scene__verdict .chip--red { background-image: url(../img/s7/rl-btn-red.webp); }
.s7 .cast[data-g="rl"] .scene__verdict .chip--purple { background-image: url(../img/s7/rl-btn-purple.webp); }
.s7 .cast[data-g="rl"] .scene__verdict .chip--gold { background-image: url(../img/s7/rl-btn-red.webp); filter: grayscale(1) sepia(1) saturate(5) hue-rotate(-12deg) brightness(1.15); }   /* 골드 단추는 받은 그림이 없어 빨강 단추의 색을 돌려 쓴다 */
/* 당첨 번호: 둥근 단추 그림(1254×1254, 원은 중심 (622, 650) · 지름 약 55%). 골드 번호는 색을 돌려 쓴다 */
.s7 .scene__verdict .nb { width: 3.7cqw; height: 3.7cqw; font-size: max(12px, 1.8cqw); color: #fff; background: url(../img/s7/rl-num.png) 49.4% 52.6% / 182% 182% no-repeat; text-shadow: 0 .1cqw .3cqw rgba(0,0,20,.7); }
.s7 .scene__verdict .nb--gold { filter: grayscale(1) sepia(1) saturate(5) hue-rotate(-12deg) brightness(1.25); }
.s7 .cast[data-g="rl"] .scene__banner { top: 31%; }
@media (prefers-reduced-motion: reduce) { .s7-wheel image { animation: none !important; } }

/* ---------- 파워사다리: 타이머 판 그림 (월계수가 달린 금테 판, 1860×846 그림에서 검은 안쪽은 x 275~1580, y 135~615) ---------- */
.s7 .cast[data-g="ld"] .scene__timer { right: 4.6cqw; top: 2.4cqw; padding: .9cqw 2cqw 1cqw; border: 0; border-radius: 0; background: none; box-shadow: none; }
.s7 .cast[data-g="ld"] .scene__timer::before { content: ""; position: absolute; left: -21.1%; top: -28.1%; width: 142.5%; height: 176.3%; background: url(../img/s7/ld-timer.webp) center / 100% 100% no-repeat; z-index: -1; filter: drop-shadow(0 .4cqw .8cqw rgba(0,0,0,.6)); }
.s7 .cast[data-g="ld"].is-soon .scene__timer { box-shadow: none; }
.s7 .cast[data-g="ld"].is-soon .scene__timer::before { filter: drop-shadow(0 0 1.4cqw rgba(255,90,60,.95)); }

/* ---------- 파워룰렛: 휠을 감도는 금빛 궤도 (그림). 천천히 기울며 숨 쉬듯 빛나고, 추첨이 가까워지면 빨라진다 ---------- */
.s7-orbit { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.s7-orbit image { transform-origin: 450px 203px; animation: s7orbit 4.5s ease-in-out infinite alternate; }
@keyframes s7orbit { from { transform: rotate(-3deg) scale(.98); opacity: .75; filter: drop-shadow(0 0 3px rgba(255,190,60,.6)); } to { transform: rotate(3deg) scale(1.03); opacity: 1; filter: drop-shadow(0 0 9px rgba(255,200,80,1)); } }
.s7 .cast.is-soon .s7-orbit image { animation-duration: 1s; }
.scene:has(#wheel.is-spin) .s7-orbit image { animation-duration: .35s; }
@media (prefers-reduced-motion: reduce) { .s7-orbit image { animation: none !important; } }

/* ==========================================================
   파워세븐볼 (세트 7) — 우주 정거장 배경의 금테 유리 추첨기. 배경 · 타이틀 로고 · 추첨기 · 궤도 · 타이머 판 · 받침 판 · 합계 판 · 결과 판 · 단추 · 공(파랑 · 빨강)은 클라이언트가 준 이미지
   통 안에서 공 48개가 튀다가 하나씩 나오는 방식은 앞 세트들과 같다 (js/sevenball-s3.js). 추첨 순서와 공 · 합계는 sevenball.js 가 그대로 맡는다
   아래 숫자들(%)은 "그림 안에서 검은 안쪽 · 단추 · 공이 실제로 있는 자리"를 재서 맞춘 값이다
   ========================================================== */
.s7 .cast[data-g="sb"] .scene { background-image: url(../img/s7/sevenball-bg.webp); background-color: #050A2A; }
.s7 .cast[data-g="sb"] { --g: #4FA8FF; --g-rgb: 79,168,255; --g-ink: #04102E; }
.s7 .cast[data-g="sb"] #machine { opacity: 0; }
.s7 .sb-stars, .s7 .sb-shoot, .s7 .sb-rings { display: none; }
/* 타이틀 로고: 위쪽 가운데 */
.s7 .cast[data-g="sb"] .s7-logo { top: -.8cqw; width: 38cqw; margin-left: -19cqw; }
/* 궤도: 추첨기 뒤에서 천천히 기울며 빛난다 */
.s7-sborbit { position: absolute; left: 23.8cqw; top: 10.9cqw; width: 52.6cqw; pointer-events: none; transform-origin: 49.8% 48.3%; animation: s7orbit 4.5s ease-in-out infinite alternate; }
.s7 .cast.is-soon .s7-sborbit { animation-duration: 1s; }
.scene:has(#machine.is-mix) .s7-sborbit { animation-duration: .35s; }
/* 추첨기 (1254×1254 그림에서 유리통은 중심 (625, 600), 안쪽 반지름 약 330) */
.s7-drum { position: absolute; left: 50%; top: 7.3cqw; width: 43cqw; height: 43cqw; margin-left: -21.5cqw; pointer-events: none; }
.s7-drum > img { display: block; width: 100%; height: 100%; filter: drop-shadow(0 1cqw 1.4cqw rgba(0,0,30,.55)); }
.s7-drum canvas, .s7-drum__glass { position: absolute; left: 23.5%; top: 21.5%; width: 52.6%; height: 52.6%; border-radius: 50%; }
.s7-drum__glass { background: radial-gradient(60% 46% at 30% 22%, rgba(255,255,255,.35), rgba(255,255,255,0) 70%); }
.s7 .cast.is-soon .s7-drum > img { animation: s7drumglow .5s ease-in-out infinite alternate; }
.scene:has(#machine.is-mix) .s7-drum > img { animation: s7drumshake .16s linear infinite; filter: drop-shadow(0 0 1.8cqw rgba(90,170,255,.95)); }
@keyframes s7drumglow { to { filter: drop-shadow(0 0 1.6cqw rgba(90,170,255,.9)); } }
@keyframes s7drumshake { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(.12cqw, -.08cqw); } 75% { transform: translate(-.12cqw, .08cqw); } }
/* 공이 나오는 자리: 추첨기 위쪽 뚜껑의 배출구 (그림에서 왼쪽 49.8%, 위 14%). 뽑힌 공은 통 안에서 위쪽 관으로 빨려 들어갔다가 여기로 나온다 */
.s7-drum__mouth { position: absolute; left: 49.8%; top: 14%; width: 0; height: 0; }
/* 관 입구(그림에서 위 23.5%)가 공을 빨아들일 때 빛난다 */
.s7-drum__mouth::after { content: ""; position: absolute; left: -2.6cqw; top: 3.2cqw; width: 5.2cqw; height: 2.2cqw; border-radius: 50%; background: radial-gradient(closest-side, #fff, rgba(120,200,255,.9) 45%, transparent); opacity: 0; }
.s7-drum__mouth.is-fire::after { animation: s7sbsuck .34s ease-in 1; }
@keyframes s7sbsuck { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.3); opacity: 1; } 100% { transform: scale(.7); opacity: 0; } }
.s7-drum__mouth::before { content: ""; position: absolute; left: -4cqw; top: -4cqw; width: 8cqw; height: 8cqw; border-radius: 50%; background: radial-gradient(closest-side, #fff, #BFE2FF 30%, rgba(60,140,255,.85) 58%, transparent 100%); opacity: 0; }
.s7-drum__mouth.is-fire::before { animation: s7sbfire .7s ease-out .22s 1; }
@keyframes s7sbfire { 0% { transform: scale(.3); opacity: 0; } 22% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(.6); opacity: 0; } }

/* 받침(공 7개): 파란 네온 판 (2000×667 그림에서 안쪽은 x 110~1890, y 240~425) */
.s7 .cast[data-g="sb"] .sb-tray { top: 44.2cqw; gap: .55cqw; padding: .5cqw 2.4cqw; border: 0; border-radius: 0; background: none; box-shadow: none; }
.s7 .cast[data-g="sb"] .sb-tray::before { content: ""; position: absolute; left: -6.2%; width: 112.4%; top: -130%; height: 360%; background: url(../img/s7/sb-tray.webp) center / 100% 100% no-repeat; z-index: -1; pointer-events: none; }
.s7 .sb-slot { width: 4.4cqw; border-color: rgba(143,216,255,.35); }
.s7 .sb-slot::before { font-size: 1.3cqw; }
/* 공: 가운데가 흰 유리 고리 그림 (1254×1254 그림에서 고리 지름은 약 80.7%). 번호는 흰 가운데에 올린다 */
.s7 .sb-ball { font-size: 2cqw; color: #0B1238; background: url(../img/s7/sb-ball-blue.webp) 50% 50.6% / 124% 124% no-repeat; box-shadow: 0 .4cqw .7cqw rgba(0,0,0,.5); }
.s7 .sb-ball--red { background-image: url(../img/s7/sb-ball-red.webp); }
.s7 .sb-ball::before, .s7 .sb-ball::after { display: none; }
.s7 .cast[data-g="sb"] .sb-slot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: .25cqw solid #BFE2FF; opacity: 0; pointer-events: none; }
.s7 .cast[data-g="sb"] .sb-slot:has(.is-drop)::after { animation: s7sbland .55s ease-out .8s 1; }
@keyframes s7sbland { from { transform: scale(.8); opacity: 1; } to { transform: scale(2.3); opacity: 0; } }
/* 합계 줄: 가는 파란 네온 판 (2000×667 그림에서 안쪽은 x 110~1890, y 270~400) */
.s7 .cast[data-g="sb"] .sb-gauge { top: 50.4cqw; gap: 1.2cqw; padding: .45cqw 2.6cqw; border-radius: 0; background: none; }
.s7 .cast[data-g="sb"] .sb-gauge::before { content: ""; position: absolute; left: -6.2%; width: 112.4%; top: -208%; height: 513%; background: url(../img/s7/sb-gauge.webp) center / 100% 100% no-repeat; z-index: -1; pointer-events: none; }
.s7 .sb-sum { font-size: max(9px, 1.15cqw); }
.s7 .sb-sum b { min-width: 4.6cqw; font-size: 2.5cqw; font-style: italic; background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.s7 .sb-bar { width: 26cqw; height: 1cqw; }
.s7 .sb-bar::before, .s7 .sb-bar::after, .s7 .sb-bar em { display: none; }
.s7 .sb-bar i { width: 1.7cqw; height: 1.7cqw; margin: -.85cqw 0 0 -.85cqw; border-width: .35cqw; }
.s7 .sb-tally { font-size: 1.8cqw; }
.s7 .sb-tally i { width: 1.3cqw; height: 1.3cqw; }
/* 타이머 판 (1536×1024 그림에서 검은 안쪽은 x 125~1415, y 250~745) */
.s7 .cast[data-g="sb"] .scene__timer { right: 3.2cqw; top: 3cqw; padding: 1cqw 2.2cqw 1.1cqw; border: 0; border-radius: 0; background: none; box-shadow: none; }
.s7 .cast[data-g="sb"] .scene__timer::before { content: ""; position: absolute; left: -9.7%; top: -50.5%; width: 119%; height: 207%; background: url(../img/s7/sb-timer.webp) center / 100% 100% no-repeat; z-index: -1; filter: drop-shadow(0 .4cqw .8cqw rgba(0,0,0,.6)); }
.s7 .cast[data-g="sb"].is-soon .scene__timer { box-shadow: none; }
.s7 .cast[data-g="sb"].is-soon .scene__timer::before { filter: drop-shadow(0 0 1.4cqw rgba(255,90,60,.95)); }
/* 결과 줄: 금테 판 (2000×667 그림에서 안쪽은 x 110~1890, y 245~420) + 단추 그림 */
.s7 .cast[data-g="sb"] .scene__verdict { bottom: .5cqw; min-width: 46cqw; gap: 1cqw; padding: .6cqw 3cqw; }
.s7 .cast[data-g="sb"] .scene__verdict::before { left: -6.2%; width: 112.4%; top: -140%; height: 381%; background-image: url(../img/s7/sb-verdict.webp); }
.s7 .cast[data-g="sb"] .scene__verdict .k { font-size: max(10px, 1.25cqw); }
.s7 .cast[data-g="sb"] .scene__verdict .chip { height: 3cqw; min-width: 6.6cqw; padding: 0 1.2cqw; font-size: max(10px, 1.45cqw); background: url(../img/s7/sb-btn-blue.webp) 49.6% 50.4% / 136% 166% no-repeat; }
.s7 .cast[data-g="sb"] .scene__verdict .chip--red { background-image: url(../img/s7/sb-btn-red.webp); }
.s7 .cast[data-g="sb"] .scene__verdict .chip:not(.chip--blue):not(.chip--red) { filter: none; background: url(../img/s7/sb-btn-navy.webp) 50% 52% / 112% 220% no-repeat; }   /* 합계 단추 */
/* 공: 위쪽 배출구(--sx, --sy 는 스크립트가 넣는다)에서 솟아올랐다가 추첨기 앞을 지나 받침으로 떨어진다. 통 안의 공이 관으로 빨려 들어가는 시간만큼 늦게 나온다 */
.s7 .cast[data-g="sb"] .sb7--drum .sb-ball.is-drop { animation: s7sbout .64s linear .3s both; }
@keyframes s7sbout {
  0%   { transform: translate(var(--sx, 0px), var(--sy, -36cqw)) scale(.2); opacity: 0; animation-timing-function: cubic-bezier(.2,.8,.4,1); }
  22%  { transform: translate(calc(var(--sx, 0px) + (var(--i) - 3) * .9cqw), calc(var(--sy, -36cqw) - .4cqw)) scale(.62); opacity: 1; filter: drop-shadow(0 0 1.2cqw rgba(160,210,255,1)); animation-timing-function: cubic-bezier(.5,0,.8,.5); }
  86%  { transform: translate(0, 0) scale(1.12, .9); filter: drop-shadow(0 -.8cqw 1cqw rgba(120,190,255,.6)); }
  100% { transform: none; opacity: 1; filter: none; }
}
.s7 .cast[data-g="sb"] .sb-slot:has(.is-drop)::after { animation-delay: .88s; }
@media (prefers-reduced-motion: reduce) { .s7-drum > img, .s7-drum__mouth::before, .s7-drum__mouth::after, .s7-sborbit { animation: none !important; } }
