@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@500;700&display=swap');
:root{color-scheme:dark;--gold:#d9b878;--ink:#0d1820;--line:#bda57540}*{box-sizing:border-box}body{margin:0;overflow:hidden;background:#0b1420;color:#f5eddb;font:14px system-ui}canvas#world3d{position:fixed;inset:0;width:100%;height:100%;touch-action:none}button,input{font:inherit}button{cursor:pointer;color:#eee3cd;border:1px solid var(--line);background:#13212bda;padding:10px 16px;border-radius:3px}button:hover{background:#42504c;border-color:var(--gold)}button:disabled{opacity:.4;cursor:wait}button:focus-visible,input:focus-visible{outline:2px solid var(--gold)}small{font-size:11px;letter-spacing:1.2px;color:#c7ba9c}header{position:absolute;top:0;left:0;right:0;display:flex;align-items:center;gap:12px;padding:18px 26px;background:linear-gradient(#08111fe8,transparent)}.brand{display:flex;gap:12px;font-family:'Noto Serif TC',serif;font-size:23px;letter-spacing:3px}.brand>span{color:var(--gold);font-size:38px}.brand small{display:block;font:9px system-ui;letter-spacing:2.5px;margin-top:3px}.connection{margin-left:auto;font-size:11px;color:#c9d4cb}.connection i{display:inline-block;width:6px;height:6px;background:#91cbae;border-radius:50%;margin-right:8px}.panel{background:linear-gradient(135deg,#0c1a26e8,#142733bc);border:1px solid var(--line);box-shadow:0 8px 30px #0002;backdrop-filter:blur(8px);padding:16px}.vitals{position:absolute;left:26px;top:95px;width:255px;border-left:2px solid var(--gold)}h2,h3{font-family:'Noto Serif TC',serif;font-weight:500}.vitals h2{font-size:18px;margin:5px 0 14px}.vitals em{float:right;font:12px system-ui;color:var(--gold);padding-top:6px}.bar{height:14px;background:#030e17;position:relative;margin:6px 0;border:1px solid #f6e8ca22}.bar i{display:block;height:100%;width:100%;background:linear-gradient(90deg,#73383e,#ba7364);transition:width .2s}.bar.mp i{background:linear-gradient(90deg,#315972,#78aebb)}.bar span{position:absolute;inset:0;text-align:center;font-size:10px;line-height:12px}.location{position:absolute;top:95px;left:50%;transform:translateX(-50%);text-align:center;text-shadow:0 2px 6px #000}.location small{font-size:9px;letter-spacing:4px}.location h2{font-size:27px;letter-spacing:5px;margin:7px}.location span{font-size:11px;color:#e4d4b1}.map{position:absolute;right:26px;top:95px;padding:10px;text-align:center;width:182px}.map canvas{display:block;width:160px;height:160px}.map small{font-size:9px;letter-spacing:0}.quest{position:absolute;left:26px;top:275px;width:255px}.quest h3{margin:12px 0 6px;font-size:17px}.quest p{font-size:12px;line-height:1.8;color:#b8c2c8}.quest button{width:100%;text-align:left;font-size:12px}.quest kbd{float:right}.chat{position:absolute;bottom:28px;left:26px;width:280px;padding:10px}#chatLog{height:95px;overflow:auto;font-size:11px}#chatLog p{margin:5px 0;overflow-wrap:anywhere}.system{color:#b9a77e}#chatForm{display:flex;border-top:1px solid var(--line);padding-top:7px;gap:5px}input{background:#07131bad;border:1px solid var(--line);color:#eee;padding:9px;min-width:0;border-radius:3px}#chatInput{width:100%;font-size:11px}#chatForm button{padding:5px;font-size:11px}.bottom{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);text-align:center}.currency{display:flex;justify-content:center;gap:20px;font-size:11px;margin-bottom:9px}.currency b{color:var(--gold);font-size:13px}.bottom nav{margin:6px;display:flex;justify-content:center;gap:6px}.bottom nav button{font-size:11px;padding:5px 12px}.skills{display:flex;gap:8px}.skills button{width:82px;height:84px;border-color:#d9b87880;position:relative;background:linear-gradient(#263b44ed,#0c1823ef)}.skills b{display:block;font-size:28px;font-weight:normal;color:#efce86}.skills span{display:block;white-space:nowrap;font-size:10px}.skills kbd{position:absolute;top:3px;left:5px;font-size:9px;color:#b4c7cb}kbd{font:10px monospace;color:#b9c1bc}#cooldown{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;font-size:30px;text-shadow:0 1px 5px black;font-style:normal}.help{display:block;margin-top:12px;font-size:10px;white-space:nowrap}#target{position:absolute;top:180px;left:50%;transform:translateX(-50%);width:220px;text-align:center;background:#10212ddd;padding:10px;font-size:12px;border:1px solid var(--line)}meter{width:100%;height:12px;display:block;margin-top:8px}#toast{position:absolute;left:50%;top:34%;transform:translateX(-50%);background:#0d1d2aea;border:1px solid var(--line);padding:14px 24px;color:#f0d59f;opacity:0;transition:opacity .2s;pointer-events:none;max-width:90%;text-align:center}#toast.show{opacity:1}.veil{position:fixed;inset:0;background:linear-gradient(90deg,#051321cf,#0b152755);display:grid;place-items:center;backdrop-filter:blur(4px)}.entry{width:560px;max-width:94vw;background:linear-gradient(150deg,#0a1929f5,#102329df);border:1px solid #c1a46a77;padding:35px 40px;box-shadow:0 25px 100px #0008;text-align:center}.entry h1{font:700 52px 'Noto Serif TC',serif;letter-spacing:12px;margin:16px 0;color:#f1d9aa}.subtitle{letter-spacing:5px;color:#bcaa88;font-size:13px}.entry>p:not(.subtitle){color:#a4b9bf;font-size:13px;margin:24px 0}.entry label{display:block;text-align:left;font-size:11px;color:#cbb98f}.entry input{display:block;width:100%;margin:8px 0 16px}#classes{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin:15px 0}#classes button{padding:12px 4px;font-size:11px;line-height:1.8}#classes b{display:block;font-size:23px}#classes button.active{background:#8d734333;border-color:#e7c989;color:#ffe0a1}.primary{background:#d0af73;color:#13202b;border:0;width:100%;padding:15px;margin:7px 0 18px;font-weight:700}.entry>small:last-child{font-size:10px;letter-spacing:.4px}dialog{width:420px;max-width:92vw;border:1px solid var(--gold);padding:30px;background:#10212c;color:#eee}dialog::backdrop{background:#0008}.close{float:right;font-size:11px}.item{padding:20px;border:1px solid var(--line);color:var(--gold)}dialog p{font-size:12px;line-height:1.8;color:#b1c0c8}#joy{display:none;position:absolute;left:28px;bottom:60px;width:108px;height:108px;border:1px solid #d9b87888;border-radius:50%;background:#10212c88;touch-action:none}#knob{width:42px;height:42px;border-radius:50%;background:#cab78488;position:absolute;left:32px;top:32px;border:1px solid #dfcb9f}
[hidden]{display:none!important}@media(pointer:coarse){#joy{display:block}.chat{display:none}.help{display:none}.bottom{left:auto;right:24px;transform:none}.skills button{width:72px;height:72px}}@media(max-width:760px){header{padding:10px;gap:5px}.brand{font-size:15px;letter-spacing:1px}.brand>span{font-size:25px}.brand small{font-size:7px;letter-spacing:1px}header button{padding:7px;font-size:10px}.connection{font-size:9px}.vitals{top:65px;left:10px;width:185px;padding:10px}.vitals h2{font-size:14px}.map{top:65px;right:10px;width:112px;padding:5px}.map canvas{width:100px;height:100px}.map small{font-size:7px}.location{top:205px;width:100%;pointer-events:none}.location h2{font-size:18px}.location small{display:none}.quest{top:265px;left:10px;width:180px;padding:10px}.quest h3{font-size:14px;margin:6px 0}.quest p{font-size:11px}.entry{padding:24px 18px}.entry h1{font-size:38px;letter-spacing:6px}.chat{display:none}.help{display:none}#target{top:245px;left:auto;right:10px;transform:none;width:155px}.bottom{bottom:22px;right:12px;left:auto;transform:none}.skills{gap:4px}.skills button{width:60px;height:70px;padding:7px}.skills b{font-size:24px}.currency{gap:10px}#joy{left:18px;bottom:38px}}@media(max-height:580px){.quest{top:215px}.quest p{margin:4px 0}.chat{display:none}.location{top:75px}.map{width:120px}.map canvas{width:98px;height:98px}.entry{padding:10px 25px}.entry h1{font-size:32px;margin:8px}.entry>p:not(.subtitle){margin:8px}.entry input{margin:4px 0}.entry #classes{margin:6px 0}.entry .primary{margin-bottom:6px}.bottom{right:20px;left:auto;transform:none}.help{display:none}}

.download-link{font-size:11px;color:#dac28f;text-decoration:none;border:1px solid var(--line);padding:10px;border-radius:3px}@media(max-width:760px){.download-link{font-size:9px;padding:6px}}

.skills img{display:block;width:38px;height:38px;object-fit:contain;margin:auto}.class-portrait{display:block;width:46px;height:46px;object-fit:cover;border-radius:50%;margin:0 auto 8px;border:1px solid #c2a57880}@media(max-width:760px){.skills img{width:32px;height:32px}.class-portrait{width:36px;height:36px}}

/* V27: painted game shell; world remains a live 3D canvas. */
:root{--gold:#d3b678;--line:#c6ad7455}body{font-size:13px}.at-title>header,.at-title>.panel,.at-title>.location,.at-title>.bottom,.at-title>#joy,.at-title>.chat-toggle{visibility:hidden}body::after{content:'';position:fixed;inset:0;box-shadow:inset 0 0 100px 12px #06111670;pointer-events:none;z-index:1}header{z-index:5;left:auto;bottom:22px;right:24px;top:auto;padding:0;gap:8px;background:none;align-items:center}header .brand{display:none}header button,.download-link{background:#091418a8;font-size:10px;padding:8px 9px;border-color:#b6995a45;color:#d0c6af;border-radius:0}header .connection{position:fixed;right:32px;top:191px;color:#c0cbbd;font-size:10px;text-shadow:0 1px 5px #000}.panel{background:none;border:0;box-shadow:none;backdrop-filter:none;z-index:3}.vitals{top:25px;left:26px;width:300px;height:113px;padding:7px 8px 8px 100px;border:0;background:linear-gradient(90deg,#071519b8,#07151970,transparent);filter:drop-shadow(0 3px 4px #0008)}.portrait-medallion{position:absolute;width:88px;height:100px;left:0;top:0;overflow:hidden;clip-path:polygon(50% 0,93% 13%,100% 65%,50% 100%,0 65%,7% 13%);background:radial-gradient(ellipse at 50% 40%,#547377,#111c23 70%);border:2px solid #d0b16e}.portrait-medallion::after{content:'';position:absolute;inset:2px;box-shadow:inset 0 0 14px #000;border:1px solid #d4ba7880}.portrait-medallion img{width:100%;height:215px;object-fit:cover;object-position:50% 0;transform:scale(1.55);transform-origin:50% 0}.vitals>small:first-of-type{font-size:10px;color:#dfd1b2;letter-spacing:2px}.vitals h2{font-size:15px;margin:3px 0 8px;color:#f2dfb3}.vitals em{font-size:11px;padding-top:3px}.bar{height:13px;margin:5px 0;border:1px solid #e0c68a66;transform:skew(-9deg);box-shadow:0 2px 3px #0009;background:#130e12}.bar i{background:linear-gradient(#c86755,#7e2726 60%,#ae4b38);box-shadow:inset 0 1px 1px #ffdfaa80}.bar.mp{height:8px}.bar.mp i{background:linear-gradient(#66b6c1,#1d556d)}.bar span{transform:skew(9deg);font-size:9px;line-height:11px;text-shadow:0 1px 2px #000}.bar.mp span{display:none}#xp{font-size:9px;color:#c1af85;letter-spacing:.5px}.location{z-index:3;top:25px;pointer-events:none}.location small{font-size:8px;color:#d6c097;letter-spacing:5px}.location h2{font-size:23px;letter-spacing:6px;margin:6px 0;color:#eee2be}.location::after{content:'◆';display:block;font-size:9px;color:#d8b36c;line-height:16px;background:linear-gradient(90deg,transparent,#d2b27770,transparent) center/150px 1px no-repeat}#coords{display:none}.map{top:23px;right:31px;width:150px;padding:8px;border-radius:50%;border:2px solid #a48b59;background:#111e1b;box-shadow:0 0 0 3px #141b1c,0 0 0 4px #c6ad7466,0 5px 22px #0008}.map::before{content:'N';position:absolute;z-index:1;left:calc(50% - 5px);top:-12px;font:13px serif;color:#e5d0a0;text-shadow:0 1px 4px black}.map canvas{width:130px;height:130px;border-radius:50%;filter:saturate(.55) contrast(1.1);opacity:.88}.map small{display:none}.quest{left:32px;top:168px;width:245px;padding:0 0 0 17px;border-left:1px solid #c5a96c88;background:linear-gradient(90deg,#07151985,transparent)}.quest>small{font-size:9px;color:#d2b370}.quest h3{font-size:15px;margin:7px 0;color:#efdab1}.quest p{font-size:11px;color:#d6d4c7;text-shadow:0 1px 3px #000;line-height:1.65;max-width:225px}.quest button{border:0;border-bottom:1px solid #bba06c55;background:none;color:#d5ba80;width:auto;min-height:36px;padding:4px 0;font-size:11px}.quest kbd{margin-left:22px}.bottom{z-index:4;left:auto;right:34px;bottom:75px;transform:none;width:245px}.skills{position:relative;height:172px;display:block}.skills button{position:absolute;border-radius:50%;border:2px solid #bda06c;background:radial-gradient(circle,#414b46,#101c24 65%);box-shadow:0 0 0 3px #121b20,0 0 0 4px #a48b5e66,0 6px 18px #000a,inset 0 0 16px #000;overflow:visible;padding:9px}.skills button:hover{border-color:#ffe0a1;filter:brightness(1.15)}.skills button:active{transform:scale(.94)}.skills #attack{width:94px;height:94px;right:0;bottom:0}.skills #skill{width:78px;height:78px;right:99px;bottom:55px}.skills #potion{width:60px;height:60px;right:112px;bottom:-11px}.skills img{width:100%;height:100%;border-radius:50%;object-fit:cover;mix-blend-mode:screen}.skills span{position:absolute;bottom:-23px;left:50%;transform:translateX(-50%);font-size:10px;text-shadow:0 2px 3px #000;color:#e8dbbd}.skills #potion span{bottom:-20px}.skills kbd{left:calc(50% - 7px);top:-12px;padding:1px 4px;border-radius:50%;background:#16232a;color:#d6c7a7;font-size:9px}#cooldown{border-radius:50%;background:#0000;font-size:25px}.skills button:disabled{opacity:.65}.currency{position:fixed;bottom:-45px;right:0;font-size:9px;gap:12px;white-space:nowrap}.currency b{font-size:11px}.bottom nav{position:absolute;right:0;top:-7px;display:flex;gap:10px}.bottom nav button{font-size:10px;background:#111d2280;border-color:#ad976148;padding:6px 9px;min-height:32px}.help{position:fixed;bottom:-52px;right:270px;font-size:9px;color:#a4b2af;letter-spacing:.5px}.chat-toggle{display:block;position:absolute;bottom:23px;left:30px;z-index:5;border:0;border-bottom:1px solid #b9a16a70;background:#0c1c2080;color:#c3b48b;font-size:10px;padding:8px 14px}.chat{display:none;bottom:68px;left:30px;width:270px;background:linear-gradient(90deg,#08181de8,#08181d9c);padding:12px;border-left:1px solid #c8ae6d66}.chat-open .chat{display:block}#chatLog{height:95px}#target{z-index:3;top:108px;background:linear-gradient(90deg,transparent,#171b1cd9,transparent);border:0;border-bottom:1px solid #a98a5b77;width:220px;font-family:'Noto Serif TC',serif;font-size:12px;padding:7px}meter{height:8px}#toast{z-index:12;top:26%;border:0;border-block:1px solid #c8ac6770;background:linear-gradient(90deg,transparent,#101e25ed 20%,#101e25ed 80%,transparent);font-family:'Noto Serif TC',serif;font-size:14px;padding:13px 40px}#joy{z-index:4;background:radial-gradient(circle,#111e2280 30%,#08151f45 66%,#b4a07140 67%,#09151d66 70%);border-color:#b79b6770;box-shadow:0 0 0 4px #0b171b55,inset 0 0 22px #0005}#knob{background:radial-gradient(circle,#b4aa86aa,#494d43aa);border-color:#d2bf8b80}.veil{z-index:20;display:block;overflow:hidden;background:#0b1d22 url('assets/art/mistfrontier-v27.png') center/cover no-repeat;backdrop-filter:none}.title-vignette{position:absolute;inset:0;background:linear-gradient(90deg,#06141be8 0%,#06141bb3 27%,#06141b18 64%),linear-gradient(0deg,#050f17ee,transparent 35%,transparent 75%,#06141988);pointer-events:none}.entry{position:absolute;left:7vw;top:50%;transform:translateY(-50%);width:460px;max-width:42vw;padding:0;background:none;border:0;box-shadow:none;text-align:left;z-index:2}.entry>small:first-child{font-size:10px;color:#d6b877;letter-spacing:4px}.entry h1{font-size:66px;letter-spacing:10px;color:#f1dfb0;text-shadow:0 3px 24px #000b;font-weight:500;margin:14px 0 6px;white-space:nowrap}.entry .subtitle{font:13px 'Noto Serif TC',serif;letter-spacing:8px;color:#c8af77;margin:8px 0 27px}.entry>p:not(.subtitle){font:15px 'Noto Serif TC',serif;color:#cfcebc;letter-spacing:3px;margin:28px 0 35px}.entry label{font-size:10px;letter-spacing:2px;color:#b5ac8d}.entry input{width:230px;background:#06131a66;border:0;border-bottom:1px solid #bda36a77;font-family:'Noto Serif TC',serif;font-size:14px;letter-spacing:2px;padding:10px 0;margin-bottom:26px}.entry #classes{display:flex;gap:10px;margin:12px 0 28px}.entry #classes button{position:relative;width:71px;height:108px;border:1px solid #b7a37244;border-top:2px solid #a38d5c99;padding:3px 0 6px;background:linear-gradient(#152a3370,#07141bb5);font:10px 'Noto Serif TC',serif;letter-spacing:0;transition:transform .2s,filter .2s;clip-path:polygon(0 0,100% 0,100% 94%,50% 100%,0 94%)}.entry .class-portrait{width:62px;height:75px;object-fit:cover;object-position:center top;border:0;border-radius:0;margin:0 auto 4px;opacity:.65;filter:saturate(.65)}.entry #classes button.active{border-top-color:#eed39c;transform:translateY(-6px);background:linear-gradient(#b59a5444,#17252b);color:#ffe1a0;box-shadow:inset 0 0 20px #b79d5e20}.entry #classes button.active .class-portrait{opacity:1;filter:none}.entry .primary{width:310px;max-width:100%;height:58px;margin:0 0 18px;clip-path:polygon(5% 0,95% 0,100% 50%,95% 100%,5% 100%,0 50%);background:linear-gradient(#d3b77d,#9c783f);box-shadow:inset 0 0 0 3px #e7d4a049;font:700 17px 'Noto Serif TC',serif;letter-spacing:5px;color:#152124;text-shadow:0 1px #eddcb780}.entry>small:last-child{display:block;font-size:9px;letter-spacing:2px;color:#9ca69b}.selected-hero{position:absolute;height:76vh;max-height:850px;max-width:40vw;object-fit:contain;bottom:0;right:14%;filter:drop-shadow(0 12px 22px #000b);animation:hero-breathe 7s ease-in-out infinite;pointer-events:none}.hero-caption{position:absolute;right:8%;bottom:12%;z-index:2;text-align:right;text-shadow:0 2px 7px black}.hero-caption small{color:#cbb67f;font-size:9px;letter-spacing:3px}.hero-caption h2{font-size:30px;letter-spacing:6px;margin:9px 0;color:#ead9b4}.hero-caption p{font-size:11px;letter-spacing:1px;color:#ccc9b4}dialog{border:1px solid #a58b59;background:linear-gradient(#102329ee,#09171bf5),url('assets/art/mistfrontier-v27.png') center/cover;box-shadow:0 0 0 5px #0c141c,0 0 0 6px #ab925c77;padding:30px;max-height:85vh}dialog h2{letter-spacing:5px}.item{border-color:#baa06c55;background:linear-gradient(135deg,#bea26d11,transparent)}@keyframes hero-breathe{50%{transform:translateY(-7px)}}@media(prefers-reduced-motion:reduce){.selected-hero{animation:none}}
@media(max-width:1000px){.entry{left:5vw;max-width:48vw}.entry h1{font-size:52px;letter-spacing:6px}.selected-hero{right:9%;height:69vh}.hero-caption{right:5%;bottom:10%}.hero-caption p{max-width:220px}.entry #classes{gap:6px}.entry #classes button{width:62px}.entry .class-portrait{width:55px}.help{display:none}header .connection{right:30px}.location h2{font-size:19px}.vitals{left:18px;width:255px;padding-left:83px}.portrait-medallion{width:74px;height:89px}.quest{left:25px;width:210px}.map{width:128px}.map canvas{width:108px;height:108px}header .connection{top:166px}}
@media(max-width:600px){.veil{background-position:61% center}.title-vignette{background:linear-gradient(0deg,#06141bf5 10%,#06141be0 40%,#06141b10 80%)}.entry{left:7%;top:auto;bottom:32px;transform:none;width:86%;max-width:none}.entry h1{font-size:40px;margin:8px 0;letter-spacing:6px}.entry>small:first-child{font-size:8px;letter-spacing:2px}.entry .subtitle{font-size:10px;margin:4px 0 18px;letter-spacing:5px}.entry>p:not(.subtitle){display:none}.entry label{font-size:9px}.entry input{font-size:12px;margin:4px 0 12px;padding:7px 0;width:180px}.entry #classes{gap:8px;margin:10px 0 20px}.entry #classes button{width:calc((100vw - 100px)/5);height:86px;font-size:9px}.entry .class-portrait{height:58px;width:48px}.entry .primary{height:48px;width:100%;font-size:15px;letter-spacing:4px;margin-bottom:12px}.selected-hero{right:4%;bottom:38%;height:55vh;max-width:65vw;opacity:.9}.hero-caption{right:5%;bottom:auto;top:25%;max-width:150px}.hero-caption h2{font-size:21px;letter-spacing:3px}.hero-caption small{font-size:8px}.hero-caption p{display:none}.vitals{left:12px;top:18px;width:215px;padding-left:70px;height:85px}.portrait-medallion{width:60px;height:76px}.portrait-medallion img{height:160px}.vitals h2{font-size:12px}.vitals em{font-size:9px}.vitals>small:first-of-type{font-size:9px}.map{right:17px;top:20px;width:88px;padding:5px}.map canvas{width:74px;height:74px}header .connection{top:116px;right:15px;font-size:8px}.location{top:124px;left:50%;width:200px}.location small{display:none}.location h2{font-size:16px;letter-spacing:3px}.quest{top:187px;left:16px;width:180px;padding-left:10px}.quest h3{font-size:13px}.quest p{font-size:10px;max-width:160px}.quest button{min-height:40px}#target{top:165px;right:15px;left:auto;transform:none;width:150px;font-size:10px}.bottom{right:18px;bottom:95px;width:180px}.skills{height:145px}.skills #attack{width:78px;height:78px}.skills #skill{width:64px;height:64px;right:82px;bottom:48px}.skills #potion{width:48px;height:48px;right:89px;bottom:-11px}.skills span{font-size:9px}.skills img{width:100%;height:100%}.bottom nav{top:-10px;gap:6px}.bottom nav button{font-size:9px;padding:6px;min-height:36px}.currency{bottom:-44px;gap:8px}.currency span,.currency b{font-size:9px}header{right:15px;bottom:15px;gap:5px}header button,.download-link{font-size:8px;padding:7px;min-height:32px}.chat-toggle{bottom:16px;left:12px;font-size:9px;min-height:32px}.chat-open .chat{display:block;width:230px;left:12px;bottom:60px}#joy{left:25px;bottom:100px;width:95px;height:95px}#knob{left:26px;top:26px}#toast{top:38%;font-size:12px;padding:12px 20px;width:90%}.entry>small:last-child{font-size:8px}}
@media(max-height:550px) and (min-width:601px){.entry{top:50%;left:6%;width:390px;max-width:47vw}.entry h1{font-size:39px;margin:5px 0}.entry .subtitle{margin:4px 0 10px;font-size:10px}.entry>p:not(.subtitle){display:none}.entry input{margin:3px 0 8px;padding:5px}.entry #classes{margin:8px 0 14px}.entry #classes button{height:77px}.entry .class-portrait{height:50px}.entry .primary{height:44px;width:280px;font-size:14px;margin-bottom:9px}.selected-hero{height:87vh;right:12%}.hero-caption{bottom:8%;right:4%}.hero-caption h2{font-size:22px}.hero-caption p{font-size:9px}.vitals{top:14px;left:17px}.quest{top:132px;left:25px}.map{top:16px;right:22px;width:98px;padding:5px}.map canvas{width:84px;height:84px}header .connection{top:125px;right:22px}.location{top:17px}.bottom{bottom:59px;right:23px;transform:scale(.85);transform-origin:right bottom}.chat-toggle{bottom:15px}header{bottom:10px}#joy{bottom:52px}.currency{display:none}.quest p{font-size:10px;margin:5px 0}}

.portrait-medallion img{position:absolute;width:180%;height:auto;max-width:none;left:-80%;top:-4%;object-fit:contain;transform:none}.vitals{background:none}.map canvas{filter:saturate(.65) brightness(.9)}

/* V45 local radar remains legible instead of compressing the entire world. */
.map{width:216px;right:20px;top:20px;border-radius:12px;padding:8px;background:#0c1c27ed}.map::before{display:none}.map #mapOpen{display:block;padding:0;border:0;background:none;width:100%;min-height:0}.map canvas{width:196px;height:196px;border-radius:7px;filter:none;opacity:1}.map small{display:block;font-size:11px;line-height:1.5;letter-spacing:0}.map select{width:100%;padding:5px;font-size:12px}.mapLegend span{color:#69e9ff}.mapLegend b{color:#ff6969}.mapLegend{color:#ffe394}#mapDialog{width:min(780px,95vw);max-height:90vh;overflow:auto;padding:18px}#worldMap{display:block;width:100%;height:auto;max-height:58vh;object-fit:contain;background:#0c1c27}#mapClose{float:right}#mapPlayers{padding-left:18px}header .connection{top:330px;right:20px}
@media(max-width:600px){.map{top:10px;right:10px;width:132px;padding:5px}.map canvas{width:120px;height:120px}.map small{font-size:9px}.map select{font-size:10px;padding:3px}.mapLegend{display:none!important}.vitals{width:calc(100vw - 155px);min-width:175px;transform:scale(.85);transform-origin:top left}.location{left:12px;top:106px;transform:none;width:190px;text-align:left}.location h2{font-size:14px}.quest{top:240px}.map~.quest{max-width:160px}header .connection{top:215px;right:10px}#target{top:195px}.map #nearestEnemy{line-height:1.2}}
@media(max-height:550px) and (min-width:601px){.map{width:154px;top:8px;right:12px}.map canvas{width:136px;height:136px}.map small{font-size:9px}header .connection{top:256px}}

/* V51 compact north-up radar: one circular range for drawing and counts. */
.map{width:190px;padding:0;background:none;border:0;box-shadow:none;backdrop-filter:none;right:max(16px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top))}.map canvas{width:190px;height:190px;border-radius:50%;filter:drop-shadow(0 3px 9px #0008)}.map select{display:block;width:142px;margin:0 auto 5px;border:1px solid #bda57550;border-radius:16px;background:#0b1d25e8;color:#e8d8b6;padding:5px 9px;font-size:11px}.map small{text-shadow:0 1px 4px #000;font-size:11px}.map #nearestEnemy{color:#d6b6a0;font-size:10px;margin-top:3px}.mapLegend{margin-top:4px;font-size:9px!important;opacity:.8}header .connection{top:285px;right:20px}
@media(max-width:600px){.map{width:126px;right:8px;top:8px}.map canvas{width:126px;height:126px}.map select{width:122px;min-height:32px;font-size:10px}.map small{font-size:10px}.map #nearestEnemy{display:none}header .connection{top:191px;right:10px}.quest{top:215px}}
@media(max-height:550px) and (min-width:601px){.map{width:136px;top:6px;right:12px}.map canvas{width:136px;height:136px}.map select{width:132px}.mapLegend,.map #nearestEnemy{display:none!important}header .connection{top:203px}}

/* V52 music and effects remain separate accessible controls. */
@media(max-width:600px){header{gap:3px;right:8px}header button,.download-link{font-size:8px;padding:7px 5px}}

/* V52: the skill layout must not intercept the navigation buttons above it. */
.skills{pointer-events:none}.skills button{pointer-events:auto}.bottom nav{z-index:1}

/* Returning players keep their server character; loading gates all entry. */
.returning-name{display:none}.returning-player #classes,.returning-player #nameEntry{display:none}.returning-player .entry .returning-name{display:block;font-size:15px;margin:22px 0;color:#e6d3aa;letter-spacing:1px}.unknown-portrait #selectedHero,.unknown-portrait .hero-caption{visibility:hidden}.asset-loading{max-width:310px;margin:12px 0 18px;color:#c9c5b2;font-size:12px;letter-spacing:.5px}.asset-loading progress{display:block;width:100%;height:8px;margin:8px 0;appearance:none;border:0;border-radius:4px;overflow:hidden;background:#142931}.asset-loading progress::-webkit-progress-bar{background:#142931}.asset-loading progress::-webkit-progress-value{background:linear-gradient(90deg,#92713c,#f0d191)}.asset-loading progress::-moz-progress-bar{background:#d6b77a}#loadRetry{margin-top:8px;font-size:12px}.entry .primary:disabled{cursor:wait;opacity:.45}@media(max-width:600px){.asset-loading{max-width:100%;font-size:11px;margin:8px 0 14px}}

/* V54: icon-first utility medallions, with unchanged action targets. */
header .hud-icon,.bottom nav .hud-icon,.chat-toggle.hud-icon{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:48px;height:48px;min-width:44px;min-height:44px;padding:8px;border:1px solid #c9a76a;border-radius:50%;background:radial-gradient(circle at 40% 28%,#30444c,#0b1923 75%);box-shadow:inset 0 0 0 3px #0c1922,inset 0 0 0 4px #bd9e5f40,0 3px 8px #0008;text-decoration:none;overflow:visible}
.hud-icon img{display:block;width:28px;height:28px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 1px 2px #000)}
#bag.hud-icon img{width:38px;height:38px;border-radius:50%}
.hud-icon kbd{position:absolute;right:-2px;bottom:-2px;background:#101f28;border:1px solid #bda575;border-radius:4px;padding:1px 4px;font-size:10px}
.hud-icon[aria-pressed="false"] img{opacity:.45}.hud-icon[aria-pressed="false"]::after{content:"";position:absolute;width:30px;height:2px;transform:rotate(-45deg);background:#e5ab87;box-shadow:0 0 0 2px #10202b}
.hud-icon:hover,.hud-icon:focus-visible{border-color:#ffe4a0;background:radial-gradient(circle at 40% 28%,#52616a,#172932 75%);box-shadow:0 0 12px #e5bb5840}
.chat-toggle.hud-icon{position:absolute}.chat-toggle[aria-expanded="true"]{border-color:#fff0ba;box-shadow:0 0 12px #e5bb5860}
.bottom nav{top:auto;bottom:calc(100% + 8px);margin:0;gap:12px}
header{gap:8px}
@media(max-width:600px){header .hud-icon,.bottom nav .hud-icon,.chat-toggle.hud-icon{width:44px;height:44px;padding:7px}header{gap:6px}.bottom nav{top:auto;bottom:calc(100% + 6px);gap:10px}}
/* Leave a clear gap between combat labels and utility medallions. */
.bottom{bottom:100px}
@media(max-width:600px){.bottom{bottom:105px}}
@media(max-height:550px) and (min-width:601px){.bottom{bottom:85px}}

#landscapeGate{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;box-sizing:border-box;margin:0;border:0;padding:24px;background:radial-gradient(ellipse at center,#20333d,#08131b 75%);color:#ead7b0;text-align:center;outline:none}#landscapeGate[open]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}#landscapeGate::backdrop{background:#08131b}#landscapeGate h2{font-size:24px;margin:12px 0 0}#landscapeGate p{margin:0;color:#d5c8ae}#landscapeGate small{color:#9caaa9}.rotate-device{width:92px;height:52px;border:3px solid #d6ba7c;border-radius:12px;font-size:44px;line-height:48px;color:#efd69e;box-shadow:0 0 40px #d6ba7c18}

