
:root{--dark:#0a1918;--dark2:#142a27;--accent:#caaa72;--light:#f4f0e3;--muted:#b7c2bd;--stroke:rgba(220,229,215,.19);--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#102d25;color:var(--light);font-family:Inter,system-ui,-apple-system,sans-serif}button,input{font:inherit}button{cursor:pointer;color:inherit;-webkit-tap-highlight-color:transparent}button:focus-visible,input:focus-visible{outline:2px solid #e3c991;outline-offset:3px}.hidden{display:none!important}#game-wrap,#scene,#scene canvas{position:absolute;inset:0;width:100%;height:100%;display:block}#scene canvas{touch-action:none}.vignette{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at center,transparent 43%,rgba(4,15,15,.32) 100%)}.glass{background:linear-gradient(145deg,rgba(14,38,33,.87),rgba(12,31,30,.74));border:1px solid var(--stroke);backdrop-filter:blur(15px);-webkit-backdrop-filter:blur(15px);box-shadow:0 8px 28px rgba(0,0,0,.22)}.eyebrow{font-size:10px;font-weight:800;letter-spacing:.23em;color:#d0ba91}.gold{color:#dcb977}.gold span{float:right;color:#a9a8a2}.loading-screen{position:absolute;z-index:60;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;background:radial-gradient(ellipse at 55% 35%,#245548,#061915 75%)}.loading-screen h1{font:700 clamp(48px,9vw,100px)/1.1 Cinzel,Georgia,serif;letter-spacing:.13em;margin:12px 0 18px;color:#f0d7a4;text-shadow:0 7px 40px #000}.loader-crest{font:80px Georgia;color:#d9bf8e;text-shadow:0 0 45px #b79858}.loading-screen .eyebrow{font-size:12px}.loading-screen #loading-text{color:#aebdb7;font-size:13px}.progress-track{width:min(320px,65vw);height:3px;background:#435d50;border-radius:8px;overflow:hidden;margin-top:20px}#loading-bar{width:10%;height:100%;background:#e5c78f;transition:width .5s}.player-card{position:absolute;top:calc(18px + var(--safe-top));left:20px;display:flex;gap:12px;padding:10px 13px 10px 10px;border-radius:15px;width:290px}.portrait{position:relative;width:65px;height:70px;flex:0 0 auto;display:grid;place-items:center;border-radius:10px;background:radial-gradient(ellipse at 50% 35%,#6c8e84,#142725);border:1px solid #b49b70}.portrait>div{font-size:32px;color:#f4d5a1}.level-chip{position:absolute;bottom:-8px;left:50%;transform:translateX(-50%);min-width:22px;padding:3px 5px;background:#bb985e;border:2px solid #192b28;border-radius:7px;text-align:center;color:#19231f;font-size:11px;font-weight:800}.player-meta{flex:1;min-width:0}.name-row{display:flex;justify-content:space-between;align-items:center;gap:4px;margin:0 0 9px}.name-row strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.name-row span{font-size:9px;color:#ddbb7b;text-transform:uppercase}.bar{position:relative;height:11px;border-radius:9px;background:rgba(2,6,5,.6);overflow:hidden;border:1px solid rgba(255,255,255,.12);margin:5px 0}.bar>div{height:100%;width:100%;transition:width .25s}.bar span{position:absolute;inset:0;text-align:center;font-size:8px;line-height:10px;font-weight:700;text-shadow:0 1px 2px #000}.hp>div{background:linear-gradient(90deg,#ad3934,#e36f5d)}.mp>div{background:linear-gradient(90deg,#246ca8,#65a7d7)}.xp{height:7px;margin-top:7px}.xp>div{background:linear-gradient(90deg,#b78943,#f4d18d)}.xp span{display:none}.top-center{position:absolute;top:calc(16px + var(--safe-top));left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;padding:10px 18px;border-radius:10px;text-align:center;white-space:nowrap}.top-center strong{display:block;font:600 14px Cinzel,Georgia,serif;letter-spacing:.08em;color:#f6ddb1}.top-center span:not(.top-icon){display:block;font-size:10px;color:#c8d0c8;margin-top:4px}.top-icon{font-size:26px;color:#d1ac6a}.top-actions{position:absolute;top:calc(18px + var(--safe-top));right:20px;display:flex;gap:8px}.top-square{width:42px;height:42px;border-radius:12px;font-size:24px;color:#f0ddad}.quest-card{position:absolute;top:calc(108px + var(--safe-top));right:20px;width:260px;padding:15px;border-radius:13px}.quest-card h3{font:600 16px Cinzel,Georgia,serif;margin:11px 0 7px;color:#f8e6c4}.quest-card p{font-size:12px;line-height:1.55;color:#c4d0c9;margin:0 0 12px}.quest-progress{display:flex;align-items:center;gap:10px;font-size:11px;font-weight:700}.quest-track{flex:1;height:5px;background:#31423b;border-radius:5px;overflow:hidden}.quest-track>div{height:100%;width:0;background:#d5b777;transition:width .35s}.quest-reward{margin-top:10px;font-size:10px;color:#cbbe96}.minimap{position:absolute;right:20px;bottom:calc(132px + var(--safe-bottom));width:166px;padding:8px;border-radius:15px}.minimap canvas{display:block;width:148px;height:148px;border-radius:9px;background:rgba(15,48,34,.8)}.minimap-title{font-size:9px;color:#ddc58d;letter-spacing:.15em;font-weight:800;padding:8px 2px 2px}.minimap-title span{float:right}.target-card{position:absolute;top:calc(115px + var(--safe-top));left:50%;transform:translateX(-50%);min-width:195px;text-align:center;border-radius:10px;padding:10px 15px}.target-card strong{font-size:12px}.target-card .bar{margin:8px 0}.target-card>span{font-size:10px;color:#c9c5ba}.bottom-ui{position:absolute;left:20px;right:20px;bottom:calc(20px + var(--safe-bottom));display:flex;justify-content:space-between;align-items:end;pointer-events:none}.bottom-ui>*{pointer-events:auto}.currency{border-radius:12px;padding:11px 14px;display:flex;align-items:center;gap:6px;font-size:13px}.currency>span{font-size:18px;color:#ebc781}.currency small{font-size:9px;letter-spacing:.1em;color:#b4c2b5}.hotbar{display:flex;align-items:center;gap:7px;border-radius:18px;padding:8px;position:absolute;left:50%;transform:translateX(-50%);bottom:0}.hotkey{position:relative;width:64px;height:62px;border-radius:11px;background:linear-gradient(#32544a,#192b28);border:1px solid rgba(226,220,189,.28);display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px;transition:.15s}.hotkey:active{transform:scale(.95)}.hotkey.attack{background:linear-gradient(140deg,#65483a,#332923)}.hotkey .hot-icon{font-size:25px;line-height:24px;color:#f5dfb9}.hotkey small{font-size:9px;font-weight:700;color:#d1d6cb}.keycap{position:absolute;top:3px;left:5px;font-size:9px;color:#e0bd82}.hotbar-rule{height:40px;width:1px;background:#698175;margin:0 3px}.right-bottom{border-radius:12px;padding:7px;display:flex;align-items:center;gap:7px}.right-bottom span{font-size:10px;color:#c3c7b8;padding:0 5px}.right-bottom button{border:1px solid #60756a;border-radius:6px;background:#234039;width:30px;height:29px;font-size:18px}.joystick{position:absolute;bottom:calc(116px + var(--safe-bottom));left:33px;width:112px;height:112px;border-radius:50%;border:2px solid rgba(235,219,170,.45);background:rgba(14,40,34,.35);backdrop-filter:blur(4px);touch-action:none;display:none;align-items:center;justify-content:center;z-index:15}.joystick>div{height:47px;width:47px;border-radius:50%;background:linear-gradient(135deg,#d7c79e,#8b7450);border:3px solid #4e5147;box-shadow:0 5px 20px #0006;transform:translate(0,0)}#hint{position:absolute;bottom:calc(114px + var(--safe-bottom));left:20px;padding:10px 13px;border-radius:10px;color:#d4d7c7;font-size:11px;transition:opacity .5s}#toast-stack{position:absolute;left:50%;top:27%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:7px;pointer-events:none;z-index:25}.toast{font-size:12px;font-weight:700;padding:10px 20px;border-radius:10px;color:#f4e6bd;background:#15362de8;border:1px solid #b9a16c;animation:toast-pop .2s ease-out;box-shadow:0 6px 20px #0005}.toast.error{border-color:#d16e6e;color:#fdd0c6}@keyframes toast-pop{from{transform:translateY(10px);opacity:0}to{transform:translateY(0);opacity:1}}
.screen-panel{position:absolute;z-index:45;inset:0;display:flex;align-items:center;justify-content:center;overflow-y:auto;padding:18px;background:#071713b9;backdrop-filter:blur(7px)}.menu-backdrop{position:absolute;inset:0;background:radial-gradient(ellipse at center,transparent 15%,#09251c9c 100%);pointer-events:none}.menu-shell{position:relative;width:min(620px,100%);max-height:95vh;overflow-y:auto;padding:28px clamp(18px,4vw,42px);border-radius:19px;background:linear-gradient(145deg,#17362dF7,#091c19FA);border:1px solid rgba(220,188,125,.46);box-shadow:0 24px 90px #000b;text-align:center}.title-mark{font:700 30px Cinzel,Georgia,serif;color:#efcf92;letter-spacing:.12em}.menu-shell h2{font:600 clamp(22px,4vw,31px) Cinzel,Georgia,serif;margin:14px 0 7px}.subintro{color:#bec9c2;font-size:13px;line-height:1.6;margin:0 0 22px}.field-label{display:block;text-align:left;color:#e8cea0;font-size:10px;letter-spacing:.15em;font-weight:800;margin-bottom:9px}.field-label.spacing{margin-top:20px}#char-name{width:100%;border-radius:10px;padding:12px 14px;color:#f8f4e8;background:#24443a;border:1px solid #7d826a;outline:none}#char-name::placeholder{color:#a8b4ad}.choice-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.choice{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:12px 6px;border-radius:12px;background:#1a332d;border:1px solid #456255;min-height:91px}.choice.active{background:linear-gradient(#49644d,#263a30);border-color:#d6b77a;box-shadow:inset 0 0 0 1px #ab9459}.choice span{font-size:25px;color:#e4c58a}.choice strong{font-size:12px}.choice small{font-size:10px;color:#c1c9c1}.btn{padding:13px 18px;border-radius:10px;border:1px solid #d2b47b;background:#233d35;font-weight:800;letter-spacing:.08em;font-size:12px}.btn.primary{background:linear-gradient(135deg,#e8cd91,#b18c55);color:#1b2620;border:1px solid #f8d99b}.btn.wide{width:100%}.start-btn{margin-top:22px;display:flex;justify-content:center;gap:12px}.menu-footer{margin-top:15px;font-size:10px;color:#94a59b;line-height:1.5}#modal-layer{position:absolute;z-index:40;inset:0;display:flex;align-items:center;justify-content:center}.modal-shade{position:absolute;inset:0;background:#06140db3;backdrop-filter:blur(3px)}.modal{position:relative;width:min(520px,calc(100% - 26px));max-height:calc(100% - 32px);overflow-y:auto;border-radius:18px;padding:22px;background:linear-gradient(160deg,#223d34f6,#0e211cf7);border-color:#7a8362}.modal-head{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #68786a55;margin-bottom:17px;padding-bottom:12px}.modal-head h2{font:600 23px Cinzel,Georgia,serif;margin:0;color:#f0d7a1}.modal-head button{width:34px;height:34px;background:#28463c;border:1px solid #7d8b75;border-radius:8px}.inventory-header{display:flex;justify-content:space-between;color:#cdd3c5;font-size:12px;margin-bottom:14px}.item-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.item{min-height:86px;border:1px solid #607363;border-radius:10px;background:#1b332b;padding:8px 4px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:3px}.item.equipped{border-color:#d4b574;background:#384637}.item-emoji{font-size:24px}.item strong{font-size:10px}.item small{font-size:9px;color:#d6c19a}.item-description{background:#132a23;padding:10px 12px;border-radius:10px;margin-top:14px;color:#c9d4c6;font-size:12px;line-height:1.6}.item-description strong{color:#ebd5a4}.settings-option{display:flex;align-items:center;justify-content:space-between;padding:10px 0;border-bottom:1px solid #4e69534d;color:#e4e7da;font-size:13px;gap:12px}.settings-option input{width:19px;height:19px;accent-color:#c9ab71}.modal-action{width:100%;margin-top:18px}.help-copy{font-size:13px;line-height:1.8;color:#d0dacd}.help-copy b{color:#ecd3a0}#death-layer{position:absolute;z-index:50;inset:0;background:#1c0c0ad9;display:grid;place-items:center}.death-box{text-align:center;padding:25px}.death-box>div{font-size:65px;color:#dab88e}.death-box h2{font:600 30px Cinzel,serif}.death-box p{color:#dccbc3;margin-bottom:25px}
@media(max-width:850px){.player-card{top:calc(8px + var(--safe-top));left:8px;width:232px;gap:8px;padding:7px}.portrait{width:50px;height:60px}.portrait>div{font-size:26px}.name-row{margin-bottom:5px}.name-row strong{font-size:11px}.name-row span{font-size:8px}.bar{margin:4px 0}.top-center{top:calc(8px + var(--safe-top));left:auto;right:93px;transform:none;padding:8px 11px}.top-center strong{font-size:10px}.top-center span:not(.top-icon){font-size:8px}.top-icon{font-size:16px}.top-actions{top:calc(8px + var(--safe-top));right:8px}.top-square{width:34px;height:34px;font-size:19px}.quest-card{top:calc(99px + var(--safe-top));right:8px;width:201px;padding:10px}.quest-card h3{font-size:12px;margin:7px 0 5px}.quest-card p{font-size:10px;margin-bottom:6px}.quest-reward{font-size:8px}.minimap{right:8px;bottom:calc(117px + var(--safe-bottom));width:112px;padding:5px}.minimap canvas{width:100px;height:100px}.minimap-title{font-size:8px}.bottom-ui{left:8px;right:8px;bottom:calc(8px + var(--safe-bottom))}.currency{font-size:11px;padding:8px}.currency small{display:none}.right-bottom{padding:4px}.right-bottom span{display:none}.right-bottom button{width:24px;height:25px}.hotbar{padding:5px;gap:4px;border-radius:14px}.hotkey{width:51px;height:50px;border-radius:8px}.hotkey .hot-icon{font-size:19px}.hotkey small{font-size:8px}.joystick{display:flex;bottom:calc(94px + var(--safe-bottom));left:20px;width:96px;height:96px}.joystick>div{width:43px;height:43px}#hint{display:none}.target-card{top:calc(82px + var(--safe-top));min-width:150px;padding:6px}.currency{max-width:78px}}
@media(max-width:550px){.top-center{top:calc(83px + var(--safe-top));left:8px;right:auto;padding:7px 9px}.top-center strong{font-size:10px}.top-center .top-icon{display:none}.quest-card{top:calc(88px + var(--safe-top));right:8px;width:min(190px,48vw)}.player-card{width:205px}.portrait{width:43px}.minimap{right:8px;bottom:calc(160px + var(--safe-bottom));width:96px}.minimap canvas{width:84px;height:84px}.minimap-title{font-size:7px}.bottom-ui{bottom:calc(6px + var(--safe-bottom))}.hotbar{left:50%;transform:translateX(-50%);bottom:2px;gap:3px;padding:4px}.hotkey{width:43px;height:45px}.hotkey .hot-icon{font-size:19px}.hotkey small{font-size:7px}.hotbar-rule{height:30px;margin:0}.currency{align-self:flex-end;position:absolute;bottom:55px;left:2px;padding:4px 7px}.currency span{font-size:14px}.right-bottom{position:absolute;bottom:55px;right:2px}#enemy-target{top:calc(133px + var(--safe-top));left:9px;transform:none;width:155px}.joystick{left:20px;bottom:calc(110px + var(--safe-bottom));width:91px;height:91px}.menu-shell{padding:23px 13px}.choice-grid{gap:6px}.choice{min-height:86px;padding:8px 2px}.choice strong{font-size:10px}.choice small{font-size:8px}.item-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-height:630px) and (min-width:700px){.quest-card{top:95px;width:220px}.minimap{width:105px;bottom:105px}.minimap canvas{width:92px;height:92px}.hotbar{transform:translateX(-50%) scale(.86);transform-origin:bottom center}.joystick{bottom:90px}}
