/* A game viewport, with paged sheets for every long menu. */
html,body{width:100%;height:100%;margin:0!important;padding:0!important;overflow:hidden!important;overscroll-behavior:none}
body{background:#223e2d}.game-shell{position:fixed;inset:0;margin:auto;max-width:1180px;height:100vh;height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden;background:#3c975b;padding-top:env(safe-area-inset-top);box-shadow:0 0 70px #0e251e55}
.masthead{height:60px!important;min-height:0!important;width:100%;max-width:none;margin:0!important;padding:5px 12px!important;display:grid;grid-template-columns:200px 1fr auto 34px 34px;gap:9px;border:0;border-bottom:2px solid #2c5f3c;border-radius:0;box-shadow:inset 0 -2px #74b46b;overflow:hidden}
.screen-wordmark{font:900 25px 'Barlow Condensed',sans-serif;letter-spacing:1px;color:#ffe1a0;text-shadow:2px 2px #2a693e;text-align:center}
.hero-strip{display:grid;grid-template-columns:38px minmax(0,1fr);grid-template-rows:27px 12px;gap:0 7px;padding:0!important;align-items:center;min-width:0;height:40px}
.hero-avatar{grid-row:1/3;grid-column:1;width:38px;height:38px;min-height:0;min-width:0;padding:0;border:2px solid #25442e;background-size:36px 36px;box-shadow:inset 0 1px #eff6bf}
.hero-title{grid-column:2;min-width:0;align-self:start}.hero-title b{font:800 16px/17px 'Barlow Condensed',sans-serif;color:#fff1c7;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hero-title>span{font:600 9px/10px 'DM Sans',sans-serif;color:#c8e1b5;display:block}
.health{grid-column:2;grid-row:2;width:100%;margin:0;align-self:stretch}.health>div:first-child{height:7px;line-height:7px;margin:0 0 2px;justify-content:flex-end}.health>div:first-child>span{display:none}.health b{font:600 7px/7px monospace;color:#f4eac9}.health .bar{height:3px;border:0;border-radius:0;background:#285f3b}.health .bar i{background:#c9e778;box-shadow:none}
.currencies{margin:0;gap:6px}.currencies>span{min-width:75px;padding:6px 8px;border-width:1px;gap:5px;font-size:12px}.currencies i{font-size:19px;width:20px}.sound-toggle,.square{width:34px;height:34px;min-height:0;padding:5px!important;border-width:1px;display:grid;place-items:center}.sound-toggle span{display:none!important}.sound-toggle svg{width:20px;height:20px}.square{font-size:20px}
main.game-main{min-width:0;min-height:0;max-width:none;width:100%;height:100%;padding:8px!important;margin:0;display:grid;grid-template-columns:minmax(0,1.45fr) minmax(270px,1fr);grid-template-rows:minmax(0,1fr);gap:8px;background:#d8e6c5;overflow:hidden}
.battle-column{display:flex;flex-direction:column;min-width:0;min-height:0;gap:5px;overflow:hidden}.arena-frame{flex:1;min-height:0;display:grid;grid-template-rows:25px minmax(0,1fr) 20px;border:4px solid #315a38;border-radius:4px;box-shadow:none;overflow:hidden;margin:0;background:#3c9658}
.arena-top{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:5px;padding:0 4px!important;font-size:9px;line-height:1;min-width:0;height:25px}.arena-top>span{font:700 8px/1 monospace;color:#d7e8be;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.arena-top>strong{font:800 15px/1 'Barlow Condensed',sans-serif;color:#fff4cd}.arena-tools{display:flex;gap:4px;justify-content:flex-end}.arena-tools button{background:#f5d482;border:1px solid #3c5d34;box-shadow:inset 0 -2px #caad62;border-radius:2px;padding:2px 5px;font:700 10px/13px monospace;min-width:24px;height:19px}
#arena{display:block;width:100%!important;height:100%!important;min-height:0;min-width:0;max-height:none!important;aspect-ratio:auto;object-fit:contain;background:#fcf0d3;image-rendering:pixelated;border-radius:0}
.arena-bottom{min-height:0;height:20px;display:flex;align-items:center;gap:6px;padding:1px 4px!important;font-size:8px;overflow:hidden;line-height:16px}.arena-bottom #combatNote{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.arena-bottom #battleStatus{font-size:7px;color:#d2e8b6;white-space:nowrap}.arena-bottom #timer{font:700 8px monospace;white-space:nowrap}.battle-banner{top:43%;left:10%;right:10%;font-size:25px;padding:13px;line-height:1.05}
.skills{flex:none;min-height:0;height:43px;grid-template-columns:repeat(3,minmax(0,1fr)) 55px;gap:5px}.skills button{display:grid;grid-template-columns:24px minmax(0,1fr);grid-template-rows:1fr 12px;column-gap:5px;row-gap:0;padding:4px 7px!important;border-width:1px;border-bottom-width:3px;border-radius:3px;min-width:0;min-height:0;text-align:left}.skills button>span{grid-column:1;grid-row:1/3;font-size:23px;text-align:center}.skills button b{font:700 16px/16px 'Barlow Condensed',sans-serif;grid-column:2;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;align-self:end}.skills button small{grid-column:2;font-size:8px;line-height:10px;margin:0;align-self:start}.skills .auto{display:block;text-align:center;font-size:10px;padding:6px 2px!important}.skills .auto small{text-align:center;font-size:6px;margin:2px 0 0;line-height:8px}
.buff-strip{flex:none;height:13px;min-height:0;max-height:13px;overflow:hidden;gap:4px;padding:0;flex-wrap:nowrap}.buff-strip:empty{display:none}.buff-strip span{font-size:7px;line-height:11px;padding:0 4px;white-space:nowrap;border-radius:2px}.battle-column>.field-note,.section-top,.wave-dots{display:none!important}
.workshop{height:100%;min-height:0;align-self:stretch;margin:0!important;border:3px solid #576d41;box-shadow:none;background:#fff0d0;border-radius:4px;overflow:visible;padding:10px}
#panel{height:100%;min-height:0;padding:0!important;display:grid;grid-template-rows:minmax(110px,1fr) minmax(120px,1.1fr) 34px;gap:8px}
.loadout-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:6px;min-width:0;min-height:0}.loadout-item{min-width:0;min-height:0;background:#eadbb6;border:2px solid #b5a074;border-bottom:4px solid var(--rarity,#b29b68);box-shadow:inset 0 0 0 2px #fff6dc;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:3px!important;overflow:hidden;position:relative}.loadout-item .pixel-icon{width:clamp(30px,6.5vh,66px);height:clamp(30px,6.5vh,66px);object-fit:contain}.loadout-item small{font:800 11px/12px 'DM Sans',sans-serif;color:#695c3a;white-space:nowrap}.loadout-item.slot-weapon{grid-column:1;grid-row:1/3;background:#dec3eb}.loadout-item.slot-weapon .pixel-icon{width:80%;height:65%;max-height:120px}.loadout-bag{background:#f3dba6}
.chest-console{min-height:0;display:grid;grid-template-columns:minmax(68px,1fr) minmax(110px,1.7fr) minmax(72px,1fr);gap:6px;align-items:center}.chest-level{height:80px;padding:5px!important;border:2px solid #92743c;background:#f3d273;box-shadow:inset 0 2px #ffe9a2;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px}.chest-level b{font:800 17px/18px 'Barlow Condensed',sans-serif}.chest-level small{font:700 9px/11px 'DM Sans',sans-serif}.chest-level:disabled{opacity:.7}
.chest-console .chest-stage{height:100%;min-height:0;max-height:180px;margin:0;padding:0!important;display:flex;justify-content:center;overflow:visible}.chest-stage::before{font-size:27px!important;top:20%;right:2%}.chest-stage::after{font-size:19px;left:0;top:65%}.chest-tap{display:flex;flex-direction:column;justify-content:center;align-items:center;border:0!important;background:none!important;box-shadow:none!important;padding:0!important;width:100%;height:100%;min-height:0;gap:7px;overflow:visible}.chest-tap:hover{filter:brightness(1.08)}.chest-tap>span{font:800 10px/12px 'Barlow Condensed',sans-serif;color:#80673b;letter-spacing:.7px}.chest-tap .chest-art{margin:0!important;transform:scale(1);flex-shrink:0}.chest-actions{display:flex;flex-direction:column;gap:7px;min-width:0}.chest-actions>button{padding:7px 3px;font-size:10px;line-height:14px;min-height:30px;background:#e8dfbb;border-color:#b6a471}.key-stock{display:block;text-align:center;font-size:15px;color:#9c7642}.key-stock b{font:800 13px 'DM Sans',sans-serif;color:#6d5a32}
.forge-feedback{min-width:0;min-height:0;height:100%;display:flex;align-items:center;gap:6px;justify-content:center;border:0;border-top:1px solid #d7c08e;background:#f4e6c0;border-radius:0;padding:3px!important;font-size:10px;box-shadow:none;overflow:hidden}.forge-feedback>span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.forge-feedback .pixel-icon{width:26px;height:26px;flex-shrink:0}.forge-feedback small{font-size:9px;white-space:nowrap}.forge-feedback:disabled{opacity:1;color:#ad9568;cursor:default}
.game-nav{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;padding:6px 9px calc(6px + env(safe-area-inset-bottom));min-height:0;background:#776446;border-top:3px solid #3b382b;box-shadow:inset 0 2px #a28d6a}.game-nav button{position:relative;border:1px solid #b19b72;background:#e6d4ae;box-shadow:inset 0 2px #fff0cb,inset 0 -2px #b69b6b;min-width:0;min-height:52px;padding:3px 2px;display:flex;align-items:center;justify-content:center;gap:8px;flex-direction:row;border-radius:4px}.game-nav button .pixel-icon{width:34px;height:34px;flex-shrink:0}.game-nav b{font:800 16px 'Barlow Condensed',sans-serif}.game-nav button.active{background:#abd198;box-shadow:inset 0 2px #d2e9b9,inset 0 -2px #739b62}.game-nav .collect-badge{top:5px;right:8px;width:7px;height:7px;border:1px solid #98763f;background:#ffdd71}
.sheet{position:fixed!important;inset:10px!important;margin:auto!important;width:min(520px,calc(100vw - 20px))!important;height:min(780px,calc(100vh - 20px))!important;height:min(780px,calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)))!important;max-width:none;max-height:none;padding:0!important;overflow:hidden!important;border:3px solid #3f6039;border-radius:7px;background:#fff1d2;box-shadow:0 15px 65px #102c2488}
.sheet[open]{display:grid;grid-template-rows:47px auto minmax(0,1fr) 43px;gap:0}.sheet::backdrop{background:#14382bc2;backdrop-filter:blur(2px)}.detail-sheet{width:min(480px,calc(100vw - 20px))!important;height:min(680px,calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)))!important}
.sheet-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 10px;background:#4b9657;border-bottom:2px solid #63844a;min-width:0;min-height:0}.sheet-header h2{font:800 25px/29px 'Barlow Condensed',sans-serif;color:#fff0c3;margin:0!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sheet-header>button,#closeModal{position:static;flex-shrink:0;width:32px;height:31px;min-height:0;padding:0;border:1px solid #355c38;background:#d8e4ad;box-shadow:inset 0 2px #f0f2ce;color:#395737;font:800 24px/26px 'DM Sans',sans-serif}
.menu-toolbar{display:flex;flex-direction:column;min-height:0;gap:7px;padding:0 12px}.menu-toolbar:empty{display:none}.menu-toolbar:not(:empty){padding-top:10px;padding-bottom:8px;border-bottom:1px solid #ddc797;background:#f3e5c0}.menu-toolbar .collection-wallet{margin:0;gap:7px}.menu-toolbar .collection-wallet>span{padding:5px 3px;font-size:11px}.menu-toolbar .collection-wallet b{font-size:18px}.menu-toolbar .collection-wallet small{font-size:7px;margin-top:1px}.menu-toolbar .collection-nav{padding:0;border:0;margin:0;gap:5px}.menu-toolbar .collection-nav button{padding:7px 2px;font-size:10px;line-height:15px}.menu-switch{display:flex;gap:6px}.menu-switch button{flex:1;padding:8px 5px;font-size:11px;background:#e6d8b0}.menu-switch button.active{background:#65a766;color:#fff7d7}.menu-wallet{display:flex;justify-content:space-between;gap:8px;font-size:11px;font-weight:700;color:#8b7549}.menu-toolbar .menu-wallet{margin:0}
.screen-stage{position:relative;min-height:0;min-width:0;overflow:hidden!important;margin:12px!important;padding:0!important;display:block!important;height:auto;align-self:stretch}
.screen-page{display:flex;flex-direction:column;gap:8px;min-width:0;min-height:0;width:100%;height:100%;overflow:hidden;align-items:stretch;justify-content:flex-start}.screen-page[hidden]{display:none!important}.screen-page>*{flex-shrink:0;max-width:100%;margin-top:0!important;margin-bottom:0!important}.page-measure{position:absolute;left:0;top:0;visibility:hidden;pointer-events:none;height:auto!important;overflow:visible!important}.page-measure>*{flex-shrink:0}
.sheet-footer{display:flex!important;align-items:center;justify-content:space-between;gap:8px;padding:5px 10px!important;margin:0!important;min-width:0;min-height:0;width:100%;max-width:none;border:0;border-top:1px solid #ccb17d;background:#e6d6ae;font-size:10px;color:#8b7651;letter-spacing:0}.sheet-footer>button{width:95px;min-height:29px;padding:4px 6px;font-size:10px;background:#fbefcd;border:1px solid #bca06c}.sheet-footer>span{font:800 11px 'DM Sans',sans-serif}.sheet-footer>button:disabled{opacity:.35}
.screen-page p{font-size:11px;line-height:1.65;color:#8a7753}.screen-page h3{font-size:21px;line-height:25px;margin-bottom:0}.screen-page .row{padding:10px 0;gap:9px;min-height:66px}.screen-page .row .row-icon{padding:7px;font-size:23px;flex-shrink:0;width:42px}.screen-page .row .details{min-width:0}.screen-page .row b{font-size:11px}.screen-page .row small{font-size:10px;line-height:1.5}.screen-page .row>button{padding:8px;min-height:32px;min-width:67px;font-size:10px}
.screen-page .inventory,.screen-page .gem-bag,.screen-page .fan-roster{max-height:none!important;overflow:visible!important;margin:0!important;grid-template-columns:repeat(3,minmax(0,1fr));padding:0!important;gap:7px}.screen-page .fan-roster{grid-template-columns:repeat(2,minmax(0,1fr))}.screen-page .gear{min-height:86px;padding:7px 3px}.screen-page .gear .pixel-icon{height:38px;width:38px}.screen-page .gem-card{padding:7px 3px;min-height:87px}.screen-page .gem-card .pixel-icon{width:35px;height:35px}.screen-page .gem-card b{font-size:10px}.screen-page .gem-card small{font-size:9px}.screen-page .fan-card{padding:7px 4px;min-height:75px}.screen-page .fan-card small{font-size:8px}.screen-page .socket{min-height:102px;padding:8px 3px}.screen-page .socket .pixel-icon{width:38px;height:38px}.screen-page .socket b{font-size:10px}.screen-page .socket small{font-size:9px}.screen-page .socket .empty-socket{font-size:28px;line-height:38px}.screen-page .socket-grid{gap:7px}
.screen-page .collection-primary{margin:0;font-size:17px;min-height:42px;padding:9px 10px}.screen-page .small-actions{margin:0;min-height:29px;align-items:center}.screen-page .small-actions button{min-height:29px;font-size:9px;padding:5px 7px;white-space:normal}.screen-page .small-actions .muted{font-size:9px}.screen-page .collection-reveal{padding:8px 10px;min-height:56px}.screen-page .divider{padding-top:10px;min-height:24px}.screen-page .collection-empty{padding:15px 8px}.screen-page .wing-preview{padding:0 6px 10px;min-height:0;background:radial-gradient(ellipse,#f2dfaa,transparent 70%)}.screen-page .wing-preview .pixel-icon{width:100px;height:70px}.screen-page .wing-preview h3{font-size:22px;line-height:26px}.screen-page .wing-preview p{margin-top:5px!important;font-size:10px;line-height:1.4}.screen-page .wing-card{padding:8px;min-height:76px}.screen-page .wing-actions{min-width:90px}.screen-page .wing-actions button{min-height:26px;font-size:9px;padding:4px 6px}.screen-page .quest-card{padding:9px 0;min-height:78px}.screen-page .quest-card em{margin-bottom:5px;font-size:9px}.screen-page .quest-card b{font-size:11px}.screen-page .quest-card small{font-size:9px}.screen-page .quest-card>button{min-width:72px;font-size:9px;padding:6px}.screen-page .stat-grid{gap:7px}.screen-page .stat{padding:9px 4px}.screen-page .stat b{font-size:23px}.screen-page .class-grid{gap:5px}.screen-page .class-grid button{padding:7px 2px;font-size:9px;min-width:0}.screen-page .class-grid .pixel-icon{display:block;margin:auto auto 3px;width:31px;height:31px}.screen-page .class-grid small{margin-top:3px}.screen-page .mastery{padding:10px}.screen-page .mastery-title b{font-size:11px}.screen-page .mastery>p{font-size:9px;margin:7px 0!important}.screen-page .ability-row{padding:9px 0}.screen-page .split-card{margin:0!important;padding:9px}.screen-page .age-card{padding:9px}.screen-page .prestige{padding:12px}.screen-page .prestige p{font-size:11px}.screen-page .prestige button{min-height:34px;font-size:11px}.screen-page .modal-actions{display:flex;flex-wrap:wrap;gap:7px;min-height:32px}.screen-page .modal-actions button{min-height:31px;font-size:10px;padding:7px 10px}.screen-page .volume-control{font-size:10px;min-height:32px}.lucky-card{padding:12px;background:#f6e2ad;border:1px solid #c4a269}.lucky-card small{display:block;font-size:10px;margin-top:7px;color:#8c7445}.lucky-card button{width:100%;min-height:35px;background:#f2c862}
.mobile-dock,body>footer{display:none!important}#toasts{bottom:calc(70px + env(safe-area-inset-bottom))!important;width:min(380px,calc(100vw - 24px))}.toast{padding:9px 12px;font-size:11px;line-height:1.4;max-height:70px;overflow:hidden}.loot-popup{z-index:4;top:30%!important;min-width:100px;padding:2px 5px;animation:compact-loot 1.1s both}.loot-popup .pixel-icon{width:48px;height:48px}.loot-popup b{font-size:12px}.loot-popup small{font-size:8px}.a11y-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.sheet .field-note{display:flex!important}
@keyframes compact-loot{0%{opacity:0;transform:translate(-50%,8px) scale(.5)}25%,65%{opacity:1;transform:translate(-50%,-37px) scale(1)}100%{opacity:0;transform:translate(-50%,-60px) scale(.9)}}
@media(max-width:740px){.game-shell{max-width:480px}.masthead{height:53px!important;grid-template-columns:minmax(0,1fr) auto 28px 28px;gap:5px;padding:4px 7px!important}.screen-wordmark{display:none}.hero-strip{grid-template-columns:32px minmax(0,1fr);grid-template-rows:25px 11px;gap:0 5px;height:36px}.hero-avatar{width:32px;height:34px;background-size:32px 32px}.hero-title b{font-size:14px;line-height:16px}.hero-title>span{font-size:8px;line-height:9px}.health b{font-size:6px;line-height:6px}.currencies{gap:4px}.currencies>span{min-width:43px;gap:3px;padding:6px 5px;font-size:10px;box-shadow:inset 0 -2px #ddc388}.currencies i{width:16px;font-size:16px}.sound-toggle,.square{width:28px;height:30px;min-height:0}.sound-toggle svg{width:17px;height:17px}.square{font-size:17px}
main.game-main{display:flex;flex-direction:column;gap:4px;padding:4px!important}.battle-column{flex:1;gap:3px;overflow:hidden}.arena-frame{grid-template-rows:22px minmax(0,1fr) 17px;border-width:3px;flex:1}.arena-top{height:22px;padding:0 3px!important;gap:3px}.arena-top>span{font-size:7px}.arena-top>strong{font-size:14px}.arena-tools button{font-size:9px;height:17px;line-height:12px;padding:1px 4px;min-width:22px}.arena-bottom{height:17px;line-height:13px;font-size:7px;padding:1px 3px!important}.arena-bottom #battleStatus{font-size:6px}.arena-bottom #timer{font-size:7px}.battle-banner{padding:10px;font-size:22px;line-height:1.05}.skills{height:35px;grid-template-columns:repeat(3,minmax(0,1fr)) 44px;gap:4px}.skills button{grid-template-columns:18px minmax(0,1fr);grid-template-rows:1fr 9px;padding:3px 4px!important;column-gap:3px;border-bottom-width:2px}.skills button>span{font-size:19px}.skills button b{font-size:13px;line-height:13px}.skills button small{font-size:7px;line-height:8px}.skills .auto{font-size:9px;padding:4px 1px!important}.skills .auto small{font-size:5px;line-height:7px}.buff-strip{height:11px;max-height:11px;gap:3px}.buff-strip span{font-size:6px;line-height:9px;padding:0 3px}
.workshop{flex:none;height:191px;padding:5px;border-width:2px;border-radius:3px}.workshop #panel{grid-template-rows:76px 77px 19px;gap:3px}.loadout-grid{gap:4px}.loadout-item{gap:0;padding:1px!important;border-width:1px;border-bottom-width:3px;box-shadow:inset 0 0 0 1px #fff8e0}.loadout-item .pixel-icon{width:25px;height:25px}.loadout-item small{font-size:8px;line-height:9px}.loadout-item.slot-weapon .pixel-icon{width:48px;height:53px;max-height:none}.loadout-bag .pixel-icon{width:23px;height:23px}.chest-console{grid-template-columns:minmax(65px,1fr) minmax(100px,1.55fr) minmax(69px,1fr);gap:4px}.chest-level{height:64px;border-width:1px;padding:3px!important;gap:2px}.chest-level b{font-size:14px;line-height:15px}.chest-level small{font-size:8px;line-height:9px}.chest-tap{gap:1px}.chest-tap .chest-art{zoom:.68}.chest-tap>span{font-size:9px;line-height:10px}.chest-console .chest-stage{max-height:none}.chest-actions{gap:3px}.chest-actions>button{min-height:22px;padding:3px 2px;font-size:9px;line-height:12px}.key-stock{font-size:10px;line-height:13px}.key-stock b{font-size:10px}.forge-feedback{font-size:8px;gap:4px;padding:1px!important}.forge-feedback .pixel-icon{width:18px;height:18px}.forge-feedback small{font-size:7px}
.game-nav{gap:3px;padding:4px 5px calc(4px + env(safe-area-inset-bottom));border-top-width:2px}.game-nav button{min-height:49px;flex-direction:column;gap:0;padding:2px 1px}.game-nav button .pixel-icon{width:26px;height:26px}.game-nav b{font:800 12px/13px 'Barlow Condensed',sans-serif}.game-nav .collect-badge{width:6px;height:6px;top:3px;right:5px}#toasts{bottom:calc(62px + env(safe-area-inset-bottom))!important}.toast{font-size:10px;padding:8px 10px}
.sheet{inset:7px!important;width:calc(100vw - 14px)!important;height:calc(100dvh - 14px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;border-width:2px;border-radius:5px}.sheet[open]{grid-template-rows:42px auto minmax(0,1fr) 39px}.sheet-header{padding:4px 9px}.sheet-header h2{font-size:23px;line-height:26px}.sheet-header>button,#closeModal{width:31px;height:29px;font-size:23px}.screen-stage{margin:10px!important}.sheet-footer{padding:4px 8px!important}.sheet-footer>button{min-height:28px;width:90px;font-size:10px}.sheet-footer>span{font-size:10px}.detail-sheet{width:calc(100vw - 18px)!important;height:min(650px,calc(100dvh - 18px - env(safe-area-inset-top) - env(safe-area-inset-bottom)))!important}.menu-toolbar{padding-left:10px;padding-right:10px}.screen-page .class-grid button{font-size:8px}.screen-page .class-grid .pixel-icon{width:28px;height:28px}.screen-page .wing-preview .pixel-icon{width:95px;height:63px}.screen-page .wing-preview h3{font-size:21px}.screen-page .fan-roster{grid-template-columns:repeat(2,minmax(0,1fr))}.screen-page .socket b{font-size:10px}.screen-page .socket small{font-size:8px}}
@media(max-width:350px){.currencies>span{min-width:39px;padding:6px 4px;font-size:9px}.masthead{gap:4px;padding:3px 5px!important}.hero-strip{grid-template-columns:28px minmax(0,1fr);gap:0 3px}.hero-avatar{width:28px;background-size:29px 29px}.hero-title b{font-size:13px}.hero-title>span{font-size:7px}.skills button b{font-size:11px}.skills button>span{font-size:16px}.skills button{grid-template-columns:15px minmax(0,1fr);column-gap:2px}.game-nav b{font-size:11px}.workshop{height:179px}.workshop #panel{grid-template-rows:70px 72px 18px}.chest-tap .chest-art{zoom:.62}.screen-page .fan-roster{grid-template-columns:1fr}.screen-page .row .row-icon{width:33px;padding:5px;font-size:19px}.screen-page .row{gap:6px}.screen-page .row>button{min-width:61px;font-size:9px}.screen-page .row b{font-size:10px}}
@media(max-height:650px) and (max-width:740px){.masthead{height:47px!important}.hero-strip{height:34px;grid-template-rows:24px 10px}.hero-avatar{height:32px}.hero-title b{font-size:13px}.workshop{height:165px;padding:4px}.workshop #panel{grid-template-rows:63px 69px 18px;gap:3px}.loadout-item .pixel-icon{height:20px;width:23px}.loadout-item small{font-size:7px;line-height:8px}.loadout-item.slot-weapon .pixel-icon{height:43px;width:44px}.chest-level{height:56px}.chest-level b{font-size:13px;line-height:14px}.chest-tap .chest-art{zoom:.58}.chest-actions>button{min-height:20px;font-size:8px;padding:2px}.key-stock,.key-stock b{font-size:9px;line-height:11px}.skills{height:32px}.game-nav button{min-height:43px}.game-nav button .pixel-icon{width:22px;height:22px}.game-nav b{font-size:11px}.arena-frame{grid-template-rows:20px minmax(0,1fr) 15px}.arena-top{height:20px}.arena-bottom{height:15px;font-size:6px}.buff-strip{height:10px;max-height:10px}}
@media(min-width:741px) and (max-height:520px){.masthead{height:47px!important}.game-nav button{min-height:39px}.game-nav button .pixel-icon{width:27px;height:27px}.game-nav b{font-size:13px}main.game-main{padding:4px!important;gap:5px}.workshop{padding:5px}.workshop #panel{grid-template-rows:minmax(70px,1fr) minmax(74px,1fr) 22px;gap:4px}.chest-tap .chest-art{zoom:.7}.chest-level{height:64px}.chest-level b{font-size:14px}.chest-level small{font-size:8px}.chest-actions>button{min-height:24px;padding:3px;font-size:9px}.loadout-item .pixel-icon{width:28px;height:28px}.loadout-item small{font-size:8px}.skills{height:34px}.skills button b{font-size:13px}.skills button>span{font-size:18px}.skills button{padding:3px 5px!important}.buff-strip{height:10px;max-height:10px}.screen-page p{font-size:10px;line-height:1.5}.sheet[open]{grid-template-rows:38px auto minmax(0,1fr) 35px}.sheet-header h2{font-size:21px}.menu-toolbar:not(:empty){padding-top:6px;padding-bottom:5px;gap:4px}.menu-toolbar .collection-wallet>span{padding:3px}.menu-toolbar .collection-wallet b{font-size:15px}.menu-toolbar .collection-nav button{padding:4px 2px}.screen-stage{margin:8px!important}}
@media(prefers-reduced-motion:reduce){.loot-popup{animation:none!important;transform:translate(-50%,-35px)}}

.key-stock .pixel-icon{width:16px;height:16px;vertical-align:middle}

.sheet-header{grid-row:1}.menu-toolbar{grid-row:2}.screen-stage{grid-row:3}.sheet-footer{grid-row:4}

.workshop-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}.workshop-nav button{min-width:0;font-size:10px;padding:7px 2px}.screen-page .tech-node{border:1px solid #bba56e;border-left:4px solid #6c9c68;background:#f0e3bd;padding:12px;border-radius:4px}.tech-node>div{display:flex;gap:8px;align-items:center}.tech-node b{font-size:12px}.tech-node .tag{font-size:8px}.screen-page .tech-node p{margin:8px 0!important}.tech-node>button{width:100%;font-size:11px;padding:8px}.tech-node.locked{opacity:.55}.tech-branches button{flex:1}.screen-page .dungeon-card{display:flex;align-items:center;gap:8px;padding:10px 0;border-bottom:1px solid #d6c394;min-height:92px}.dungeon-card .row-icon{font-size:26px;width:34px;text-align:center;flex-shrink:0}.dungeon-card .details{flex:1;min-width:0}.dungeon-card b{font-size:11px}.dungeon-card small{display:block;font-size:9px;line-height:1.6;color:#8a7753}.dungeon-actions{display:flex;flex-direction:column;gap:5px;min-width:80px}.dungeon-actions button{font-size:9px;padding:6px;min-height:29px}.dungeon-actions button:first-child{background:#cee0b4}.supply-parcel{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:12px;background:#e9d4a4;border:1px solid #b99e62;border-radius:4px}.supply-parcel>div{flex:1;min-width:160px}.supply-parcel>button{width:100%;background:#83b16f;font-size:12px}.supply-parcel .pixel-icon{width:52px;height:52px}.screen-page .gear-traits{padding:10px;background:#eadbb7;color:#7a633b;font-weight:700}

#arena{touch-action:none;cursor:crosshair;user-select:none;-webkit-user-select:none}
.pilot-bar{flex:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) 25px;gap:4px;height:40px;min-height:0}
.pilot-bar button{position:relative;overflow:hidden;display:grid;grid-template-columns:20px minmax(0,1fr);grid-template-rows:1fr 11px;column-gap:4px;min-width:0;min-height:0;padding:4px 6px;background:#d9e8d0;border:1px solid #709570;border-bottom-width:3px;border-radius:3px;text-align:left;box-shadow:inset 0 1px #edf5d9}
.pilot-bar button::after{content:'';position:absolute;inset:0 auto 0 0;width:var(--cooldown,0%);background:#42644d22;pointer-events:none}
.pilot-bar button>span{grid-row:1/3;align-self:center;font-size:22px;line-height:22px;color:#4d795e}.pilot-bar b{font:800 14px/14px 'Barlow Condensed',sans-serif;align-self:end;white-space:nowrap}.pilot-bar small{font:700 8px/10px monospace;color:#4e765d}.pilot-bar button:disabled{opacity:.58}.pilot-bar button.active{opacity:1;background:#a6e0db;border-color:#408d8c}.pilot-bar #pilotHelp{display:block;text-align:center;padding:0;font-size:15px;background:#eee2bd;color:#777044;border-color:#9b946c}
@media(max-width:740px){.pilot-bar{height:34px;grid-template-columns:repeat(4,minmax(0,1fr)) 22px;gap:3px}.pilot-bar button{grid-template-columns:15px minmax(0,1fr);grid-template-rows:1fr 9px;column-gap:2px;padding:3px 4px;border-bottom-width:2px}.pilot-bar button>span{font-size:18px;line-height:19px}.pilot-bar b{font-size:12px;line-height:12px}.pilot-bar small{font-size:7px;line-height:8px}.pilot-bar #pilotHelp{font-size:13px}}
@media(max-width:350px),(max-height:500px){.pilot-bar{height:31px}.pilot-bar button{grid-template-columns:12px minmax(0,1fr);padding:2px 3px}.pilot-bar button>span{font-size:15px}.pilot-bar b{font-size:11px;line-height:12px}.pilot-bar small{font-size:6px;line-height:8px}}

@media(orientation:landscape) and (min-width:480px) and (max-width:740px) and (max-height:500px){
 .game-shell{max-width:none}.masthead{height:44px!important}.hero-strip{height:34px}
 main.game-main{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(250px,1fr);grid-template-rows:minmax(0,1fr)}
 .workshop{height:100%;padding:4px}.workshop #panel{grid-template-rows:minmax(60px,1fr) minmax(65px,1fr) 18px}
 .battle-column{height:100%}.arena-top>span{max-width:90px}.arena-top>strong{font-size:12px}.skills button b{font-size:10px}.skills button{grid-template-columns:14px minmax(0,1fr)}.skills button>span{font-size:14px}
 .game-nav button{min-height:35px;flex-direction:row;gap:4px}.game-nav button .pixel-icon{width:23px;height:23px}
 .menu-toolbar:not(:empty){padding-top:5px;padding-bottom:5px;gap:4px}.menu-toolbar .collection-wallet>span{padding:2px}.menu-toolbar .collection-wallet b{font-size:14px}.menu-toolbar .collection-nav button{padding:4px 2px}
 .sheet[open]{grid-template-rows:35px auto minmax(0,1fr) 35px}.sheet-header h2{font-size:20px}.screen-stage{margin:7px!important}
}

.screen-page .summon-reveal{display:block}.summon-reveal small{white-space:normal;overflow-wrap:anywhere;line-height:1.6}
.screen-page .row-icon .pixel-icon{display:block;width:100%;height:auto;max-width:100%;object-fit:contain}
