#geardetail{display:none}
html body #modal.gear-board{position:fixed;inset:calc(10px + var(--safe-top,0px)) calc(12px + var(--safe-right,0px)) calc(10px + var(--safe-bottom,0px)) calc(12px + var(--safe-left,0px));transform:none;width:auto;max-width:1100px;max-height:none;margin:auto;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto minmax(0,1fr) auto;gap:12px;padding:16px;overflow:hidden;background:linear-gradient(145deg,#263d60,#34304c);border:3px solid #f3d58c;border-radius:14px;box-shadow:inset 0 0 0 3px #8c6837,0 14px 50px #0009}
html body #modal.gear-board .modalcopy{grid-column:1;grid-row:1;text-align:left;min-height:0;margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:4px 18px}
html body #modal.gear-board .eyebrow{display:none}html body #modal.gear-board h2{font-size:clamp(22px,3vw,32px);margin:0;color:#fff4ce}
html body #modal.gear-board #modaltext{margin:0;padding:8px 16px;background:#101e2d;border:2px solid #d8b568;border-radius:6px;font-size:16px;font-weight:800;color:#ffdf7e}
html body #modal.gear-board .modalcards{grid-column:1/-1;grid-row:2;display:block;min-height:0;overflow:hidden;margin:0}
html body #modal.gear-board #upgrades{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:none;grid-auto-rows:minmax(145px,auto);align-content:start;gap:10px;height:100%;max-height:none;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;scrollbar-color:#e5c174 #1c2943;scrollbar-width:thin;padding:3px 8px 6px 3px;margin:0}
html body #modal.gear-board #upgrades .powerup-tile{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:145px;margin:0;padding:10px 6px;overflow:visible;transform:none;border:2px solid #cda864;border-radius:7px;background:linear-gradient(#53636a,#3b4d58);color:#fff8df;box-shadow:inset 0 0 0 2px #243645,0 3px 0 #182234;text-align:center;opacity:1}
html body #modal.gear-board #upgrades .powerup-tile[aria-pressed="true"]{background:linear-gradient(#476a93,#354f80);border-color:#ffe5a1;outline:2px solid #ffe5a1;outline-offset:1px}
html body #modal.gear-board #upgrades .powerup-tile.maxed{background:linear-gradient(#6b7050,#50563e)}
html body #modal.gear-board .powerup-tile b{font-size:16px;line-height:1.2;min-height:1.2em;margin:0;font-weight:800;color:inherit}
html body #modal.gear-board .upgradeart{width:48px;height:48px;min-height:48px;float:none;margin:0;border:2px solid #e4c27a;border-radius:7px;box-shadow:0 2px 0 #17293d}
html body #modal.gear-board .powerup-ranks{display:flex;flex-wrap:wrap;justify-content:center;gap:3px;max-width:150px;margin:0}
html body #modal.gear-board .powerup-ranks i{display:grid;place-items:center;width:14px;height:14px;border:1px solid #c3a264;background:#202238;color:#ffdf69;font-size:13px;font-weight:900;font-style:normal;line-height:1}
html body #modal.gear-board .powerup-ranks i.filled{background:#5d4b29}
html body #modal.gear-board .powerup-count{font-size:12px;color:#ece4c6;margin:0;line-height:1}
html body #modal.gear-board #geardetail{grid-column:1/-1;grid-row:3;display:flex;align-items:center;gap:14px;padding:12px;background:#192c40;border:2px solid #d8b568;border-radius:8px;min-width:0}
html body #modal.gear-board #geardetailart{flex:none}html body #modal.gear-board #geardetailart .upgradeart{display:block}
html body #modal.gear-board .gear-description{flex:1;min-width:0;text-align:left}html body #modal.gear-board .gear-description h3{margin:0 0 4px;font-size:18px;color:#ffe3a2}html body #modal.gear-board .gear-description p{margin:0 0 4px;font-size:16px;line-height:1.25}html body #modal.gear-board #geardetailrank{font-size:14px;color:#bed4dc}
html body #modal.gear-board #gearbuy{width:auto;max-width:220px;min-width:140px;margin:0;padding:12px;font-size:16px}html body #modal.gear-board #gearbuy:disabled{opacity:1;background:#40515f;color:#dbe0de;border-color:#8c9eaa;box-shadow:none;cursor:default}
html body #modal.gear-board .modalactions{grid-column:2;grid-row:1;display:flex;align-items:center;gap:8px;margin:0;min-height:0}html body #modal.gear-board #continue{width:auto;min-width:90px;margin:0;padding:10px 18px;min-height:44px;font-size:16px}
html body #modal.gear-board :is(#upgradepages,#pauseenemies,#modalmap,#quithome){display:none!important}
@media(max-width:600px){html body #modal.gear-board{padding:10px;gap:10px}html body #modal.gear-board #upgrades{grid-template-columns:repeat(3,minmax(0,1fr))}html body #modal.gear-board #geardetail{flex-wrap:wrap;gap:8px;padding:10px}html body #modal.gear-board #gearbuy{max-width:none;width:100%}html body #modal.gear-board #modaltext{padding:5px 9px;font-size:14px}}
@media(max-height:480px) and (orientation:landscape){html body #modal.gear-board{padding:8px;gap:7px}html body #modal.gear-board #upgrades{grid-auto-rows:135px}html body #modal.gear-board #upgrades .powerup-tile{min-height:135px;padding:7px}html body #modal.gear-board #geardetail{padding:8px}html body #modal.gear-board .gear-description h3{font-size:16px}html body #modal.gear-board #gearbuy{padding:8px}}
html body #modal.gear-board .upgradeart{background-image:url('art/upgrade-atlas.png');background-size:400% 300%;background-repeat:no-repeat}
