/* 등불 생존기(생존 게임) — 화면 스타일 (한국어·영어 페이지 공용) */
.sv-page{margin:0;background:#070b0d;color:#eef2ea;font-family:-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic","Segoe UI",Roboto,sans-serif}
.sv-wrap,.sv-wrap *{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
.sv-wrap{position:relative;width:100%;max-width:1100px;margin:0 auto;height:56.25vw;max-height:100vh;overflow:hidden;background:#070b0d;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.sv-wrap canvas#sv-canvas{display:block;position:absolute;left:0;top:0;touch-action:none}
.sv-wrap:fullscreen{max-width:none;max-height:none;width:100vw;height:100vh}
.sv-wrap.sv-playing{touch-action:none}
.sv-ui{position:absolute;inset:0;pointer-events:none}
.sv-screen{position:absolute;inset:0;pointer-events:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:14px 16px;overflow-y:auto;touch-action:pan-y;text-align:center;background:radial-gradient(ellipse at 50% 40%,rgba(6,10,14,.35),rgba(3,5,8,.82));animation:svIn .22s ease-out}
@keyframes svIn{from{opacity:0;transform:scale(1.03)}to{opacity:1;transform:none}}
.sv-screen.sv-menu{background:radial-gradient(ellipse at 50% 50%,rgba(6,10,14,0),rgba(3,5,8,.6))}
.sv-screen.sv-levelup,.sv-screen.sv-chest{background:radial-gradient(ellipse at 50% 45%,rgba(30,22,6,.55),rgba(3,4,6,.86))}
.sv-logo{font-weight:900;font-size:clamp(38px,8.4vw,76px);line-height:1.05;letter-spacing:.02em}
.sv-logo span{background:linear-gradient(180deg,#fffbe8 8%,#ffd36b 48%,#ff8a3a 92%);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 0 16px rgba(255,190,90,.55)) drop-shadow(0 4px 0 rgba(0,0,0,.65))}
.sv-sub{font-size:14px;opacity:.9;max-width:560px}
.sv-stat{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:center;font-size:13px;opacity:.92}
.sv-stat>span{background:rgba(0,0,0,.4);padding:5px 11px;border-radius:999px}
.sv-btn{font:inherit;font-weight:800;font-size:16px;border:0;border-radius:14px;padding:12px 20px;margin:0;cursor:pointer;color:#1a1004;background:linear-gradient(180deg,#ffe9a8,#ffcf5a 50%,#e89a2a);box-shadow:0 4px 0 #8a5212,0 0 18px rgba(255,190,80,.3);transition:transform .08s,filter .15s}
.sv-btn:active{transform:translateY(3px);box-shadow:0 1px 0 #8a5212}
.sv-btn:hover{filter:brightness(1.07)}
.sv-btn.sv-big{font-size:20px;padding:14px 38px}
.sv-btn.sv-g{background:rgba(255,255,255,.08);color:#f3f1e8;box-shadow:inset 0 0 0 2px rgba(255,255,255,.26)}
.sv-btn.sv-sm{font-size:14px;padding:9px 14px}
.sv-btn.sv-warn{box-shadow:inset 0 0 0 2px rgba(255,110,120,.6);color:#ffb9c0}
.sv-btn:disabled{opacity:.45;cursor:default}
.sv-row{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.sv-ib{font:inherit;font-weight:900;width:40px;height:40px;border-radius:12px;border:0;background:rgba(0,0,0,.45);color:#fff;font-size:20px;cursor:pointer;box-shadow:inset 0 0 0 2px rgba(255,255,255,.25);flex:none}
.sv-top{position:absolute;top:0;left:0;right:0;display:flex;align-items:center;gap:10px;padding:10px 12px;z-index:2}
.sv-ttl{flex:1;text-align:left;font-weight:900;font-size:18px}
.sv-ttl2{font-weight:900;font-size:clamp(26px,5vw,40px);text-shadow:0 0 18px rgba(255,190,90,.45),0 3px 0 #000}
.sv-ttl2.sv-gold,.sv-ttl2.sv-lvup{background:linear-gradient(180deg,#fff,#ffe57a 50%,#ff9f1c);-webkit-background-clip:text;background-clip:text;color:transparent;text-shadow:none;filter:drop-shadow(0 0 14px rgba(255,200,80,.6))}
.sv-coinbox{display:inline-flex;align-items:center;gap:6px;font-weight:800;font-size:14px;background:rgba(0,0,0,.45);padding:6px 11px;border-radius:999px}
.sv-ci{display:inline-block;width:14px;height:14px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#fff6c2,#ffd23f 50%,#c47f00);box-shadow:0 0 8px rgba(255,210,63,.6);vertical-align:-2px}
.sv-prep,.sv-shopscr,.sv-codex,.sv-settings,.sv-rank{justify-content:flex-start;padding-top:62px}
.sv-sec{font-size:12px;font-weight:800;letter-spacing:.12em;opacity:.75;text-transform:uppercase;margin-top:2px}
.sv-chars{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;width:100%;max-width:900px}
.sv-stages{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;width:100%;max-width:900px}
.sv-card{font:inherit;color:#fff;position:relative;display:flex;flex-direction:column;align-items:center;gap:3px;border:0;border-radius:16px;padding:8px 6px 10px;background:linear-gradient(160deg,rgba(255,255,255,.1),rgba(255,255,255,.03));box-shadow:inset 0 0 0 2px rgba(255,255,255,.14);cursor:pointer;text-align:center;min-width:0}
.sv-card.on{box-shadow:inset 0 0 0 3px #ffd36b,0 0 18px rgba(255,200,90,.45)}
.sv-card.lock{opacity:.55}
.sv-card img{width:64px;height:64px}
.sv-card img.sv-wic{position:absolute;top:6px;right:6px;width:26px;height:26px}
.sv-card b{font-size:14px}
.sv-card small{font-size:11px;opacity:.85;line-height:1.3}
.sv-stc{min-height:64px;justify-content:center}
.sv-stc.st0{background:linear-gradient(160deg,rgba(60,140,100,.35),rgba(10,30,22,.4))}
.sv-stc.st1{background:linear-gradient(160deg,rgba(110,150,230,.35),rgba(14,22,44,.4))}
.sv-stc.st2{background:linear-gradient(160deg,rgba(230,110,60,.35),rgba(40,14,8,.4))}
.sv-stc.st3{background:linear-gradient(160deg,rgba(150,200,80,.32),rgba(12,30,18,.45))}
.sv-stc.st4{background:linear-gradient(160deg,rgba(170,100,240,.34),rgba(20,10,34,.5))}
.sv-stc.st5{background:linear-gradient(160deg,rgba(232,50,58,.3),rgba(14,18,30,.55))}
.sv-gobtn{margin-top:4px}
.sv-panel{width:100%;max-width:560px;background:rgba(0,0,0,.45);border-radius:16px;padding:12px 14px;display:flex;flex-direction:column;gap:8px;text-align:left}
.sv-shop{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:8px;width:100%;max-width:760px}
.sv-shopi{font:inherit;color:#fff;display:flex;align-items:center;gap:10px;border:0;border-radius:14px;padding:8px 10px;background:rgba(255,255,255,.07);box-shadow:inset 0 0 0 2px rgba(255,255,255,.12);cursor:pointer;text-align:left}
.sv-shopi img{width:44px;height:44px;flex:none}
.sv-shopi.max{opacity:.7}
.sv-shopi.poor .sv-cost{opacity:.5}
.sv-sn{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.sv-sn b{font-size:14px}.sv-sn small{font-size:11.5px;opacity:.8}
.sv-pips{display:flex;gap:3px;margin-top:3px}
.sv-pips i{width:12px;height:5px;border-radius:3px;background:rgba(255,255,255,.18)}
.sv-pips i.on{background:#ffd36b;box-shadow:0 0 6px rgba(255,210,90,.6)}
.sv-cost{font-weight:800;font-size:13px;white-space:nowrap;display:flex;align-items:center;gap:4px}
.sv-tabs{display:flex;gap:6px;flex-wrap:wrap}
.sv-tabs button{font:inherit;font-weight:800;font-size:14px;border:0;border-radius:10px;padding:7px 13px;background:rgba(255,255,255,.1);color:#fff;cursor:pointer}
.sv-tabs button.on{background:#ffd36b;color:#1a1004}
.sv-cxlist{display:flex;flex-direction:column;gap:6px;max-height:58vh;overflow-y:auto;padding-right:2px}
.sv-cx{display:flex;gap:10px;align-items:center;background:rgba(255,255,255,.05);border-radius:12px;padding:7px 9px}
.sv-cx img{width:44px;height:44px;flex:none}
.sv-cx>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.sv-cx b{font-size:14px}.sv-cx small{font-size:12px;opacity:.88;line-height:1.35}
.sv-dim{opacity:.65}
.sv-ok{color:#7dffa0;font-size:12px}
.sv-rec{display:flex;align-items:center;gap:2px;flex:none}
.sv-rec img{width:34px;height:34px}
.sv-rec em{font-style:normal;font-weight:900;opacity:.7}
.sv-sil{filter:brightness(0) opacity(.5)}
.sv-evo.found{box-shadow:inset 0 0 0 1px rgba(255,209,102,.5)}
.sv-stdot{width:44px;height:44px;border-radius:12px;flex:none}
.sv-stdot.st1{background:linear-gradient(160deg,#6e96e6,#0e162c)}.sv-stdot.st2{background:linear-gradient(160deg,#e66e3c,#280e08)}.sv-stdot.st3{background:linear-gradient(160deg,#96c850,#0c1e12)}.sv-stdot.st4{background:linear-gradient(160deg,#aa64f0,#140a22)}.sv-stdot.st5{background:linear-gradient(160deg,#e8323a,#141822)}
.sv-set{display:grid;gap:8px;width:100%;max-width:360px;margin:0 auto}
.sv-set label{display:grid;grid-template-columns:70px 1fr;align-items:center;gap:10px;font-size:13px;font-weight:700;text-align:left}
.sv-set input[type=range]{width:100%;accent-color:#ffcf5a}
.sv-tog{display:flex;align-items:center;gap:10px;font-size:14px;cursor:pointer;padding:3px 0}
.sv-tog input{width:20px;height:20px;accent-color:#ffcf5a;flex:none}
.sv-build{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;max-width:520px}
.sv-build span{position:relative;width:40px;height:40px}
.sv-build span.p{width:32px;height:32px;margin-top:4px}
.sv-build img{width:100%;height:100%}
.sv-build b{position:absolute;right:-2px;bottom:-4px;font-size:11px;background:rgba(0,0,0,.7);border-radius:6px;padding:0 4px}
/* 레벨업 카드 */
.sv-cards{display:flex;gap:10px;justify-content:center;width:100%;max-width:820px}
.sv-lvc{font:inherit;color:#fff;position:relative;flex:1;min-width:0;max-width:260px;display:flex;flex-direction:column;align-items:center;gap:6px;border:0;border-radius:18px;padding:14px 12px 14px;background:linear-gradient(170deg,rgba(60,74,110,.75),rgba(14,18,30,.92));box-shadow:inset 0 0 0 2px rgba(160,190,255,.35),0 8px 24px rgba(0,0,0,.4);cursor:pointer;text-align:center;animation:svCard .35s ease-out backwards;transition:transform .12s,box-shadow .12s}
.sv-lvc.p{background:linear-gradient(170deg,rgba(50,96,74,.75),rgba(10,24,18,.92));box-shadow:inset 0 0 0 2px rgba(150,240,180,.32),0 8px 24px rgba(0,0,0,.4)}
.sv-lvc:nth-child(2){animation-delay:.06s}.sv-lvc:nth-child(3){animation-delay:.12s}
.sv-lvc:hover,.sv-lvc:focus-visible{transform:translateY(-4px);box-shadow:inset 0 0 0 3px #ffd36b,0 0 26px rgba(255,200,90,.5)}
@keyframes svCard{from{opacity:0;transform:translateY(18px) scale(.94)}to{opacity:1;transform:none}}
.sv-lvc img{width:64px;height:64px}
.sv-key{position:absolute;top:8px;left:10px;font-size:11px;font-weight:900;opacity:.5}
.sv-lvt{display:flex;flex-direction:column;gap:3px;align-items:center}
.sv-lvt b{font-size:16px}
.sv-lvl{font-size:12px;font-weight:800;color:#9fe9ff}
.sv-lvt small{font-size:12.5px;opacity:.92;line-height:1.35}
.sv-new{font-style:normal;color:#1a1004;background:#7dffa0;border-radius:6px;padding:1px 6px;font-size:11px;font-weight:900}
.sv-evohint{font-style:normal;font-size:12px;font-weight:800;color:#ffd36b;animation:svPulse .8s ease-in-out infinite alternate}
.sv-pair{font-style:normal;font-size:11px;opacity:.7;display:flex;align-items:center;gap:3px;justify-content:center}
.sv-pair.has{opacity:1;color:#ffe08a}
.sv-pair img{width:18px;height:18px}
@keyframes svPulse{to{opacity:.55}}
/* 상자 */
.sv-chestbox{display:flex;flex-direction:column;align-items:center;gap:10px;animation:svPop .45s cubic-bezier(.2,1.6,.4,1)}
@keyframes svPop{from{transform:scale(.6);opacity:0}to{transform:none;opacity:1}}
.sv-evobig img{width:110px;height:110px;filter:drop-shadow(0 0 24px rgba(255,210,90,.8));animation:svSpin 2.4s ease-in-out infinite alternate}
@keyframes svSpin{from{transform:rotate(-6deg) scale(1)}to{transform:rotate(6deg) scale(1.06)}}
.sv-chestitems{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.sv-chestitems span{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:13px}
.sv-chestitems img{width:58px;height:58px}
.sv-coinline{font-weight:800;font-size:18px;display:flex;align-items:center;gap:6px}
/* 결과 */
.sv-results{justify-content:flex-start;padding-top:18px;background:radial-gradient(ellipse at 50% 30%,rgba(8,12,16,.86),rgba(3,5,8,.95))}
.sv-stats{display:grid;grid-template-columns:repeat(4,minmax(64px,1fr));gap:8px;width:100%;max-width:520px}
.sv-stats div{background:rgba(0,0,0,.42);border-radius:12px;padding:8px 4px;display:flex;flex-direction:column;align-items:center;gap:2px}
.sv-stats b{font-size:20px}.sv-stats span{font-size:11px;opacity:.78}
.sv-earn{font-size:15px;display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:center}
.sv-earn b{color:#ffd36b}
.sv-unl{font-weight:800;color:#7dffa0}
.sv-dps{border-collapse:collapse;font-size:13px;width:100%;max-width:520px;background:rgba(0,0,0,.35);border-radius:12px;overflow:hidden}
.sv-dps th,.sv-dps td{padding:5px 8px;border-bottom:1px solid rgba(255,255,255,.08);text-align:right;white-space:nowrap}
.sv-dps th:first-child,.sv-dps td:first-child{text-align:left;white-space:normal}
.sv-dps td img{width:22px;height:22px;vertical-align:middle;margin-right:5px}
.sv-rankp{max-width:520px}
.sv-regrow{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:center}
.sv-nick{font:inherit;font-size:15px;padding:9px 10px;border-radius:10px;border:0;width:140px;text-align:center}
.sv-board{max-height:30vh;overflow-y:auto;font-size:14px}
.sv-rank .sv-board{max-height:60vh}
.sv-rk{display:flex;justify-content:space-between;gap:10px;padding:4px 2px;border-bottom:1px solid rgba(255,255,255,.07)}
.sv-rk small{margin-left:6px;opacity:.6;font-size:11px}
.sv-rk.me{color:#7dffa0;font-weight:800}
.sv-muted{font-size:13px;opacity:.7;padding:6px 0}
.sv-note{font-size:12px;opacity:.78}
/* HUD */
.sv-hud{position:absolute;inset:0;pointer-events:none}
.sv-hud button{pointer-events:auto}
.sv-pausebtn{position:absolute;top:14px;right:10px}
.sv-full{position:absolute;top:14px;right:56px;font-size:18px}
.sv-toast{position:absolute;left:50%;top:62px;transform:translate(-50%,-10px);background:rgba(0,0,0,.82);color:#fff;padding:8px 14px;border-radius:10px;font-size:14px;opacity:0;pointer-events:none;transition:all .2s;z-index:5}
.sv-toast.on{opacity:1;transform:translate(-50%,0)}
/* 좁은 화면(세로 휴대폰) */
.sv-narrow .sv-chars{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.sv-narrow .sv-chars .sv-card{padding:6px 4px 8px}
.sv-narrow .sv-chars .sv-card img{width:52px;height:52px}
.sv-narrow .sv-chars .sv-card img.sv-wic{width:22px;height:22px;top:4px;right:4px}
.sv-narrow .sv-chars .sv-card small{font-size:10.5px}
.sv-narrow .sv-stages{grid-template-columns:1fr}
.sv-narrow .sv-stc{min-height:0;padding:8px 10px}
.sv-narrow .sv-cards{flex-direction:column;align-items:stretch;max-width:420px}
.sv-narrow .sv-lvc{max-width:none;flex-direction:row;text-align:left;padding:10px 12px;gap:10px}
.sv-narrow .sv-lvc img{width:52px;height:52px;flex:none}
.sv-narrow .sv-lvt{align-items:flex-start}
.sv-narrow .sv-pair{justify-content:flex-start}
.sv-narrow .sv-key{display:none}
.sv-narrow .sv-stats b{font-size:17px}
/* 낮은 화면(가로 휴대폰) */
.sv-short .sv-screen{gap:6px;padding-top:8px;padding-bottom:8px}
.sv-short .sv-prep,.sv-short .sv-shopscr,.sv-short .sv-codex,.sv-short .sv-settings,.sv-short .sv-rank{padding-top:54px}
.sv-short .sv-logo{font-size:clamp(30px,6vw,52px)}
.sv-short .sv-btn.sv-big{padding:9px 28px;font-size:18px}
.sv-short .sv-btn{padding:8px 15px}
.sv-short .sv-top{padding:6px 10px}
.sv-short .sv-card img{width:44px;height:44px}
.sv-short .sv-card small{display:none}
.sv-short .sv-card.lock small,.sv-short .sv-stc small{display:block}
.sv-short .sv-lvc{padding:8px 10px;gap:4px}
.sv-short .sv-lvc img{width:44px;height:44px}
.sv-short .sv-ttl2{font-size:24px}
.sv-short .sv-cxlist{max-height:62vh}
.sv-short .sv-results{padding-top:8px}
.sv-short .sv-board{max-height:40vh}
.sv-short .sv-stats div{padding:4px}
/* 아래 설명 */
.sv-below{max-width:760px;margin:0 auto;padding:16px 16px 34px;font-size:15px;line-height:1.75;color:#d6dccf}
.sv-below h1{font-size:22px;color:#fff;margin:14px 0 6px}
.sv-below h2{font-size:18px;color:#fff;margin:22px 0 6px}
.sv-below a{color:#ffd36b}
.sv-below ul{padding-left:20px}
.sv-below details{background:rgba(255,255,255,.05);border-radius:12px;padding:8px 14px;margin:8px 0}
.sv-below summary{cursor:pointer;font-weight:700;color:#fff}
.sv-below details p{margin:6px 0 2px}
.sv-tbl{width:100%;border-collapse:collapse;font-size:14px;margin:10px 0}
.sv-tbl th,.sv-tbl td{border-bottom:1px solid rgba(255,255,255,.12);padding:6px 6px;text-align:left;vertical-align:top}
.sv-tbl th{color:#fff}
.sv-more{opacity:.8;font-size:14px}
@media (prefers-reduced-motion:reduce){.sv-screen,.sv-lvc,.sv-chestbox{animation:none}.sv-evobig img{animation:none}}
/* 넘치는 화면도 위가 잘리지 않게 가운데 정렬 */
.sv-screen{justify-content:flex-start}
.sv-screen>:first-child:not(.sv-top){margin-top:auto}
.sv-screen>:last-child{margin-bottom:auto}
.sv-wrap .sv-lvc .sv-pair img{width:20px;height:20px;flex:none}
.sv-short .sv-evobig img{width:68px;height:68px}
