:root{--hud-height:64px;--game-hud-height:64px;--game-ink:#f8efd8;--game-muted:#bdc8b3;--game-surface:#142f23ef;--game-line:#ba9a615c;--game-gold:#dcc18a}
html,body{min-height:100%;background:#0c2019}
body{margin:0}
.game-shell{position:relative;height:100dvh;min-height:480px;overflow:hidden;color:var(--game-ink);background:#0e211a}
.game-shell button{font-family:inherit}
.game-shell button:focus-visible{outline:2px solid #f4d28c;outline-offset:3px}
.game-hud{position:fixed;inset:0 0 auto;z-index:60;height:var(--hud-height);display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 28px;color:var(--game-ink);border-bottom:1px solid #a88e5545;background:linear-gradient(180deg,#10271cf7,#10251cf0);box-shadow:0 4px 24px #07140d70;backdrop-filter:blur(14px)}
.hud-left,.game-wallet,.hud-actions{display:flex;align-items:center;gap:16px;min-width:0}
.hud-emblem{width:38px;height:38px;object-fit:contain}
.hud-scene-title{font-size:13px;font-weight:600;letter-spacing:.5px;white-space:nowrap;color:#e6d9b7}
.hud-back{border:1px solid var(--game-line);border-radius:6px;background:#243c2e;color:#f5e4bf;padding:8px 14px;white-space:nowrap;font-size:13px;font-weight:600}
.hud-back:hover{background:#3c4c35;border-color:#d5b16b}
.game-wallet{gap:25px;margin-left:auto}
.hud-currency{display:flex;align-items:center;gap:7px;white-space:nowrap;font-size:15px;font-variant-numeric:tabular-nums}
.hud-currency i{font-style:normal;font-size:21px;color:#e6bd6a;text-shadow:0 0 15px #c9983c40}
.hud-currency b{font-weight:600}
.hud-currency small{color:#b2bba8;font-size:10px}
.hud-currency.gerege i{color:#a0cfc0}
.hud-actions{gap:8px;margin-left:8px}
.hud-tool{display:flex;align-items:center;justify-content:center;gap:6px;width:34px;height:34px;border:1px solid #c3a36740;border-radius:5px;background:#183122;color:#dbc493;font-size:19px;line-height:1}
.hud-tool:has(span){width:auto;padding:0 10px}
.hud-tool span{font-size:11px}
.hud-tool:hover{background:#34513a;border-color:#cbb179}
.hud-profile{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:1px solid #b997584f;background:#af884c20;color:#edddb8;font-size:12px;border-radius:5px;min-height:34px;padding:0 13px}
.game-stage{position:relative;height:calc(100dvh - var(--hud-height));margin-top:var(--hud-height);min-height:0;overflow:hidden}
.game-home{position:relative;isolation:isolate;min-height:100%;height:100%;display:grid;grid-template-columns:1.15fr 1fr;grid-template-rows:1fr auto;align-items:center;gap:35px 65px;padding:55px max(6.5vw,32px) 30px;background:linear-gradient(90deg,#0e251bee 0%,#142c2280 50%,#0d211bd9 100%),linear-gradient(0deg,#0b1d17f5,#0b1d1700 60%),url('./assets/art/battle-steppe.webp') center/cover;overflow:hidden}
.game-home:before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at 25% 34%,#b5986030,transparent 50%);box-shadow:inset 0 0 120px #07120eaa}
.home-title{position:relative;z-index:2;align-self:center;margin-top:-35px;max-width:650px;text-shadow:0 3px 14px #030e0a}
.home-emblem{width:100px;height:100px;object-fit:contain;margin:0 0 16px;filter:drop-shadow(0 5px 14px #06140c)}
.home-tagline{margin:0 0 15px!important;color:#d6b776!important;font-size:12px!important;font-weight:600;letter-spacing:5px}
.home-title h1{margin:0;font-family:Georgia,'Times New Roman',serif;font-size:clamp(32px,3.6vw,64px);font-weight:600;letter-spacing:1.3px;line-height:1.1;color:#f4e8c7}
.home-title h1 span{font-size:1.4em;color:#ebc67d;letter-spacing:8px;line-height:1.16}
.home-title>p:last-child{max-width:430px;margin:22px 0 0;font-size:15px;line-height:1.7;color:#c6d0bd}
.home-heroes{position:absolute;inset:auto auto 50px 12%;width:38%;height:54%;max-height:370px;z-index:0;opacity:.25;pointer-events:none;display:flex;align-items:end;justify-content:center;gap:0;filter:saturate(.8);mask-image:linear-gradient(#000 35%,transparent 100%)}
.home-heroes .hero-card{width:33%;flex-shrink:0;max-height:100%;transform:rotate(-10deg) translateY(15px);box-shadow:0 15px 25px #050e08}
.home-heroes .hero-card:nth-child(2){transform:translateY(-20px);z-index:1}
.home-heroes .hero-card:nth-child(3){transform:rotate(10deg) translateY(15px)}
.game-mode-grid{display:grid;gap:12px;position:relative;z-index:3;max-width:500px;justify-self:stretch;width:100%}
.game-mode{position:relative;display:flex;align-items:center;gap:19px;width:100%;min-height:84px;padding:17px 22px;text-align:left;border:1px solid #b291505b;border-radius:8px;color:#eadcbd;background:linear-gradient(100deg,#173827f2,#162c22e8);box-shadow:0 5px 15px #05130d50,inset 0 1px #ded0a710;transition:transform .18s,background .18s,border-color .18s;overflow:hidden}
.game-mode:before{content:"";position:absolute;inset:0 auto 0 0;width:3px;background:#a98845;opacity:.7}
.game-mode:hover{transform:translateX(4px);background:linear-gradient(100deg,#294b32f5,#243b2be8);border-color:#d5b474b0}
.game-mode.mode-campaign{min-height:100px;background:linear-gradient(100deg,#71572ad9,#30442be8);border-color:#c9a966b0;box-shadow:0 8px 20px #05130d80,inset 0 1px #e7c98845}
.game-mode.mode-campaign:before{background:#edc97e}
.mode-icon{position:relative;width:44px;flex:0 0 44px;text-align:center;font-size:31px;color:#ddba76;filter:drop-shadow(0 3px 5px #0c1a10)}
.game-mode>div{flex:1;min-width:0}
.game-mode strong{display:block;font-size:18px;font-weight:600;letter-spacing:.4px}
.game-mode small{display:block;margin-top:6px;line-height:1.4;font-size:12px;color:#b8c4ab}
.mode-campaign small{color:#e2d7b5}
.mode-arrow{font-size:30px;color:#ba9d66;margin-left:auto}
.home-footer{grid-column:1/-1;position:relative;z-index:4;display:flex;align-items:center;justify-content:center;gap:25px;flex-wrap:wrap;color:#9da991;font-size:11px;padding-top:19px;border-top:1px solid #bc995631}
.home-footer .btn{color:#cfbf98;border-color:#a7925c45;background:#18322480;font-size:11px}
.campaign-scene{position:relative;width:100%;height:100%;overflow:hidden;background:#12281e;color:var(--game-ink);isolation:isolate}
.map-viewport{position:absolute;inset:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:none;background:#13271f;cursor:grab;touch-action:pan-x pan-y}
.map-viewport::-webkit-scrollbar{display:none}
.map-viewport:active{cursor:grabbing}
.campaign-scene .map{position:relative;display:block;width:var(--map-width,100%);height:auto;min-width:100%;min-height:100%;aspect-ratio:1000/600;border:0;border-radius:0;overflow:visible;background:#21392c;box-shadow:none;margin:0}
.campaign-scene .territory-map{display:block;width:100%;height:auto;aspect-ratio:1000/600;max-width:none;background:url('./assets/art/campaign-map.webp') center/100% 100%;filter:saturate(.8)}
.campaign-scene:after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(0deg,#071b14ce,transparent 23%,transparent 72%,#071b1480);box-shadow:inset 0 0 110px #07191180}
.campaign-scene .map-vignette{opacity:.24}
.campaign-scene .territory-cell{fill-opacity:.07;stroke-opacity:.32;stroke-width:.7}
.campaign-scene .territory-cell:hover,.campaign-scene .territory-cell:focus{fill-opacity:.32;stroke-opacity:1;stroke-width:2}
.campaign-scene .territory-cell.cleared{fill-opacity:.45;stroke-opacity:.7}
.campaign-scene .territory-cell.selected{fill-opacity:.47;stroke-width:2.5;stroke-opacity:1}
.campaign-scene .territory-border{stroke:#edddb6;stroke-opacity:.85;stroke-width:1.3}
.campaign-scene .territory.selected .territory-border{stroke:#ffe8a2;stroke-width:2.2;stroke-opacity:1}
.campaign-scene .territory-label rect{fill:#13291ce8;fill-opacity:1;stroke:#bea062;stroke-opacity:.85}
.campaign-scene .territory-label text{font-size:16px;fill:#f1e4c2}
.campaign-scene .territory-label .map-count{font-size:11px;fill:#cdb686}
.campaign-hud{position:absolute;z-index:5;top:26px;left:30px;max-width:390px;padding:15px 20px;border-left:2px solid #d2af68;background:linear-gradient(90deg,#102a20eb,#102a20b8);border-radius:0 6px 6px 0;box-shadow:0 6px 22px #09171040;pointer-events:none}
.campaign-hud>small{font-size:10px;letter-spacing:3px;color:#c6a669}
.campaign-hud h1{font-family:Georgia,'Times New Roman',serif;font-size:24px;line-height:1.2;margin:6px 0 8px;font-weight:600;color:#f0e2bb}
.campaign-hud p{font-size:11px;margin:0;color:#d3d5bf}
.campaign-hud p span{color:#91aa94;margin-left:5px}
.campaign-difficulty{position:absolute;z-index:6;top:28px;right:30px;display:flex;gap:0;padding:4px;border:1px solid #b0925555;border-radius:7px;background:#10281feb;box-shadow:0 6px 20px #06170e50}
.campaign-difficulty button{min-width:76px;padding:8px 14px;border:1px solid transparent;border-radius:4px;background:transparent;color:#c5cfb9;font-size:12px}
.campaign-difficulty button small{display:block;margin-top:4px;color:#889f8b;font-size:9px}
.campaign-difficulty button.active{border-color:#d2b37366;background:#baa06625;color:#f5dfae}
.campaign-difficulty button.active small{color:#d0bf91}
.campaign-difficulty button:hover{background:#b49a5620;color:#f0dfb7}
.campaign-dock{position:absolute;z-index:8;left:50%;bottom:22px;transform:translateX(-50%);max-width:calc(100% - 110px);padding:8px;border:1px solid #c4a16365;border-radius:8px;background:#10271ff2;box-shadow:0 8px 30px #04160dab;backdrop-filter:blur(12px)}
.campaign-dock .chapter-navigation{display:flex;flex-wrap:nowrap;gap:5px;margin:0;overflow:auto;scrollbar-width:none}
.campaign-dock .chapter-navigation::-webkit-scrollbar{display:none}
.campaign-dock .chapter-navigation button{flex:0 0 auto;position:relative;min-height:44px;border:1px solid #8d9c7645;background:#193525;color:#bccaad;border-radius:4px;padding:8px 12px;font-size:11px;gap:7px;transition:background .2s,border-color .2s}
.campaign-dock .chapter-navigation button b{color:#829b82;font-size:10px}
.campaign-dock .chapter-navigation button.active{background:#78613255;border-color:#dcc17c;color:#f9e6bb}
.campaign-dock .chapter-navigation button.active b{color:#e7c87e}
.campaign-dock .chapter-navigation button:hover{background:#355033;color:#f7e9c4}
.campaign-dock .chapter-navigation .chapter-done{color:#a5dbac}
.campaign-hint{position:absolute;z-index:5;left:50%;bottom:103px;transform:translateX(-50%);font-size:11px;letter-spacing:.3px;color:#e2ddc4;text-align:center;white-space:nowrap;text-shadow:0 2px 5px #081a0d;background:#10271b9e;padding:7px 12px;border-radius:4px;pointer-events:none}
.map-controls{position:absolute;z-index:8;right:26px;bottom:110px;display:flex;flex-direction:column;gap:4px;padding:4px;border:1px solid #c5a36360;border-radius:6px;background:#10281feb;box-shadow:0 5px 15px #06170c80}
.map-controls button{width:35px;height:35px;border:0;border-radius:3px;background:#203c29;color:#e7d4a9;font-size:23px;font-weight:400;line-height:1}
.map-controls button:hover{background:#6d6136;color:#fff2ce}
.campaign-encounter{position:absolute;z-index:20;top:120px;right:30px;width:380px;max-height:calc(100% - 220px);overflow:auto;scrollbar-width:thin;scrollbar-color:#8c7b4e #193224;border:1px solid #c6a064b3;border-radius:10px;color:#f6e7c3;background:linear-gradient(140deg,#263c27f8,#10291ffb);box-shadow:0 12px 45px #06180ddd,inset 0 1px #ebd0a72e;backdrop-filter:blur(18px);animation:encounter-in .2s ease-out}
.encounter-close{position:absolute;z-index:5;right:10px;top:10px;display:flex;justify-content:center;align-items:center;width:31px;height:31px;border:1px solid #cbaa6565;border-radius:4px;background:#163023e8;color:#e7d8b4;font-size:24px;line-height:1}
.encounter-close:hover{background:#4c5531;color:#fff0ce}
.campaign-encounter .boss-panel{display:grid;grid-template-columns:120px minmax(0,1fr);gap:16px;padding:24px 20px 18px;border:0;border-radius:0;background:transparent;box-shadow:none;color:#f5e6c1}
.encounter-card{grid-column:1;grid-row:1;align-self:start;padding-top:9px}
.encounter-card .hero-card{width:100%;max-width:none;min-height:0;aspect-ratio:.66;margin:0;box-shadow:0 7px 20px #050f0d}
.encounter-info{min-width:0;padding-top:13px}
.encounter-info .boss-label{font-size:9px!important;letter-spacing:.6px;color:#b8c8a9;line-height:1.6}
.encounter-info h3{font-family:Georgia,'Times New Roman',serif;font-size:23px;line-height:1.15;margin:8px 0;color:#f2dfab;overflow-wrap:anywhere}
.encounter-info>p{font-size:10px;line-height:1.5;color:#a8bba1;margin:0}
.encounter-bonus{margin:14px 0;padding:11px 0 0;border-top:1px solid #c2a26638}
.encounter-bonus small{font-size:8px;letter-spacing:1px;color:#c5af7d}
.encounter-bonus p{font-size:11px;line-height:1.5;margin:4px 0 0;color:#d6dfc7}
.encounter-info .reward-tag{display:block;margin:0 0 12px;font-size:10px;color:#d9bf81}
.encounter-info .btn.primary{width:100%;min-height:40px;padding:8px 10px;background:linear-gradient(#d0ac63,#ab8646);color:#172c20;border:1px solid #e3c481;border-radius:5px;font-weight:700;font-size:12px;box-shadow:0 4px 13px #091a0e80}
.encounter-info .btn.primary:hover{background:linear-gradient(#ebca85,#c2a05b)}
.encounter-info .btn.primary:disabled{background:#43503a;color:#91a081;border-color:#7d88634d;box-shadow:none}
.encounter-info .final-boss-tag{font-size:8px;letter-spacing:.1px;margin:6px 0 0;padding:4px 6px}
.encounter-stages{grid-column:1/-1;border-top:1px solid #bda36538;padding-top:14px}
.encounter-stages>small{font-size:10px;color:#a8bea0}
.encounter-stages .stages{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:4px;margin:9px 0 0}
.encounter-stages .stage{position:relative;display:flex;align-items:center;justify-content:center;min-height:31px;height:31px;padding:0;border:1px solid #90a27845;border-radius:3px;background:#173423;color:#c9d9bb;font-size:12px}
.encounter-stages .stage>strong{font-size:12px}
.encounter-stages .stage>small,.encounter-stages .stage .stage-rarity,.encounter-stages .stage .status-mark{display:none}
.encounter-stages .stage.active{background:#c1a46340;border-color:#d9be81;color:#ffecbe}
.encounter-stages .stage.complete{background:#44663a;color:#e0eed0}
.encounter-stages .stage.locked{opacity:.5}
.encounter-stages .stage:hover{border-color:#edc982;background:#4a5c34}
.scene-page .game-stage{overflow-y:auto;background:linear-gradient(#173729f2,#10251bf9),url('./assets/art/battle-steppe.webp') center/cover}
.scene-page .page{max-width:1440px;margin:0 auto;min-height:100%;padding:32px 4vw 60px;color:var(--game-ink)}
.scene-page .page-heading{padding:0 0 20px;border-bottom:1px solid var(--game-line);margin-bottom:22px}
.scene-page .page-heading h1{color:#f3e4bd}
.scene-page .page-heading p{color:#b6c4a9}
.scene-page .eyebrow{color:#c4aa74}
.scene-page .tabs{border-color:#899e6f4d;background:#102b20}
.scene-page .tabs button{color:#afc3a4;background:transparent}
.scene-page .tabs button.active{background:#b9985640;color:#f7e1ad}
.scene-page .stat-panel,.scene-page .panel,.scene-page .store-panel,.scene-page .profile-panel,.scene-page .deck-panel,.scene-page .collection-toolbar{background:#183725;border-color:#9b9d6d45;color:#e1e4cb}
.scene-page .muted,.scene-page .small-note{color:#b4bda5}
.scene-page .collection-layout .collection-aside{background:#152f22;border-color:#9a98694f}
.scene-page .btn.ghost{border-color:#9a986965;color:#d6cea8;background:#223c29}
.scene-page .btn.ghost:hover{background:#36533a}
.scene-page .filter-row label,.scene-page .filter-row span{color:#b7c2aa}
.scene-page select,.scene-page input{color:#e7e7ce;border-color:#a492655c;background:#142e21}
.scene-page .empty{color:#c0c7ab;border-color:#a48d5640;background:#173225}
.scene-entry .game-stage{overflow-y:auto;background:#f2ebdd}
.scene-battle .game-stage{overflow:auto;background:#10291e}
.game-shell .modal{color:var(--ink)}
@keyframes encounter-in{from{opacity:0;transform:translateX(18px)}to{opacity:1;transform:translateX(0)}}
@media(min-width:1600px){.game-home{padding-left:10vw;padding-right:10vw;gap:80px}.game-mode-grid{max-width:560px}.game-mode{min-height:95px}.game-mode.mode-campaign{min-height:112px}.campaign-dock .chapter-navigation button{padding:10px 17px;font-size:12px}}
@media(max-width:1100px){.game-hud{padding:0 20px;gap:14px}.hud-left{gap:10px}.game-wallet{gap:13px}.hud-currency small{display:none}.game-home{gap:35px;padding:40px 5vw 24px}.home-emblem{width:80px;height:80px}.home-title h1{font-size:36px}.home-title h1 span{letter-spacing:5px}.game-mode{gap:15px;min-height:75px;padding:14px 17px}.game-mode.mode-campaign{min-height:86px}.mode-icon{font-size:27px;width:36px;flex-basis:36px}.game-mode strong{font-size:16px}.game-mode small{font-size:11px}.campaign-dock{max-width:calc(100% - 50px)}.campaign-dock .chapter-navigation button{padding:8px 10px;font-size:10px}.campaign-encounter{right:20px;width:360px}.campaign-hud{left:20px;top:20px}.campaign-difficulty{right:20px;top:22px}}
@media(max-width:760px){
 :root{--hud-height:54px;--game-hud-height:54px}
 .game-shell{min-height:0}
 .game-hud{height:54px;padding:0 12px;gap:8px}
 .hud-left{gap:8px}.hud-emblem{width:29px;height:29px}.hud-scene-title{font-size:11px;max-width:110px;overflow:hidden;text-overflow:ellipsis}
 .hud-back{padding:7px 10px;font-size:12px}
 .game-wallet{gap:11px;margin-left:auto}.hud-currency{gap:4px;font-size:12px}.hud-currency i{font-size:16px}
 .hud-actions{gap:5px;margin-left:0}.hud-tool{width:29px;height:29px;font-size:17px}.hud-tool:has(span){width:29px;padding:0}.hud-tool span{display:none}
 .hud-profile{font-size:10px;min-height:29px;padding:0 8px;max-width:90px}
 .scene-home .game-stage{overflow-y:auto}
 .game-home{height:auto;min-height:100%;grid-template-columns:1fr;grid-template-rows:auto auto auto;gap:25px;padding:30px 25px 22px;align-items:start;background:linear-gradient(#11261b90,#0e251bdf 50%,#0a2118fb),url('./assets/art/battle-steppe.webp') center top/auto 100%}
 .home-title{text-align:center;margin:0 auto;max-width:100%}.home-emblem{width:63px;height:63px;margin-bottom:9px}.home-tagline{font-size:9px!important;letter-spacing:4px;margin-bottom:10px!important}
 .home-title h1{font-size:28px;letter-spacing:1px}.home-title h1 span{font-size:1.35em;letter-spacing:6px}.home-title>p:last-child{font-size:12px;margin-top:12px;max-width:none}
 .home-heroes{left:8%;bottom:25%;width:84%;height:48%;max-height:360px;opacity:.14}
 .game-mode-grid{max-width:560px;margin:0 auto;gap:8px}.game-mode{min-height:64px;padding:11px 15px;gap:13px;border-radius:6px}.game-mode.mode-campaign{min-height:76px}.mode-icon{font-size:26px;width:35px;flex-basis:35px}.game-mode strong{font-size:15px}.game-mode small{font-size:10px;margin-top:4px}.mode-arrow{font-size:25px}.game-mode:hover{transform:none}
 .home-footer{gap:12px;padding-top:15px;font-size:9px}.home-footer>span:nth-child(2){display:none}.home-footer .btn{font-size:10px}
 .campaign-hud{left:12px;top:15px;padding:10px 12px;max-width:calc(100% - 175px)}.campaign-hud>small{font-size:8px;letter-spacing:1.5px}.campaign-hud h1{font-family:inherit;font-size:15px;margin:5px 0 7px}.campaign-hud p{font-size:9px;line-height:1.45}.campaign-hud p span{display:none}
 .campaign-difficulty{top:15px;right:12px;padding:3px}.campaign-difficulty button{min-width:44px;padding:7px 7px;font-size:10px}.campaign-difficulty button small{font-size:7px;margin-top:4px}
 .campaign-dock{left:12px;right:12px;bottom:14px;transform:none;max-width:none;padding:6px;border-radius:6px}.campaign-dock .chapter-navigation{gap:5px}.campaign-dock .chapter-navigation button{min-height:43px;padding:8px 11px;font-size:10px}.campaign-dock .chapter-navigation button b{font-size:9px}
 .campaign-hint{bottom:85px;max-width:calc(100% - 90px);font-size:9px;padding:6px 9px;white-space:normal;width:max-content}
 .map-controls{right:14px;bottom:90px;padding:3px;gap:3px}.map-controls button{width:31px;height:31px;font-size:21px}
 .campaign-scene .territory-label text{font-size:16px}.campaign-scene .territory-label .map-count{font-size:11px}
 .campaign-encounter{top:auto;left:10px;right:10px;bottom:79px;width:auto;max-height:min(440px,calc(100% - 105px));border-radius:9px;animation:encounter-up .18s ease-out}
 .campaign-encounter .boss-panel{grid-template-columns:112px minmax(0,1fr);gap:10px 15px;padding:18px 17px 14px}
 .encounter-card{padding-top:0;align-self:center}.encounter-card .hero-card{aspect-ratio:.65}
 .encounter-info{padding-top:12px}.encounter-info h3{font-size:21px;margin:6px 0}.encounter-info .boss-label{font-size:8px!important}.encounter-info>p{font-size:9px}
 .encounter-bonus{margin:10px 0;padding-top:8px}.encounter-bonus small{font-size:7px}.encounter-bonus p{font-size:10px;margin-top:3px}
 .encounter-info .reward-tag{font-size:9px;margin-bottom:8px}.encounter-info .btn.primary{min-height:38px;font-size:11px}.encounter-close{right:8px;top:8px;width:28px;height:28px;font-size:23px}
 .encounter-stages{padding-top:10px}.encounter-stages>small{font-size:9px}.encounter-stages .stages{margin-top:7px}.encounter-stages .stage{height:28px;min-height:28px}
 .scene-page .page{padding:22px 16px 45px}.scene-page .page-heading h1{font-size:27px}.scene-page .page-heading{gap:12px}
 .scene-battle .game-stage{overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain}
}
@media(max-width:460px){.hud-scene-title{display:none}.hud-profile{max-width:74px}.game-wallet{gap:9px}.hud-tool[data-act="rules"]{display:none}.home-title h1{font-size:26px}.home-title h1 span{letter-spacing:5px}.game-home{padding:23px 18px 20px;gap:20px}.home-emblem{width:52px;height:52px}.campaign-hud{max-width:calc(100% - 170px)}.campaign-hud h1{font-size:13px}.encounter-card{width:104px}.campaign-encounter .boss-panel{grid-template-columns:104px minmax(0,1fr);padding:18px 13px 13px;gap:10px 13px}.encounter-info h3{font-size:19px}}
@media(max-height:740px) and (min-width:761px){.game-home{gap:20px 60px;padding-top:25px;padding-bottom:20px}.home-title{margin-top:0}.home-emblem{width:70px;height:70px;margin-bottom:8px}.home-tagline{margin-bottom:10px!important}.home-title h1{font-size:clamp(32px,3.2vw,52px)}.home-title>p:last-child{margin-top:15px;font-size:13px}.game-mode{min-height:65px;padding:11px 18px}.game-mode.mode-campaign{min-height:78px}.game-mode-grid{gap:8px}.home-footer{padding-top:12px}.campaign-encounter{top:106px;max-height:calc(100% - 195px)}}
@media(max-height:580px) and (min-width:761px){.game-home{grid-template-columns:1fr 1.2fr;padding:20px 4vw;gap:10px 40px;overflow:auto}.home-emblem{display:none}.home-title h1{font-size:32px}.game-mode-grid{grid-template-columns:1fr 1fr;gap:8px;max-width:none}.game-mode.mode-campaign{grid-column:1/-1;min-height:63px}.game-mode{min-height:67px;padding:10px 13px}.game-mode strong{font-size:13px}.game-mode small{font-size:9px}.mode-icon{width:25px;flex-basis:25px;font-size:24px}.mode-arrow{display:none}.home-footer{grid-column:1/-1}.campaign-encounter{top:20px;max-height:calc(100% - 106px)}.campaign-encounter .boss-panel{padding-top:15px}}
@keyframes encounter-up{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.game-mode{transition:none}.campaign-encounter{animation:none}}

/* Scene panels share the game palette while card and account dialogs retain parchment. */
.scene-page .shop-pack,.scene-page .listing-card{background:#183725;border-color:#a2966155;color:#eee4c5;box-shadow:0 7px 23px #071b1150}
.scene-page .shop-pack:before{opacity:.25}
.scene-page .shop-pack .eyebrow{color:#d0b27a}
.scene-page .shop-pack p,.scene-page .listing-meta,.scene-page .footer-note,.scene-page .info-list p{color:#b2c2a3}
.scene-page .shop-pack .price,.scene-page .big-symbol,.scene-page .info-list strong{color:#dfbe7d}
.scene-page .field{color:#dbe3c6}
.scene-page .info-list>div,.scene-page .divider{border-color:#a8986845}
.scene-page .notice{background:#b59c4c18;color:#dfd0a4;border-color:#c2a66655}
.scene-page .pill{background:#27472e;color:#d8d9b5;border-color:#a09d6550}
.scene-page .btn.primary{background:linear-gradient(#d0b177,#b39154);border-color:#debd83;color:#1a3022;box-shadow:0 3px 10px #091b1150}
.scene-page .btn.primary:hover{background:linear-gradient(#e7c993,#c6a269)}
.scene-page .gold{color:#dfbe7d}
.encounter-stages .stage.active{background:#c1a46340;border-color:#d9be81;color:#ffecbe}
.encounter-stages .stage.complete{background:#44663a;border-color:#88ac72;color:#e0eed0}
.encounter-stages .stage.complete.active{border-color:#f0d292}

/* Compact encounter cards keep both stat labels and a visible skill detail action. */
.encounter-card .card-stats{padding:5px 0 4px}
.encounter-card .card-stats>div{display:flex;flex-direction:column;align-items:flex-start;gap:2px}
.encounter-card .card-stats>div+div{padding-left:7px}
.encounter-card .card-stats b{font-size:17px;line-height:1.05}
.encounter-card .card-stats small{font-size:6.5px;letter-spacing:.1px;line-height:1.15}
.encounter-card .card-name{font-size:12px;line-height:1.2;min-height:14px}
.encounter-card .card-body{padding:7px 7px 8px}
.encounter-card .card-click{cursor:pointer}
.encounter-card .card-click:hover .hero-card{border-color:#f4d193;transform:translateY(-1px);box-shadow:0 0 0 2px #d5b37444}
.encounter-detail{display:block;width:100%;margin-top:8px;padding:5px 3px;border:1px solid #c2a26155;border-radius:4px;background:#c2a2601a;color:#dcc78f;font-size:9px;line-height:1.4;text-align:center;cursor:pointer}
.encounter-detail:hover{background:#bc9b572b;color:#fff0c7}
@media(max-width:760px){.encounter-card .card-stats b{font-size:16px}.encounter-card .card-stats small{font-size:6px}.encounter-card .card-name{font-size:11px}.encounter-detail{font-size:8px;margin-top:6px}}
