/* MECH SQUAD: landscape HUD and menus. Every plate and icon is a generated image (assets/mech/ui/); text stays live. */
:root { --pink: #ff3fb4; --purple: #9b4dff; --gold: #ffcf3d; --ink: #f4efff; --dim: #b9addb; --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0d0820; color: var(--ink); font: 600 14px/1.25 Inter, system-ui, sans-serif; touch-action: none; user-select: none; -webkit-user-select: none; overscroll-behavior: none; }
canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#hud { pointer-events: none; }
.hide { display: none !important; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
b, h1, h2, .logo, .pill { font-family: 'Russo One', Inter, sans-serif; font-weight: 400; letter-spacing: 0.02em; }
.ico { display: inline-block; width: 100%; height: 100%; background: url(/assets/mech/ui/icons.webp) 0 0 / 400% 400% no-repeat; }
.ico-part { background-position: 33.333% 100%; } .ico-dash { background-position: 0% 100%; } .ico-up { background-position: 100% 100%; }
.ico-pause { background: url(/assets/mech/ui/pause.webp) center / contain no-repeat; } .ico-sound { background: url(/assets/mech/ui/sound.webp) center / contain no-repeat; }
.txt-shadow, .wave b, .bounty b, .banner, .left { text-shadow: 0 2px 0 #1a0b33, 0 0 14px rgba(155, 77, 255, 0.55); }

/* ---- HUD */
#game { position: fixed; inset: 0; pointer-events: none; }
#game .top { position: absolute; left: calc(10px + var(--safe-l)); right: calc(10px + var(--safe-r)); top: calc(8px + var(--safe-t)); display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.squad { display: flex; flex-direction: column; gap: 5px; width: min(34vw, 270px); }
.chip { display: grid; grid-template-columns: 34px 1fr; gap: 0 7px; align-items: center; padding: 4px 8px 4px 4px; border: 12px solid transparent; border-image: url(/assets/mech/ui/panel.webp) 60 fill / 12px stretch; padding: 0 2px; }
.chip img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; grid-row: span 2; background: #1c1236; }
.chip b { font-size: 11.5px; display: flex; justify-content: space-between; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .chip b small { font: 700 11px Inter; color: var(--dim); }
.chip .hp { height: 6px; border-radius: 3px; background: rgba(0, 0, 0, 0.5); overflow: hidden; } .chip .hp i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #6fffd2, #36e0ff); transition: width 0.15s; }
.chip.down { filter: grayscale(0.8) brightness(0.7); } .chip.me { filter: drop-shadow(0 0 6px rgba(255, 63, 180, 0.85)); }
.mid { text-align: center; flex: 1; max-width: 340px; }
.wave b { font-size: clamp(18px, 3.4vw, 28px); } .wave span { color: var(--dim); font: 700 13px Inter; margin-left: 12px; }
.mid .bar { height: 8px; margin: 4px auto 3px; width: 82%; border-radius: 5px; background: rgba(10, 4, 28, 0.7); box-shadow: 0 0 0 1px rgba(190, 150, 255, 0.35); overflow: hidden; }
.mid .bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff3fb4, #9b4dff); transition: width 0.2s; }
.left { font: 700 12px Inter; color: var(--ink); }
.right { display: flex; align-items: center; gap: 8px; pointer-events: auto; }
.bounty { display: flex; flex-direction: column; align-items: center; min-width: 110px; padding: 2px 10px 1px; border: 18px solid transparent; border-image: url(/assets/mech/ui/badge.webp) 90 fill / 18px stretch; }
.bounty span { font: 800 10.5px Inter; letter-spacing: 0.14em; color: #ffe7a0; } .bounty b { font-size: clamp(16px, 2.8vw, 22px); color: var(--gold); }
.bounty.bump b { animation: bump 0.35s; }
@keyframes bump { 40% { transform: scale(1.3); } }
.parts { display: flex; align-items: center; gap: 4px; } .parts .ico { width: 26px; height: 26px; } .parts b { font-size: 16px; color: #ffe08a; }
.round { width: 40px; height: 40px; } .round .ico { width: 100%; height: 100%; }
.boss { position: absolute; top: calc(74px + var(--safe-t)); left: 50%; transform: translateX(-50%); width: min(56vw, 520px); text-align: center; }
.boss span { font: 400 14px 'Russo One'; color: #ff8aa0; letter-spacing: 0.12em; } .boss .bar { height: 12px; border-radius: 6px; background: rgba(20, 0, 10, 0.75); box-shadow: 0 0 0 2px rgba(255, 70, 110, 0.6); overflow: hidden; margin-top: 3px; }
.boss .bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff2a55, #ff9a3a); transition: width 0.15s; }
.banner { position: absolute; top: 30%; left: 0; right: 0; text-align: center; font: 400 clamp(30px, 7vw, 64px) 'Russo One'; color: #fff; opacity: 0; pointer-events: none; }
.banner small { display: block; font: 800 clamp(13px, 2vw, 18px) Inter; color: var(--gold); letter-spacing: 0.08em; }
.banner.show { animation: banner 1.8s ease-out forwards; }
@keyframes banner { 0% { opacity: 0; transform: scale(1.6); } 12% { opacity: 1; transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: scale(0.96); } }
.xp { position: absolute; left: 50%; bottom: calc(6px + var(--safe-b)); transform: translateX(-50%); width: min(40vw, 360px); height: 7px; border-radius: 4px; background: rgba(10, 4, 28, 0.7); box-shadow: 0 0 0 1px rgba(255, 207, 61, 0.35); }
.xp i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #ffcf3d, #fff2a8); transition: width 0.25s; }
.xp b { position: absolute; right: 100%; top: 50%; transform: translate(-8px, -50%); font-size: 12px; color: var(--gold); white-space: nowrap; }

/* buttons: the right thumb */
.pad { position: absolute; right: calc(14px + var(--safe-r)); bottom: calc(14px + var(--safe-b)); width: 272px; height: 200px; pointer-events: none; }
.lpad { position: absolute; left: calc(14px + var(--safe-l)); bottom: calc(14px + var(--safe-b)); width: 250px; height: 200px; pointer-events: none; }
.btn { position: absolute; pointer-events: auto; border-radius: 50%; background: url(/assets/mech/ui/btn_ab.webp) center / contain no-repeat; touch-action: none; }
.btn .ico { position: absolute; inset: 18%; width: 64%; height: 64%; border-radius: 50%; }
.btn.on { transform: scale(0.92); filter: brightness(1.25); }
.atk { right: 0; bottom: 0; width: 112px; height: 112px; background-image: url(/assets/mech/ui/btn_atk.webp); }
.atk .ico { inset: 20%; width: 60%; height: 60%; }
.mel { right: 120px; bottom: 2px; width: 84px; height: 84px; background-image: url(/assets/mech/ui/btn_atk.webp); filter: hue-rotate(-28deg) saturate(1.2); } .mel .ico { filter: hue-rotate(28deg); }
.ab { width: 66px; height: 66px; } #b-ab1 { right: 112px; bottom: 96px; } #b-ab2 { right: 30px; bottom: 120px; }
.dash { width: 74px; height: 74px; left: 168px; bottom: 6px; }
.ult { width: 74px; height: 74px; right: 196px; bottom: 100px; background-image: url(/assets/mech/ui/btn_gold.webp); }
.ult svg { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); transform: rotate(-90deg); pointer-events: none; }
.ult circle { fill: none; stroke: var(--gold); stroke-width: 6; stroke-dasharray: 289; stroke-dashoffset: 289; stroke-linecap: round; filter: drop-shadow(0 0 6px #ffcf3d); }
.ult.ready { animation: ready 0.9s infinite; } @keyframes ready { 50% { filter: brightness(1.5) drop-shadow(0 0 14px #ffcf3d); } }
.ult:not(.ready) .ico { filter: grayscale(0.7) brightness(0.6); }
.cd { position: absolute; inset: 12%; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 400 18px 'Russo One'; background: rgba(8, 2, 20, 0.62); opacity: 0; }
.btn.cool .cd { opacity: 1; }
.stick { position: absolute; left: calc(22px + var(--safe-l)); bottom: calc(20px + var(--safe-b)); width: 140px; height: 140px; border-radius: 50%; background: url(/assets/mech/ui/stick.webp) center / contain no-repeat; opacity: 0.7; pointer-events: none; transition: opacity 0.15s; }
.stick.on { opacity: 1; transition: none; } @media (pointer: fine) { .stick, .lpad { display: none; } } .stick i { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px; border-radius: 50%; background: url(/assets/mech/ui/btn_ab.webp) center / contain no-repeat; }
.revive, .downed { position: absolute; left: 50%; top: 62%; transform: translateX(-50%); text-align: center; }
.revive b { color: #6fffd2; } .revive .bar { width: 160px; height: 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.6); overflow: hidden; margin-top: 4px; } .revive .bar i { display: block; height: 100%; background: #6fffd2; width: 0; }
.downed { top: 40%; padding: 14px 20px; border: 16px solid transparent; border-image: url(/assets/mech/ui/panel.webp) 60 fill / 16px stretch; max-width: 420px; }
.downed b { display: block; font-size: 24px; color: #ff9ad5; } .downed span { color: var(--dim); font-size: 13px; }

/* ---- cards */
.cards { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, rgba(30, 10, 60, 0.55), rgba(8, 3, 20, 0.82)); gap: 10px; }
.cards h2 { margin: 0; font-size: clamp(20px, 4vw, 30px); color: var(--gold); }
.cards .row { display: flex; gap: 14px; }
.card { width: clamp(130px, 22vw, 190px); aspect-ratio: 3 / 4; padding: 17% 8% 10%; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; background: url(/assets/mech/ui/card.webp) center / 100% 100% no-repeat; transition: transform 0.12s; }
.card:hover, .card:focus { transform: translateY(-6px) scale(1.04); } .card .ico { width: clamp(48px, 9vw, 76px); height: clamp(48px, 9vw, 76px); flex: none; }
.card b { font-size: clamp(14px, 2.2vw, 18px); color: #fff; } .card span { font-size: 12px; color: var(--dim); }
.cards p { margin: 0; color: var(--dim); font-weight: 700; }

/* ---- menu */
.menu, .results, .pausebox, .loading { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: calc(10px + var(--safe-t)) calc(14px + var(--safe-r)) calc(10px + var(--safe-b)) calc(14px + var(--safe-l)); }
.menu { background: linear-gradient(180deg, rgba(13, 8, 32, 0.25), rgba(13, 8, 32, 0.15) 50%, rgba(13, 8, 32, 0.75)); }
.logo { line-height: 0.9; text-align: center; font-size: clamp(34px, 7vw, 66px); }
.logo b { color: #fff; text-shadow: 0 4px 0 #3a1580, 0 0 24px rgba(155, 77, 255, 0.8); } .logo em { font-style: normal; color: var(--pink); margin-left: 0.25em; text-shadow: 0 4px 0 #5a0d3b, 0 0 24px rgba(255, 63, 180, 0.8); }
.heroes { display: flex; gap: 12px; }
.hero { width: clamp(120px, 20vw, 190px); background: rgba(16, 8, 36, 0.55); border-radius: 22px; padding: 0 0 4px; border: 14px solid transparent; border-image: url(/assets/mech/ui/panel.webp) 60 fill / 14px stretch; text-align: center; opacity: 0.86; transition: transform 0.15s, opacity 0.15s; }
.hero img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; }
.hero b { display: block; font-size: clamp(15px, 2.4vw, 20px); } .hero span { font-size: 11px; color: var(--dim); }
.hero.on { opacity: 1; transform: translateY(-6px) scale(1.05); filter: drop-shadow(0 0 16px rgba(255, 63, 180, 0.6)); }
.go { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.pill { min-width: 170px; padding: 0 12px; font-size: clamp(16px, 2.6vw, 20px); color: #fff; border: 22px solid transparent; border-image: url(/assets/mech/ui/pill.webp) 0 110 fill / 0 26px stretch; min-height: 54px; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }
.pill { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.pill.pink { border-image-source: url(/assets/mech/ui/pill_pink.webp); } .pill small { display: block; font: 700 12px Inter; opacity: 0.9; }
.pill:active { transform: scale(0.95); }
.note { margin: 0; color: var(--dim); font-size: 12px; min-height: 1em; text-align: center; max-width: 520px; }
.mute { position: absolute; right: calc(12px + var(--safe-r)); top: calc(10px + var(--safe-t)); }

/* ---- results */
.results { background: radial-gradient(ellipse at center, rgba(30, 10, 60, 0.6), rgba(8, 3, 20, 0.9)); }
.results h1 { margin: 0; font-size: clamp(30px, 6vw, 54px); color: var(--gold); text-shadow: 0 4px 0 #5a3a00, 0 0 24px rgba(255, 207, 61, 0.6); }
.near { margin: 0; color: #ffd0ec; font-weight: 800; }
.paid { display: flex; gap: 12px; } .paid div { min-width: 110px; padding: 0 6px; text-align: center; border: 14px solid transparent; border-image: url(/assets/mech/ui/panel.webp) 60 fill / 14px stretch; }
.paid span { display: block; font: 800 11.5px Inter; letter-spacing: 0.12em; color: var(--dim); } .paid b { font-size: 24px; color: #fff; }
.board { display: flex; flex-direction: column; gap: 4px; min-width: min(80vw, 460px); }
.board .row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 14px; align-items: center; padding: 5px 12px; border-radius: 10px; background: rgba(20, 10, 44, 0.7); font-size: 13px; }
.board .row button { font: 700 11px Inter; color: var(--dim); padding: 3px 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); }
.pausebox { background: rgba(8, 3, 20, 0.8); }
.loading { background: #0d0820 url(/assets/mech/ui/key.webp) center / cover no-repeat; z-index: 20; }
.loading .bar { width: min(60vw, 360px); height: 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.6); overflow: hidden; } .loading .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ff3fb4, #9b4dff); }
.loading p { color: var(--dim); margin: 0; }
.turn { display: none; position: fixed; inset: 0; z-index: 30; background: #0d0820 url(/assets/mech/ui/key.webp) center / cover no-repeat; align-items: flex-end; justify-content: center; padding: 0 20px 18vh; text-align: center; }
.turn div { padding: 16px 20px; border-radius: 18px; background: rgba(13, 8, 32, 0.82); box-shadow: 0 0 0 1px rgba(190, 150, 255, 0.35); }
.turn b { display: block; font-size: 22px; } .turn span { color: var(--dim); }
@media (orientation: portrait) and (pointer: coarse), (max-aspect-ratio: 1/1) { .turn { display: flex; } }
@media (max-height: 420px) { .pad { transform: scale(0.88); transform-origin: right bottom; } .lpad { transform: scale(0.88); transform-origin: left bottom; } .stick { width: 124px; height: 124px; } .squad { width: 190px; } .chip img { width: 28px; height: 28px; } .hero span { display: none; } }

/* ---- online */
.lobby, .squadbox { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: radial-gradient(ellipse at center, rgba(30, 10, 60, 0.6), rgba(8, 3, 20, 0.9)); padding: 12px; }
.lobby h2, .squadbox h2 { margin: 0; font-size: clamp(22px, 4vw, 32px); }
.code { font: 400 clamp(34px, 7vw, 56px) 'Russo One'; letter-spacing: 0.25em; color: var(--gold); text-shadow: 0 3px 0 #5a3a00, 0 0 20px rgba(255, 207, 61, 0.5); min-height: 0; }
.seats { display: flex; gap: 10px; }
.seat { width: clamp(120px, 20vw, 170px); padding: 0 4px 4px; text-align: center; border: 14px solid transparent; border-image: url(/assets/mech/ui/panel.webp) 60 fill / 14px stretch; }
.seat img { width: 64px; height: 64px; border-radius: 12px; display: block; margin: 0 auto 4px; }
.seat b { display: block; font-size: 14px; } .seat span { font-size: 11px; color: var(--dim); } .seat.empty { opacity: 0.55; }
.join { display: flex; gap: 8px; align-items: center; }
.join input { width: 170px; height: 54px; border-radius: 14px; border: 2px solid rgba(190, 150, 255, 0.5); background: rgba(10, 4, 28, 0.85); color: #fff; font: 400 26px 'Russo One'; letter-spacing: 0.2em; text-align: center; text-transform: uppercase; }
.chatbtn { position: absolute; left: calc(14px + var(--safe-l)); bottom: calc(176px + var(--safe-b)); width: 46px; height: 46px; pointer-events: auto; }
.chatbtn { background: url(/assets/mech/ui/btn_ab.webp) center / contain no-repeat; } .ico-chat { position: absolute; inset: 22%; width: 56%; height: 56%; background-position: 66.666% 100%; }
.chatwheel { position: absolute; left: calc(64px + var(--safe-l)); bottom: calc(14px + var(--safe-b)); display: grid; grid-template-columns: repeat(4, auto); gap: 6px; pointer-events: auto; }
.chatwheel .pill { min-width: 0; min-height: 40px; font-size: 13px; padding: 0 6px; }
.chatlog { position: absolute; left: calc(12px + var(--safe-l)); top: 48%; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.chatlog div { padding: 4px 10px; border-radius: 10px; background: rgba(13, 8, 32, 0.75); font-size: 13px; } .chatlog b { color: var(--pink); }

.hints span { position: absolute; padding: 6px 12px; border-radius: 12px; background: rgba(13, 8, 32, 0.78); box-shadow: 0 0 0 1px rgba(255, 63, 180, 0.6), 0 0 18px rgba(255, 63, 180, 0.35); font-weight: 800; font-size: 13px; animation: hint 1.4s ease-in-out infinite; }
.h-move { left: calc(34px + var(--safe-l)); bottom: calc(168px + var(--safe-b)); } .h-dash { left: calc(184px + var(--safe-l)); bottom: calc(104px + var(--safe-b)); } .h-atk { right: calc(296px + var(--safe-r)); bottom: calc(26px + var(--safe-b)); } .h-ab { right: calc(40px + var(--safe-r)); bottom: calc(214px + var(--safe-b)); }
@media (pointer: fine) { .h-dash { display: none; } .h-move { left: calc(60px + var(--safe-l)); bottom: 34%; } }
@keyframes hint { 50% { transform: translateY(-4px); } }

/* ---- garage */
.menu-bar { position: absolute; right: calc(10px + var(--safe-r)); top: calc(58px + var(--safe-t)); }
.menu-bar { display: flex; flex-direction: column; gap: 4px; } .menu-bar .pill { min-width: 132px; min-height: 42px; font-size: 14px; border-image-width: 0 20px; }
@media (max-width: 900px) { .heroes .hero { width: clamp(110px, 19vw, 170px); } .menu .heroes { margin-right: 130px; } }
.supply-btn.has { animation: ready 1.2s infinite; }
.garage { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: calc(8px + var(--safe-t)) calc(14px + var(--safe-r)) calc(8px + var(--safe-b)) calc(14px + var(--safe-l)); background: radial-gradient(ellipse at center, rgba(30, 10, 60, 0.9), rgba(8, 3, 20, 0.97)); }
.garage h2 { margin: 0; font-size: clamp(20px, 3.6vw, 28px); color: var(--gold); }
.g-parts { position: absolute; right: calc(16px + var(--safe-r)); top: calc(12px + var(--safe-t)); display: flex; align-items: center; gap: 6px; } .g-parts .ico { width: 30px; height: 30px; } .g-parts b { font-size: 20px; color: #ffe08a; } .g-parts span { color: var(--dim); font-size: 12px; }
.g-tabs { display: flex; gap: 8px; }
.g-tab { display: flex; align-items: center; gap: 6px; padding: 0 8px 0 0; border: 10px solid transparent; border-image: url(/assets/mech/ui/panel.webp) 60 fill / 10px stretch; opacity: 0.65; }
.g-tab img { width: 32px; height: 32px; border-radius: 8px; } .g-tab b { font-size: 14px; } .g-tab span { font-size: 11px; color: var(--dim); } .g-tab.on { opacity: 1; filter: drop-shadow(0 0 8px rgba(255, 63, 180, 0.7)); }
.g-body { display: flex; gap: 14px; align-items: center; }
.g-mech { width: clamp(130px, 22vw, 230px); aspect-ratio: 1; object-fit: contain; }
.g-rows { display: flex; flex-direction: column; gap: 6px; width: min(56vw, 520px); }
.g-row { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; padding: 0 6px; border: 12px solid transparent; border-image: url(/assets/mech/ui/panel.webp) 60 fill / 12px stretch; }
.g-row .ico { width: 42px; height: 42px; } .g-row b { font-size: 15px; display: block; } .g-row b small { font: 700 11px Inter; color: var(--dim); } .g-row span { font-size: 12px; color: var(--dim); }
.pips { display: flex; gap: 3px; margin-top: 3px; } .pips i { width: 12px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); } .pips i.on { background: linear-gradient(90deg, #ffcf3d, #fff2a8); }
.g-row .pill { min-width: 120px; min-height: 46px; font-size: 14px; } .g-row .pill[disabled] { opacity: 0.55; }
.g-goal { margin: 2px 0 0; font-weight: 800; color: #ffe08a; font-size: 13px; } .g-note { margin: 0; font-size: 11px; color: var(--dim); }
.g-close { position: absolute; left: calc(12px + var(--safe-l)); top: calc(10px + var(--safe-t)); min-width: 110px; min-height: 44px; }
@media (max-height: 420px) {
  .garage { gap: 4px; justify-content: flex-start; padding-top: calc(6px + var(--safe-t)); }
  .garage h2 { font-size: 18px; } .g-mech { width: 150px; } .g-rows { width: min(62vw, 520px); gap: 4px; }
  .g-row { border-width: 8px; grid-template-columns: 34px 1fr auto; gap: 8px; } .g-row .ico { width: 34px; height: 34px; }
  .g-row b { font-size: 13px; } .g-row span { font-size: 11px; } .g-row .pill { min-height: 38px; min-width: 104px; font-size: 13px; }
  .g-tab { border-width: 7px; } .g-tab img { width: 26px; height: 26px; } .g-goal { font-size: 12px; } .g-note { display: none; }
}

/* ---- supply drop */
.supply { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: radial-gradient(ellipse at center, rgba(30, 10, 60, 0.92), rgba(8, 3, 20, 0.97)); padding: 10px; }
.supply h2 { margin: 0; color: var(--gold); font-size: clamp(20px, 3.6vw, 28px); }
.s-row { display: flex; gap: 18px; align-items: center; }
.s-crate { width: clamp(150px, 26vw, 260px); filter: drop-shadow(0 0 24px rgba(155, 77, 255, 0.6)); transition: transform 0.2s; }
.s-crate.shake { animation: shake 0.6s; } @keyframes shake { 20%, 60% { transform: rotate(-6deg) scale(1.05); } 40%, 80% { transform: rotate(6deg) scale(1.08); } }
.s-odds { padding: 0 8px; border: 14px solid transparent; border-image: url(/assets/mech/ui/panel.webp) 60 fill / 14px stretch; min-width: 220px; }
.s-odds b { display: block; font-size: 14px; margin-bottom: 4px; } .s-odds div { display: flex; justify-content: space-between; gap: 14px; font-size: 13px; font-weight: 800; }
.s-odds p { margin: 6px 0 0; font-size: 11px; color: var(--dim); max-width: 240px; }
.s-reward { min-height: 40px; text-align: center; font: 400 clamp(20px, 4vw, 30px) 'Russo One'; } .s-reward small { display: block; font: 800 12px Inter; color: var(--dim); }
.s-go { display: flex; gap: 8px; }

.weapon { position: absolute; right: calc(14px + var(--safe-r)); bottom: calc(238px + var(--safe-b)); width: 150px; text-align: right; }
.weapon b { font-size: 15px; color: #ffd27a; text-shadow: 0 2px 0 #1a0b33; } .weapon .bar { height: 7px; margin-top: 3px; border-radius: 4px; background: rgba(10, 4, 28, 0.75); overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 210, 122, 0.45); }
.weapon .bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff8a3a, #ffd27a); }
@media (max-height: 420px) { .weapon { bottom: calc(205px + var(--safe-b)); } }

.heroes.many { max-width: min(78vw, 980px); overflow-x: auto; padding: 8px 4px; scrollbar-width: none; } .heroes.many .hero { flex: none; width: clamp(100px, 15vw, 160px); }

.touch-only { display: none; } @media (pointer: coarse) { .touch-only { display: inline-flex; } }
#tilt.on { filter: hue-rotate(160deg) brightness(1.15); }

/* ---- jetpack button (left thumb, above dash): the fuel ring drains while it burns, orange when low */
.jet { width: 74px; height: 74px; left: 168px; bottom: 92px; }
.jet b { position: absolute; left: 0; right: 0; top: -16px; font: 800 11px Inter; letter-spacing: 0.08em; color: #9ae8ff; text-shadow: 0 1px 3px #000; }
.jet svg { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); transform: rotate(-90deg); pointer-events: none; }
.jet circle { fill: none; stroke: #6ac8ff; stroke-width: 6; stroke-dasharray: 289; stroke-dashoffset: 0; stroke-linecap: round; filter: drop-shadow(0 0 6px #4ab8ff); transition: stroke-dashoffset 0.1s linear; }
.jet.low circle { stroke: #ff9a3a; filter: drop-shadow(0 0 6px #ff7a2a); }
.h-dash { bottom: calc(186px + var(--safe-b)); }

/* ---- locked mechs */
.hero.locked img { filter: grayscale(0.85) brightness(0.55); } .hero.locked em { font-style: normal; color: var(--gold); font-weight: 800; }
.g-tab.locked img { filter: grayscale(0.9) brightness(0.6); } .g-tab.locked span { color: var(--gold); }
.g-mech.locked { filter: grayscale(0.8) brightness(0.55) drop-shadow(0 0 18px rgba(255, 207, 61, 0.35)); }
.g-unlock { gap: 8px; } .g-big { font: 400 clamp(18px, 3vw, 24px) 'Russo One'; color: #fff; } .g-unlock > span { font-size: 13px; color: var(--dim); }
.g-acts { display: flex; flex-wrap: wrap; gap: 8px; } .g-acts .pill { min-width: 132px; min-height: 48px; font-size: 14px; } .g-acts .pill[disabled] { opacity: 0.55; }

/* ---- garage modes and weapon skins */
.g-modes { display: flex; gap: 6px; }
.g-mode { padding: 6px 16px; border-radius: 14px; font: 800 12px Inter; letter-spacing: 0.06em; color: var(--dim); background: rgba(16, 8, 36, 0.6); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12); }
.g-mode.on { color: #fff; background: rgba(255, 63, 180, 0.28); box-shadow: 0 0 0 1px rgba(255, 63, 180, 0.8), 0 0 12px rgba(255, 63, 180, 0.4); }
.g-skins { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.g-skin { display: flex; flex-direction: column; align-items: center; padding: 2px 2px 4px; border: 9px solid transparent; border-image: url(/assets/mech/ui/panel.webp) 60 fill / 9px stretch; text-align: center; min-width: 0; }
.g-skin img { width: 100%; max-width: 72px; aspect-ratio: 1; object-fit: contain; } .g-skin.locked img { filter: brightness(0.5) saturate(0.6); }
.g-skin b { font-size: 11px; line-height: 1.1; } .g-skin small { font-size: 11px; color: var(--dim); margin-bottom: 3px; }
.g-skin .pill { min-width: 0; min-height: 28px; padding: 0 10px; font-size: 11px; } .g-skin .pill[disabled] { opacity: 0.5; }
.g-skin .eq { font: 800 11.5px Inter; color: #9df27c; letter-spacing: 0.06em; padding: 7px 0; }
.g-skin.on { filter: drop-shadow(0 0 10px rgba(157, 242, 124, 0.55)); }
@media (max-height: 460px) {
  .g-skins { gap: 4px; } .g-skin { border-width: 6px; } .g-skin img { max-width: 46px; } .g-skin small { display: none; } .g-skin b { font-size: 11px; }
  .g-skin .pill { min-height: 26px; font-size: 11.5px; } .g-modes { margin-top: -4px; } .g-mode { padding: 4px 12px; font-size: 11px; }
}
@media (max-width: 600px) { .g-body { flex-direction: column; } .g-skins { grid-template-columns: repeat(3, 1fr); } .g-rows { width: 92vw; } }
/* garage on a sideways phone: four upgrade rows, the mode switch and the tabs clear of BACK */
@media (max-height: 460px) {
  .g-tabs { margin-left: 118px; margin-right: 120px; flex-wrap: nowrap; } .g-tab b { display: none; } .g-tab { padding-right: 4px; } .g-tab span { font-size: 11px; }
  .g-row { border-width: 5px; padding: 0 4px; } .g-row .pips { display: none; } .g-row .pill { min-height: 32px; min-width: 100px; font-size: 12px; }
  .g-row b { font-size: 13px; } .g-row span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .g-row .ico { width: 28px; height: 28px; }
  .g-row { grid-template-columns: 28px 1fr auto; } .g-rows { gap: 3px; } .g-goal { font-size: 11px; }
}
.hero .lk { display: none; }
@media (max-height: 420px) { .hero.locked .lk { display: block; font: 800 12px Inter; color: var(--gold); margin-top: -2px; } }
@media (max-height: 460px) {
  .g-row .pill { min-height: 0; height: 38px; border-top-width: 0; border-bottom-width: 0; line-height: 1.05; } .g-row .pill small { font-size: 11px; }
  .g-row > div { line-height: 1.15; } .garage { gap: 3px; } .g-body { margin-top: 0; }
}
/* seven mechs: the row scrolls sideways, stays clear of the buttons on the right, and fades at the edges */
.heroes.many { max-width: calc(100vw - 390px); width: max-content; justify-content: flex-start; -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 3%, #000 95%, transparent); }
.heroes.many .hero { width: clamp(96px, 13vw, 150px); }
@media (max-width: 900px) { .menu .heroes.many { max-width: calc(100vw - 300px); margin-right: 140px; } }
@media (max-height: 460px) { .g-tabs { margin-left: 124px; gap: 6px; } .g-tab span { font-size: 11.5px; } }
/* the four mode buttons stay on one row in every language (Portuguese and German words are longer): they share the
   width beside the side buttons and their text shrinks a little rather than wrapping under them */
@media (max-width: 1000px) {
  .menu .go { flex-wrap: nowrap; margin-right: 175px; gap: 8px; }
  .go .pill { min-width: 0; flex: 1 1 0; max-width: 190px; padding: 0 2px; white-space: normal; text-align: center; overflow-wrap: anywhere; font-size: clamp(12px, 1.9vw, 17px); line-height: 1; }
  .go .pill small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
}
/* small landscape phones (667-760 wide): slimmer side buttons and button edges, so the four modes fit beside them */
@media (max-width: 780px) {
  .menu-bar .pill { min-width: 0; width: 128px; font-size: 13px; }
  .menu-bar .pill small { font-size: 10px; }
  .menu .go { margin-right: 140px; gap: 6px; }
  .go .pill { border-left-width: 14px; border-right-width: 14px; border-image-width: 0 16px; font-size: 12px; min-height: 48px; }
}
