:root{color-scheme:light;--dark:#18181d;--muted:#777780;--stroke:#e5e3e5;--white:#fff;--violet:#8061fa}*{box-sizing:border-box}html,body{margin:0;height:100%;width:100%;overflow:hidden;overscroll-behavior:none;background:#f2f0ec;color:#202026;font:14px/1.5 -apple-system,BlinkMacSystemFont,"Pretendard","Apple SD Gothic Neo",system-ui,sans-serif}button,input{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible{outline:3px solid #afa3ff}button:disabled{cursor:wait;opacity:.6}#scene{position:fixed;inset:0;touch-action:none}#scene canvas{display:block;width:100%;height:100%}#loading{position:absolute;z-index:1;left:50%;top:50%;transform:translate(-50%,-50%);padding:13px 20px;background:#fff;border-radius:16px;color:#666;box-shadow:0 6px 30px #0001}.hidden{display:none!important}#hud{position:fixed;inset:0;pointer-events:none}#hud>*{pointer-events:auto}.topbar{position:absolute;z-index:4;left:16px;top:16px;right:16px;display:flex;justify-content:space-between;align-items:center;gap:10px}.logo{display:flex;align-items:center;gap:10px;padding:9px 13px;background:#fffffff0;box-shadow:0 6px 30px #1212181c;border:1px solid #eeebed;border-radius:16px;width:max-content}.logoMark{background:#202027;color:white;display:grid;place-items:center;border-radius:10px;width:31px;height:31px;font-weight:900;letter-spacing:-1.5px;font-size:16px}.logo strong{display:block;font-size:13px;letter-spacing:.5px;line-height:1.2}.logo small{display:block;font-size:9px;color:#86818b;letter-spacing:.9px;margin-top:3px}.topActions{display:flex;gap:7px;align-items:center}.tinyChip{border-radius:12px;background:#fffefef0;border:1px solid #eae5eb;padding:9px 11px;color:#57545f;box-shadow:0 5px 20px #0001;font-size:11px;font-weight:700;white-space:nowrap}.worldCaption{position:absolute;top:87px;left:20px;font-size:11px;color:#76727a}.worldCaption span{color:#b9b2c3}.nameLabel,.bubble{position:absolute;left:50%;top:44%;transform:translate(-50%,-100%);pointer-events:none;z-index:3;white-space:nowrap;box-shadow:0 3px 16px #18111a11}.nameLabel{font-size:12px;font-weight:800;background:#ffffffd9;border-radius:13px;padding:4px 10px}.bubble{max-width:230px;min-width:60px;white-space:pre-wrap;word-break:break-word;text-align:center;background:#fff;border:2px solid #ddd2ff;border-radius:17px;padding:9px 12px;font-size:13px}.bubble:after{content:"";position:absolute;width:9px;height:9px;background:#fff;border-right:2px solid #ddd2ff;border-bottom:2px solid #ddd2ff;bottom:-6px;left:calc(50% - 5px);transform:rotate(45deg)}.bottomBar{position:absolute;bottom:max(16px,env(safe-area-inset-bottom));left:16px;display:flex;align-items:center;gap:10px}.pill{border:1px solid #e9e6e9;background:#fffefef5;border-radius:15px;padding:12px 16px;font-weight:800;color:#454150;box-shadow:0 7px 24px #0001}.pill span{color:var(--violet)}.help{border-radius:12px;padding:9px 12px;background:#ffffffbb;font-size:11px;color:#89848c}.chatPanel{position:absolute;z-index:5;top:80px;right:16px;bottom:16px;width:325px;border:1px solid #ede9eb;background:#fffefef4;box-shadow:0 12px 36px #27202719;border-radius:24px;display:flex;flex-direction:column;overflow:hidden;backdrop-filter:blur(13px)}.panelTop{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:17px;border-bottom:1px solid #ece9ec}.panelTop strong{display:block;font-size:15px}.panelTop small{display:block;font-size:10px;color:#89848e;margin-top:3px}.chatLog{flex:1;min-height:0;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px}.systemMsg{padding:10px;border-radius:13px;background:#f5f3f7;color:#96909c;font-size:11px;line-height:1.65;text-align:center}.chatLine{max-width:96%;align-self:flex-start;background:#f2f0f4;padding:9px 12px;border-radius:15px 15px 15px 5px;word-break:break-word}.chatLine.mine{align-self:flex-end;background:#ede7ff;border-radius:15px 15px 5px 15px}.chatLine small{display:block;color:#7c7685;font-size:10px;font-weight:800;margin-bottom:3px}.chatForm{border-top:1px solid #eeeaf0;padding:11px;display:flex;gap:7px}.chatForm input{border:0;border-radius:12px;min-width:0;flex:1;background:#f4f2f5;padding:11px;font-size:13px}.chatForm button{border:0;background:#292530;border-radius:12px;padding:10px 14px;color:#fff;font-weight:800}.mobileOnly{display:none}.motionPanel{position:absolute;left:16px;bottom:84px;z-index:6;background:#fffefef6;border:1px solid #ece8ee;box-shadow:0 12px 36px #27202722;width:343px;max-width:calc(100vw - 32px);border-radius:24px;overflow:hidden}.motionList{padding:13px;max-height:min(49vh,360px);overflow:auto;display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.motionList button{min-height:51px;background:#f8f6f8;border:1px solid #eeeaf0;border-radius:13px;font-size:11px;color:#484150;font-weight:750}.motionList button.on{background:#eae3ff;border-color:#a99ae9;color:#4f2fbd}.motionList button[data-empty="true"]{border-style:dashed}.motionFoot{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:12px;border-top:1px solid #eeeaf0;font-size:10px;color:#88818c}.motionFoot button{padding:8px 10px;border:0;border-radius:9px;background:#222129;color:#fff;font-weight:800}.iconBtn{border:0;background:#f0eef1;border-radius:10px;width:33px;height:33px}.toast{position:absolute;left:50%;top:84px;transform:translateX(-50%);border-radius:12px;background:#25212be8;color:#fff;padding:10px 14px;z-index:7;opacity:0;transition:opacity .2s;font-size:11px;pointer-events:none;max-width:85vw;text-align:center}.toast.show{opacity:1}.mobileMove{display:none}.selectScreen{position:fixed;inset:0;z-index:20;background:linear-gradient(145deg,#faf7f3,#eee9f5);overflow-y:auto;overscroll-behavior:contain}.selectWrap{max-width:820px;margin:auto;padding:26px 18px 24px;min-height:100%;display:flex;flex-direction:column}.selectHeading{display:flex;justify-content:space-between;align-items:center;gap:10px}.logo.light{box-shadow:none;background:transparent;border:0;padding:0}.verTag{font-size:10px;border:1px solid #d9d4dc;color:#9b94a0;border-radius:99px;padding:7px 11px;font-weight:700}.selectIntro{margin:28px 0 20px}.selectIntro h1{font-size:clamp(29px,4vw,42px);line-height:1.15;margin:0 0 12px;letter-spacing:-1.7px}.selectIntro em{font-style:normal;color:#8b6bf1}.selectIntro p{color:#837e89;max-width:480px;font-size:13px;margin:0}.selectGrid{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;isolation:isolate}.avatarCard{height:clamp(128px,18vw,184px);position:relative;border-radius:17px;background:linear-gradient(135deg,#fffefd,#f4f0ff);border:2px solid #e9e4eb;overflow:hidden;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;padding:0 3px 10px;z-index:2;transition:border-color .16s,transform .16s;touch-action:manipulation}.avatarCard[data-selected="true"]{border-color:#9173f5;background:linear-gradient(135deg,#f7f2ff,#eae1ff);transform:translateY(-2px);box-shadow:0 5px 15px #926bf326}.avatarCard strong{font-size:12px;line-height:1.2;text-shadow:0 1px 5px white;z-index:3}.avatarCard small{font-size:10px;color:#aca5b0;z-index:3}.avatarCard .avatarLoading{position:absolute;top:43%;font-size:10px;color:#a7a2aa}.avatarCard .avatarLoading.error{color:#bb3f51}.avatarCard.ready .avatarLoading{display:none}#previewCanvas{position:absolute;inset:0;z-index:3;pointer-events:none;overflow:hidden}#previewCanvas canvas{width:100%;height:100%;display:block;pointer-events:none}.selectFoot{margin-top:19px;display:flex;align-items:center;gap:10px}.selectFoot label{font-size:12px;color:#76707e;font-weight:800}.selectFoot input{border:1px solid #dfd9e2;border-radius:12px;background:white;padding:12px;min-width:0;width:210px;flex:1}.selectFoot button{border:0;border-radius:12px;background:#27232d;color:#fff;font-weight:850;padding:13px 25px}.selectDisclaimer{font-size:10px;color:#a09aa4;margin:13px 0 0}.selectGrid .avatarCard{background-color:transparent}.selectGrid .avatarCard[data-selected="true"]{background:transparent}
@media(max-width:720px){.selectWrap{padding:16px 12px 25px}.selectIntro{margin:21px 0 17px}.selectIntro h1{font-size:29px}.selectIntro p{font-size:12px}.selectGrid{gap:7px}.avatarCard{height:clamp(128px,24vh,179px);border-radius:13px}.selectFoot{gap:7px;flex-wrap:wrap}.selectFoot label{width:100%}.selectFoot input{width:50%}.selectFoot button{flex:1;padding:12px}.verTag{font-size:8px}.topbar{top:9px;left:9px;right:9px}.logo{padding:8px 10px}.logo small{font-size:8px}.tinyChip{font-size:10px;padding:9px}.worldCaption{top:74px;left:14px;right:14px;max-width:250px;font-size:10px}.chatPanel{top:auto;bottom:0;right:0;left:0;width:auto;height:min(70dvh,520px);border-radius:23px 23px 0 0;display:none}.chatPanel.open{display:flex}.mobileOnly{display:inline-flex;align-items:center;justify-content:center}.bottomBar{left:auto;right:12px;bottom:calc(18px + env(safe-area-inset-bottom));flex-direction:column;gap:7px}.help{display:none}.pill{min-width:80px;padding:13px 17px}.mobileMove{display:flex;position:absolute;z-index:2;left:21px;bottom:calc(22px + env(safe-area-inset-bottom));align-items:center;gap:8px;flex-direction:column;color:#a09ba5;font-size:10px;pointer-events:auto}#joystick{width:102px;height:102px;touch-action:none;background:#ffffff80;border:2px solid #ffffffd9;border-radius:50%;display:grid;place-items:center;box-shadow:0 3px 20px #0001}#joyNub{width:48px;height:48px;border-radius:50%;background:#ffffffed;border:1px solid #e7e1ec;box-shadow:0 3px 13px #0002;will-change:transform}.motionPanel{bottom:calc(94px + env(safe-area-inset-bottom));left:9px;width:min(340px,calc(100vw - 18px))}.nameLabel{font-size:11px}}
@media(max-width:350px){.avatarCard{height:125px}.selectIntro{margin:16px 0 13px}.selectDisclaimer{display:none}.selectFoot{margin-top:12px}.logo strong{font-size:11px}}
#previewCanvas{z-index:1}.avatarCard{z-index:2}.avatarCard strong,.avatarCard small{position:relative;z-index:2}.avatarCard .avatarLoading{z-index:2}.peerLabel{background:#eee9ffcf}
.selectGrid .avatarCard,.selectGrid .avatarCard[data-selected="true"]{background:transparent!important}

/* WindyChat v0.2: imported original Miner joystick images, separate safe-area controls. */
@media(max-width:720px),(pointer:coarse){
 .mobileMove{display:flex;position:absolute;z-index:8;left:max(12px,env(safe-area-inset-left));bottom:calc(64px + env(safe-area-inset-bottom));align-items:center;gap:10px;flex-direction:row;color:#a09ba5;pointer-events:none}
 #joystick{pointer-events:auto;position:relative;width:80px;height:80px;display:block;border:0;border-radius:50%;background:transparent url('./assets/joystick-base.webp') center/contain no-repeat;box-shadow:none;touch-action:none;isolation:isolate}
 #joyNub{pointer-events:none;position:absolute;width:41.6%;height:41.6%;left:50%;top:50%;transform:translate(-50%,-50%);border:0;border-radius:50%;background:transparent url('./assets/joystick-knob.webp') center/contain no-repeat;box-shadow:none;will-change:transform}
 #runToggle{pointer-events:auto;touch-action:manipulation;border:1px solid #e6e2e8;background:#fffffff0;color:#292530;border-radius:14px;min-width:64px;min-height:48px;padding:10px 12px;font:700 12px system-ui;box-shadow:0 3px 12px #0002}
 #runToggle[aria-pressed="true"]{background:#18181d;color:#fff}
}
@media(pointer:coarse) and (min-width:721px){
 .mobileMove{bottom:calc(56px + env(safe-area-inset-bottom))}
}
