:root{--bg:#080f18;--panel:#101922;--panel2:#172530;--line:#364148;--text:#efe9dd;--dim:#a1a8a9;--accent:#e6c27b;--good:#82d6b1}
body{font-family:Inter,'Segoe UI',sans-serif;background:#080f18}
#world3d{position:absolute;inset:0;width:100%;height:100%;display:block;outline:none}
.three-ready #game{opacity:0;pointer-events:none}
#cinemaShade{position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,rgba(5,12,20,.97),rgba(5,12,20,.83) 28%,rgba(5,12,20,.3) 55%,transparent 80%),linear-gradient(0deg,rgba(5,12,20,.65),transparent 30%);z-index:2}
.playing #cinemaShade{background:radial-gradient(ellipse at 50% 45%,transparent 45%,rgba(3,8,14,.48) 100%)}
#vignette{box-shadow:inset 0 0 140px 10px #03081060}
#edition{position:absolute;top:27px;left:34px;z-index:8;font-size:11px;letter-spacing:2px;color:#ded4bb;pointer-events:none;font-weight:600}
#edition b{display:inline-block;border:1px solid #b49455;color:#e1bd70;padding:4px 6px;margin-left:6px;font-size:10px}
#overlay{z-index:12;background:transparent!important;justify-content:flex-start;padding:80px 5vw 40px;align-items:center}
#overlay>.panel.compact{background:transparent;border:0;box-shadow:none;width:500px;max-width:44vw;padding:0;text-align:left}
.game-title{font-family:Georgia,'Times New Roman',serif!important;color:#f5e9cf!important;font-size:75px!important;line-height:1!important;letter-spacing:-3px;margin:22px 0 10px!important;font-weight:normal;text-shadow:0 4px 30px #0008}
.game-title span{display:block;font-size:43px;letter-spacing:-1.5px;margin-top:8px}
.game-title em{font:600 12px 'Segoe UI',sans-serif;letter-spacing:7px;display:block;margin-top:18px;color:#e3b95f}
.eyebrow{font-size:9px;letter-spacing:2.1px;font-weight:700;color:#c4a96d}
.version{font-size:10px!important;letter-spacing:2.5px!important;color:#8d999f!important;margin-bottom:28px!important}
.herorow{justify-content:flex-start;gap:12px;margin:18px 0!important}
.hero{display:grid!important;grid-template-columns:58px 1fr;grid-template-rows:1fr 1fr;align-items:end;text-align:left;width:180px!important;min-width:0;max-width:46%;padding:9px 12px!important;border-radius:8px!important;background:#0d1824c9!important;border:1px solid #35434a!important;box-shadow:none!important;transition:background .2s,border .2s,transform .2s}
.hero img{grid-row:1/3;width:53px!important;height:58px!important;object-fit:contain;margin:0!important;filter:drop-shadow(0 3px 5px #0009)}
.hero b{font-size:14px;color:#e9e4d7}.hero small{font-size:10px;color:#8c9ba4!important;align-self:start;margin-top:4px}
.hero.sel{border-color:#bd9a53!important;background:#26302ee0!important}.hero:hover{transform:translateY(-2px);border-color:#d9b66d!important}
.diffrow{justify-content:flex-start!important;gap:6px!important;margin:16px 0!important}.diff{border-radius:5px!important;background:#15212aa8!important;border:1px solid #34414a!important;font-size:11px!important;padding:8px 12px!important;box-shadow:none!important;color:#b7c0c3!important}.diff.sel{color:#efce87!important;border-color:#a5884d!important;background:#3c3426!important}
.tipline{font-size:11px!important;line-height:1.8!important;color:#b0b7b8!important;max-width:390px;margin:17px 0!important}
.enterrow{text-align:left!important;justify-content:flex-start!important;margin:20px 0!important}.enter{width:100%;max-width:385px;background:linear-gradient(110deg,#ead09a,#c29b56)!important;color:#1d241f!important;border:1px solid #f0d49c!important;border-radius:5px!important;box-shadow:0 8px 32px #9c702622!important;font-size:13px!important;text-transform:uppercase;letter-spacing:2px;font-weight:800!important;padding:16px!important}.enter:disabled{opacity:.45}.enter:hover:not(:disabled){filter:brightness(1.12);transform:translateY(-1px)}
.menurow{justify-content:flex-start!important;gap:8px!important;margin:10px 0!important}.menubtn{border-radius:5px!important;padding:10px 13px!important;font-size:11px!important;background:#101f2aa8!important;border:1px solid #38444c!important;color:#c0c8c8!important}.menubtn.reset{font-size:9px!important;border:0!important;background:transparent!important;opacity:.5;padding-left:0!important}.menubtn.daily{color:#d9c99e!important}
#accountview{background:linear-gradient(90deg,#070f18ed,#070f18a3 50%,#070f1844)!important;align-items:center;justify-content:flex-start!important;padding-left:7vw!important}
.acpanel{background:#0b1521e8!important;border:1px solid #435058!important;border-radius:12px!important;box-shadow:0 30px 100px #0009!important;backdrop-filter:blur(16px);padding:30px!important}.acpanel h1{font-family:Georgia,serif;font-weight:normal;color:#efe1c2!important;font-size:30px!important}.acwho{font-size:11px!important;margin-bottom:22px!important}.slot{background:#14232be0!important;border-color:#3c494e!important;border-radius:7px!important;transition:background .2s}.slot:hover{background:#25373ee8!important;border-color:#bc9d62!important}.slotno{color:#c6ad75!important;font-size:10px!important}.slotmain{font-size:15px!important}.slotgo{font-size:10px!important;color:#bbc4c5!important}.acver{color:#7e909c!important;font-size:9px!important;letter-spacing:1.8px}.aclogout{display:none}
#hud{display:none;top:26px;left:28px;max-width:350px;border:1px solid #7f8d963a;border-radius:9px;background:linear-gradient(130deg,#101d2deb,#0b1621dd);padding:16px 18px;backdrop-filter:blur(16px);box-shadow:0 12px 50px #0005}
.playing #hud{display:block}.playing #edition{display:none}.hud-title{font-size:10px;letter-spacing:1.5px;margin-bottom:11px;color:#e6c58c}.hud-hp{margin-bottom:10px}.hpbar{height:7px;border:0;background:#28313b}.hpfill{background:linear-gradient(90deg,#963f44,#ef8173);box-shadow:none}.hpnum{font-size:10px}.chip{border:0;background:transparent;padding:1px 7px 1px 0;font-size:10px}.hud-eq{font-size:10px;color:#9cabb4;line-height:1.8}.hud-chips{gap:4px}.hud-spark{font-size:10px}
#sceneInfo{display:none;position:absolute;z-index:8;top:26px;left:50%;transform:translateX(-50%);text-align:center;pointer-events:none;color:#e2d7be;text-shadow:0 2px 8px #000}
.playing #sceneInfo{display:block}#sceneInfo span{font-size:8px;letter-spacing:3px;display:block;color:#b8a16e}#sceneInfo b{font:normal 18px Georgia,serif;display:block;margin:7px 0}#sceneInfo small{font-size:8px;letter-spacing:2px;color:#a4afb4}
#mini3d{display:none;position:absolute;right:24px;top:86px;z-index:8;border:1px solid #52636a50;border-radius:7px;background:#0c1720ba;backdrop-filter:blur(8px)}
#viewTools{position:absolute;right:26px;bottom:26px;z-index:10;display:flex;gap:8px}#viewTools button{color:#cfcec4;background:#15232dcc;border:1px solid #48575e;border-radius:5px;padding:9px 12px;cursor:pointer;font:12px 'Segoe UI',sans-serif}#viewTools span{font-size:10px;margin-left:6px}
#btn-exit,#btn-mute,#fsbtn{border-radius:6px!important;width:36px!important;height:34px!important;top:26px!important;background:#111e2bd9!important;border-color:#52626a70!important;font-size:15px!important}#btn-mute{right:25px!important}#fsbtn{right:69px!important}#btn-exit{right:113px!important}
#controls{display:none}.playing #controls{display:flex}.btn{border-radius:7px!important;background:linear-gradient(145deg,#21313dda,#101c27ee)!important;border:1px solid #697b864d!important;box-shadow:0 5px 14px #0004!important;font-size:19px;color:#d7cfbb;backdrop-filter:blur(6px)}.btn small{font-size:9px!important;font-weight:500!important;letter-spacing:.5px;color:#a3b0b7!important}.btn:active{background:#806a35!important}.btn.skill{font-size:18px;border-color:#a18b524d!important}.btn.ready{box-shadow:inset 0 0 20px #ccae3220!important}#dpad{gap:4px!important}#actions{gap:6px!important}.act{width:54px!important;height:50px!important}#abilitybar{margin-bottom:8px!important;gap:8px!important}
#log{display:none;left:28px;bottom:32px;width:340px;max-height:125px;overflow:hidden;padding:0!important;background:linear-gradient(90deg,#0c1621c9,transparent);font-size:11px!important;line-height:1.8!important;text-shadow:0 2px 5px #000;mask-image:linear-gradient(0deg,#000 70%,transparent)}.playing #log{display:block}
#modelStatus{position:absolute;bottom:8px;left:50%;transform:translateX(-50%);color:#acb6bb;font-size:9px;letter-spacing:1px;z-index:25;pointer-events:none}#modelStatus a{pointer-events:auto;color:#e8c681}
#guide3d[hidden]{display:none}#guide3d{position:absolute;inset:0;z-index:30;background:#060e18cf;display:grid;place-items:center;backdrop-filter:blur(14px);padding:20px}#guide3d section{max-width:510px;max-height:90vh;overflow:auto;padding:30px;background:#13202c;border:1px solid #4d5a60;border-radius:12px}#guide3d h2{font:normal 35px Georgia;margin:15px 0}#guide3d p{font-size:12px;line-height:1.7;color:#bac1c4}#guide3d dl{display:grid;grid-template-columns:135px 1fr;gap:13px;font-size:11px;margin:25px 0}#guide3d dt{color:#e0c185}#guide3d dd{color:#b1bec5}.quality{display:flex;justify-content:space-between;font-size:12px;padding:20px 0}.quality select{background:#1f303c;color:#d5dedf;border:1px solid #5a6b77;padding:7px;border-radius:4px}.guide-actions{display:flex;gap:18px;align-items:center}.guide-actions button{padding:12px;background:#d5b274;border:0;border-radius:4px;color:#142332;cursor:pointer}.guide-actions a{font-size:10px;color:#a6b7c3}
.panel:not(.compact),.ipanel,.bookpanel,.prep,.preppanel{background:linear-gradient(145deg,#15232ff5,#0b1520fa)!important;border:1px solid #63727b60!important;border-radius:12px!important;box-shadow:0 25px 100px #0008!important}
#overlay:has(.prep){justify-content:center}#overlay:has(.prep)>.panel,#overlay:has(.prep)>.prep{max-width:min(760px,95vw)}
#inventory,#bookview,#mapview{backdrop-filter:blur(9px);background:#050c16bd!important}
#loading{background:#080f18;letter-spacing:3px;font-size:11px;color:#d3b276}
@keyframes impact{0%{filter:brightness(1.25)}100%{filter:none}}.impact{animation:impact .23s ease-out}
@media (min-width:900px) and (pointer:fine){#dpad{display:none!important}#controls{bottom:25px!important;left:50%!important;right:auto!important;transform:translateX(-50%);align-items:center!important}#abilitybar{justify-content:center!important}.btn.skill{width:49px!important;height:45px!important}#actions{display:flex!important}.btn.act{width:52px!important;height:47px!important}}
@media (max-width:900px){#hud{left:15px;top:16px;max-width:270px;padding:10px 12px}#sceneInfo{display:none!important}#mini3d{width:130px;height:94px;right:15px;top:70px}#log{left:16px;bottom:235px;width:270px;max-height:70px;font-size:10px!important}#viewTools{right:16px;bottom:230px}#edition{left:20px;font-size:9px}#overlay>.panel.compact{max-width:49vw}.game-title{font-size:56px!important}.game-title span{font-size:31px}.hero{padding:7px!important;grid-template-columns:40px 1fr}.hero img{width:37px!important}.hero b{font-size:12px}.hero small{font-size:9px}.diff{padding:7px!important;font-size:10px!important}.tipline{font-size:10px!important}.acpanel{max-width:85vw!important}#accountview{padding-left:5vw!important}}
@media (max-width:600px){#cinemaShade{background:linear-gradient(0deg,#07111afa 5%,#07111aee 48%,#07111a11 90%)}#overlay{padding:170px 24px 18px;align-items:flex-end;overflow:auto}#overlay>.panel.compact{max-width:100%;width:100%}.game-title{font-size:43px!important;margin-top:9px!important}.game-title span{font-size:29px;display:inline;margin-left:9px}.game-title em{font-size:10px;margin-top:12px}.eyebrow{font-size:8px}.version{font-size:8px!important;margin-bottom:10px!important}.herorow{margin:10px 0!important}.hero{max-width:48%;width:170px!important}.hero img{height:42px!important}.diffrow{margin:10px 0!important}.tipline{margin:8px 0!important;line-height:1.5!important}.enterrow{margin:12px 0!important}.enter{max-width:100%;padding:12px!important}.menurow{margin:5px 0!important}.menubtn{padding:8px 10px!important}.menurow:has(.reset){display:none}#viewTools{bottom:235px;gap:4px}#viewTools button{padding:7px}#viewTools span{display:none}#edition{top:20px;max-width:60%;font-size:8px;letter-spacing:1px}#btn-exit,#btn-mute,#fsbtn{top:18px!important;width:28px!important;height:28px!important}#btn-mute{right:14px!important}#fsbtn{right:47px!important}#btn-exit{right:80px!important}#hud{top:15px;left:12px;max-width:calc(100vw - 135px);padding:9px;font-size:9px}.hud-title{font-size:8px;letter-spacing:.3px}.hud-eq{font-size:8px}.chip{font-size:8px}.hpnum{font-size:8px}#mini3d{top:60px;width:105px;height:76px;right:12px}#accountview{justify-content:center!important;padding:20px!important}.acpanel{padding:22px!important;max-width:95vw!important;width:100%!important}.acpanel h1{font-size:26px!important}#log{bottom:225px;font-size:9px!important;max-height:50px;width:75%}#guide3d section{padding:22px}#guide3d dl{grid-template-columns:112px 1fr;gap:10px;font-size:10px}}
@media (max-height:700px) and (min-width:601px){.game-title{font-size:49px!important;margin-top:10px!important}.game-title span{font-size:32px}.game-title em{margin-top:10px}.version{margin-bottom:12px!important}.herorow{margin:10px 0!important}.tipline{margin:10px 0!important}.enterrow{margin:10px 0!important}#overlay{padding-top:65px}.hero img{height:43px!important}}
#overlay:has(.builder){justify-content:center;padding:65px 20px 25px;background:#08121caf!important;backdrop-filter:blur(8px)}
#overlay>.builder{max-width:min(740px,94vw);width:740px}.builder .bhead h1{font-family:Georgia,serif;font-weight:normal;color:#e5cf9e}.builder .pcell{background:#152630;border-color:#53626a55;border-radius:8px}.builder .pcell.sel{border-color:#c3a465;background:#353c33}.builder .enter{max-width:240px}.builder .bfoot{gap:20px;align-items:center}.builder .bfoot .enter{width:auto;min-width:180px;font-size:11px!important}
.playing #sceneInfo{max-width:33vw}.playing #log .magic{color:#bda7de!important}.playing #log .dim{color:#9dabb5!important}.playing #log .good{color:#a8d4bb!important}
@media (max-width:1100px){#sceneInfo{display:none!important}}
body:not(.playing) #viewTools{display:none}
@media(max-width:600px){.playing #viewTools{bottom:300px}.playing #log{bottom:285px;max-height:52px}.game-title span{display:block!important;margin-left:0!important;font-size:28px!important}.game-title{font-size:44px!important}.hero small{letter-spacing:.2px!important}}
/* Keep text at native resolution when only the 3D buffer is downscaled. */
.performance-mode #hud,.performance-mode .btn,.performance-mode #guide3d,.performance-mode .acpanel{backdrop-filter:none!important}
#fsbtn{min-width:44px;min-height:44px;touch-action:manipulation;top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right))}
#fsbtn:focus-visible{outline:2px solid #efd68c;outline-offset:3px}
#fullscreenNotice{position:fixed;z-index:100;left:50%;bottom:max(20px,env(safe-area-inset-bottom));transform:translateX(-50%);max-width:85vw;background:#122331;color:#f1dfb8;border-radius:8px;padding:12px 18px;pointer-events:none;font-size:13px}
#fullscreenNotice:empty{display:none}
.expanded-game #stage{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important}
html:fullscreen #stage{width:100vw;height:100dvh}
#btn-exit,#btn-mute,#fsbtn{width:44px!important;height:44px!important;top:max(12px,env(safe-area-inset-top))!important}
#btn-mute{right:max(12px,env(safe-area-inset-right))!important}#fsbtn{right:calc(max(12px,env(safe-area-inset-right)) + 48px)!important}#btn-exit{right:calc(max(12px,env(safe-area-inset-right)) + 96px)!important}
@media(max-width:600px){#hud{max-width:calc(100vw - 165px)}}
body>#fsbtn{position:fixed;z-index:110}
