@font-face{font-family:'KCCMurukmuruk';src:url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2302@1.0/KCCMurukmuruk.woff2') format('woff2');font-weight:normal;font-display:block}
:root{--navy:#102446;--navy2:#1d3961;--navy3:#2f5585;--yellow:#ffd484;--snow:#e7f1fe;--txt:#0f2347;--pink:#ffb4a0}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{width:100%;height:100%;overflow:hidden;background:#0a1830;font-family:Pretendard,"Apple SD Gothic Neo","Noto Sans KR",sans-serif;color:#fff;-webkit-user-select:none;user-select:none;touch-action:manipulation;overscroll-behavior:none}
#wrap{position:fixed;inset:0;display:flex;align-items:center;justify-content:center}
#stage{position:absolute;left:50%;top:50%;width:844px;height:390px;transform-origin:center;overflow:hidden;border-radius:18px;background:var(--navy)}
#cv{position:absolute;inset:0;width:844px;height:390px;display:block}
.hidden{display:none!important}
button{font-family:inherit;border:0;cursor:pointer;color:inherit;background:none}

/* HUD */
#hud{position:absolute;left:24px;right:24px;top:18px;height:58px;border-radius:16px;background:var(--navy2);display:flex;align-items:center;justify-content:space-between;padding:0 20px;z-index:5;pointer-events:none}
#hud button{pointer-events:auto}
.hud-l{display:flex;align-items:baseline;gap:8px;font-size:18px}
.hud-l .lbl{font-weight:800}.hud-l>b{font-size:18px;font-weight:800;min-width:56px}
.hud-l .best{font-size:14px;font-weight:700;margin-left:22px}.hud-l .best b{font-weight:700}
.hud-c{display:flex;gap:10px;font-size:20px;color:var(--pink);position:absolute;left:50%;transform:translateX(-50%)}
.hud-c .off{opacity:.22}
.hud-c .pop{animation:pop .4s}
@keyframes pop{50%{transform:scale(1.6)}}
.hud-r{display:flex;align-items:center;gap:22px}
.hud-r>b{font-size:18px;font-weight:800;min-width:52px;text-align:right}
.hud-btn{font-size:18px;font-weight:800;padding:6px 6px}
.hud-btn.txt{font-size:13px;font-weight:700}
.hud-btn.txt.off{opacity:.5}
#tapHint{position:absolute;left:0;right:0;bottom:30px;text-align:center;color:var(--txt);font-weight:800;font-size:15px;z-index:4;pointer-events:none;transition:opacity .6s}

/* screens */
.screen{position:absolute;inset:0;z-index:10}
#sStart{background:var(--navy)}
.st-village{position:absolute;left:0;top:-30px;width:844px;height:339px}
.st-ground{position:absolute;left:0;right:0;top:294px;bottom:0;background:var(--snow)}
.brand{position:absolute;left:38px;top:32px;width:156px;height:45px;border-radius:10px;background:var(--navy);display:flex;align-items:center;justify-content:center}
.brand img{width:136px;height:29px;display:block}
.title{position:absolute;left:44px;top:104px;margin:0;font-weight:normal}
.title .t1{display:block;font-family:'KCCMurukmuruk',Pretendard,sans-serif;font-size:59px;line-height:1.1;white-space:nowrap;letter-spacing:0}
.title .t2{display:block;font-family:Pretendard,sans-serif;font-weight:300;font-size:37px;line-height:1.2;margin-top:6px;white-space:nowrap}
.sub{position:absolute;left:46px;top:238px;font-size:16px;line-height:22px;font-weight:500;color:#dfe8f7}
.st-char{position:absolute;left:549px;top:140px;width:170px;height:170px}
.st-bagel{position:absolute;left:548px;top:238px;width:46px;height:46px}
.st-sando{position:absolute;left:650px;top:110px;width:48px;height:48px;transform:rotate(30deg)}
.flake{position:absolute;animation:bob 3s ease-in-out infinite}
.f1{left:554px;top:196px;width:22px}.f2{left:586px;top:104px;width:30px;animation-delay:-1s}.f3{left:678px;top:200px;width:24px;animation-delay:-2s}
@keyframes bob{50%{transform:translateY(-6px) rotate(20deg)}}
.panel{position:absolute;left:534px;top:103px;width:274px;height:186px;border-radius:24px;background:var(--navy2);padding:23px 16px;display:flex;flex-direction:column;gap:18px}
.panel .link{position:absolute;left:0;right:0;bottom:-34px;font-size:13px;font-weight:700;color:var(--txt);text-decoration:underline;text-underline-offset:3px}
.btn{height:46px;border-radius:14px;font-size:17px;font-weight:800;color:var(--txt);display:flex;align-items:center;justify-content:center;transition:transform .08s,filter .15s;white-space:nowrap;padding:0 16px}
.btn:active{transform:scale(.96)}
.panel .btn{height:58px;border-radius:18px}
.btn.y{background:var(--yellow)}
.btn.w{background:var(--snow)}
.btn.d{background:var(--navy2);color:#fff}
.btn.o{background:var(--navy2);color:#fff;box-shadow:inset 0 0 0 1.5px #dfe8f7}
.btn.sm{height:38px;font-size:14px}
.btn:disabled{opacity:.5}
.rotate-hint{display:none;position:absolute;left:0;right:0;bottom:30px;text-align:center;color:var(--txt);font-size:14px;font-weight:700}
.portrait .rotate-hint{display:block}

.card-screen{background:var(--navy);padding:36px 40px 30px}
.card-screen h2{font-size:30px;font-weight:800;letter-spacing:-.5px}
.desc{font-size:13px;color:#cfdcf0;margin-top:8px}
.cols{display:flex;gap:20px;margin-top:22px}
.box{flex:1;border-radius:16px;background:var(--navy2);padding:18px 22px}
.box h3{font-size:20px;color:var(--yellow);font-weight:800;margin-bottom:12px}
.box h3.muted{font-size:13px;color:#cfdcf0;font-weight:600;margin-bottom:6px}
.box>b{font-size:16px;font-weight:800;display:block;margin-bottom:8px}
.box p{font-size:13px;color:#dfe8f7;line-height:1.6}
.box .big{font-size:56px;font-weight:800;color:var(--yellow);line-height:1.1;font-variant-numeric:tabular-nums}
.box .bold{font-weight:700;font-size:14px;color:#fff;margin-top:6px}
.item-line{font-size:20px!important;font-weight:800;color:#fff!important;line-height:1.7!important}
.item-line.y{color:var(--yellow)!important}
.item-line.s{font-size:14px!important;color:#9fe3b5!important}
.row{display:flex;gap:14px;margin-top:24px;justify-content:space-between}
.row .btn{min-width:120px}
.row.four .btn:nth-child(1){flex:0 0 140px}.row.four .btn:nth-child(2){flex:0 0 160px;font-size:14px}.row.four .btn:nth-child(3){flex:0 0 140px;font-size:14px}.row.four .btn:nth-child(4){flex:1}
#sHelp .row .btn:last-child{min-width:240px}
#sHelp .box{min-height:150px}
#sResult{padding-top:30px}
#sResult .box{min-height:150px}

.rank-head{display:flex;justify-content:space-between;align-items:flex-start}
.row.tight{margin-top:0;gap:12px}
.rank{list-style:none;padding:12px 18px;min-height:176px}
.rank li{display:flex;align-items:center;height:30px;font-size:14px;font-weight:700}
.rank li .no{width:40px;color:var(--yellow);font-size:12px}
.rank li .nm{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rank li .sc{font-variant-numeric:tabular-nums}
.rank li.me{color:var(--yellow)}
.rank li.empty{color:#7f93b5;font-weight:500}
#sRank .cols{margin-top:18px}
.rank-foot{display:flex;gap:0;margin-top:16px;font-size:14px;font-weight:700}
.rank-foot span{flex:1}.rank-foot .y{color:var(--yellow)}

.modal{position:absolute;inset:0;z-index:30;background:rgba(6,16,36,.72);display:flex;align-items:center;justify-content:center}
.mbox{width:400px;border-radius:22px;background:var(--navy2);padding:26px 28px;text-align:center}
.mbox h3{font-size:22px;font-weight:800}
.mbox input{margin-top:16px;width:100%;height:50px;border-radius:12px;border:0;padding:0 16px;font:inherit;font-size:18px;font-weight:700;color:var(--txt);background:var(--snow);text-align:center;outline:none;-webkit-user-select:text;user-select:text}
.mbox .err{color:#ffb4a0;font-size:13px;min-height:18px;margin-top:8px}
.mbox .row{margin-top:10px}.mbox .row .btn{flex:1}
.mbox .row.col{flex-direction:column;margin-top:20px}

#loading{background:var(--navy);display:flex;align-items:center;justify-content:center;font-weight:700;color:#cfdcf0;z-index:50}
.toast{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:rgba(16,36,70,.92);padding:14px 22px;border-radius:14px;font-weight:800;z-index:40;pointer-events:none}
/* layout v7: buttons on the snow band */
.panel{left:0;right:0;top:310px;width:auto;height:auto;background:none;padding:0;flex-direction:row;justify-content:center;gap:14px}
.panel .btn{height:52px;border-radius:16px;width:200px}
.panel .link{position:static;width:150px;height:52px;border-radius:16px;background:var(--navy2);color:#fff;text-decoration:none;font-size:15px;font-weight:800;display:flex;align-items:center;justify-content:center}
.panel .btn.w{background:#fff;box-shadow:inset 0 0 0 2px #c9d9f0}
