:root{color-scheme:dark;--cream:#eee4cf;--gold:#e4bb77}*{box-sizing:border-box}body{margin:0;background:#101c22;color:var(--cream);font-family:Manrope,Arial,sans-serif;overflow:hidden}#world{position:fixed;inset:0;width:100%;height:100%}.vignette{position:fixed;inset:0;pointer-events:none;background:radial-gradient(ellipse at 52% 47%,transparent 35%,#07121c77 100%)}header{position:absolute;top:39px;left:43px;display:flex;gap:19px;pointer-events:none}.seal{border:1px solid #cda76b88;border-radius:50%;height:53px;width:53px;display:grid;place-items:center;font-size:37px;color:var(--gold)}.eyebrow{font-size:9px;letter-spacing:2.5px;font-weight:700;color:var(--gold)}h1,h2{font-family:'Cormorant Garamond',Georgia,serif;font-weight:500}h1{font-size:49px;letter-spacing:1px;margin:2px 0}header p{font-size:10px;color:#aeb7b5;margin:0;letter-spacing:1px}nav{position:absolute;right:37px;top:37px;display:flex;gap:9px}button{color:var(--cream);cursor:var(--game-cursor-pointer);font:inherit;border:1px solid #d8c99e30;background:#14232acf;transition:.2s}button:hover{border-color:var(--gold);background:#2e393c}button:focus-visible{outline:2px solid var(--gold);outline-offset:4px}nav button{padding:10px 14px;border-radius:30px}nav span{font-size:10px;margin-left:6px}.quest{position:absolute;top:205px;left:47px;border-left:1px solid #d6b47666;padding-left:19px;width:210px;pointer-events:none}.quest h2{font-size:25px;margin:12px 0 6px}.quest p{font-size:11px;color:#aab6b5;line-height:1.9}#discoveries{font-size:22px;color:var(--gold);letter-spacing:5px;margin-top:17px}#discoveries span{display:block;font-size:9px;letter-spacing:1px;color:#aab6b5;margin-top:9px}footer{position:absolute;bottom:26px;left:43px;right:37px;display:flex;justify-content:space-between;align-items:center;font-size:9px;letter-spacing:1.3px;color:#cad0c7}footer>div:last-child{display:flex;align-items:center;gap:10px;color:#9eaaa9;letter-spacing:0}kbd{font:9px Manrope,Arial;border:1px solid #ccc4a23f;padding:5px 7px;border-radius:4px;color:#e6dbc2}.live{display:inline-block;width:5px;height:5px;background:#c4d797;border-radius:50%;margin-right:9px;box-shadow:0 0 10px #b9e495}.divider{margin:0 15px;color:#647879}#help{border-radius:50%;margin-left:8px;width:25px;height:25px}#prompt{position:absolute;bottom:110px;left:50%;transform:translateX(-50%)}#prompt button{display:flex;align-items:center;gap:17px;border-radius:8px;padding:12px 18px;box-shadow:0 12px 40px #0008;font-size:12px}#prompt kbd{background:#ddc590;color:#222b2b;font-size:13px;border:0}#prompt b{color:var(--gold)}#toast{position:absolute;left:50%;top:35px;transform:translateX(-50%);font-size:11px;color:var(--gold);transition:opacity .5s}#loading{position:fixed;inset:0;background:#101c22;display:grid;place-content:center;text-align:center;z-index:10}#loading .seal{margin:auto}#loading h2{font-size:27px}#overlay{position:fixed;inset:0;z-index:5;background:radial-gradient(ellipse at center,#26332abf,#0c1724f5);backdrop-filter:blur(14px);text-align:center;padding:10vh 24px;animation:arrive .4s ease}#overlay .emblem{font-size:70px;margin:30px}#overlay h2{font-size:65px;margin:20px 0}#overlay p{color:#b8c4be;max-width:420px;margin:20px auto;line-height:1.9;font-size:13px}#overlay .tag{display:inline-block;border:1px solid #d0b77c55;border-radius:20px;padding:8px 16px;font-size:10px;letter-spacing:2px;color:var(--gold)}.primary{padding:15px 25px;background:#d8bb80;color:#172326;border-radius:5px;margin-top:25px;font-size:12px}.close{position:absolute;right:22px;top:16px;border:0;background:none;font-size:28px}#settingsPanel{position:fixed;z-index:6;left:50%;top:50%;transform:translate(-50%,-50%);width:350px;max-width:90vw;padding:40px;background:#14252cf5;border:1px solid #d0b77c55;border-radius:12px;box-shadow:0 0 0 100vmax #030b1099}#settingsPanel h2{font-size:32px}#settingsPanel label{display:block;margin:20px 0;font-size:12px}#settingsPanel p{font-size:12px;line-height:2;color:#aab7b5}input{accent-color:#d8bb80}#zoom{width:100%;margin-top:15px}[hidden]{display:none!important}#touch{display:none}@keyframes arrive{from{opacity:0;transform:scale(1.025)}to{opacity:1;transform:scale(1)}}@media(max-width:700px){header{left:20px;top:22px}h1{font-size:35px}header .seal{display:none}.eyebrow{font-size:8px;letter-spacing:1.5px}nav{right:18px;top:25px}nav span{display:none}.quest{top:145px;left:22px;width:160px}.quest h2{font-size:21px}.quest p{display:none}footer{left:20px;bottom:20px}footer>div:first-child{display:none}#overlay h2{font-size:42px}#touch{display:flex;position:absolute;bottom:80px;left:20px;gap:4px}#touch button{width:38px;height:40px;border-radius:8px}}

#asset-warning{position:fixed;bottom:65px;left:20px;max-width:600px;padding:15px;background:#422a24;border:1px solid #d49d66;font-size:12px;z-index:20}
/* CARTOONIX arrival screen: rendered immediately, before the WebGL world is ready. */
#loading{z-index:100;background:#050607;overflow:hidden;isolation:isolate;opacity:1;transition:opacity .6s ease,visibility .6s ease;place-content:center;padding:28px;color:#f1dfc0}
#loading.is-leaving{opacity:0;visibility:hidden;pointer-events:none}
.loading-atmosphere{position:absolute;inset:-20%;z-index:-1;background:radial-gradient(ellipse at 50% 48%,#35201140 0%,#1c152638 28%,transparent 60%);animation:loading-breathe 8s ease-in-out infinite alternate}
.loading-content{width:min(780px,88vw);display:flex;align-items:center;flex-direction:column;position:relative}
.loading-logo{width:100%;height:auto;display:block;object-fit:contain;filter:drop-shadow(0 10px 35px #000);animation:loading-arrive .8s ease-out both}
.loading-world{display:flex;align-items:center;gap:16px;margin-top:36px;font-family:'Cormorant Garamond',Georgia,serif;font-size:16px;letter-spacing:7px;color:#d4bd90}
.loading-world span{height:1px;width:45px;background:linear-gradient(90deg,transparent,#8b684b)}
.loading-world span:last-child{transform:rotate(180deg)}
#loading #loading-status{font-family:Manrope,Arial,sans-serif;font-size:11px;font-weight:400;letter-spacing:1px;margin:27px 0 18px;color:#b4aaa0;min-height:16px}
.loading-progress-row{display:flex;align-items:center;gap:15px;width:min(410px,78vw)}
#loading-progress{height:5px;flex:1;border:1px solid #80614455;border-radius:8px;background:#1b1718;overflow:hidden;box-shadow:0 0 20px #ff842a08}
#loading-fill{height:100%;width:100%;transform:scaleX(0);transform-origin:left;background:linear-gradient(90deg,#a84c20,#e78b36,#f2c576);border-radius:8px;box-shadow:0 0 15px #e58e4888;transition:transform .35s ease}
#loading-percent{width:35px;text-align:right;font:10px Manrope,Arial,sans-serif;letter-spacing:1px;color:#d1b78e;font-variant-numeric:tabular-nums}
.loading-hint{font-size:10px;letter-spacing:1.5px;color:#6e7374;margin-top:24px}
.loading-footer{position:absolute;bottom:30px;left:20px;right:20px;font:8px Manrope,Arial,sans-serif;letter-spacing:3px;color:#746e65}
#loading-retry{margin-top:18px;padding:12px 22px;border-radius:5px;border-color:#a77b4b;color:#efd6ad}
body.is-loading>header,body.is-loading>nav,body.is-loading>footer,body.is-loading>.quest,body.is-loading>#touch{visibility:hidden}
@keyframes loading-arrive{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@keyframes loading-breathe{from{transform:translate(-1%,0);opacity:.6}to{transform:translate(1%,1%);opacity:1}}
@media(max-width:600px){.loading-world{font-size:13px;letter-spacing:5px;margin-top:28px}.loading-world span{width:25px}#loading #loading-status{font-size:10px;letter-spacing:.4px}.loading-footer{font-size:7px;letter-spacing:2px;bottom:22px}}
@media(prefers-reduced-motion:reduce){.loading-logo,.loading-atmosphere{animation:none}#loading,#loading-fill{transition:none}}
@media(max-height:520px){.loading-logo{width:auto;max-width:100%;max-height:32vh}.loading-world{margin-top:16px;font-size:12px}#loading #loading-status{margin:16px 0 12px}.loading-hint{margin-top:14px}.loading-footer{bottom:14px}}
/* Quiet gameplay HUD; information appears only during an action or in a menu. */
#touch{display:grid;grid-template-columns:repeat(3,44px);gap:5px;position:fixed;left:24px;bottom:24px;z-index:2;touch-action:none}
#touch button{height:44px;width:44px;border-radius:10px;background:#14232a99;user-select:none}
#touch button:first-child{grid-column:2}#touch button:nth-child(2){grid-column:1}
#inventory-hotbar{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);z-index:3;display:flex;gap:7px;padding:7px;border:1px solid #d0b77c65;border-radius:13px;background:#101a20db;box-shadow:0 10px 30px #0009,inset 0 1px #ffffff12;backdrop-filter:blur(8px);pointer-events:none}
.hotbar-slot{position:relative;display:grid;place-items:center;width:62px;height:62px;border:1px solid #d0b77c55;border-radius:8px;background:linear-gradient(145deg,#34413bdb,#18262bdb);box-shadow:inset 0 1px #ffffff19}
.hotbar-slot img{display:block;width:52px;height:52px;object-fit:contain;filter:drop-shadow(0 2px 4px #0008)}
.hotbar-slot .hotbar-count{position:absolute;right:3px;bottom:2px;min-width:18px;padding:1px 4px;border-radius:5px;background:#0b151cef;color:#f8dda0;font-size:13px;font-weight:700;line-height:18px;text-align:center;font-variant-numeric:tabular-nums}
.hotbar-slot.is-empty{border-color:#d0b77c2d;background:#1b292db5}
#harvest-panel,#harvest-result{position:fixed;bottom:70px;left:50%;transform:translateX(-50%);width:min(330px,85vw);padding:18px 24px;border:1px solid #ba94504d;border-radius:12px;background:#101c22ed;text-align:center;z-index:4;font-size:13px;box-shadow:0 12px 35px #0005}
#harvest-panel p{margin:0 0 14px}#harvest-progress{display:block;width:100%;height:7px;border:0;border-radius:8px;overflow:hidden;background:#34403b;accent-color:#e4bb77}#harvest-progress::-webkit-progress-bar{background:#34403b}#harvest-progress::-webkit-progress-value{background:linear-gradient(90deg,#bd6b28,#e9c078)}
#inventory{position:fixed;z-index:7;left:50%;top:50%;transform:translate(-50%,-50%);width:min(400px,90vw);padding:38px;border:1px solid #d0b77c55;border-radius:16px;background:#14252cf5;box-shadow:0 0 0 100vmax #030b1099}#inventory h2{font-size:38px;margin:12px 0 25px}.inventory-item{display:flex;gap:20px;align-items:center;background:#26362f;padding:20px;border:1px solid #d0b77c22;border-radius:10px;font-size:12px}.inventory-item>span{font-size:40px}.inventory-item strong{display:block;font-size:28px;color:var(--gold);margin-top:5px}#inventory-empty{font-size:12px;color:#aab7b5;line-height:1.8}

/* Courage: the actual 3D NPC is framed on the left; dialogue stays on the right. */
.dialogue-shell{position:fixed;inset:0;z-index:9;background:linear-gradient(90deg,transparent 28%,#07101855 46%,#071018dc 100%);pointer-events:none;display:flex;align-items:center;justify-content:flex-end;padding:5vh 5vw}
.dialogue-card{position:relative;pointer-events:auto;width:min(480px,43vw);max-height:88vh;overflow:auto;padding:38px 30px 27px;border:1px solid #d0b77c55;border-radius:16px;background:#14212be8;box-shadow:0 18px 60px #0005}.dialogue-card h2{font-size:42px;margin:18px 0 23px;color:#f0d8b1}.dialogue-card>p{font-size:15px;line-height:1.9;margin:0 0 28px;color:#eee4d6;min-height:160px}.dialogue-controls{display:flex;align-items:center;gap:10px}.dialogue-controls>span{font-size:11px;color:#b5a78f;margin-right:auto;font-variant-numeric:tabular-nums}.dialogue-controls button{padding:12px 14px;border-radius:6px;font-size:12px;margin:0}.dialogue-controls button:disabled{opacity:.28;cursor:var(--game-cursor-default)}.dialogue-card small{display:block;font-size:10px;color:#9faaa8;margin-top:20px;letter-spacing:.5px}body.is-talking>nav,body.is-talking>#touch{visibility:hidden}
@media(max-width:700px){.dialogue-shell{padding:3vh 3vw}.dialogue-card{width:49vw;padding:30px 16px 20px}.dialogue-card h2{font-size:29px;margin:14px 0}.dialogue-card>p{font-size:12px;line-height:1.75;min-height:0}.dialogue-controls{flex-wrap:wrap;gap:7px}.dialogue-controls>span{width:100%}.dialogue-controls button{font-size:10px;padding:10px}.dialogue-card small{font-size:8px}.dialogue-card .eyebrow{font-size:7px}}

body.is-talking>#qa-panel{visibility:hidden}

.dialogue-controls .primary:hover,.dialogue-controls .primary:focus-visible{background:#edd09b;color:#142129;border-color:#edce92}

#coin-hud{position:fixed;top:25px;left:28px;z-index:10;display:flex;align-items:center;gap:11px;min-width:99px;padding:5px 18px 5px 6px;border:1px solid #dab36750;border-radius:30px;background:#11202bdd;box-shadow:0 5px 22px #0004;pointer-events:none}#coin-hud img{width:44px;height:44px;object-fit:contain;filter:drop-shadow(0 1px 5px #ff9c2733)}#coin-balance{font-size:19px;font-weight:700;color:#f6d995;font-variant-numeric:tabular-nums}body.is-loading>#coin-hud{visibility:hidden}#grim-shop-callout{font-size:12px;line-height:1.8;color:#e9c58c;font-weight:600;margin:-10px 0 24px}.shop-card{min-height:420px}#shop-products{min-height:220px}.shop-back{padding:12px 17px;border-radius:6px;font-size:12px}#grim-text strong{color:#f6d995}#grim-text em{color:#dac8dd}@media(max-width:700px){#coin-hud{top:18px;left:18px;gap:7px;padding:4px 14px 4px 5px;min-width:80px}#coin-hud img{width:34px;height:34px}#coin-balance{font-size:16px}#grim-shop-callout{font-size:10px}.shop-card{min-height:330px}#shop-products{min-height:160px}}
#quest-panel{position:fixed;inset:0;z-index:11;display:grid;place-items:center;padding:18px;background:#030a10b8;backdrop-filter:blur(8px)}.quest-board-card{position:relative;width:min(620px,94vw);max-height:92vh;overflow:auto;padding:34px;border:1px solid #d0b77c66;border-radius:16px;background:linear-gradient(155deg,#192a30,#111d28);box-shadow:0 25px 90px #0009}.quest-board-card h2{margin:8px 0 5px;font-size:40px;color:#f0d8b1}.quest-intro{margin:0 36px 22px 0;color:#b9c0b7;font-size:12px;line-height:1.7}.task-list{display:grid;gap:13px}.task-card{padding:17px 18px;border:1px solid #d0b77c30;border-radius:11px;background:#24302fe6}.task-heading{display:flex;align-items:center;gap:12px}.task-pumpkin{font-size:29px;filter:drop-shadow(0 0 8px #e7813144)}.task-heading h3{margin:0 0 4px;font-size:16px;font-weight:600;color:#f2e6d1}.task-reward{font-size:13px;font-weight:700;color:#f2cf85}.task-reward span{font-size:10px;font-weight:500;color:#c4b99e}.task-card progress{display:block;width:100%;height:7px;margin:14px 0 9px;border:0;border-radius:8px;overflow:hidden;background:#37423e;accent-color:#d7a856}.task-card progress::-webkit-progress-bar{background:#37423e}.task-card progress::-webkit-progress-value{background:linear-gradient(90deg,#a85c28,#edc576)}.task-foot{display:flex;justify-content:space-between;gap:8px;font-size:10px;color:#b9b4a4}.task-progress{font-variant-numeric:tabular-nums;color:#e3d1ab}.task-claim{width:100%;margin-top:12px;padding:10px 14px;border-radius:6px;font-size:11px}.task-claim:disabled{cursor:var(--game-cursor-default);opacity:.46}.task-session-note{margin:16px 0 0;text-align:center;color:#899893;font-size:10px}@media(max-width:560px){.quest-board-card{padding:28px 17px 20px}.quest-board-card h2{font-size:33px}.task-card{padding:14px}.task-foot{align-items:flex-start;flex-direction:column}.quest-intro{font-size:11px}}

body.is-loading>#inventory-hotbar,body.is-talking>#inventory-hotbar{visibility:hidden}
#harvest-panel,#harvest-result{bottom:112px}
@media(max-width:900px){#inventory-hotbar{bottom:140px}.hotbar-slot{width:52px;height:52px}.hotbar-slot img{width:44px;height:44px}#prompt{bottom:215px}#harvest-panel,#harvest-result{bottom:215px}}
@media(max-width:420px){#inventory-hotbar{gap:5px;padding:5px}.hotbar-slot{width:48px;height:48px}.hotbar-slot img{width:40px;height:40px}.hotbar-slot .hotbar-count{font-size:11px;line-height:15px}}
@media(max-height:520px){#inventory-hotbar{bottom:110px}#prompt,#harvest-panel,#harvest-result{bottom:180px}}

/* Pumpkin token badge: the coin sits proud of the compact number plaque. */
#coin-hud{top:20px;left:24px;display:block;width:max-content;height:62px;min-width:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none}
#coin-hud img{position:absolute;z-index:2;top:0;left:0;width:62px;height:62px;filter:drop-shadow(0 3px 1px #091119) drop-shadow(0 6px 8px #0008)}
.coin-balance-bar{display:flex;align-items:center;justify-content:center;min-width:132px;height:45px;margin:8px 0 0 39px;padding:3px 16px 3px 30px;border:3px solid #091722;border-radius:11px;background:linear-gradient(180deg,#263e4a 0%,#192d3b 40%,#142436 100%);box-shadow:inset 0 2px 0 #98ac9d4a,inset 0 -3px 0 #06121bb0,0 4px 0 #07141d,0 7px 15px #0008}
#coin-balance{font-family:Manrope,Arial,sans-serif;font-size:21px;font-weight:900;line-height:1;color:#f7f1de;font-variant-numeric:tabular-nums;letter-spacing:-.5px;text-shadow:0 2px 0 #0a1422,1px 0 1px #0a1422,-1px 0 1px #0a1422}
@media(max-width:700px){#coin-hud{top:15px;left:14px;height:50px}#coin-hud img{width:50px;height:50px}.coin-balance-bar{min-width:106px;height:38px;margin:6px 0 0 31px;padding:2px 11px 2px 24px;border-radius:9px}#coin-balance{font-size:18px}}

/* Slightly smaller token badge, retaining the same coin-over-plaque silhouette. */
#coin-hud{height:54px;top:19px;left:23px}
#coin-hud img{width:54px;height:54px}
.coin-balance-bar{min-width:116px;height:39px;margin:7px 0 0 34px;padding:2px 13px 2px 27px;border-radius:10px}
#coin-balance{font-size:18px}
@media(max-width:700px){#coin-hud{height:46px;top:14px;left:13px}#coin-hud img{width:46px;height:46px}.coin-balance-bar{min-width:101px;height:34px;margin:6px 0 0 29px;padding:2px 10px 2px 23px;border-radius:8px}#coin-balance{font-size:16px}}

#coin-hud{height:46px;top:17px;left:20px}
#coin-hud img{width:46px;height:46px}
.coin-balance-bar{min-width:101px;height:34px;margin:6px 0 0 29px;padding:2px 10px 2px 23px;border-width:2px;border-radius:9px}
#coin-balance{font-size:16px}
@media(max-width:700px){#coin-hud{height:40px;top:13px;left:12px}#coin-hud img{width:40px;height:40px}.coin-balance-bar{min-width:88px;height:30px;margin:5px 0 0 25px;padding:2px 8px 2px 20px;border-radius:8px}#coin-balance{font-size:14px}}

.player-hp{position:fixed;z-index:2;width:82px;height:12px;transform:translate(-50%,-100%);border:1px solid #c4a777;border-radius:5px;background:#240e15;box-shadow:0 2px 7px #000b,inset 0 0 0 1px #08090e;overflow:hidden;pointer-events:none}.player-hp-fill{position:absolute;inset:2px;border-radius:2px;background:linear-gradient(#fa706f,#c62b3c 55%,#8c192c);transform-origin:left;transition:transform .25s ease}.player-hp span{position:absolute;inset:0;text-align:center;font:700 8px/10px Manrope,Arial;color:#fff0e1;text-shadow:0 1px 2px #000}.player-name{position:fixed;z-index:2;transform:translate(-50%,-50%);pointer-events:none;font:400 12px/1.2 Tahoma,Arial,sans-serif;color:#ffdb68;text-shadow:0 1px 2px #171008,0 0 2px #171008;white-space:nowrap}.player-level{color:#97da68}
#level-hud{position:fixed;top:14px;left:14px;width:min(205px,46vw);aspect-ratio:427.17/112.88;container-type:inline-size;pointer-events:none;z-index:4}
.level-track,.level-track i,.level-badge{position:absolute;box-sizing:border-box}
.level-track{left:19.62%;right:.05%;top:20.83%;height:59.79%;border-image:url('./public/ui/level/Bg_Navy.png') 14 14 13 14 fill / 3.51cqw 3.51cqw 3.28cqw 3.51cqw stretch}
.level-track i{left:.88%;top:4.45%;height:90.38%;width:calc(98.24% * var(--xp-ratio,0));border-image:url('./public/ui/level/Fill_Yellow.png') 0 18 0 17 fill / 0 4.45cqw 0 4.21cqw stretch}
@font-face{font-family:'Lilita One';src:url('./public/ui/level/LilitaOne-Regular.ttf') format('truetype');font-style:normal;font-weight:400;font-display:swap}
.level-badge{left:0;top:0;width:25.05%;height:105.42%;display:grid;place-items:center;padding:0 .7cqw 3.28cqw 0;background:url('./public/ui/level/Badge_Blue.png') center/100% 100% no-repeat;font:400 12.64cqw/1 'Lilita One',Tahoma,sans-serif;color:white;text-shadow:0 2px 2px #183354}
#map-editor{position:fixed;right:14px;top:14px;z-index:65;box-sizing:border-box;width:min(275px,90vw);max-height:94vh;overflow:auto;padding:17px;color:#f6eedc;background:#182328f5;border:1px solid #938261;border-radius:12px;font:14px/1.35 system-ui,sans-serif;box-shadow:0 6px 30px #0007}
#map-editor[hidden]{display:none}#map-editor header{position:static;display:flex;align-items:center;justify-content:space-between;color:#f4d491;font:600 22px Georgia,serif}
#map-editor label{display:grid;grid-template-columns:1fr;margin:10px 0 0;gap:3px;font-size:12px}
#map-editor input,#map-editor select,#map-editor button{padding:6px 9px;border:1px solid #69726b;background:#293438;color:#fff;border-radius:5px;font:inherit}
#map-editor .edit-actions{display:flex;gap:8px;margin-top:10px}#map-editor button:disabled{opacity:.4}#map-editor p{font-size:12px;color:#d6d5c9}
#map-editor #editor-save{width:100%;background:#e5bb72;color:#201c16;font-weight:700}#editor-message{display:block;margin-top:8px}
body.editing-map #level-hud,body.editing-map > nav,body.editing-map #touch,body.editing-map #prompt{display:none!important}
#map-editor header,#editor-close{pointer-events:auto}
#wardrobe{color:#fff3da;background:#262337;border:1px solid #dbb781;border-radius:14px;padding:24px;max-width:90vw}#wardrobe::backdrop{background:#161521aa}#wardrobe p{display:flex;align-items:center;justify-content:space-between;gap:18px}#wardrobe button{padding:8px 12px;cursor:var(--game-cursor-pointer)}
#wardrobe{width:min(660px,90vw);max-height:88vh;overflow:auto;background:linear-gradient(145deg,#262d38,#231e2a)}#wardrobe header,.turn{display:flex;align-items:center;justify-content:space-between;gap:8px}#wardrobe h2{margin:.3em 0 .8em;color:#ffe7bd}.gallery{display:grid;grid-template-columns:1.25fr 1fr;gap:18px}.gallery canvas{width:100%;height:clamp(200px,40vh,340px);display:block;touch-action:none;cursor:grab;background:radial-gradient(ellipse at 50% 68%,#556472,#262d39 75%);border-radius:10px}.choices,.choices nav{display:flex;flex-direction:column;gap:8px}.choices nav button{text-align:left}.choices button[aria-pressed=true]{outline:2px solid #dbb781}.choices output{margin-top:auto}.skin-action{background:#ead0a1;color:#291e20}.turn{margin-top:8px}@media(max-width:540px){.gallery{grid-template-columns:1fr}.gallery canvas{height:25vh}.choices nav{display:grid;grid-template-columns:1fr 1fr}}
#wardrobe header,#wardrobe nav{position:static;inset:auto;transform:none;width:auto;margin:0;padding:0;pointer-events:auto}#wardrobe header{margin-bottom:10px}
#energy-hud{position:fixed;right:95px;top:24px;z-index:4}
.energy-bar{--unit:clamp(.39px,.052vw,.55px);font-size:var(--unit);height:64em;display:flex;align-items:center;isolation:isolate;padding-left:80em;padding-right:38em;box-sizing:content-box}
.energy-background{position:absolute;width:0;height:0;pointer-events:none}
.energy-track{position:absolute;inset:0 -40em 0 0;z-index:-1;border-image:url('./public/ui/energy/ResourceBar_Bg.png') 0 15 0 15 fill / 0 15em 0 16em stretch}
.energy-bar .energy-add{position:absolute;left:10em;top:7em;font-size:inherit;width:49em;height:53em;border:0;padding:0;margin:0;opacity:1;background:transparent url('./public/ui/energy/ResourceBar_Btn_Single_Green.png') center/100% 100% no-repeat;box-shadow:none}
.energy-value{font:400 calc(40 * var(--unit))/1.25 'Lilita One',Tahoma,sans-serif;color:white;white-space:nowrap;text-align:right}
.energy-icon{position:absolute;z-index:1;left:calc(100% - 18em);top:-13.5em;width:68em;height:91em;pointer-events:none}
.energy-icon img{display:block;width:100%;height:100%}
.energy-fx{position:absolute;left:50%;top:45%;width:0;height:0}
.energy-fx i{position:absolute;left:calc((var(--i) - 1.5)*8em);top:calc((1 - var(--i))*5em);width:45em;height:45em;margin:-22.5em;mask:url('./public/ui/energy/fx_star_white.png') center/contain no-repeat;animation:energy-spark 2.6s infinite both;animation-delay:calc(var(--i)*-.69s)}
@keyframes energy-spark{0%,36%,100%{opacity:0;transform:scale(.07);background:white}12%{opacity:1;transform:scale(.85);background:var(--spark-color,#94ff52)}27%{opacity:.75;transform:scale(.45);background:var(--spark-color,#ffcd40)}}
body.is-loading #energy-hud,body.editing-map #energy-hud{display:none}@media(max-width:650px){#energy-hud{right:84px;top:22px}}#resource-hud{position:fixed;z-index:4;right:95px;top:24px;display:flex;align-items:center;gap:36px}
#resource-hud #energy-hud,#resource-hud .energy-bar{position:relative;inset:auto}
.energy-bar:is([data-kind=energy],[data-kind=gem]) .energy-track{right:-20em}
.energy-bar[data-kind=gem] .energy-icon{width:70em;height:84em;top:-10em}
.energy-bar[data-kind=gold] .energy-icon{width:76em;height:83em;top:-9.5em}
.energy-bar[data-kind=gem] .energy-fx,.energy-bar[data-kind=gold] .energy-fx{--spark-color:white}
body.is-loading #resource-hud,body.editing-map #resource-hud{display:none}
@media(max-width:680px){#resource-hud{top:78px;right:32px;gap:26px}}
body>nav:has(#settings){position:fixed;inset:calc(24px + clamp(.39px,.052vw,.55px)*32) 0 auto auto;transform:translateY(-50%);z-index:5}
body>nav #settings{display:block;position:relative;width:clamp(44px,5vw,57px);height:auto;aspect-ratio:145.62854/132;border:0;border-radius:0;padding:0;box-shadow:none;background:transparent url('./public/ui/settings/Button_FlushRight_Gray.png') center/100% 100% no-repeat}
#settings::after{content:'';position:absolute;left:35.3%;top:15.5%;width:48.1%;height:57.6%;background:url('./public/ui/settings/Icon_PictoIcon_Setting02.png') center/contain no-repeat}
@media(max-width:680px){#resource-hud{right:74px}body>nav:has(#settings){top:calc(78px + clamp(.39px,.052vw,.55px)*32)}}
@media(max-width:680px){body>nav #settings{width:44px;min-width:44px}}
#inventory{width:min(940px,94vw);box-sizing:border-box;max-height:90vh;overflow:auto;padding:20px;border:1px solid #8b8171;border-radius:12px;color:#f3eadc;background:linear-gradient(110deg,#423e34f5,#26272bf7 65%);box-shadow:0 14px 60px #0008}
#inventory::backdrop{background:#15151b99;backdrop-filter:blur(3px)}
.inv-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.inv-heading h2{margin:0;font:600 24px Georgia}.inv-heading button{font-size:21px}
.inv-layout{display:grid;grid-template-columns:40% 1fr;gap:20px}.inv-bag{display:grid;grid-template-columns:repeat(4,1fr);align-content:start;gap:7px}
#inventory .inv-cell{width:100%;aspect-ratio:1;display:grid;place-items:center;border:1px solid #726b5d;border-radius:7px;background:#1b1917b8;color:#f8edd8;padding:4px;overflow-wrap:anywhere}
.inv-cell[draggable=true]{cursor:grab}.inv-gear{position:relative;height:clamp(270px,42vh,420px);border-left:1px solid #70695755}.inv-gear canvas{position:absolute;left:33%;width:48%;height:100%}
.inv-equip{position:absolute;width:18%;text-align:center}.inv-equip span{display:block;font:600 clamp(9px,1vw,12px) Tahoma,sans-serif;margin-bottom:6px}.inv-secondary{left:1%;top:44%}.inv-primary{left:21%;top:44%}.inv-backpack{right:1%;top:4%}
@media(max-width:620px){.inv-layout{grid-template-columns:1fr;gap:12px}.inv-bag{width:min(100%,290px)}.inv-gear{height:245px;border:0}#inventory{padding:12px}}
#inventory{background:linear-gradient(115deg,#1c3044,#0d192b 63%,#132a40);border:1px solid #b49563;box-shadow:inset 0 0 0 4px #162536,inset 0 0 0 5px #716147,0 16px 55px #0009;padding:clamp(16px,2.3vw,30px)}
#inventory[open]{animation:inv-arrive .18s ease-out}@keyframes inv-arrive{from{opacity:0;transform:scale(.98)}}
.inv-heading{border-bottom:1px solid #967b4b;padding-bottom:12px;color:#ffe3a6}.inv-heading button{background:#1d3245;border:1px solid #917a54;border-radius:50%;width:32px;height:32px;color:#efd7a4}
.inv-gear{height:clamp(315px,56vh,525px);background:radial-gradient(ellipse at 50% 62%,#33516b,#101e30 70%);border:1px solid #806c49;border-radius:8px}
.inv-gear canvas{left:0;width:100%;height:100%;cursor:grab;touch-action:none}.inv-gear canvas:active{cursor:grabbing}
.inv-primary,.inv-secondary{left:3%;width:18%}.inv-primary{top:18%}.inv-secondary{top:55%}.inv-backpack{top:18%;right:3%;width:18%}
#inventory .inv-cell{position:relative;background:linear-gradient(145deg,#223449,#101c2c);border-color:#607080;box-shadow:inset 0 0 0 3px #182433;color:#d6bb87}
#inventory .inv-cell[data-rarity=Rare]{border-color:#61aff0}#inventory .inv-cell[data-rarity=Epic]{border-color:#c58afa}#inventory .inv-cell[data-rarity=Legendary]{border-color:#f5bd59}
#inventory .inv-cell:hover,#inventory .inv-cell:focus{outline:1px solid #edc572;box-shadow:0 0 10px #f3c67544}
.inv-cell img{width:75%;height:75%;object-fit:contain}.inv-cell::after{content:attr(data-count);position:absolute;right:5px;bottom:3px}
.inv-cell[data-tip]:not([data-tip=""]):hover::before,.inv-cell[data-tip]:not([data-tip=""]):focus-visible::before{content:attr(data-tip);position:absolute;bottom:95%;left:0;min-width:95px;background:#101d2e;color:#f1debe;border:1px solid #816e52;padding:6px;font:12px Tahoma;z-index:4}
@media(max-width:620px){.inv-gear{height:clamp(245px,40vh,330px)}}
#inventory[open]{position:fixed;inset:0;margin:auto;height:fit-content;max-height:90dvh}#inventory .inv-cell[hidden]{display:none}.wardrobe-tabs{display:flex;gap:6px}.wardrobe-tabs button[aria-pressed=true]{color:#ffda94;border-color:#d4a864}
#inventory[open]{transform:none}

/* Original game cursor artwork; preserve specialized drag and text cursors. */
:root{--game-cursor-default:url("/public/ui/cursors/default.png") 5 5,default;--game-cursor-pointer:url("/public/ui/cursors/pointer.png") 8 4,pointer}
html,body{cursor:var(--game-cursor-default)}
button,a[href],select,[role="button"],input[type="range"],input[type="checkbox"]{cursor:var(--game-cursor-pointer)}
button:disabled{cursor:var(--game-cursor-default)}

#side-menu{position:fixed;right:14px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;gap:8px;z-index:4}#side-menu button{position:relative;width:80px;height:82px;border:0;background:transparent;padding:4px 0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font:400 13px/1.1 'Lilita One',Tahoma,sans-serif;color:#fff;text-shadow:0 2px 2px #001b36;isolation:isolate}#side-menu button::before{content:'';position:absolute;inset:0;background:url('./public/ui/side-menu/background.png') center/100% 100% no-repeat;opacity:.086;z-index:-1}#side-menu img{width:49px;height:52px;object-fit:contain;pointer-events:none}#side-menu button:hover{filter:brightness(1.15);transform:scale(1.04)}#side-menu button:active{transform:scale(.95)}#side-menu button:focus-visible{outline:2px solid #fff;outline-offset:2px;border-radius:12px}@media(max-height:560px),(max-width:600px){#side-menu{right:6px;gap:3px;top:55%}#side-menu button{width:65px;height:64px;font-size:11px}#side-menu img{width:39px;height:40px}}

/* Keep original sprite borders; indicate keyboard focus without an extra rectangle. */
button,button:focus,button:focus-visible,a:focus,a:focus-visible,[role="button"]:focus,dialog,dialog:focus,canvas:focus{outline:none!important;outline-offset:0!important;-webkit-tap-highlight-color:transparent}
button:focus-visible,a:focus-visible,[role="button"]:focus-visible{filter:brightness(1.16)}

#side-menu .santa-event::before { content: none; }
#side-menu .santa-event > img {
  transform: scale(1.16);
  transform-origin: center bottom;
}
#side-menu .santa-event::after {
  content: '';
  position: absolute;
  top: 43%;
  left: 50%;
  width: 112%;
  aspect-ratio: 1;
  translate: -50% -50%;
  background: center / contain no-repeat url('./public/ui/levelup/fx_rotate_line.png');
  mix-blend-mode: screen;
  opacity: .8;
  pointer-events: none;
  z-index: -1;
  animation: santa-light-turn 24s linear infinite;
}
#side-menu .santa-countdown {
  position: relative;
  padding: 2px 4px;
  border-radius: 5px;
  background: #0a2038e8;
  color: #fff0be;
  font-size: .83em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
@keyframes santa-light-turn { to { rotate: 1turn; } }
@media (prefers-reduced-motion: reduce) {
  #side-menu .santa-event::before { content: none; }
#side-menu .santa-event > img {
  transform: scale(1.16);
  transform-origin: center bottom;
}
#side-menu .santa-event::after { animation: none; }
}

.santa-mail-hud {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 70vw;
  padding: 6px 13px;
  border-radius: 10px;
  background: #163451e6;
  color: white;
  text-align: center;
  font: 16px "Lilita One",sans-serif;
  pointer-events: none;
}

#candy-exchange {
  width: min(530px, calc(100vw - 24px));
  max-height: 90dvh;
  box-sizing: border-box;
  padding: 12px 10px;
  border: 18px solid transparent;
  border-image: url('./public/ui/caroling/Popup01_Single_Navy.png') 24 25 38 25 fill / 18px 18px 27px 18px stretch;
  background: none;
  color: white;
  font: 16px 'Lilita One', Tahoma, sans-serif;
}
#candy-exchange::backdrop { background: #07152d70; }
#candy-exchange header {
  position: static;
  inset: auto;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  background: center bottom / 100% 8px no-repeat url('./public/ui/inbox/Common_Popup_TitleLIne.png');
}
#candy-exchange h2 { margin:0; font:inherit; font-size:clamp(20px,5vw,29px); }
#candy-exchange .candy-close {
  flex:0 0 38px;
  height:38px;
  border:0;
  background: center / 48% no-repeat url('./public/ui/inbox/Icon_PictoIcon_Close.png'),
    center / contain no-repeat url('./public/ui/inbox/Button_Square02_Gray.png');
}
#candy-exchange .candy-close:hover { filter:brightness(1.15); }
#candy-exchange .candy-balance { margin:12px 0; color:#fff0bd; }
#candy-exchange .candy-offers { display:grid; gap:7px; }
#candy-exchange .candy-card {
  display:grid;
  grid-template-columns:clamp(28px, 7vw, 44px) minmax(0,1fr) auto;
  align-items:center;
  gap:clamp(5px,2vw,10px);
  min-height:55px;
  padding:5px 7px;
  border:6px solid transparent;
  border-image:url('./public/ui/inbox/BorderFrame_Round01_Blue.png') 11 fill stretch;
  background:#073668;
  background-clip:padding-box;
}
#candy-exchange .candy-card > img { width:100%; height:41px; object-fit:contain; }
#candy-exchange .candy-detail { display:grid; gap:3px; }
#candy-exchange .candy-detail span { display:flex; align-items:center; gap:4px; font-size:.86em; color:#bde8ff; }
#candy-exchange .candy-detail span img { width:20px; height:20px; object-fit:contain; }
#candy-exchange .candy-trade {
  min-width:72px;
  min-height:38px;
  padding:0 5px;
  border:solid transparent;
  border-width:7px 7px 13px;
  border-image:url('./public/ui/inbox/Button01_145_Green.Png') 27 27 116 26 fill stretch;
  background:none;
  color:white;
  font-size:.88em;
  text-shadow:0 1px 2px #0a3810;
}
#candy-exchange .candy-trade:hover:not(:disabled) { filter:brightness(1.12); }
#candy-exchange .candy-trade:disabled { filter:grayscale(.76) brightness(.75); }
#candy-exchange [role=status] { min-height:1.1em; color:#ffdb9c; }
#equipment-screen .eq-cell[data-count]:not([data-count=""])::after {
  content:attr(data-count);
  position:absolute;
  right:5px;
  bottom:3px;
  color:white;
  font: 16px 'Lilita One', Tahoma, sans-serif;
  text-shadow:0 1px 3px #0a1023,0 1px 3px #0a1023;
  pointer-events:none;
}
