*{box-sizing:border-box}body{margin:0;background:#071320;color:#e9f5ff;font-family:system-ui,sans-serif;overflow:hidden}canvas{position:fixed;inset:0;width:100%;height:100%;touch-action:none}header{position:fixed;top:0;left:0;right:0;padding:24px 32px;display:flex;justify-content:space-between;align-items:center;pointer-events:none}header>*{pointer-events:auto}header b{font-size:27px;letter-spacing:-1px}header b span{color:#91f557}small{display:block;font-size:11px;letter-spacing:1.5px;color:#7e99ad}header small{font-size:9px;letter-spacing:4px;margin-top:3px}header em{font-size:11px;color:#ffdc7b;font-style:normal}button{cursor:pointer;border:1px solid #2b4357;border-radius:14px;background:#13283b;color:#e9f5ff;padding:13px 18px;font:600 14px system-ui}button:hover{filter:brightness(1.15)}button:disabled{opacity:.45;cursor:default}header button{margin-left:18px;padding:9px}main{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(450px,92vw);max-height:82dvh;overflow:auto;background:linear-gradient(145deg,#142b3eee,#091824f5);border:1px solid #35495d;border-radius:28px;padding:30px;box-shadow:0 30px 100px #0008;text-align:center;backdrop-filter:blur(16px)}main.hidden{display:none}.eyebrow{color:#94f861;font-size:11px;font-weight:800;letter-spacing:3px}h1{font-size:47px;line-height:1.12;letter-spacing:-2px;margin:18px 0}h2{font-size:30px;margin:15px 0}p{font-size:14px;color:#9eb5c7;line-height:1.8}.primary{display:block;width:100%;background:#a2fa62;color:#102313;border:0;font-size:17px;padding:17px;margin:18px 0 10px;box-shadow:0 7px 24px #8dff4320}.secondary{display:block;width:100%;margin:8px 0}.stats{display:flex;gap:8px;justify-content:center;margin:22px 0}.stats>div{flex:1;background:#07142180;padding:15px 8px;border-radius:13px}.stats strong{font-size:23px;display:block;margin-bottom:6px}.note{font-size:11px;color:#7e99ad;line-height:1.6}.chips{display:flex;gap:9px;justify-content:center;margin:14px}.chip{width:40px;height:40px;border-radius:50%;padding:0;border:3px solid transparent}.chip.selected{border-color:white;box-shadow:0 0 20px #fff3}.banner{border:1px dashed #365269;border-radius:10px;padding:10px;font-size:11px;color:#7292ab;margin-top:17px}#hud{position:fixed;top:100px;left:32px;display:flex;gap:28px;align-items:center}#hud[hidden],#board[hidden],#controls[hidden]{display:none}#hud strong{font-size:28px}#board{position:fixed;right:25px;top:105px;font-size:12px;background:#071421aa;border:1px solid #203548;border-radius:14px;padding:14px;min-width:145px}#ranks div{display:flex;justify-content:space-between;gap:14px;margin-top:9px}#controls{position:fixed;bottom:25px;left:25px;right:25px;display:flex;align-items:center;justify-content:space-between;pointer-events:none}#controls span{font-size:11px;color:#849cac;line-height:1.7}.joystick{width:110px;height:110px;border:1px solid #ffffff20;border-radius:50%;background:#ffffff08;pointer-events:auto;touch-action:none;display:grid;place-items:center}.joystick i{width:44px;height:44px;background:#ffffff25;border:1px solid #ffffff40;border-radius:50%}#boost{width:90px;height:90px;border-radius:50%;font-size:33px;color:#afff65;border-color:#77c340;pointer-events:auto;touch-action:none}#boost small{font-size:9px;letter-spacing:0;color:#b9d99e}#toast{position:fixed;bottom:155px;left:50%;transform:translateX(-50%);background:#223e50;padding:12px 20px;border-radius:12px;display:none;font-size:13px}.ad-orb{font-size:70px;margin:25px}.reward{color:#ffdb75;font-size:32px}.row{display:flex;gap:8px}.row button{flex:1}@media(max-width:600px){header{padding:18px}header b{font-size:22px}#hud{left:18px;top:85px;gap:18px}#hud strong{font-size:23px}#board{right:12px;top:85px;min-width:118px;padding:10px;font-size:10px}main{padding:24px}h1{font-size:40px}#controls{left:16px;right:16px;bottom:22px}#controls span{max-width:100px;text-align:center}.joystick{width:95px;height:95px}}

#volume{width:72px;margin-left:10px;accent-color:#a2fa62;vertical-align:middle} @media(max-width:600px){#volume{width:48px;margin-left:5px}header button{margin-left:8px;padding:8px}header b{font-size:20px}}

.coin-hud{display:flex!important;gap:10px;flex-wrap:wrap}.coin-hud span{font-size:11px;white-space:nowrap}.coin-hud b{display:block;font-size:18px}.qta{color:#ffd263}.qx{color:#62dfff}.qkey{color:#d7a4ff}.coin-result{display:flex;justify-content:center;gap:30px;margin:18px 0}.coin-result b{display:block;font-size:30px}@media(max-width:600px){#hud{flex-wrap:wrap;max-width:calc(100vw - 32px)}.coin-hud{gap:12px}#board{top:155px!important}}

.coin-hud .daily{display:block;font-size:9px;line-height:1.5;opacity:.85;letter-spacing:0}.coin-hud{gap:12px!important}@media(max-width:600px){#hud{gap:12px}#hud .coin-hud{order:3;width:100%;justify-content:space-between}#board{top:200px!important}}

#hud{flex-wrap:wrap;width:min(500px,calc(100vw - 64px));gap:16px}.level-hud{width:100%;padding:9px 12px;border:1px solid #608d3b;background:#0d231fe8;border-radius:12px}.level-hud div{display:flex;align-items:center;justify-content:space-between;gap:8px}.level-hud b{color:#b4ff77;font-size:14px}.level-hud span{color:#b1c7ba;font-size:11px}.level-hud progress{display:block;width:100%;height:5px;margin-top:7px;accent-color:#acff6b;border:0;border-radius:8px;overflow:hidden}.level-hud progress::-webkit-progress-bar{background:#2a4034}.level-hud progress::-webkit-progress-value{background:#acff6b}.level-result{color:#b4ff77;font-weight:700}@media(max-width:600px){#hud{width:calc(100vw - 36px);gap:10px}#board{top:265px!important}.level-hud b{font-size:13px}.level-hud span{font-size:10px}}

.shop-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.shop-item{background:#071421b0;border:1px solid #355063;border-radius:15px;padding:12px 8px}.shop-icon{font-size:34px;color:#ffdf79;text-shadow:0 0 16px #fba929}.shop-icon.ice{color:#86eeff;text-shadow:0 0 16px #3bdcff}.shop-item>b{display:block;font-size:13px}.shop-item small{font-size:10px;letter-spacing:0;line-height:1.5;margin:7px 0;min-height:30px}.shop-item button{padding:9px 5px;width:100%;font-size:11px}.gold-text{color:#ffdf79}.perk{display:block;text-align:left;width:100%;margin:12px 0;padding:18px;border-color:#77b750}.perk b{display:block;font-size:18px;color:#b8ff80}.perk span{display:block;font-size:12px;color:#a9bdcc;margin-top:8px}.hunt-info{display:grid;gap:6px;max-width:210px;border-bottom:1px solid #375061;margin-bottom:10px;padding-bottom:10px}.hunt-info b{color:#ffdf79}.hunt-info span{font-size:10px;color:#b2c9da}.hunt-info strong{font-size:11px;color:#9affdf}@media(max-width:600px){#board{min-width:145px;max-width:175px;top:260px!important;background:#071421c9}.hunt-info{gap:4px}.hunt-info b{font-size:10px}.hunt-info strong{font-size:10px}#ranks div{margin-top:5px}}

#language{position:fixed;z-index:20;top:66px;right:32px;border:1px solid #42617a;border-radius:8px;background:#12283b;color:#e9f5ff;padding:4px 8px;font:12px system-ui;max-width:120px}#language:disabled{opacity:.5}@media(max-width:600px){#language{top:57px;right:18px}#board{max-width:180px}.hunt-info{overflow-wrap:anywhere}.level-hud div{flex-wrap:wrap}.level-hud span{letter-spacing:0}#hud .coin-hud{gap:6px!important}.coin-hud .daily{font-size:8px}#controls span{font-size:10px}.perk span{line-height:1.5}.shop-item>b{min-height:32px}}

.shop-wallet{margin:8px 0}.shop-tabs{display:flex;gap:8px;margin:16px 0}.shop-tabs button{flex:1}.shop-tabs .active{background:#a2fa62;color:#102313}.gear-list{display:grid;gap:12px}.gear-card{display:grid;grid-template-columns:42px 1fr;text-align:left;gap:10px;background:#081925;border:1px solid #345368;border-radius:14px;padding:14px}.gear-icon{font-size:34px;color:#b4ff78}.gear-card p{font-size:12px;margin:7px 0;line-height:1.5}.gear-card small{letter-spacing:0;margin-bottom:10px}.gear-card button{padding:9px 5px;font-size:11px}.revive-card{padding:15px;border:1px solid #9b7943;background:#3a2c1833;border-radius:14px;margin-top:15px}.revive-card b{color:#ffda86}.revive-card p{font-size:12px;margin-bottom:0}.gear-buttons{position:absolute;left:50%;bottom:25px;transform:translateX(-50%);display:flex;gap:8px;pointer-events:auto}.gear-use{width:85px;padding:8px 3px;border-color:#6aa844;background:#132c24}.gear-use b{display:block;font-size:23px;color:#beff82}.gear-use span{display:block!important;max-width:none!important;font-size:10px!important;line-height:1.5!important;text-align:center!important;color:#e4f9df!important}.gear-use small{font-size:9px;letter-spacing:0;color:#b6d2b6}.gear-use:disabled{opacity:.6}#controls>span{position:absolute;bottom:0;left:50%;transform:translateX(-50%);white-space:nowrap;max-width:none}@media(max-width:600px){.gear-buttons{bottom:120px;gap:6px}.gear-use{width:78px;padding:6px 2px}#controls>span{bottom:25px;font-size:9px}#board{max-width:160px}.gear-card{padding:12px;grid-template-columns:30px 1fr}.gear-icon{font-size:28px}}

.qw-member{position:fixed;z-index:20;top:66px;left:32px;max-width:46vw;border:1px solid #42617a;border-radius:8px;background:#12283b;color:#e9f5ff;padding:4px 8px;font:12px system-ui;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.qw-member:disabled{cursor:default;color:#a2fa62;opacity:1}@media(max-width:600px){.qw-member{top:57px;left:18px}}
/* ★ 2026-11-18 [QWORM_FIT] 폰 화면 맞춤 — 사장님 "각 페이지 모바일 최적화" (PERM-023). 게임판(캔버스)·지렁이 크기는 그대로, 창·버튼 배치만.
   ① 창(로비·결과·사망·상점)은 머리글 아래에서 시작, 화면 안에서만 스크롤, 주 버튼은 항상 보이게(아래 고정)
   ② 창이 떠 있으면 경기용 아이템·조이스틱 숨김 ③ 경기 중 아이템 버튼은 왼쪽 세로줄(순위판과 안 겹침) */
main:not(.hidden)~#controls{display:none!important}
@media(max-width:600px){
 header small{display:none}
 main{top:98px;transform:translateX(-50%);max-height:calc(100dvh - 108px);padding:16px 16px 0;border-radius:22px}
 main>:last-child{margin-bottom:14px}
 main .primary{position:sticky;bottom:8px;z-index:2;padding:13px;margin:10px 0 6px;font-size:16px}
 h1{font-size:clamp(24px,4.6dvh,34px);letter-spacing:-1px;margin:8px 0}
 h2{font-size:clamp(19px,3.4dvh,24px);margin:8px 0}
 p{font-size:13px;line-height:1.55;margin:8px 0}
 .stats{margin:10px 0;gap:6px}
 .stats>div{padding:8px 4px}
 .stats strong{font-size:18px;margin-bottom:2px}
 .chips{margin:6px}
 .chip{width:30px;height:30px}
 .secondary{margin:6px 0}
 .gear-buttons{left:0;bottom:112px;transform:none;flex-direction:column;gap:5px}
 .gear-use{width:66px;padding:3px 2px}
 .gear-use b{font-size:16px}
 .gear-use small{display:none}
}
@media(max-width:600px) and (max-height:700px){
 #board .hunt-info span{display:none}
 .gear-buttons{bottom:104px}
 .gear-use span{font-size:9px!important;line-height:1.3!important}
}
/* 창이 떠 있으면 뒤의 경기 표시(레벨 막대·순위판)도 숨김 [QWORM_FIT] */
body:has(main:not(.hidden)) #hud,body:has(main:not(.hidden)) #board{visibility:hidden}
@media(max-width:600px){main .primary{box-shadow:0 0 0 10px #0b1b28}}
/* 2026-11-18 [QWORM_RANK_SMALL] 사장님 "게임중에 등수 순위화면을 다른곳으로 옮기던가 — 방해" → 폰: 오른쪽 아래(가속 버튼 위) 작게, 상위 3명만, 반투명, 터치 통과 */
@media(max-width:600px){
 #board{top:auto!important;bottom:122px;right:8px;min-width:0!important;width:124px;max-width:124px!important;padding:6px 8px;font-size:9px;background:#07142166!important;border-color:#20354880;opacity:.85;pointer-events:none}
 #board .hunt-info{gap:2px;margin-bottom:3px}
 #board .hunt-info span{display:none}
 #board .hunt-info b,#board .hunt-info strong{font-size:9px;line-height:1.3}
 #board>small{font-size:8px;letter-spacing:1px}
 #ranks>div:nth-child(n+4){display:none}
 #ranks>div{line-height:1.45}
}
@media(max-width:600px) and (max-height:700px){#board{bottom:112px}}
/* 2026-11-18 [QWORM_NO_SELECT] 사장님 "이게 왜 가속에서 뜨냐" — 가속 버튼 길게 누르면 폰 브라우저가 글자 선택(파란 표시·손잡이)을 띄움 → 게임 화면 전체 글자 선택·길게 누름 메뉴·탭 반짝임 금지 */
html,body,canvas,#controls,#controls *,#hud,#board,header,button{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
#boost,.joystick,.gear-use{touch-action:none}
input,textarea{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
