:root{font-family:'Noto Sans KR',sans-serif;color:#244d3f;font-synthesis:none}*{box-sizing:border-box}body{margin:0;overflow:hidden;background:#a7d7c3}button,input{font:inherit}button,a{touch-action:manipulation}button{border:0;border-radius:16px;background:#fff9e9;color:#315442;padding:11px 17px;font-weight:800;cursor:pointer;box-shadow:0 3px 0 #244d3f20}button:hover{filter:brightness(1.04);transform:translateY(-1px)}button:focus-visible,a:focus-visible{outline:3px solid #f7a43a}canvas#world{position:fixed;inset:0;width:100%;height:100%;touch-action:none}header{position:fixed;top:16px;left:22px;right:22px;display:flex;align-items:center;gap:12px;z-index:3}header a{color:#fff;text-decoration:none;background:#244d3fe8;border-radius:30px;padding:12px 18px;font-weight:bold}header>span{font-family:Jua,sans-serif;font-size:25px;margin-right:auto;text-shadow:0 2px #fff8}header small{display:block;font-family:inherit;font-size:10px;letter-spacing:3px}#hud{position:fixed;top:94px;left:22px;right:22px;display:flex;gap:14px;pointer-events:none}.score,.mission{background:#fffbeced;border:2px solid #fff9;border-radius:22px;padding:14px 20px;box-shadow:0 6px 20px #28544618}.score{min-width:180px}.score small,.mission small{display:block;font-size:11px;font-weight:800;letter-spacing:2px;color:#738b71}.score b{font-family:Jua;font-size:38px;display:block;line-height:1.2}.score span{font-size:11px;color:#bb7b35}.mission{max-width:430px;flex:1;height:max-content}.mission b{display:block;font-size:15px;margin:5px 0}.mission span{font-size:11px}.bar{height:7px;background:#dbe6ca;border-radius:5px;overflow:hidden;margin:8px 0}.bar i{display:block;height:100%;background:#e7a54e;transition:width .3s}#mapbox{margin-left:auto;text-align:center;pointer-events:auto}#minimap{width:134px;height:134px;border:5px solid #fff4d8;border-radius:26px;box-shadow:0 6px 20px #28544630;cursor:pointer}#minimap.large{width:min(64vw,420px);height:min(64vw,420px)}#mapbox small{display:block;font-size:10px;background:#fff9e9dc;border-radius:10px}#roster{position:fixed;top:245px;left:22px;display:grid;gap:7px}#roster button{display:flex;align-items:center;gap:9px;padding:7px 12px;background:#fff9e9e8;text-align:left;font-size:12px}#roster img{width:34px;height:34px;border-radius:50%;object-fit:cover}#roster small{display:block;font-size:10px;color:#738b71}#roster .active{outline:3px solid #e8aa49}#toast{position:fixed;bottom:160px;left:50%;transform:translateX(-50%);border-radius:20px;padding:12px 24px;background:#214f40eb;color:#fff;max-width:80%;text-align:center;opacity:0;transition:opacity .3s;pointer-events:none}#toast.show{opacity:1}#hint{position:fixed;bottom:74px;left:50%;transform:translateX(-50%);font-size:11px;background:#fff9e9ce;padding:9px 16px;border-radius:20px;white-space:nowrap}footer{position:fixed;bottom:16px;left:22px;right:22px;display:flex;align-items:center;gap:10px}#bag{background:#fff9e9ed;border-radius:16px;padding:10px 18px;font-weight:800;margin-right:auto}dialog{border:3px solid #fff8d9;border-radius:32px;padding:32px;max-width:580px;width:calc(100% - 28px);background:#fff9ec;color:#315442;box-shadow:0 30px 120px #153a4250;max-height:94dvh;overflow:auto}dialog::backdrop{background:#1b3c4260;backdrop-filter:blur(7px)}h1{font-family:Jua,sans-serif;font-weight:400;font-size:44px;line-height:1.1;margin:13px 0}h1 em{color:#db8c41;font-style:normal}dialog p{font-size:13px;line-height:1.7}.eyebrow{font-size:10px;letter-spacing:3px;font-weight:800;color:#81957b}#choices{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin:18px 0}#choices button{padding:9px 4px;background:#f0ecdb;border:2px solid transparent}#choices img{width:100%;max-width:78px;aspect-ratio:1;object-fit:cover;border-radius:18px;display:block;margin:auto auto 6px}#choices .selected{border-color:#d78a3f;background:#ffeac4}#choices small{display:block;font-size:10px;font-weight:400;margin-top:4px}.lobby-actions{display:grid;gap:9px}.primary{background:#2f7257;color:#fff;padding:15px}.join{display:flex;gap:8px;margin-top:13px}input{min-width:0;flex:1;background:#fff;border:2px solid #e1dfcc;border-radius:13px;padding:11px;text-transform:uppercase}.tips{font-size:11px;color:#81917c;line-height:1.8}#error{color:#bd493f}#controls{position:fixed;bottom:95px;left:28px;right:28px;display:flex;align-items:center;justify-content:space-between;pointer-events:none}#stick{width:112px;height:112px;border-radius:50%;border:2px solid #fff9;background:#fff4d94a;position:relative;touch-action:none;pointer-events:auto}#stick i{position:absolute;left:31px;top:31px;width:46px;height:46px;border-radius:50%;background:#fff8e8c9;box-shadow:0 3px 8px #244d3f30;pointer-events:none}#run{width:74px;height:74px;border-radius:50%;background:#f5bb54e8;touch-action:none;pointer-events:auto}#controls{display:none}@media(pointer:coarse){#controls{display:flex}#hint{bottom:68px;font-size:10px;max-width:95%;white-space:normal;text-align:center}}@media(max-width:650px){header{top:10px;left:10px;right:10px;gap:6px}header a{padding:10px;font-size:11px}header>span{font-size:18px}header button{padding:10px;font-size:10px}#hud{top:73px;left:10px;right:10px;gap:7px}.score{padding:10px;min-width:100px}.score b{font-size:29px}.score small{font-size:8px;letter-spacing:1px}.score span{font-size:9px}.mission{padding:10px}.mission b{font-size:11px}.mission small{font-size:9px}#minimap{width:75px;height:75px;border-width:3px;border-radius:18px}#mapbox small{font-size:8px;max-width:75px}#roster{top:195px;left:10px;gap:5px}#roster button{font-size:10px;padding:5px 8px}#roster img{width:25px;height:25px}#roster small{font-size:8px}dialog{padding:23px}h1{font-size:36px}footer{left:10px;right:10px;bottom:10px;font-size:11px}footer button{font-size:11px}#bag{padding:10px}#choices{gap:5px}#choices button{font-size:12px}#choices small{font-size:9px}}

.family-model-preview{display:block;width:100%;aspect-ratio:7/4;object-fit:cover;border-radius:20px;margin:16px 0 0}#lobby h1{font-size:36px}#lobby{padding:25px}#lobby p{margin:10px 0}#choices{margin:12px 0}#progress{width:0}

#run{position:absolute;right:62px;bottom:92px;width:56px;height:56px;font-size:10px}
@media(pointer:coarse){#hint{bottom:66px;line-height:1.5}#controls{bottom:95px}}

@media(pointer:coarse){#stick{width:96px;height:96px}#stick i{left:25px;top:25px}}

#equipped{position:fixed;left:50%;transform:translateX(-50%);bottom:114px;background:#fff9e9e8;border-radius:14px;padding:8px 14px;font-size:10px;max-width:90%;text-align:center;pointer-events:none}@media(pointer:coarse){#equipped{bottom:78px;font-size:9px;max-width:94%;width:max-content;padding:5px 8px}#hint{display:none}}

/* Touch layout: one movement pad, one action pad, and a clear camera surface. */
html,body{height:100%;height:100dvh;overscroll-behavior:none}
body{font-family:system-ui,-apple-system,'Malgun Gothic',sans-serif;-webkit-user-select:none;user-select:none;touch-action:none}
dialog{touch-action:pan-y;overscroll-behavior:contain;-webkit-user-select:text;user-select:text}
#lookhint{display:none;pointer-events:none}#asset-status{font-size:12px;color:#3b785f;font-weight:700}
#action-pad{display:grid;grid-template-columns:repeat(3,56px);grid-template-rows:repeat(2,56px);gap:8px;pointer-events:none}
#action-pad button{position:static;width:56px;height:56px;padding:2px;border-radius:18px;pointer-events:auto;touch-action:none;font-size:24px;line-height:1;box-shadow:0 3px 0 #214b3c40;border:2px solid #ffffffb0;background:#fff8e9ed}
#action-pad button small{display:block;font-size:9px;line-height:1.4;margin-top:3px}#action-pad #run{grid-column:2;grid-row:1;background:#f5bd5beb}
#action-pad #jump{grid-column:3;grid-row:1;background:#a3d6bfef}#action-pad #roll-left{grid-column:1;grid-row:2}#action-pad #roll{grid-column:2;grid-row:2}#action-pad #roll-right{grid-column:3;grid-row:2}
#action-pad #run[aria-pressed=true]{background:#db9330;box-shadow:inset 0 2px 7px #80571677}
#stick>span{position:absolute;left:0;right:0;bottom:6px;text-align:center;font-size:8px;pointer-events:none;color:#305d48}
.touch-ui button:hover{transform:none;filter:none}.touch-ui button:active{filter:brightness(.9)}
.touch-ui #controls{display:flex;left:max(14px,env(safe-area-inset-left));right:max(14px,env(safe-area-inset-right));bottom:calc(112px + env(safe-area-inset-bottom));align-items:end;z-index:5}
.touch-ui #stick{width:104px;height:104px;flex:none;background:#fff7d964;border:2px solid #fff9;box-shadow:0 3px 12px #194b3a20}
.touch-ui #stick i{left:29px;top:29px;width:42px;height:42px}
.touch-ui header{top:calc(8px + env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));height:44px;gap:6px}
.touch-ui header>a{display:flex;align-items:center;justify-content:center;flex:0 0 44px;height:44px;padding:0;font-size:0;border-radius:15px}
.touch-ui header>a:before{content:'‹';font-size:32px;line-height:1}.touch-ui header>span{font-size:17px;min-width:0;flex:1;white-space:nowrap;overflow:hidden}
.touch-ui header small{font-size:8px;letter-spacing:1px}.touch-ui header button{height:44px;padding:7px;font-size:10px;flex:none;border-radius:14px}
.touch-ui #music{width:74px}.touch-ui #menu{width:76px}
.touch-ui #hud{top:calc(62px + env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));height:92px;gap:7px;align-items:start}
.touch-ui .score{padding:10px;min-width:78px;width:78px;flex:none;border-radius:16px;height:92px}.touch-ui .score small{font-size:8px;letter-spacing:.7px;white-space:nowrap}.touch-ui .score b{font-size:27px;line-height:1.3}.touch-ui .score span{font-size:8px;display:block;line-height:1.3}
.touch-ui .mission{padding:9px;min-width:0;max-width:none;height:92px;border-radius:16px;flex:1}.touch-ui .mission small{font-size:10px;letter-spacing:.5px}.touch-ui .mission b{font-size:11px;line-height:1.35;margin:3px 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.touch-ui .mission span{font-size:8px;line-height:1.3;display:block}.touch-ui .bar{margin:5px 0;height:5px}
.touch-ui #mapbox{flex:0 0 58px;width:58px;margin:0}.touch-ui #minimap{width:58px;height:58px;border-radius:17px;border-width:3px}.touch-ui #mapbox small{font-size:7px;line-height:1.5;max-width:58px;margin-top:3px}
.touch-ui #minimap.large{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(80vw,360px);height:min(80vw,360px);z-index:15;border-width:5px}
.touch-ui #roster{top:calc(164px + env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));display:flex;gap:6px;max-width:calc(100vw - 24px)}
.touch-ui #roster button{display:flex;flex-direction:column;gap:1px;align-items:center;min-width:42px;min-height:52px;padding:5px 6px;border-radius:13px;font-size:9px}.touch-ui #roster img{width:25px;height:25px}.touch-ui #roster small{display:none}.touch-ui #roster .active{outline:2px solid #e8aa49}
.touch-ui #lookhint{display:block;position:fixed;top:calc(177px + env(safe-area-inset-top));right:12px;max-width:calc(100vw - 230px);font-size:9px;line-height:1.5;text-align:right;color:#264f43;text-shadow:0 1px #fff9}
#lookhint[hidden]{display:none!important}
.touch-ui footer{bottom:calc(8px + env(safe-area-inset-bottom));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));height:44px;gap:7px;z-index:6}
.touch-ui #bag{padding:8px;min-width:0;margin:0;flex:1;font-size:9px;line-height:1.4;border-radius:13px}.touch-ui footer button{height:44px;padding:7px;font-size:9px;min-width:44px;border-radius:13px}
.touch-ui #equipped{bottom:calc(62px + env(safe-area-inset-bottom));padding:6px 8px;font-size:8px;line-height:1.5;max-width:calc(100vw - 24px);width:max-content;min-height:26px;border-radius:12px;z-index:4}
.touch-ui #hint{display:none}.touch-ui #toast{bottom:calc(274px + env(safe-area-inset-bottom));max-width:88%;width:max-content;font-size:11px;padding:9px 13px;z-index:8}
.touch-ui dialog{max-width:560px;width:calc(100vw - 16px);max-height:calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:18px!important;border-radius:24px}
.touch-ui #lobby h1{font-size:29px}.touch-ui .family-model-preview{max-height:126px;object-fit:cover;object-position:center 45%;margin-top:8px;border-radius:14px}.touch-ui #lobby p{font-size:11px;line-height:1.5;margin:8px 0}
.touch-ui #choices{gap:6px;margin:10px 0}.touch-ui #choices img{max-width:54px;border-radius:12px}.touch-ui #choices button{font-size:11px;padding:7px 3px;min-height:78px}.touch-ui #choices small{font-size:8px}
.touch-ui .lobby-actions{gap:8px}.touch-ui .lobby-actions button{min-height:48px;padding:10px;font-size:12px}.touch-ui .join{margin-top:10px}.touch-ui .join input{min-height:44px;font-size:12px}.touch-ui .join button{min-width:56px;font-size:12px}.touch-ui .tips{font-size:9px;line-height:1.6}
@media(max-height:500px) and (orientation:landscape){
 .touch-ui header{height:38px;top:calc(4px + env(safe-area-inset-top))}.touch-ui header>a,.touch-ui header button{height:38px}.touch-ui header>span small{display:none}
 .touch-ui #hud{top:calc(49px + env(safe-area-inset-top));height:66px;max-width:630px}.touch-ui .score{height:66px;width:84px;min-width:84px;padding:6px 9px}.touch-ui .score b{font-size:25px}.touch-ui .score span{display:none}
 .touch-ui .mission{height:66px;padding:6px 9px}.touch-ui .mission b{-webkit-line-clamp:1;line-height:1.2}.touch-ui .mission small{font-size:9px}.touch-ui .bar{margin:3px 0}.touch-ui .mission span{font-size:8px}
 .touch-ui #mapbox small{display:none}.touch-ui #minimap{width:52px;height:52px}.touch-ui #roster{top:calc(123px + env(safe-area-inset-top))}.touch-ui #roster button{min-height:42px;flex-direction:row;gap:3px;font-size:8px}.touch-ui #roster img{width:24px;height:24px}
 .touch-ui #controls{bottom:calc(62px + env(safe-area-inset-bottom))}.touch-ui #stick{width:96px;height:96px}.touch-ui #stick i{left:25px;top:25px}.touch-ui #equipped{bottom:calc(62px + env(safe-area-inset-bottom));max-width:calc(100vw - 440px)}
 .touch-ui #lookhint{top:125px;right:20px;max-width:220px}.touch-ui #toast{bottom:170px;max-width:50%}
 .touch-ui .family-model-preview{max-height:90px}.touch-ui dialog{max-width:640px}.touch-ui #lobby h1{font-size:25px}
}
