:root{color-scheme:dark;--gold:#e5c792;--ink:#112c2bdb;--line:#e7d3a42e;--muted:#bfcfc8}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}body{margin:0;background:#122b2b;color:#f5eedf;font:15px system-ui,-apple-system,sans-serif;overflow:hidden;touch-action:none;user-select:none}button{font:inherit;color:inherit;cursor:pointer;border:1px solid var(--line);background:var(--ink);touch-action:manipulation;transition:background .15s,transform .15s}button:active{transform:scale(.95);background:#496b60}button:focus-visible{outline:2px solid var(--gold);outline-offset:3px}button:disabled{opacity:.4;cursor:default}canvas#world{display:block;width:100vw;height:100dvh;touch-action:none}#hud{position:fixed;inset:0;pointer-events:none;padding:max(16px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))}#hud:before{content:"";position:absolute;inset:0;background:linear-gradient(#081e254d,transparent 23%,transparent 67%,#061e2859);z-index:-1;pointer-events:none}#hud button,#joystick{pointer-events:auto}header{display:flex;align-items:center;justify-content:space-between;height:38px}.brand{display:flex;align-items:center;gap:9px;text-shadow:0 2px 8px #102b23}.brand b{font:700 20px Georgia,serif;letter-spacing:3px}.brand small{display:block;font-size:10px;letter-spacing:1.7px;margin-top:4px;color:#e0e8d8}.crest{font-size:32px;color:var(--gold);line-height:1}.headerActions{display:flex;gap:6px}.square{width:38px;height:38px;border-radius:50%;font-size:21px;background:#123331b8;backdrop-filter:blur(8px)}.stats{position:absolute;top:76px;left:18px;width:176px;padding:10px 12px;border:1px solid var(--line);background:linear-gradient(110deg,#0e282add,#163432b0);border-radius:12px;box-shadow:0 4px 20px #0c211925}.stats>div{display:flex;align-items:center;gap:8px;margin-bottom:6px}.stats span{color:#f39f8b;font-size:15px}.stats b{font-size:12px;min-width:23px;font-variant-numeric:tabular-nums}.track{height:5px;background:#061d2080;border-radius:5px;overflow:hidden;flex:1}.track i{display:block;height:100%;background:linear-gradient(90deg,#dc735e,#f2b086);width:100%;transition:width .2s}.mana{color:#8bdddd!important}#energy{background:linear-gradient(90deg,#488ea8,#83d7d3)}.stats small{font-size:10px;color:#e5d4b5;letter-spacing:.5px}#compass{position:absolute;top:29px;left:50%;transform:translateX(-50%);font-size:11px;letter-spacing:2px;color:#e5e8dd;text-shadow:0 2px 5px #0008;white-space:nowrap}.quest{position:absolute;top:77px;right:18px;width:220px;text-align:left;padding:11px 14px;background:linear-gradient(110deg,#112e2dd9,#12352cb3);border:1px solid var(--line);border-radius:12px;box-shadow:0 4px 20px #0c211925}.quest>span{font-size:9px;letter-spacing:1.7px;color:var(--gold)}.quest b,.quest small{display:block;margin-top:5px}.quest b{font:17px Georgia,serif}.quest small{font-size:12px;color:#d2ded0;line-height:1.4}.quest .track{margin-top:9px;height:2px}.quest i{background:var(--gold)}#toast,#skillNotice{position:absolute;left:50%;transform:translateX(-50%);text-align:center;opacity:0;transition:opacity .3s;pointer-events:none;width:max-content;max-width:calc(100vw - 40px);font-size:12px;color:#fcf4e4;text-shadow:0 1px 4px #0005}#toast{top:182px;background:#13332fdf;border:1px solid #d0d9b92a;border-radius:20px;padding:8px 16px;box-shadow:0 4px 20px #071b2025}#skillNotice{top:221px;padding:5px 12px;background:#113531a6;border-radius:6px;border-bottom:1px solid #b8d88d80}#target{position:absolute;bottom:250px;left:50%;transform:translateX(-50%);text-shadow:0 2px 5px #000,0 0 15px #0009;font-size:13px;text-align:center;color:#fff3d9;width:70vw}#resources{position:absolute;bottom:94px;left:50%;transform:translateX(-50%);display:flex;gap:17px;background:#0e2c2ba6;padding:8px 15px;border:1px solid var(--line);border-radius:20px;color:var(--gold);font-size:12px;backdrop-filter:blur(8px)}#resources b{color:#fff2d8;margin-left:4px;font-variant-numeric:tabular-nums}nav{position:absolute;bottom:max(20px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;gap:3px;padding:5px;background:linear-gradient(#163c36b3,#102e2be6);border:1px solid var(--line);border-radius:18px;backdrop-filter:blur(12px);box-shadow:0 8px 20px #06201c44}nav button{width:58px;height:51px;border-radius:12px;font-size:22px;background:none;border-color:transparent}nav button:active{background:#e5c79222}nav small{display:block;font-size:12px;color:#dce3d4;margin-top:2px}#joystick{position:absolute;bottom:103px;left:35px;border-radius:50%;width:108px;height:108px;border:1px solid #e9e3c747;background:radial-gradient(circle,#133b3933 47%,#e3ebce1a 48%,#132f353f 51%,#142e3430);touch-action:none;box-shadow:inset 0 0 20px #0c25362b}#stick{position:absolute;width:44px;height:44px;left:31px;top:31px;border:1px solid #f0e2b38a;background:linear-gradient(140deg,#c7ccb356,#284c4680);border-radius:50%;box-shadow:0 3px 14px #031d282b,inset 0 0 10px #e2d8a51c;pointer-events:none}#actions{position:absolute;right:30px;bottom:100px;width:145px;height:151px}#actions button{border-radius:50%;position:absolute;display:flex;align-items:center;justify-content:center;flex-direction:column;box-shadow:0 5px 18px #08282940;backdrop-filter:blur(5px)}#actions small{font-size:11px;line-height:1.2;margin-top:2px}#act{width:78px;height:78px;right:0;bottom:0;font-size:30px;border:1px solid #efd59a;background:linear-gradient(135deg,#85704dd9,#384a3fd9);box-shadow:0 0 0 4px #e9cd9420!important}#magic,#dodge{width:54px;height:54px;font-size:22px;background:#123d38b3;border-color:#bfd8c055}#magic{right:7px;top:0;color:#b0ecea}#dodge{left:0;bottom:12px}#cameraControls{position:absolute;right:18px;top:45%;display:flex;flex-direction:column;gap:5px}#cameraControls button{width:36px;height:36px;border-radius:50%;font-size:21px;background:#153a3659;border-color:#e3e4ce38;color:#f1eddb}.bottomHint{position:absolute;bottom:5px;left:50%;transform:translateX(-50%);font-size:9px;letter-spacing:1px;opacity:.6;white-space:nowrap}.overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;padding:20px;background:#061b2394;backdrop-filter:blur(9px);z-index:10}.hidden{display:none!important}.welcome{text-align:center;max-width:450px;width:100%;padding:25px 20px}.eyebrow{font-size:10px;letter-spacing:3px;color:var(--gold)}.bigRune{display:block;font-size:82px;color:var(--gold);line-height:1.4;text-shadow:0 0 40px #ecca6b44}.welcome h1{font:40px Georgia,serif;letter-spacing:5px;margin:5px 0}.subtitle{font-size:12px!important;color:var(--gold);margin:12px 0 25px!important}.welcome p{font-size:16px;line-height:1.7;color:#dee7dc}.primary{border:1px solid #edd19c;background:linear-gradient(120deg,#e1c187,#b49b65);color:#192e2b;padding:16px 24px;font-weight:700;border-radius:9px;width:100%;font-size:16px}.primary span{float:right}.instructions{display:flex;justify-content:space-around;margin:25px 0;color:var(--gold);font-size:25px}.instructions small{display:block;font-size:12px;color:#d4dccf;margin-top:7px}.note{font-size:11px;line-height:1.8;color:#acbfb6}.panel{position:relative;width:450px;max-width:100%;max-height:85dvh;overflow:auto;background:linear-gradient(145deg,#183c38f5,#0d272df5);border:1px solid #a3b0954d;border-radius:20px;padding:26px;box-shadow:0 20px 100px #0007;touch-action:pan-y}.close{position:absolute;right:12px;top:12px;border:1px solid #d4e2c822;font-size:25px;background:#102c2d80;width:35px;height:35px;border-radius:50%}.panel h2{font:27px Georgia,serif;color:var(--gold);margin:0 24px 8px 0}.panel p{font-size:14px;color:#c2d3c9;line-height:1.6}.recipe{display:flex;justify-content:space-between;align-items:center;padding:15px 0;border-bottom:1px solid #ffffff12;gap:12px}.recipe small{display:block;color:#b9cbbd;font-size:12px;margin-top:5px}.recipe button{padding:10px 12px;border-radius:8px;min-width:70px;color:var(--gold)}.items{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:20px 0}.item{padding:16px;background:#2e51454d;border:1px solid #d8dfbd17;border-radius:12px}.item b{display:block;font-size:24px;color:var(--gold)}#mapCanvas{width:100%;aspect-ratio:1;border-radius:12px;margin-top:15px}.muted{color:#a9bfb2;font-size:12px}#boss{display:none;position:absolute;top:270px;left:50%;transform:translateX(-50%);width:min(340px,75vw);text-align:center;text-shadow:0 2px 5px #000}#boss small{font-size:9px;letter-spacing:2px;color:#efb899}#boss b{display:block;font:20px Georgia,serif;margin:6px}#boss .track{height:6px}#bossHealth{background:linear-gradient(90deg,#c45a49,#f2ad74)}.skillCard{background:#2a4c3f59;border:1px solid #e1e3c914;border-radius:12px;padding:15px;margin:12px 0}.skillHead{display:flex;gap:10px;align-items:center;margin-bottom:10px}.skillHead>span{font-size:25px;color:var(--skill);width:29px}.skillHead>b{font-size:16px}.skillHead>strong{margin-left:auto;color:var(--skill);font-size:25px}.skillHead strong small{font-size:12px;color:#aabdb0;margin-left:4px}.skillCard .track{height:5px}.skillCard i{background:var(--skill)}.skillCard>small{font-size:12px;color:#b1c5b8;display:block;margin-top:7px}.skillCard p{margin:8px 0;font-size:14px}.skillCard em{font-size:13px;color:var(--skill);font-style:normal}
@media(max-width:600px) and (orientation:portrait){#hud{padding-left:14px;padding-right:14px}.brand b{font-size:17px;letter-spacing:2px}.brand small{font-size:9px;letter-spacing:1px}.crest{font-size:29px}.square{width:36px;height:36px}#compass{display:none}.stats{left:14px;top:67px;width:158px;padding:8px 10px}.stats>div{margin-bottom:4px}.stats small{font-size:9px}.quest{left:14px;right:14px;top:145px;width:auto;padding:9px 12px;border-radius:10px;background:linear-gradient(90deg,#14392bd9,#17383380)}.quest>span{font-size:8px;letter-spacing:1px}.quest b{font:15px Georgia,serif;margin-top:3px;padding-right:10px}.quest small{display:none}.quest .track{height:2px;margin-top:7px}#resources{top:69px;bottom:auto;left:auto;right:14px;transform:none;display:grid;grid-template-columns:1fr 1fr;gap:7px 13px;padding:10px 12px;border-radius:12px;font-size:12px;background:#17342c91}#toast{top:216px;padding:7px 13px;font-size:12px}#skillNotice{top:252px;font-size:12px;padding:4px 8px}#boss{top:292px;width:75vw}#boss b{font-size:18px}#cameraControls{right:13px;top:43%}#cameraControls button{width:34px;height:34px;font-size:20px}nav{bottom:max(12px,env(safe-area-inset-bottom));padding:4px;gap:0;border-radius:16px}nav button{width:54px;height:49px;font-size:22px}nav small{font-size:11px}#joystick{left:24px;bottom:98px;width:100px;height:100px}#stick{left:27px;top:27px}#actions{right:23px;bottom:95px;width:135px;height:146px}#act{width:74px;height:74px}#magic,#dodge{width:51px;height:51px}#actions small{font-size:10px}#target{bottom:255px;font-size:12px}.bottomHint{display:none}.welcome h1{font-size:34px}}
@media(orientation:landscape) and (max-height:600px){#hud{padding-top:max(10px,env(safe-area-inset-top));padding-left:max(18px,env(safe-area-inset-left));padding-right:max(18px,env(safe-area-inset-right))}.brand b{font-size:16px}.brand small{font-size:9px}.crest{font-size:28px}.square{width:34px;height:34px}.stats{top:61px;left:max(18px,env(safe-area-inset-left));width:153px;padding:7px 10px}.stats>div{margin-bottom:4px}.stats small{font-size:9px}.quest{top:59px;right:max(18px,env(safe-area-inset-right));width:193px;padding:9px 11px}.quest b{font-size:15px}.quest small{display:none}.quest>span{font-size:8px}.quest .track{margin-top:6px}#compass{top:20px;font-size:10px;letter-spacing:1px}#cameraControls{top:136px;right:max(18px,env(safe-area-inset-right));flex-direction:row}#cameraControls button{width:33px;height:33px;font-size:19px}#skillNotice{top:92px;font-size:11px;max-width:40vw}#toast{top:56px;max-width:40vw;font-size:11px;padding:6px 12px}#joystick{bottom:max(22px,env(safe-area-inset-bottom));left:max(28px,env(safe-area-inset-left));width:100px;height:100px}#stick{left:27px;top:27px}#actions{bottom:max(22px,env(safe-area-inset-bottom));right:max(24px,env(safe-area-inset-right));width:128px;height:138px}#act{width:71px;height:71px}#magic,#dodge{width:49px;height:49px}#actions small{font-size:10px}nav{bottom:max(12px,env(safe-area-inset-bottom));padding:3px;gap:0}nav button{width:49px;height:44px;font-size:20px}nav small{font-size:10px}#resources{bottom:75px;font-size:11px;padding:5px 12px}#boss{top:128px;width:35vw}#boss b{font-size:16px}#boss small{font-size:8px}#target{bottom:112px;font-size:12px}.bottomHint{display:none}.panel{max-height:90dvh}.welcome{padding:0;max-width:390px}.bigRune{font-size:40px}.welcome h1{font-size:29px}.welcome p{margin:8px;font-size:14px}.subtitle{margin:5px!important}.instructions{margin:12px}.eyebrow,.note{display:none}}
@media(orientation:portrait) and (max-height:650px){.stats{top:61px}.quest{top:132px}#toast{top:195px}#skillNotice{top:229px}#boss{top:259px}#joystick{bottom:83px}#actions{bottom:80px}#target{bottom:230px}.bigRune{font-size:55px}.welcome h1{font-size:29px}.welcome p{font-size:14px}.instructions{margin:15px 0}}
/* Classic adventure interface: stone frames, readable slots and a round world map. */
:root{--gold:#e7ce87;--ink:#383c31ed;--line:#aa9b714f;--muted:#d0ccb5}body{font-family:Verdana,system-ui,sans-serif}.brand b{font-family:Georgia,serif;color:#f1dc9d;letter-spacing:2px}canvas#world{image-rendering:pixelated}.square{border-radius:6px;background:linear-gradient(#676451,#393d32);border:2px solid #9b9070;box-shadow:inset 0 0 0 1px #25291f;backdrop-filter:none}.stats,.quest{background:linear-gradient(120deg,#444b38f0,#30382be6);border:2px solid #a0916a;border-radius:4px;box-shadow:inset 0 0 0 1px #21261c,0 3px 6px #0004}.quest b{font-family:Verdana,sans-serif;font-size:14px;color:#f3e59b}.quest small{color:#eee2c9}.stats .track{border:1px solid #20251e;height:7px;border-radius:0}.track i{border-radius:0}#resources{border:1px solid #958a68;border-radius:3px;background:#373e2bd9;backdrop-filter:none}#resources .goldCount{color:#ead37f}.goldCount b{color:#fff07c}#toast{background:#2e342cef;border:1px solid #a08f65;border-radius:3px;color:#f6df91}#skillNotice{background:#343c2cb5;border-radius:2px}nav{background:linear-gradient(#706b55,#3e4435);border:3px solid #9e9478;border-radius:5px;box-shadow:inset 0 0 0 1px #2a2e24;backdrop-filter:none}nav button{border:1px solid #2b3028;border-radius:3px;background:linear-gradient(#625f4d,#454939)}nav button:active{background:#857b53}nav small{color:#f2e6c7}#act{border-radius:12px!important;border:2px solid #c9b26e;background:linear-gradient(#807650,#4c513b);box-shadow:inset 0 0 0 2px #2c3027!important}#magic,#dodge{background:linear-gradient(#575f4d,#2f3e34);border:2px solid #9a936f;box-shadow:inset 0 0 0 1px #2e3327!important;backdrop-filter:none!important}#cameraControls button{background:#3e473887;border-color:#d3c99b65}.panel{background:linear-gradient(125deg,#565844,#353f30);border:4px solid #a89b79;border-radius:5px;box-shadow:inset 0 0 0 2px #292f25,0 20px 60px #0008}.panel h2{color:#ffdf76;font-family:Georgia,serif}.panel p{color:#e2decc}.panel h3{font-size:17px;color:#f0d996;margin:20px 0 9px}.primary{background:linear-gradient(#998c59,#69683f);color:#fff4d0;border:2px solid #c0aa6d;border-radius:4px;text-shadow:0 1px #332d1b}.close{border-radius:3px;background:#3b4233;border-color:#c0b48a}.recipe{border-color:#a2936b36}.recipe button,.storageRow button,.menuTabs button,.mapTargets button,.tradeActions button{background:linear-gradient(#716e50,#474e37);border:1px solid #a1956d;border-radius:3px;padding:9px 10px;color:#ffeaab;font-size:13px}.recipe small{color:#d5d6bf}.recipe .missing{color:#ffb29c}.menuTabs{display:flex;gap:7px;margin:16px 0;flex-wrap:wrap}.menuTabs button{flex:1;min-height:41px}.menuTabs button[aria-pressed=true]{background:#998d55;color:#fff8c6;box-shadow:inset 0 -3px #e9cf77}.objectiveCard{border:1px solid #a69a6e;padding:15px;background:#77754b27;margin:14px 0}.objectiveCard h3{margin:7px 0}.objectiveCard small{font-size:10px;letter-spacing:2px;color:#f1d878}.items{grid-template-columns:repeat(4,1fr);gap:4px}.item{background:#4f5540;border:2px solid #2b3327;border-top-color:#999374;border-left-color:#88866b;border-radius:2px;min-height:84px;padding:10px 6px;display:flex;flex-direction:column-reverse;justify-content:space-between;font-size:11px;text-align:center}.item b{font-size:23px;color:#fff281}.skillCard{border-radius:3px;background:#2c3a2b55;border:1px solid #a199703f}.skillCard p{color:#d2d7c2}.storageRow{display:flex;gap:6px;align-items:center;padding:11px 0;border-bottom:1px solid #b9a97824}.storageRow>div{flex:1}.storageRow small{display:block;font-size:12px;color:#d6d4b8;margin-top:5px}.storageRow button{min-width:45px}.tradeActions{display:flex;flex-direction:column;gap:5px}.mapTargets{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:12px}.mapTargets button{text-align:left}.mapTargets small{display:block;font-size:11px;margin-top:5px;color:#ded7b6}#mapCanvas{border:3px solid #a99c70;border-radius:2px}.quickEat{position:absolute;bottom:161px;left:157px;width:45px;height:45px;border:2px solid #a4966c;border-radius:50%;background:#3b4933df;color:#eeaf90;font-size:19px}.quickEat small{display:block;font-size:10px;color:#f0e8c7}#waypoint{position:absolute;top:151px;left:50%;transform:translateX(-50%);display:flex;gap:8px;align-items:center;max-width:90%;font-size:12px;color:#ffeda8;text-shadow:0 2px 4px #142112;padding:5px 9px;background:#2431268c;border-radius:3px;pointer-events:none}#waypointArrow{color:#ffdb79;display:inline-block;font-size:15px}#miniMapButton{position:absolute;right:18px;top:72px;width:102px;height:102px;padding:0;border:5px ridge #a29673;border-radius:50%;overflow:hidden;background:#73784e;box-shadow:0 3px 8px #0005}#minimap{display:block;width:100%;height:100%;image-rendering:pixelated}.quest{right:134px;width:225px}.stats{width:170px}#toast{top:187px}#skillNotice{top:225px}
@media(orientation:portrait) and (max-width:600px){#miniMapButton{right:14px;top:67px;width:89px;height:89px}.stats{width:157px;top:67px}.quest{top:138px;left:14px;right:auto;width:calc(100% - 126px);padding:8px 10px;min-height:47px}.quest>span{display:none}.quest b{margin:0;font-size:13px;line-height:1.3}.quest .track{margin-top:6px}#resources{top:auto;bottom:82px;right:auto;left:50%;transform:translateX(-50%);display:flex;gap:11px;padding:5px 9px;font-size:11px;white-space:nowrap}#waypoint{top:198px;font-size:11px;white-space:nowrap;max-width:95%}#toast{top:232px;max-width:90%;font-size:11px}#skillNotice{top:267px;font-size:11px}#boss{top:302px}nav{padding:3px;bottom:max(12px,env(safe-area-inset-bottom))}nav button{width:52px;height:47px}#joystick{bottom:119px}#actions{bottom:119px}.quickEat{left:137px;bottom:123px;width:43px;height:43px}#target{bottom:280px;font-size:11px}#cameraControls{top:44%}}
@media(orientation:landscape) and (max-height:600px){#miniMapButton{top:60px;right:18px;width:82px;height:82px}.quest{top:61px;right:112px;width:186px}.stats{width:152px;top:61px}#waypoint{top:123px;left:50%;font-size:11px;padding:4px 8px}#toast{top:155px;max-width:42vw}#skillNotice{top:185px}#cameraControls{top:152px;right:18px}#resources{bottom:75px}#boss{top:215px;width:40vw}.quickEat{left:140px;bottom:25px;width:44px;height:44px}nav{bottom:max(12px,env(safe-area-inset-bottom))}nav button{width:47px}.quest>span{display:none}.quest b{font-size:12px}.quest .track{margin-top:5px}}

#modalFeedback:not(:empty){position:sticky;top:0;z-index:2;margin:22px 0 12px;padding:12px;border:1px solid #dab273;background:#54412a;color:#ffe4a1;font-size:14px;line-height:1.4}
#combatFeedback{position:absolute;inset:0;pointer-events:none;overflow:hidden}.damageNumber{position:absolute;transform:translate(-50%,-50%);padding:3px 7px;min-width:27px;text-align:center;background:#782f21;border:1px solid #eeab77;color:#fff4b6;border-radius:6px;font:bold 17px Georgia,serif;text-shadow:0 1px 2px #000;box-shadow:0 2px 5px #0005}.damageNumber.magic{background:#1d5367;border-color:#8dd4e5;color:#bff6ff}.damageNumber.hurt{background:#a1342b;color:#fff;border-color:#fa9586}#targetMeter{position:absolute;left:50%;bottom:222px;transform:translateX(-50%);width:116px;display:none;text-align:center;pointer-events:none}#targetMeter .track{height:4px;border:1px solid #f4d99f77}#targetFill{background:#e6c779;width:0}#targetCount{font-size:10px;color:#fff1c3;text-shadow:0 1px 3px #000}#saveState{position:absolute;bottom:8px;right:18px;font-size:9px;color:#e0ddc3;text-shadow:0 1px 4px #000;pointer-events:none}.simpleHud .quest,.simpleHud #resources,.simpleHud #cameraControls,.simpleHud #compass{display:none!important}.headerActions{gap:5px}.headerActions .square{width:35px;height:35px}#target{pointer-events:none}#target:empty{display:none}@media(orientation:portrait) and (max-width:600px){.brand b{font-size:15px;letter-spacing:1px}.brand small{font-size:8px}.brand{gap:6px}.crest{font-size:26px}.headerActions .square{width:33px;height:33px}#targetMeter{bottom:254px}#saveState{bottom:4px;right:12px;font-size:8px}}@media(orientation:landscape) and (max-height:600px){#targetMeter{bottom:92px;width:96px}#saveState{right:180px;bottom:8px;font-size:8px}#targetCount{display:none}}

/* V6: retain the classic stone-and-gold identity with a clearer mobile HUD. */
:root{--gold:#f0d393;--ink:#263a30ee;--line:#d3bd795c}
body{font:16px/1.4 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
canvas#world{image-rendering:auto}
#hud{padding-top:max(14px,env(safe-area-inset-top));padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}
header{height:44px;gap:8px}.brand{gap:8px}.brand b{font-size:20px;letter-spacing:2px}.brand small{font-size:12px;letter-spacing:.8px}.crest{font-size:31px}
.headerActions{gap:6px;flex-shrink:0}.headerActions .square{width:44px;height:44px;border-radius:8px;border-width:1px;background:linear-gradient(#5f6850ee,#303d2eed);font-size:23px}
.stats,.quest{border:1px solid #d5c08a8a;border-radius:8px;background:linear-gradient(130deg,#344835f0,#21362deb);box-shadow:inset 0 1px #ffffdc0d,0 3px 12px #071b2040}
.stats{top:78px;left:max(16px,env(safe-area-inset-left));width:184px;padding:10px 12px}.stats>div{gap:9px;margin-bottom:5px}.stats span{font-size:17px}.stats b{font-size:14px;min-width:28px}.stats small{font-size:12px;letter-spacing:.1px}.stats .track{height:8px;border-radius:3px}.stats .track i{border-radius:3px}
.quest{top:78px;right:136px;width:246px;padding:10px 12px}.quest>span{font-size:12px;letter-spacing:.5px}.quest b{font:600 16px/1.3 system-ui,sans-serif;margin-top:4px;color:#f6df9d}.quest small{font-size:14px;line-height:1.4;margin-top:5px;color:#e1e8d6}.quest .track{height:3px;margin-top:8px;background:#071d20a6;border-radius:3px}
#miniMapButton{top:78px;right:max(16px,env(safe-area-inset-right));width:104px;height:104px;border:4px solid #b9aa7c;box-shadow:0 0 0 2px #26392c,0 4px 16px #0005}
#waypoint{top:190px;font-size:14px;line-height:1.4;max-width:calc(100% - 32px);padding:6px 12px;border:1px solid #dbc99130;border-radius:6px;background:#21372bc9;gap:8px}
#waypointText{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#waypointArrow{font-size:17px;flex-shrink:0}
#toast{top:236px;font-size:14px;line-height:1.4;border-radius:8px;padding:9px 14px;background:#233b2ff0;border-color:#d3bd7966}#skillNotice{top:282px;font-size:14px;line-height:1.4;padding:6px 12px;border-radius:5px;background:#263d2ed9}
#resources{bottom:max(88px,calc(env(safe-area-inset-bottom) + 80px));font-size:14px;gap:14px;padding:7px 12px;max-width:calc(100% - 32px);border-radius:6px;background:#293c2fde}
nav{bottom:max(14px,env(safe-area-inset-bottom));width:min(380px,calc(100% - 32px));display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;padding:5px;border:1px solid #c4af79;border-radius:10px;background:linear-gradient(#4c5b3fea,#293d2ff2);box-shadow:0 4px 14px #061e2966,inset 0 1px #ffffcd12}
nav button{width:100%;height:54px;border:1px solid #d6cb9d22;border-radius:6px;background:linear-gradient(#61704f66,#263a3033);font-size:23px}nav small{font:500 14px/1.2 system-ui,sans-serif;margin-top:3px;color:#f1edd6}
#joystick{width:116px;height:116px;left:max(24px,env(safe-area-inset-left));bottom:max(132px,calc(env(safe-area-inset-bottom) + 120px));border:2px solid #cfdbc05e;background:radial-gradient(circle,#a6b79809 44%,#dce4ba26 46%,#112d314d 49%,#162e344d);box-shadow:inset 0 0 16px #102b3655,0 4px 16px #112a2526}
#stick{width:46px;height:46px;left:33px;top:33px;background:linear-gradient(135deg,#c4d0ae99,#3e6052db);border-color:#e9e4bba3;box-shadow:0 3px 12px #10251f55,inset 0 1px #faffd933}
#actions{width:164px;height:168px;right:max(24px,env(safe-area-inset-right));bottom:max(132px,calc(env(safe-area-inset-bottom) + 120px))}
#actions button{backdrop-filter:none;box-shadow:0 4px 15px #102b2940!important}#actions small{font:600 14px/1.15 system-ui,sans-serif;margin-top:3px}
#act{width:84px;height:84px;font-size:32px;border-radius:15px!important;border:2px solid #e2c780;background:linear-gradient(145deg,#8b8a55,#3b5941);transition:background .15s,transform .15s,box-shadow .15s}
#act.hasTarget{background:linear-gradient(145deg,#b09a5c,#4c6644);box-shadow:0 0 0 4px #f5d88d1a,0 4px 16px #081e2855!important}#actGlyph{line-height:1}
#magic,#dodge{width:64px;height:64px;font-size:26px;border:1px solid #c1d3b280;background:linear-gradient(#476659ee,#263f35ec)}#magic{right:12px;top:0}#dodge{left:0;top:48px;bottom:auto}
#magic::after,#dodge::after{content:"";position:absolute;inset:-4px;border-radius:50%;pointer-events:none;background:conic-gradient(from 180deg,#a9d6bd calc(var(--ready,1) * 1turn),#d4dbc423 0);mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 calc(100% - 2px))}
.quickEat{width:52px;height:52px;left:max(55px,calc(env(safe-area-inset-left) + 32px));bottom:max(266px,calc(env(safe-area-inset-bottom) + 254px));font-size:21px;border:1px solid #cdb989;background:linear-gradient(#52634bee,#283c2eed)}.quickEat small{font-size:14px;line-height:1.2}
#target{bottom:max(322px,calc(env(safe-area-inset-bottom) + 310px));width:max-content;max-width:calc(100% - 32px);padding:5px 12px;border-radius:6px;font-size:14px;line-height:1.4;background:#1b322bad;border:1px solid #e9d6a633}
#targetMeter{bottom:max(284px,calc(env(safe-area-inset-bottom) + 272px));width:142px}#targetMeter .track{height:5px;border-radius:4px}#targetCount{font-size:12px;line-height:1.5}
#cameraControls{top:44%;right:max(14px,env(safe-area-inset-right));gap:8px}#cameraControls button{width:44px;height:44px;font-size:24px;background:#253e33b3;border:1px solid #c4d3ac55}
#compass{top:29px;font-size:12px;letter-spacing:1px}#boss{top:324px}#boss small{font-size:12px;letter-spacing:1px}#boss b{font-size:20px}#boss .track{height:8px;border:1px solid #eab67c6e}
#saveState{font-size:12px;right:max(16px,env(safe-area-inset-right));bottom:2px}.bottomHint{display:none}
.overlay{padding:16px}.panel{width:510px;border:1px solid #c6b381;border-radius:12px;background:linear-gradient(135deg,#3b503aec,#21382df7);padding:24px;max-height:calc(100dvh - 32px);scrollbar-width:thin;scrollbar-color:#bac18a #24382c}
.panel h2{font-size:28px}.panel h3{font-size:19px}.panel p{font-size:16px;line-height:1.6}.panel .close{width:44px;height:44px;border-radius:7px;font-size:29px;right:12px;top:12px}.panel h2{margin-right:48px}.panel button{min-height:44px}
.recipe{padding:17px 0;gap:14px}.recipe b,.storageRow b{font-size:16px}.recipe small,.storageRow small,.mapTargets small{font-size:14px;line-height:1.5}.recipe button,.storageRow button,.menuTabs button,.mapTargets button,.tradeActions button{font-size:14px;border-radius:5px;border-color:#c3b07d6b}
.items{gap:7px}.item{font-size:14px;padding:12px 5px;min-height:95px;border-radius:5px;background:#4b624233}.item b{font-size:25px}.skillCard{border-radius:7px;padding:16px}.skillCard p{font-size:16px}.skillCard>small,.skillCard em{font-size:14px}.skillHead>b{font-size:17px}.muted{font-size:14px}.objectiveCard{border-radius:7px}.objectiveCard small{font-size:12px;letter-spacing:1px}
.welcome{padding:20px;max-width:450px}.welcome h1{font-size:38px}.welcome p{font-size:17px}.instructions small{font-size:14px}.note,.eyebrow{font-size:12px}.primary{border-radius:7px;min-height:52px;background:linear-gradient(#baaa6b,#807746);border-color:#e1c887}

@media (orientation:portrait) and (max-width:600px){
 #hud{padding-top:max(12px,env(safe-area-inset-top));padding-left:14px;padding-right:14px}.brand{gap:6px}.brand b{font-size:16px;letter-spacing:1px}.brand small{font-size:12px;letter-spacing:0}.crest{font-size:28px}.headerActions{gap:5px}.headerActions .square{width:42px;height:42px}
 .stats{top:max(74px,calc(env(safe-area-inset-top) + 60px));left:14px;width:174px;padding:8px 10px}.stats small{font-size:12px}#miniMapButton{top:max(74px,calc(env(safe-area-inset-top) + 60px));right:14px;width:96px;height:96px}
 .quest{top:max(163px,calc(env(safe-area-inset-top) + 149px));left:14px;right:auto;width:calc(100% - 126px);padding:8px 10px}.quest>span{display:none}.quest b{font-size:15px;margin:0;padding:0}.quest small{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:14px;margin-top:4px}.quest .track{margin-top:7px}
 #compass{display:none}#waypoint{top:max(264px,calc(env(safe-area-inset-top) + 250px));font-size:14px;width:max-content}#toast{top:max(302px,calc(env(safe-area-inset-top) + 288px));max-width:calc(100% - 32px);font-size:14px}#skillNotice{top:max(347px,calc(env(safe-area-inset-top) + 333px));font-size:14px}#boss{top:388px;width:75vw}
 #resources{top:auto;right:auto;left:50%;transform:translateX(-50%);display:flex;gap:10px;font-size:14px;padding:6px 10px;white-space:nowrap}
 #joystick{left:22px}#actions{right:22px}.panel{padding:21px}.items{grid-template-columns:repeat(3,minmax(0,1fr))}.welcome h1{font-size:34px}.subtitle{font-size:14px!important}
}
@media (orientation:portrait) and (max-width:359px){.brand b{font-size:15px;letter-spacing:.5px}.brand small{display:none}.crest{font-size:26px}.headerActions .square{width:40px;height:40px}.stats{width:163px}#miniMapButton{width:85px;height:85px}.quest{width:calc(100% - 115px)}#actions{right:14px;width:148px}#joystick{left:14px;width:108px;height:108px}#stick{left:29px;top:29px}#resources{gap:8px;padding:6px 8px}}
@media (orientation:portrait) and (max-height:700px){.bigRune{font-size:48px}.welcome h1{font-size:29px}.welcome p{font-size:15px;margin:9px 0}.instructions{margin:16px 0}.stats{top:66px}.quest{top:153px}#miniMapButton{top:66px}#waypoint{top:250px}#toast{top:288px}#skillNotice{top:330px}#boss{top:365px}#cameraControls{top:46%}}
@media (orientation:landscape) and (max-height:600px){
 #hud{padding-top:max(10px,env(safe-area-inset-top))}.brand b{font-size:17px}.brand small{font-size:12px}.crest{font-size:29px}.headerActions .square{width:42px;height:42px}
 .stats{top:68px;left:max(16px,env(safe-area-inset-left));width:172px;padding:7px 10px}.stats small{font-size:12px}.quest{top:68px;left:auto;right:124px;width:222px;padding:8px 10px}.quest>span{display:none}.quest b{font-size:15px}.quest small{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-size:14px;overflow:hidden}.quest .track{margin-top:6px}#miniMapButton{top:68px;right:max(16px,env(safe-area-inset-right));width:92px;height:92px}
 #waypoint{top:163px;font-size:14px;padding:5px 10px;max-width:48vw}#toast{top:206px;max-width:46vw;font-size:14px}#skillNotice{top:250px;font-size:14px}#compass{top:27px;font-size:12px}#boss{top:160px;width:32vw}#boss b{font-size:17px}#boss small{font-size:12px}
 #joystick{bottom:max(20px,env(safe-area-inset-bottom));left:max(22px,env(safe-area-inset-left))}#actions{bottom:max(20px,env(safe-area-inset-bottom));right:max(22px,env(safe-area-inset-right));height:168px}#act{width:84px;height:84px}#magic,#dodge{width:64px;height:64px}#dodge{top:48px;bottom:auto}.quickEat{left:max(55px,calc(env(safe-area-inset-left) + 32px));bottom:max(151px,calc(env(safe-area-inset-bottom) + 131px));width:52px;height:52px}
 nav{bottom:max(12px,env(safe-area-inset-bottom));width:min(340px,calc(100% - 280px))}nav button{height:50px}nav small{font-size:14px}#resources{bottom:80px;font-size:14px;padding:5px 10px}#target{bottom:135px;font-size:14px;max-width:44vw}#targetMeter{bottom:100px;width:132px}#targetCount{display:block;font-size:12px}#cameraControls{right:max(16px,env(safe-area-inset-right));top:174px;flex-direction:row;gap:6px}#cameraControls button{width:42px;height:42px}#saveState{bottom:2px;right:16px;font-size:12px}
 .welcome{padding:5px;max-width:420px}.bigRune{font-size:38px}.welcome h1{font-size:28px;margin:0}.welcome p{font-size:15px;line-height:1.5;margin:8px 0}.subtitle{font-size:12px!important;margin:5px 0!important}.instructions{margin:13px 0}.instructions small{font-size:14px}.welcome .note,.eyebrow{display:none}.panel{max-height:calc(100dvh - 24px)}
}
@media (orientation:landscape) and (max-height:400px){.quest small{display:none}#waypoint{top:140px}#toast{top:174px}#skillNotice{top:212px}#boss{top:120px}#compass{display:none}#cameraControls{top:148px}.welcome p:not(.subtitle){display:none}.bigRune{font-size:30px}.instructions{margin:9px 0}}
@media (orientation:landscape) and (max-width:640px){.quest{width:180px;right:119px}.stats{width:154px}.stats small{font-size:12px}nav{gap:2px;padding:4px}nav small{font-size:12px}.brand small{display:none}#cameraControls{flex-direction:column;top:168px;right:10px}#cameraControls button{width:36px;height:36px}#waypoint{max-width:42vw}.quest b{font-size:14px}}
@media (prefers-reduced-motion:reduce){button,.track i{transition:none}}

/* Enemy health shares the focused-target panel. */
#targetMeter.enemy #targetFill{background:linear-gradient(90deg,#ad594c,#efa77e)}
#targetMeter.enemy #targetCount{color:#f3c7ad}

/* Camp management and loot use the existing touch-sized game panels. */
.menuTabs{flex-wrap:wrap}
.buildingCard{border:1px solid #c2c89545;background:#18312655;border-radius:7px;padding:14px;margin:12px 0}
.buildingCard b{font-size:18px}.buildingCard small{display:block;color:#d0d8bc;font-size:14px;margin-top:5px}
.buildingActions{display:flex;gap:8px;margin-top:12px}.buildingActions button{flex:1;font-size:14px;border-radius:5px}
.secondary{display:block;width:100%;margin:12px 0;border-radius:6px;font-size:14px}.dangerButton{background:#784636;border-color:#d6a288}
.inventoryGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.inventoryItem{padding:12px;border:1px solid #bfcaa344;border-radius:6px;background:#1c362958;min-width:0}
.inventoryItem>div{display:flex;gap:8px;align-items:start;justify-content:space-between}.inventoryItem b{font-size:15px;line-height:1.4}.inventoryItem strong{color:#f1d593;font-size:19px;font-variant-numeric:tabular-nums}
.inventoryItem small{display:block;font-size:14px;color:#d3dec7;line-height:1.45;margin-top:7px}.inventoryItem button{width:100%;margin-top:10px;border-radius:5px;font-size:14px}
.junkGrid .inventoryItem{background:#55433055;border-color:#bca48755}.junkGrid small{color:#d8c6aa}
.lootRow{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:14px 0;border-bottom:1px solid #cbd39b33}.lootRow>div{min-width:0}.lootRow b{font-size:16px;line-height:1.4}.lootRow span{color:#f0d58e;white-space:nowrap}.lootRow small{display:block;color:#d0dfbf;font-size:14px;line-height:1.45;margin-top:5px}.lootRow.isJunk small{color:#ddbf9e}.lootRow button{min-width:58px;border-radius:5px;font-size:14px}
#placementControls{position:absolute;left:50%;transform:translateX(-50%);bottom:max(12px,env(safe-area-inset-bottom));width:min(470px,calc(100% - 28px));padding:10px 12px;border:1px solid #e1ce914e;background:#1c352eed;border-radius:9px;pointer-events:auto}
#placementControls[hidden]{display:none}#placementControls>b{display:block;font-size:16px}#placementStatus{display:block;font-size:14px;line-height:1.3;color:#c3e4a6;margin:5px 0 9px}#placementStatus.invalid{color:#ffb3a1}
#placementControls>div{display:flex;gap:8px}#placementControls button{flex:1;min-height:44px;font-size:14px;border-radius:5px}#placementControls .primary{margin:0;min-height:44px}
.placing nav,.placing #actions,.placing .quickEat,.placing #resources,.placing #target,.placing #targetMeter,.placing #waypoint,.placing #saveState,.placing #boss,.placing #skillNotice{display:none!important}
.placing #joystick{bottom:max(168px,calc(env(safe-area-inset-bottom) + 156px))}
@media(orientation:landscape) and (max-height:600px){#placementControls{width:min(430px,calc(100% - 280px))}.placing #joystick{bottom:max(20px,env(safe-area-inset-bottom))}}
@media(max-width:359px){.inventoryGrid{grid-template-columns:1fr}#placementControls>b{font-size:15px}}

/* Keep the refuge status visible on compact landscape screens too. */
.brand #region.safeZone{display:block;color:#c4e9ad;font-weight:700;letter-spacing:.06em}

/* Atlas and expedition panels share the touch controls of the main adventure. */
.brand{min-width:0;max-width:calc(100% - 148px)}.brand>div{min-width:0}.brand small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.atlasStats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:16px 0}.atlasStats span{font-size:14px;color:#d7dfcd;text-align:center;padding:10px 5px;background:#183a2e66;border:1px solid #c8c49444;border-radius:6px}.atlasStats b{display:block;color:#efdab0;font-size:22px;margin-bottom:4px}
#mapCanvas{display:block;width:100%;height:auto;aspect-ratio:1;border-radius:8px;border:1px solid #d3c58f88;background:#426551;margin:16px 0}
.atlasCard{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:15px 0;border-bottom:1px solid #c4ce9d38;min-width:0}.atlasCard>div:first-child{min-width:0;flex:1}.atlasCard b{display:block;font-size:16px;line-height:1.4}.atlasCard small{display:block;font-size:14px;line-height:1.5;color:#d0dec9;margin-top:5px}.atlasCard button{border-radius:5px;font-size:14px;min-height:44px;min-width:58px;padding:9px 12px;flex-shrink:0}.atlasActions{display:flex;gap:6px;flex-shrink:0}.regionList .atlasCard{border-left:3px solid var(--region);padding-left:12px}
#expeditionHud{position:absolute;top:176px;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 32px);font-size:14px;line-height:1.4;text-align:center;padding:9px 14px;border-radius:7px;border:1px solid #d3c19777;background:#203e35e8;color:#f4e7c8}#expeditionHud[hidden]{display:none}.onExpedition .quest,.onExpedition #waypoint,.onExpedition #skillNotice{display:none!important}.onExpedition #boss{top:230px}.placing #expeditionHud{display:none}
@media(max-width:359px){.atlasCard{gap:8px}.atlasActions{flex-direction:column}.atlasCard button{padding:8px;font-size:14px}.atlasStats{gap:4px}.atlasStats span{font-size:12px}}
@media(orientation:landscape) and (max-height:600px){#expeditionHud{top:165px;max-width:45vw}.onExpedition #boss{top:217px}}

/* V7 — Green Valley premium interface: soft glass, warm sunlight and gold accents. */
:root{--gold:#f4d58d;--gold-soft:#e9c77d;--glass:rgba(20,55,47,.78);--glass-deep:rgba(12,39,35,.88);--line:rgba(244,213,141,.38)}
body{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#173b36}
#hud:before{background:linear-gradient(180deg,rgba(7,34,34,.30),transparent 25%,transparent 66%,rgba(8,35,29,.42))}
.brand{text-shadow:0 3px 14px rgba(4,25,22,.65)}
.brand b{font-family:Georgia,serif;color:#f7dfa2;letter-spacing:2.5px;text-shadow:0 2px 14px rgba(0,0,0,.35)}
.brand small{color:#e8eddc;letter-spacing:1.2px}
.crest{color:#f3d38c;text-shadow:0 0 18px rgba(248,210,130,.3)}
.headerActions .square{border:1px solid var(--line);border-radius:13px;background:rgba(21,57,50,.72);box-shadow:inset 0 1px rgba(255,255,220,.12),0 4px 18px rgba(3,22,20,.25);backdrop-filter:blur(12px)}
.stats,.quest{border:1px solid var(--line);border-radius:15px;background:linear-gradient(135deg,rgba(16,53,45,.90),rgba(20,64,51,.74));box-shadow:inset 0 1px rgba(255,255,220,.12),0 7px 24px rgba(4,28,23,.30);backdrop-filter:blur(14px)}
.stats{width:196px;padding:12px 14px}.stats .track{height:8px;border:0;border-radius:99px;background:rgba(5,28,27,.7)}.stats .track i{border-radius:99px}
.stats small{color:#e9e7ca}.quest{width:272px;padding:13px 15px}.quest>span{color:#f5d78e;font-size:10px;letter-spacing:1.4px}.quest b{font:600 18px/1.25 system-ui,sans-serif;color:#ffe3a0}.quest small{color:#e3ecdd;font-size:13px}.quest .track{height:4px;border-radius:99px;background:rgba(3,25,25,.68)}.quest i{border-radius:99px;background:linear-gradient(90deg,#eac46b,#fff0ad)}
#miniMapButton{border:3px solid rgba(244,213,141,.75);box-shadow:0 0 0 2px rgba(13,44,37,.8),0 6px 20px rgba(0,0,0,.32);background:#426c50}
#resources{border:1px solid var(--line);border-radius:14px;background:rgba(16,51,44,.78);box-shadow:0 5px 18px rgba(0,0,0,.20);backdrop-filter:blur(12px)}
#waypoint{border:1px solid rgba(244,213,141,.28);border-radius:99px;background:rgba(18,54,46,.78);box-shadow:0 4px 18px rgba(0,0,0,.22);backdrop-filter:blur(8px)}
nav{border:1px solid rgba(244,213,141,.52);border-radius:18px;background:linear-gradient(145deg,rgba(30,77,62,.88),rgba(12,42,37,.94));box-shadow:0 10px 28px rgba(3,24,21,.38),inset 0 1px rgba(255,255,220,.15);backdrop-filter:blur(14px)}
nav button{border:1px solid rgba(242,220,162,.13);border-radius:12px;background:linear-gradient(145deg,rgba(94,132,91,.34),rgba(24,59,49,.25));color:#fff1c4}nav button:active{background:rgba(244,213,141,.28)}nav small{color:#f2edd9}
#joystick{border:1px solid rgba(236,242,207,.38);background:radial-gradient(circle,rgba(206,228,183,.15) 0 42%,rgba(209,229,190,.28) 43% 45%,rgba(10,44,42,.35) 46% 51%,rgba(14,43,43,.25) 52%);box-shadow:inset 0 0 24px rgba(0,25,23,.25),0 5px 22px rgba(0,0,0,.18)}
#stick{background:linear-gradient(145deg,rgba(224,231,195,.72),rgba(46,91,76,.92));border:1px solid rgba(255,246,207,.75);box-shadow:0 4px 15px rgba(2,28,23,.35),inset 0 1px rgba(255,255,230,.5)}
#actions button{box-shadow:0 7px 22px rgba(3,28,25,.30)!important}#act{border:2px solid #f0d188;background:linear-gradient(145deg,#a69358,#3f674d);box-shadow:0 0 0 4px rgba(244,213,141,.15),0 7px 22px rgba(3,28,25,.35)!important}#magic,#dodge{border:1px solid rgba(204,234,207,.58);background:linear-gradient(145deg,rgba(71,126,97,.92),rgba(25,69,58,.92))}
#toast,#skillNotice{border:1px solid rgba(244,213,141,.34);background:rgba(19,59,49,.90);border-radius:12px;box-shadow:0 6px 22px rgba(3,27,23,.3);backdrop-filter:blur(12px)}
.panel{border:1px solid rgba(244,213,141,.48);border-radius:20px;background:linear-gradient(145deg,rgba(40,91,69,.96),rgba(12,42,37,.97));box-shadow:0 22px 90px rgba(0,0,0,.52),inset 0 1px rgba(255,255,220,.12)}.panel h2{color:#f5d58c}.panel .close{border:1px solid rgba(244,213,141,.4);border-radius:12px;background:rgba(17,56,47,.76)}
.primary{border:1px solid #f0d18a;border-radius:12px;background:linear-gradient(120deg,#e4c37b,#9e8750);box-shadow:0 5px 18px rgba(0,0,0,.2)}
@media (orientation:portrait) and (max-width:600px){.stats{width:174px;padding:9px 11px}.quest{width:calc(100% - 126px);padding:9px 11px}.quest b{font-size:15px}.quest small{font-size:12px}.headerActions .square{width:42px;height:42px}nav{border-radius:16px}nav button{border-radius:10px}}
/* Presence belongs to the game HUD; labels never capture camera gestures. */
#playerLabels{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:2}
.playerName{position:absolute;left:0;top:0;min-width:58px;max-width:180px;padding:5px 9px;border:1px solid #78ccd788;border-radius:6px;background:#102e2be8;color:#defbff;text-align:center;font:600 14px/1.25 system-ui,sans-serif;box-shadow:0 2px 10px #0006;will-change:transform}
.playerName b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.playerName>span{display:block;height:3px;border-radius:3px;background:#061b19;margin-top:4px;overflow:hidden}
.playerName i{display:block;height:100%;background:#72dfca}
.onlineStatus{min-height:40px;max-width:175px;padding:5px 10px!important;border:1px solid #71969088!important;border-radius:7px!important;background:#162e2beb!important;color:#c0cfc8;font:600 14px/1.2 system-ui,sans-serif!important}
.onlineStatus[data-state="online"]{border-color:#71c7d4aa!important;color:#a2edf4}
.onlineStatus[data-state="reconnecting"]{color:#f4d08f}
.playerField{display:block;max-width:260px;margin:16px auto 8px;text-align:left;color:#e9dcba;font:600 14px/1.3 system-ui,sans-serif}
.playerField input{display:block;box-sizing:border-box;width:100%;margin-top:6px;padding:11px 12px;min-height:44px;background:#101f1ce8;border:1px solid #778679;border-radius:6px;color:#fff4df;font:16px/1.3 system-ui,sans-serif;touch-action:manipulation}
.playerField input:focus{outline:2px solid #9cd9d6;outline-offset:2px}
.playerField input::placeholder{color:#a8b8ad}
.onlineIntro{display:block;margin:7px auto 13px;color:#b1dcd8;font:14px/1.35 system-ui,sans-serif}
@media(max-width:480px){.headerActions{gap:4px!important}.onlineStatus{max-width:120px;min-height:34px;padding:4px 7px!important}.brand b{font-size:15px}.brand .crest{display:none}.headerActions .square{width:34px;height:34px}.welcome{max-height:calc(100dvh - 36px);overflow:auto}.welcome .bigRune{font-size:46px}.welcome h1{font-size:30px}.welcome .playerField{margin-top:10px}.welcome .note{line-height:1.4}.playerName{max-width:150px}}
@media(orientation:landscape) and (max-height:600px){.welcome{max-height:calc(100dvh - 26px);overflow:auto;padding:16px 28px}.welcome .bigRune,.welcome .eyebrow,.welcome .instructions{display:none}.welcome h1{font-size:26px;margin:4px 0}.welcome p{margin:6px 0}.welcome .playerField{margin:8px auto}.welcome .onlineIntro{margin:6px auto}.welcome .note{margin-top:8px}}

/* Four separate combat controls, with the arrow count always in reach. */
#actions{width:164px;height:168px}
#bowShot{left:0;top:0;width:64px;height:64px;font-size:26px;border:1px solid #d6d2a58c;background:linear-gradient(145deg,#647b44eb,#304f36ee)}
#magic{right:10px;top:0}#dodge{left:0;top:96px;bottom:auto}#act{right:0;bottom:0}
#bowShot small{font-size:12px}
#bowShot::after{content:"";position:absolute;inset:-4px;border-radius:50%;pointer-events:none;background:conic-gradient(from 180deg,#d6d69f calc(var(--ready,1) * 1turn),#d4dbc423 0);mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 calc(100% - 2px))}
.wardrobeEntry{width:100%;margin:4px 0;display:flex;align-items:center;justify-content:space-between}
.outfitGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0}
.outfitCard{text-align:left;padding:12px;min-height:140px;border-radius:9px;border:1px solid #c5d0ae38;background:linear-gradient(145deg,#61725a45,#132e2659)}
.outfitCard[aria-pressed="true"]{border-color:var(--gold);box-shadow:inset 0 0 0 1px #e5c79266;background:#a2ae6721}
.outfitCard b,.outfitCard small,.outfitCard strong{display:block}.outfitCard b{margin:6px 0;font:18px Georgia,serif}.outfitCard small{font-size:12px;line-height:1.5;color:#d0dcce}.outfitCard strong{font-size:12px;margin-top:9px;color:var(--gold)}
.outfitPreview{display:flex;align-items:center;justify-content:center;width:42px;height:42px;font-size:30px;color:var(--trim);background:var(--outfit);border-radius:8px;border:1px solid var(--trim)}
.weaponChoice button[aria-pressed="true"]{border-color:var(--gold);background:#e5c79226}
@media (orientation:portrait) and (max-width:359px){#actions{width:148px}#magic{right:0}}

/* Fighting styles have visible bonuses, while personal armour stays locked. */
.outfitCard{min-height:190px}.outfitCard small{font-size:14px}.outfitCard:disabled{opacity:.6}
.outfitBonuses{display:block;font-size:14px;line-height:1.5;color:#e5e0b1;margin-top:9px}
.personalOutfit{background:linear-gradient(145deg,#bba44832,#124a3d80);border-color:#dbbe7866}
.equippedOutfit{padding:12px 14px;border:1px solid #d4c2816b;background:#102e2670;border-radius:9px}
.equippedOutfit b,.equippedOutfit small{display:block}.equippedOutfit small{font-size:14px;line-height:1.5;color:#d4e2c7;margin-top:5px}
.personalNotice{padding:12px;border:1px solid #e4c37766;border-radius:9px;color:#ffe6a6;background:#73652230}
#ownerAccessNotice{font-size:14px;line-height:1.4;color:#f4df9f}#ownerAccessNotice[hidden]{display:none}

/* Keep the play area free of messages until the player enables them. */
.quietNotifications #toast,
.quietNotifications #skillNotice,
.quietNotifications #quest,
.quietNotifications #saveState,
.quietNotifications .bottomHint{display:none!important}
