:root{color-scheme:dark;font-family:"Noto Sans SC","Microsoft YaHei",system-ui,sans-serif;--safe-top:max(0px,env(safe-area-inset-top));--safe-right:max(0px,env(safe-area-inset-right));--safe-bottom:max(0px,env(safe-area-inset-bottom));--safe-left:max(0px,env(safe-area-inset-left))}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;user-select:none}html,body{width:100%;height:100%;margin:0;overflow:hidden;background:#0a0f0a;touch-action:none;overscroll-behavior:none}body{position:fixed;inset:0}button,input{font:inherit}button{touch-action:manipulation}input{user-select:text}.hidden{display:none!important}#game-shell{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;overflow:hidden;background:#0b100b}#game{position:absolute;inset:0;width:100%;height:100%;overflow:hidden}#game canvas{display:block;position:absolute;inset:0;margin:0}#world-tint{position:absolute;inset:0;z-index:18;pointer-events:none;background:rgba(7,13,22,0);transition:background 1s linear}.overlay{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:16px 24px;background:radial-gradient(circle at 50% 32%,rgba(151,132,82,.14),transparent 40%),linear-gradient(180deg,rgba(9,13,9,.9),rgba(6,8,6,.99));backdrop-filter:blur(4px)}.overlay.highest{z-index:500}.boot-card,.modal-card{width:min(590px,88vw);max-height:86dvh;padding:24px 28px 20px;text-align:center;border:1px solid rgba(224,208,164,.24);border-radius:18px;background:rgba(18,23,17,.94);box-shadow:0 24px 80px rgba(0,0,0,.45);overflow:auto}.boot-card{cursor:pointer}.boot-kicker,.modal-kicker{color:#baa873;font-size:11px;letter-spacing:.22em}.boot-card h1{margin:6px 0 0;font:500 clamp(34px,6vw,64px)/1.12 serif;letter-spacing:.14em;color:#f0e8d1}.boot-card p,.modal-card p{margin:11px auto 0;max-width:470px;color:rgba(239,234,216,.72);line-height:1.65;font-size:13px}.boot-small{font-size:11px!important;opacity:.72}.boot-line{width:110px;height:1px;margin:15px auto 0;background:linear-gradient(90deg,transparent,rgba(214,194,138,.65),transparent)}#enter-world,.primary-btn,.secondary-btn{min-height:43px;border-radius:999px;padding:10px 22px;color:#f4edd9}#enter-world,.primary-btn{border:1px solid rgba(221,203,151,.52);background:linear-gradient(180deg,rgba(143,125,80,.48),rgba(79,69,42,.42))}#enter-world{min-width:210px;margin-top:15px}.secondary-btn{border:1px solid rgba(221,203,151,.24);background:rgba(255,255,255,.035)}.tap-anywhere{margin-top:7px;color:rgba(239,234,216,.4);font-size:10px}.modal-card h2{margin:7px 0 12px;color:#efe7cf;font:500 27px/1.2 serif}.modal-card input{width:100%;height:46px;margin-top:9px;padding:0 14px;border:1px solid rgba(221,203,151,.22);border-radius:11px;outline:0;color:#f2ead5;background:rgba(0,0,0,.22)}.button-row{display:flex;gap:9px;margin-top:11px}.button-row button{flex:1}.form-message{min-height:19px;margin-top:7px;color:#d9b47f;font-size:11px}.wide{width:100%;margin-top:11px}.gender-row{display:flex;gap:9px;margin-top:11px}.gender-btn{flex:1;min-height:42px;border:1px solid rgba(221,203,151,.2);border-radius:11px;color:#cfc7b2;background:rgba(255,255,255,.03)}.gender-btn.selected{border-color:rgba(221,203,151,.55);color:#f1e7c9;background:rgba(153,128,72,.20)}.loading-ring{width:42px;height:42px;border:2px solid rgba(236,224,190,.18);border-top-color:rgba(236,224,190,.85);border-radius:50%;animation:spin 1s linear infinite}#loading-text{position:absolute;margin-top:88px;color:rgba(242,235,215,.78);font-size:13px}@keyframes spin{to{transform:rotate(360deg)}}.rotate-card{width:min(360px,86vw);text-align:center;color:#eee6cf}.rotate-icon{font-size:48px}.rotate-title{margin-top:8px;font:500 24px serif}.rotate-text{margin-top:7px;font-size:12px;opacity:.65}
#hud{position:fixed;inset:0;z-index:30;pointer-events:none}.hud-panel,.hud-chip,.icon-button,#minimap-box,#joystick-zone,#action-cluster{pointer-events:auto}.hud-panel{position:absolute;border:1px solid rgba(220,205,162,.22);background:rgba(13,17,12,.78);box-shadow:0 8px 24px rgba(0,0,0,.2);backdrop-filter:blur(5px)}.player-panel{top:calc(var(--safe-top) + clamp(18px,3.2vh,32px));left:calc(var(--safe-left) + clamp(24px,3.5vw,58px));width:clamp(260px,24vw,360px);padding:10px 13px;border-radius:12px}.player-name-line{display:flex;align-items:center;gap:8px}.player-name-line span:first-child{font:500 clamp(17px,1.5vw,22px) serif;color:#f0e7cc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.player-name-line span:last-child{padding:2px 7px;border:1px solid rgba(214,193,139,.26);border-radius:999px;color:#cdbc8b;font-size:9px}.hud-sub{display:flex;gap:5px;margin-top:3px;color:#cfc7b1;font-size:10px;opacity:.8}.meter{height:5px;margin-top:5px;border-radius:999px;overflow:hidden;background:rgba(255,255,255,.07)}.meter i{display:block;height:100%;width:0;transition:width .18s}.meter.hp i{background:linear-gradient(90deg,#653131,#b0614d)}.meter.spirit i{background:linear-gradient(90deg,#354b62,#5a8ead)}.meter.cult i{background:linear-gradient(90deg,#70613b,#c4a75d)}.meter-labels{display:flex;justify-content:space-between;gap:7px;margin-top:3px;color:rgba(238,229,203,.55);font-size:8px}.coord-panel{top:calc(var(--safe-top) + clamp(18px,3.2vh,32px));right:calc(var(--safe-right) + clamp(24px,3.5vw,58px));min-width:clamp(210px,19vw,290px);padding:10px 13px;border-radius:12px;color:#e9e1c9;text-align:right}.coord-panel>div:first-child{font:500 clamp(13px,1.15vw,17px) serif;color:#f0e6c9}.coord-row{display:flex;justify-content:flex-end;gap:12px;margin-top:3px;font-size:9px;opacity:.65}.hud-chip{position:absolute;top:calc(var(--safe-top) + clamp(20px,3.4vh,34px));left:50%;transform:translateX(-50%);padding:6px 10px;border-radius:999px;color:rgba(238,230,207,.7);background:rgba(14,18,13,.65);border:1px solid rgba(220,205,162,.14);font-size:9px}.icon-button{position:absolute;border:1px solid rgba(220,205,162,.2);color:#eee4c7;background:rgba(14,18,13,.66);border-radius:9px}.fullscreen-btn{top:calc(var(--safe-top) + clamp(18px,3.2vh,32px));right:calc(var(--safe-right) + clamp(250px,22vw,340px));width:36px;height:36px;font-size:18px}#minimap-box{position:absolute;top:calc(var(--safe-top) + clamp(88px,14vh,132px));right:calc(var(--safe-right) + clamp(24px,3.5vw,58px));width:184px;height:132px;padding:5px;border:1px solid rgba(220,205,162,.18);border-radius:11px;background:rgba(12,16,12,.65);backdrop-filter:blur(3px)}#minimap{width:174px;height:106px;display:block;border-radius:7px}.minimap-title{text-align:center;color:rgba(232,222,195,.5);font-size:8px;padding-top:3px}#joystick-zone{position:absolute;left:calc(var(--safe-left) + clamp(70px,8vw,126px));bottom:calc(var(--safe-bottom) + clamp(48px,8vh,94px));width:138px;height:138px;touch-action:none}.joystick-base{position:absolute;inset:0;border-radius:50%;border:2px solid rgba(234,222,184,.22);background:rgba(12,17,12,.5)}.joystick-ring{position:absolute;inset:23px;border:1px solid rgba(234,222,184,.15);border-radius:50%;background:rgba(77,88,68,.18)}#joystick-knob{position:absolute;left:50%;top:50%;width:56px;height:56px;transform:translate(-50%,-50%);border-radius:50%;border:1px solid rgba(246,236,204,.3);background:rgba(207,193,145,.6);box-shadow:0 4px 16px rgba(0,0,0,.25)}#action-cluster{position:absolute;right:calc(var(--safe-right) + clamp(64px,7vw,118px));bottom:calc(var(--safe-bottom) + clamp(44px,7vh,84px));width:290px;height:185px}.action-btn{position:absolute;border-radius:50%;border:1px solid rgba(235,221,180,.28);color:#f2e8cb;background:rgba(30,35,26,.76);box-shadow:0 5px 18px rgba(0,0,0,.25)}.action-btn:active{transform:scale(.96)}.action-btn.attack{right:0;bottom:0;width:86px;height:86px;font:500 17px serif;background:rgba(89,55,42,.82)}.action-btn.medium{right:94px;bottom:69px;width:64px;height:64px;font-size:12px}.action-btn.cultivate{right:12px;bottom:96px;width:66px;height:66px;font-size:12px;background:rgba(60,70,48,.82)}.action-btn.small{right:162px;bottom:2px;width:60px;height:60px;font-size:10px}.action-btn.micro{right:226px;bottom:18px;width:50px;height:50px;font-size:9px}.action-btn.micro.map{right:218px;bottom:78px}.action-btn.disabled{opacity:.35}
.side-panel{position:fixed;z-index:80;top:calc(var(--safe-top) + clamp(18px,3vh,32px));right:calc(var(--safe-right) + clamp(22px,3vw,48px));bottom:calc(var(--safe-bottom) + clamp(18px,3vh,32px));width:min(390px,43vw);padding:17px;overflow:auto;border:1px solid rgba(220,205,162,.24);border-radius:17px;background:rgba(15,19,14,.96);box-shadow:0 20px 70px rgba(0,0,0,.42)}.side-panel-head{display:flex;justify-content:space-between;align-items:flex-start}.side-panel h3{margin:3px 0 0;color:#eee4ca;font:500 23px serif}.close-btn{width:36px;height:36px;border:0;border-radius:50%;color:#ddd1b0;background:rgba(255,255,255,.06);font-size:22px}.inventory-list{margin-top:15px;display:grid;gap:7px}.inventory-item,.lore-item,.shop-item,.equip-item{padding:10px 11px;border:1px solid rgba(220,205,162,.12);border-radius:10px;color:#ddd4bb;background:rgba(255,255,255,.025)}.inventory-item{display:flex;justify-content:space-between;align-items:center;text-align:left;width:100%}.inventory-item .meta{font-size:9px;opacity:.48;margin-top:3px}.inventory-item strong{font-size:12px}.inventory-empty{padding:30px 10px;color:rgba(238,230,207,.45);text-align:center}.item-detail{margin-top:12px;padding:12px;border:1px solid rgba(217,197,140,.22);border-radius:11px;background:rgba(155,131,73,.08)}.item-detail h4{margin:0;color:#ebdfbe;font:500 18px serif}.item-detail p{margin:7px 0;color:#aaa28e;font-size:11px;line-height:1.6}.item-actions{display:flex;gap:7px;margin-top:9px}.panel-button,.item-actions button,.dialog-actions button,.shop-item button,.panel-tab{border:1px solid rgba(220,205,162,.2);border-radius:8px;color:#ded4b7;background:rgba(255,255,255,.04);padding:8px 11px}.panel-button{width:100%;margin-top:15px}.danger-btn{color:#d69c91;border-color:rgba(178,96,84,.35)}#profile-content{margin-top:14px}.profile-hero{padding:13px;border:1px solid rgba(220,205,162,.12);border-radius:11px;background:rgba(255,255,255,.025)}.profile-hero h4{margin:0;color:#eee1c0;font:500 21px serif}.profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:11px}.profile-stat{padding:8px;border-radius:8px;background:rgba(255,255,255,.025);font-size:10px;color:#9f9784}.profile-stat strong{display:block;margin-top:3px;color:#e0d7bf;font-size:13px}.section-title{margin:15px 0 7px;color:#bbaa7c;font-size:11px}.equip-item{display:flex;justify-content:space-between;align-items:center;margin-top:6px;font-size:11px}.panel-tabs{display:flex;gap:5px;margin-top:14px}.panel-tab{flex:1;font-size:10px}.panel-tab.active{background:rgba(139,117,67,.24);border-color:rgba(220,205,162,.38)}#lore-content{margin-top:12px;display:grid;gap:7px}.lore-item h4{margin:0;color:#e2d6b5;font:500 14px serif}.lore-item p{margin:5px 0 0;color:#99917d;font-size:10px;line-height:1.55}.shop-item{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;margin-top:8px}.shop-item h4{margin:0;color:#e1d6b7;font:500 14px serif}.shop-item p{margin:4px 0 0;color:#968e7b;font-size:9px}.shop-item .price{font-size:10px;color:#c5ad73}.shop-item button{font-size:10px}.shop-note{margin-top:13px;font-size:9px;color:#77705e}.dialog-panel{position:fixed;z-index:85;left:50%;bottom:calc(var(--safe-bottom) + clamp(24px,4vh,42px));transform:translateX(-50%);width:min(660px,68vw);padding:15px 17px 13px;border:1px solid rgba(220,205,162,.24);border-radius:13px;background:rgba(12,16,12,.95);box-shadow:0 18px 60px rgba(0,0,0,.38)}.dialog-name{color:#cdbd8d;font:500 15px serif}.dialog-text{margin-top:6px;color:#e7dec6;line-height:1.65;font-size:12px}.dialog-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:9px}.dialog-actions button{font-size:10px}.toast,.event-banner{position:fixed;z-index:120;left:50%;transform:translateX(-50%);max-width:72vw;border:1px solid rgba(220,205,162,.2);color:#eee5ca;background:rgba(12,16,12,.88);pointer-events:none}.toast{top:23%;padding:9px 15px;border-radius:999px;font-size:11px}.event-banner{top:calc(var(--safe-top) + clamp(68px,10vh,95px));padding:9px 14px;border-radius:10px;font-size:10px;color:#dcc98c}.pulse{animation:pulse 1s ease 2}@keyframes pulse{50%{transform:scale(1.05)}}
@media(orientation:portrait){#boot-screen,#account-screen,#character-screen{visibility:hidden}}@media(orientation:landscape) and (max-height:620px){.overlay{padding:8px 18px}.boot-card,.modal-card{width:min(620px,82vw);max-height:92dvh;padding:13px 22px 12px}.boot-kicker,.boot-small{display:none}.boot-card h1{font-size:34px;margin-top:1px}.boot-card p{margin-top:5px;line-height:1.35;font-size:11px}.boot-line{margin-top:7px}#enter-world{margin-top:7px;min-height:38px;padding:7px 20px}.tap-anywhere{margin-top:3px}.player-panel{top:calc(var(--safe-top) + 10px);left:calc(var(--safe-left) + 16px);width:230px;padding:7px 10px}.player-name-line span:first-child{font-size:15px}.hud-sub{font-size:9px}.meter{height:4px;margin-top:3px}.coord-panel{top:calc(var(--safe-top) + 10px);right:calc(var(--safe-right) + 16px);min-width:175px;padding:7px 9px}.coord-panel>div:first-child{font-size:12px}.fullscreen-btn{top:calc(var(--safe-top) + 10px);right:calc(var(--safe-right) + 205px);width:32px;height:32px}.hud-chip{top:calc(var(--safe-top) + 12px)}#minimap-box{display:none}#joystick-zone{width:108px;height:108px;left:calc(var(--safe-left) + 52px);bottom:calc(var(--safe-bottom) + 26px)}.joystick-ring{inset:18px}#joystick-knob{width:46px;height:46px}#action-cluster{transform:scale(.82);transform-origin:bottom right;right:calc(var(--safe-right) + 35px);bottom:calc(var(--safe-bottom) + 22px)}.side-panel{top:10px;right:12px;bottom:10px;width:min(360px,48vw);padding:13px}.dialog-panel{bottom:12px;width:min(600px,68vw);padding:10px 13px}.event-banner{top:56px}}@media(orientation:landscape) and (max-height:440px){.hud-chip{display:none}.meter-labels span:nth-child(2){display:none}.player-panel{width:210px}.action-btn.micro{display:none}.side-panel{width:50vw}}

/* ===== V2.0 ===== */
#action-cluster{width:350px;height:220px;right:calc(var(--safe-right) + clamp(52px,6vw,105px));bottom:calc(var(--safe-bottom) + clamp(34px,6vh,72px))}
.action-btn.attack{right:0;bottom:0;width:88px;height:88px}
.action-btn.medium{right:98px;bottom:62px;width:65px;height:65px}
.action-btn.cultivate{right:8px;bottom:102px;width:68px;height:68px}
.action-btn.small{right:172px;bottom:4px;width:62px;height:62px}
.action-btn.micro.profile{right:246px;bottom:12px}
.action-btn.micro.map{right:250px;bottom:74px}
.action-btn.micro.craft{right:190px;bottom:82px}
.action-btn.skill{width:58px;height:58px;font:500 12px serif;border-color:rgba(173,197,222,.28);background:rgba(38,54,66,.82)}
.action-btn.skill-one{right:88px;bottom:126px}
.action-btn.skill-two{right:150px;bottom:133px}
.action-btn.skill.cooldown{opacity:.36;filter:saturate(.45)}
.warn-btn{color:#d9bf84;border-color:rgba(184,143,72,.42)}
.recipe-item{margin-top:8px;padding:11px;border:1px solid rgba(220,205,162,.12);border-radius:10px;background:rgba(255,255,255,.025)}
.recipe-item h4{margin:0;color:#e2d6b5;font:500 14px serif}.recipe-item p{margin:5px 0;color:#99917d;font-size:10px;line-height:1.55}.recipe-item .recipe-materials{font-size:10px;color:#c4b27e}.recipe-item .recipe-actions{display:flex;justify-content:flex-end;margin-top:8px}.recipe-item button{border:1px solid rgba(220,205,162,.2);border-radius:8px;color:#ded4b7;background:rgba(255,255,255,.04);padding:8px 12px;font-size:10px}.recipe-item.locked{opacity:.5}
.skill-list{display:grid;gap:7px;margin-top:8px}.skill-card{padding:10px;border:1px solid rgba(120,157,185,.18);border-radius:9px;background:rgba(62,84,98,.08)}.skill-card h4{margin:0;color:#d7e1e2;font:500 13px serif}.skill-card p{margin:5px 0 0;font-size:9px;color:#8f9b99;line-height:1.5}
.node-type{display:inline-block;padding:2px 6px;margin-right:5px;border-radius:999px;border:1px solid rgba(220,205,162,.16);font-size:8px;color:#b9aa7e}
#minimap-box{width:210px;height:146px}#minimap{width:200px;height:120px}
@media(orientation:landscape) and (max-height:620px){#action-cluster{transform:scale(.76);transform-origin:bottom right;right:calc(var(--safe-right) + 28px);bottom:calc(var(--safe-bottom) + 16px)}.action-btn.micro{display:block}.player-panel{left:calc(var(--safe-left) + 20px)}.coord-panel{right:calc(var(--safe-right) + 20px)}#minimap-box{display:none}.dialog-panel{width:min(620px,65vw)}}
@media(orientation:landscape) and (max-height:440px){#action-cluster{transform:scale(.68)}.action-btn.micro{display:block}.player-panel{width:215px}.coord-panel{min-width:170px}.hud-chip{display:none}}
