/* ShellStrike Arena — UI design system */
:root {
  --bg: #070b16;
  --panel: rgba(10, 16, 34, 0.86);
  --panel-2: rgba(20, 28, 58, 0.9);
  --line: rgba(120, 160, 255, 0.18);
  --line-hot: rgba(255, 194, 51, 0.55);
  --text: #e9edf9;
  --muted: #8b96b8;
  --gold: #ffc233;
  --gold-2: #ff9a1a;
  --red: #ff3b3b;
  --green: #5dff6a;
  --cyan: #4ad8ff;
  --purple: #b44dff;
  --display: 'Russo One', 'Arial Black', Impact, sans-serif;
  --ui: 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
  --r: 10px;
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 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: var(--bg); color: var(--text); font-family: var(--ui); font-weight: 600; user-select: none; -webkit-user-select: none; touch-action: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
a { color: var(--cyan); }
.hidden { display: none !important; }
#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

/* ── cards & shared ─────────────────────────────── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.04); }
.muted { color: var(--muted); }
h2, h3, h4 { font-family: var(--display); font-weight: 400; letter-spacing: .06em; margin: 0; }
h3 { font-size: 15px; color: var(--gold); margin-bottom: 10px; }
h3 small { color: var(--muted); font-family: var(--ui); font-size: 13px; }
h4 { font-size: 12px; color: var(--muted); margin: 0 0 8px; letter-spacing: .14em; }
.coin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; vertical-align: -3px; }
.coin.bc { background: radial-gradient(circle at 35% 35%, #fff4c0, #ffc233 45%, #a86a00); box-shadow: 0 0 8px rgba(255,194,51,.6); }

/* ── screens ────────────────────────────────────── */
.screen { position: fixed; inset: 0; display: none; z-index: 5; }
.screen.active { display: flex; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

#boot { align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 40%, #1a1440 0%, #070b16 70%); z-index: 50; }
.boot-inner { text-align: center; }
.boot-bar { width: 260px; height: 4px; background: rgba(255,255,255,.08); border-radius: 4px; margin: 28px auto 10px; overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 30%; background: linear-gradient(90deg, var(--gold-2), var(--gold)); animation: boot 1.1s ease-in-out infinite; }
@keyframes boot { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }
.boot-msg { color: var(--muted); font-size: 14px; letter-spacing: .1em; }

/* ── logo ───────────────────────────────────────── */
.logo { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; }
.logo-main { display: flex; align-items: center; }
.logo-word { font-family: var(--display); font-size: clamp(38px, 6vw, 76px); letter-spacing: .01em; transform: skewX(-9deg);
  background: linear-gradient(180deg, #ffffff 0%, #e6ebf5 38%, #9aa3b8 49%, #ff6a3a 52%, #d31d10 78%, #7a0a06 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #1a0604) drop-shadow(0 0 18px rgba(255,80,40,.35)); position: relative; }
.logo-shell { width: clamp(64px, 9vw, 118px); margin-left: -4px; filter: drop-shadow(0 0 10px rgba(255,160,60,.55)); }
.logo-arena { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.logo-arena span { font-family: var(--display); font-size: clamp(22px, 3.2vw, 40px); letter-spacing: .5em; padding-left: .5em;
  background: linear-gradient(180deg, #fff3b0, #ffc233 55%, #c47a00); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #3a2200); }
.logo-arena i { width: clamp(30px, 5vw, 70px); height: 2px; background: linear-gradient(90deg, transparent, var(--gold)); }
.logo-arena i:last-child { transform: scaleX(-1); }
.logo-tag { margin-top: 12px; font-size: clamp(12px, 1.4vw, 16px); letter-spacing: .45em; color: #cfd6ea; }
.logo-tag b { color: var(--red); }

/* ── lobby ──────────────────────────────────────── */
#lobby { background: linear-gradient(90deg, rgba(7,11,22,.92) 0%, rgba(7,11,22,.55) 42%, rgba(7,11,22,0) 70%); padding: 3vh calc(3vw + var(--safe-l)); gap: 3vw; justify-content: space-between; align-items: stretch; }
.lobby-left { display: flex; flex-direction: column; justify-content: center; max-width: 560px; min-width: 0; }
.lobby-left .logo { align-self: flex-start; margin-bottom: 3.2vh; }
.menu { display: flex; flex-direction: column; gap: 9px; }
.menu-btn { position: relative; text-align: left; padding: 12px 22px; background: var(--panel); border: 1px solid var(--line); clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%); transition: transform .12s, background .12s, border-color .12s; }
.menu-btn span { display: block; font-family: var(--display); font-size: 21px; letter-spacing: .08em; }
.menu-btn small { color: var(--muted); font-size: 13px; }
.menu-btn:hover:not(.locked) { transform: translateX(6px); background: var(--panel-2); border-color: var(--line-hot); }
.menu-btn.primary { background: linear-gradient(90deg, #ff3b1f, #ff9a1a); border: 0; box-shadow: 0 0 28px rgba(255,90,30,.45); }
.menu-btn.primary small { color: rgba(255,255,255,.85); }
.menu-btn.primary span { font-size: 28px; color: #fff; text-shadow: 0 2px 0 rgba(90,10,0,.5); }
.locked { opacity: .55; cursor: not-allowed; }
.menu-btn em, .menu-sm em { position: absolute; right: 26px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 11px; padding: 2px 7px; border: 1px solid var(--muted); border-radius: 4px; color: var(--muted); letter-spacing: .1em; }
.menu-sm em { position: static; transform: none; margin-left: 6px; font-size: 9px; padding: 1px 4px; }
.menu-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.menu-sm { padding: 11px 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; font-family: var(--display); font-size: 14px; letter-spacing: .08em; transition: border-color .12s, background .12s; }
.menu-sm:hover:not(.locked) { border-color: var(--line-hot); background: var(--panel-2); }
.lobby-right { display: flex; flex-direction: column; justify-content: center; gap: 12px; width: 300px; flex-shrink: 0; }
.pilot { padding: 16px; }
.pilot-top { display: flex; gap: 12px; align-items: center; }
.lvl-badge { width: 48px; height: 48px; display: grid; place-items: center; font-family: var(--display); font-size: 20px; color: #1a1000; background: linear-gradient(160deg, #fff3b0, #ffc233 50%, #c47a00); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.pilot-name { font-family: var(--display); font-size: 18px; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.pilot-sub { font-size: 12px; color: var(--muted); }
.xpbar { height: 8px; background: rgba(255,255,255,.07); border-radius: 6px; margin: 14px 0 4px; overflow: hidden; }
.xpbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), #8a7dff); box-shadow: 0 0 10px var(--cyan); transition: width .6s ease; }
.xptext { font-size: 12px; color: var(--muted); text-align: right; }
.wallet { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 20px; }
.wallet small { color: var(--muted); font-size: 12px; }

/* ── multiplayer ── */
#mp-body { max-width: 1100px; margin: 0 auto; }
.mp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.mp-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.mp-card h3 { font-family: var(--display); font-weight: 400; letter-spacing: .06em; margin: 0 0 8px; font-size: 18px; }
.mp-card label { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 8px 0; color: var(--muted); }
.mp-card select, .mp-card input { background: rgba(0,0,0,.35); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font: inherit; }
.mp-card .btn-main { margin-top: 10px; width: 100%; }
.mp-note { max-width: 520px; margin: 30px auto; text-align: center; }
.mp-code-input { width: 100%; box-sizing: border-box; font-family: var(--display); font-size: 30px; letter-spacing: .3em; text-align: center; text-transform: uppercase; }
.mp-fine { text-align: center; font-size: 13px; margin-top: 16px; }
.mp-room { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mp-codebox { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.mp-codebox small { color: var(--muted); letter-spacing: .12em; }
.mp-codebox b { font-family: var(--display); font-size: 36px; letter-spacing: .25em; color: var(--gold); }
.mp-players { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mp-players li { display: grid; grid-template-columns: 14px 1fr auto; column-gap: 10px; align-items: center; background: rgba(255,255,255,.03); border-radius: 8px; padding: 8px 10px; }
.mp-players li.off { opacity: .45; }
.mp-players i { width: 14px; height: 14px; border-radius: 50%; }
.mp-players small { display: block; color: var(--muted); }
.mp-players .mp-ready { font-size: 12px; letter-spacing: .08em; color: var(--muted); border: 1px solid var(--line); border-radius: 12px; padding: 2px 9px; }
.mp-players .mp-ready.on { color: var(--green); border-color: rgba(93,255,106,.45); }
.mp-host { font-size: 10px; color: var(--gold); border: 1px solid var(--line-hot); border-radius: 4px; padding: 0 4px; margin-left: 4px; }
.chips.mp-colors { margin-top: 10px; }
.chips.mp-colors button { width: 28px; height: 28px; min-width: 0; padding: 0; border-radius: 50%; border: 2px solid transparent; }
.mp-colors button.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.6); }
.mp-lchat { display: flex; flex-direction: column; }
.mp-chatlog { flex: 1; min-height: 110px; max-height: 180px; overflow-y: auto; font-size: 14px; display: grid; align-content: start; gap: 3px; margin-bottom: 8px; }
.mp-lchat form { display: flex; gap: 8px; } .mp-lchat input { flex: 1; }
.mp-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 12px; }
.mp-actions .btn-main { width: auto; margin: 0; min-width: 220px; }
.mp-standings { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 15px; }
.mp-standings th, .mp-standings td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.mp-standings th { color: var(--muted); font-size: 11px; letter-spacing: .1em; }
.mp-standings tr.me td { color: var(--gold); }
@media (max-width: 760px) { .mp-room { grid-template-columns: 1fr; } }

/* ── accounts ── */
.acct-btn { margin-top: 12px; width: 100%; font-family: var(--display); font-size: 13px; letter-spacing: .08em; padding: 9px 12px; border-radius: 6px; border: 1px solid var(--line-hot); background: rgba(255,194,51,.08); color: var(--gold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-btn:hover { background: rgba(255,194,51,.16); }
.acct-btn.muted-btn { border-color: var(--line); background: transparent; color: var(--muted); }
.acct-form { text-align: left; }
.acct-field { display: block; margin: 0 0 10px; }
.acct-field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.acct-field input { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--line); background: rgba(0,0,0,.35); color: var(--text); }
.acct-field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255,194,51,.2); }
.acct-ferr, .acct-err { display: block; color: #ff8a8a; font-size: 13px; min-height: 0; margin-top: 3px; }
.acct-err { background: rgba(255,59,59,.1); border: 1px solid rgba(255,59,59,.35); border-radius: 6px; padding: 8px 10px; margin: 6px 0 0; }
.acct-err[hidden] { display: none; }
.acct-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text); margin: 4px 0 2px; }
.acct-check input { margin-top: 3px; width: 16px; height: 16px; flex-shrink: 0; }
.acct-check a, .acct-foot a { color: var(--cyan); }
.acct-foot { margin-top: 12px; font-size: 14px; color: var(--muted); text-align: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--cyan); font: inherit; cursor: pointer; text-decoration: underline; }
.acct-msg { text-align: left; color: #c9cfe4; }
.acct-card { display: grid; gap: 10px; text-align: left; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.acct-card small { display: block; color: var(--muted); font-size: 11px; letter-spacing: .1em; }
.acct-card b { font-size: 16px; word-break: break-all; }
.chip-ok { font-size: 10px; letter-spacing: .1em; color: var(--green); border: 1px solid rgba(93,255,106,.45); border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: middle; }
.acct-import { margin-top: 12px; text-align: left; font-size: 14px; background: rgba(74,216,255,.07); border: 1px solid rgba(74,216,255,.3); border-radius: 8px; padding: 10px 12px; display: grid; gap: 8px; }
.btn-sec.danger, .btn-main.danger { border-color: rgba(255,59,59,.6); color: #ff8a8a; }
.btn-main.danger { background: linear-gradient(135deg, #b3122a, #ff3b3b); color: #fff; }
.daily { padding: 14px 16px; }
.daily ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.daily li { font-size: 14px; }
.daily .dm-top { display: flex; justify-content: space-between; gap: 8px; }
.daily .dm-bar { height: 4px; background: rgba(255,255,255,.07); border-radius: 3px; margin-top: 4px; overflow: hidden; }
.daily .dm-bar i { display: block; height: 100%; background: var(--green); }
.daily button { font-size: 12px; padding: 2px 8px; border-radius: 4px; background: var(--green); color: #032a08; }
.daily .done { color: var(--muted); text-decoration: line-through; }
.lobby-foot { position: fixed; left: calc(3vw + var(--safe-l)); bottom: calc(10px + var(--safe-b)); font-size: 12px; color: var(--muted); }

/* ── panel screens ──────────────────────────────── */
.panel-screen { flex-direction: column; background: rgba(5,8,18,.9); padding: 16px calc(3vw + var(--safe-l)) 20px calc(3vw + var(--safe-r)); overflow-y: auto; touch-action: pan-y; gap: 14px; }
.ph { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.ph h2 { font-size: 26px; color: #fff; }
.ph-right { margin-left: auto; font-size: 18px; display: flex; gap: 8px; align-items: center; }
.back { font-family: var(--display); font-size: 14px; letter-spacing: .08em; padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.back:hover { border-color: var(--line-hot); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }
.tabs button { padding: 9px 16px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); font-family: var(--display); font-size: 13px; letter-spacing: .08em; color: var(--muted); }
.tabs button.on { color: #1a1000; background: linear-gradient(180deg, #ffd96a, var(--gold)); border-color: transparent; }
.mode-desc { margin: 0; color: var(--muted); font-size: 15px; }
section { flex-shrink: 0; }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.map-card { position: relative; border-radius: 8px; overflow: hidden; border: 2px solid transparent; background: #0b1020; text-align: left; transition: transform .12s, border-color .12s; }
.map-card img { display: block; width: 100%; aspect-ratio: 320/150; object-fit: cover; }
.map-card .mc-txt { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 7px; background: linear-gradient(transparent, rgba(0,0,0,.85)); }
.map-card b { font-family: var(--display); font-weight: 400; font-size: 15px; letter-spacing: .05em; display: block; }
.map-card small { color: #c9cfe4; font-size: 12px; }
.map-card.on { border-color: var(--gold); box-shadow: 0 0 18px rgba(255,194,51,.35); }
.map-card:hover:not(.locked) { transform: translateY(-2px); }
.lock-tag { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.75); padding: 3px 8px; border-radius: 4px; font-size: 12px; letter-spacing: .08em; }
.tank-row { display: flex; gap: 10px; flex-wrap: wrap; }
.tank-chip { width: 150px; padding: 8px; border-radius: 8px; background: var(--panel); border: 2px solid var(--line); text-align: center; position: relative; }
.tank-chip img { width: 100%; height: 62px; object-fit: contain; }
.tank-chip b { display: block; font-family: var(--display); font-weight: 400; font-size: 14px; }
.tank-chip small { color: var(--muted); font-size: 12px; }
.tank-chip.on { border-color: var(--gold); box-shadow: 0 0 16px rgba(255,194,51,.3); }
.opts { display: flex; gap: 30px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { padding: 8px 14px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); font-size: 15px; }
.chips button.on { border-color: var(--gold); color: var(--gold); background: rgba(255,194,51,.08); }
.swatch { display: inline-flex; align-items: center; gap: 7px; }
.swatch i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.deploy-bar { display: flex; justify-content: flex-end; margin-top: auto; padding-top: 6px; position: sticky; bottom: 0; }
.btn-deploy, .btn-main { font-family: var(--display); font-size: 22px; letter-spacing: .1em; padding: 12px 38px; color: #fff; background: linear-gradient(90deg, #ff3b1f, #ff9a1a); clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%); box-shadow: 0 0 24px rgba(255,90,30,.4); transition: filter .12s, transform .12s; }
.btn-deploy:hover, .btn-main:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-sec { font-family: var(--display); font-size: 16px; letter-spacing: .08em; padding: 11px 24px; border: 1px solid var(--line); background: var(--panel-2); border-radius: 6px; }
.btn-sec:hover { border-color: var(--line-hot); }
.btn-danger { padding: 9px 16px; border-radius: 6px; border: 1px solid rgba(255,59,59,.6); color: #ff8a8a; background: rgba(255,59,59,.08); }

.mission-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.mission { text-align: left; border-radius: 10px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); position: relative; transition: transform .12s, border-color .12s; }
.mission:hover:not(.locked) { transform: translateY(-2px); border-color: var(--line-hot); }
.mission img { width: 100%; display: block; aspect-ratio: 320/120; object-fit: cover; }
.mission .mi { padding: 10px 12px 12px; }
.mission .mi-num { font-size: 12px; color: var(--gold); letter-spacing: .12em; }
.mission b { font-family: var(--display); font-weight: 400; font-size: 17px; display: block; margin: 2px 0 4px; }
.mission p { margin: 0; font-size: 13px; color: var(--muted); min-height: 34px; }
.mission .foes { font-size: 12px; margin-top: 6px; color: #c8d0ea; }
.stars { color: #3a4468; letter-spacing: 2px; font-size: 16px; }
.stars .s-on { color: var(--gold); text-shadow: 0 0 8px rgba(255,194,51,.7); }
.badge-diff { position: absolute; top: 8px; right: 8px; font-size: 11px; padding: 2px 8px; border-radius: 4px; background: rgba(0,0,0,.7); letter-spacing: .08em; }
.done-tag { position: absolute; top: 8px; left: 8px; font-size: 11px; padding: 2px 8px; border-radius: 4px; background: var(--green); color: #032a08; }

.armory-body { display: grid; grid-template-columns: 1fr 320px; gap: 14px; min-height: 0; }
.weapon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; align-content: start; }
.wcard { border-radius: 8px; overflow: hidden; background: var(--panel); border: 2px solid var(--line); text-align: center; padding-bottom: 6px; position: relative; }
.wcard img { width: 100%; display: block; aspect-ratio: 1; }
.wcard span { font-size: 13px; display: block; padding: 4px 4px 0; line-height: 1.1; }
.wcard .lvl { position: absolute; top: 4px; left: 4px; font-size: 10px; background: rgba(0,0,0,.7); padding: 1px 5px; border-radius: 3px; color: var(--gold); }
.wcard.on { border-color: var(--gold); }
.wcard.locked img { filter: grayscale(1) brightness(.5); }
.wcard.locked::after { content: attr(data-lock); position: absolute; top: 34%; left: 0; right: 0; font-size: 13px; letter-spacing: .08em; }
.weapon-detail { padding: 16px; align-self: start; position: sticky; top: 0; }
.weapon-detail img { width: 96px; border-radius: 8px; float: left; margin-right: 12px; }
.weapon-detail h3 { margin: 0 0 2px; font-size: 18px; color: #fff; }
.rarity { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.weapon-detail p { clear: both; padding-top: 10px; color: #c9cfe4; font-size: 14px; margin: 0; }
.statline { display: grid; grid-template-columns: 90px 1fr 44px; align-items: center; gap: 8px; font-size: 13px; margin-top: 7px; }
.statline .sb { height: 6px; background: rgba(255,255,255,.07); border-radius: 4px; overflow: hidden; }
.statline .sb i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), #8a7dff); }
.statline .sb i.up { background: linear-gradient(90deg, var(--gold-2), var(--gold)); }
.upgrade-box { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.pips { display: flex; gap: 5px; margin: 6px 0 10px; }
.pips i { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.1); }
.pips i.on { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.small-note { font-size: 12px; color: var(--muted); margin-top: 8px; }

.garage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.gcard { padding: 14px; text-align: center; position: relative; }
.gcard img { width: 100%; height: 110px; object-fit: contain; }
.gcard .cls { font-size: 12px; letter-spacing: .16em; }
.gcard b { font-family: var(--display); font-weight: 400; font-size: 20px; display: block; }
.gcard p { font-size: 13px; color: var(--muted); min-height: 36px; margin: 6px 0; }
.gcard .gstats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; text-align: left; font-size: 13px; margin: 8px 0 12px; }
.gcard .gstats span { color: var(--muted); }
.gcard.sel { border-color: var(--gold); box-shadow: 0 0 20px rgba(255,194,51,.25); }

.profile-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.profile-body .card { padding: 16px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.field input { font: inherit; font-size: 18px; color: var(--text); background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; user-select: text; -webkit-user-select: text; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-grid div { background: rgba(255,255,255,.03); border-radius: 6px; padding: 8px 10px; }
.stat-grid small { display: block; color: var(--muted); font-size: 12px; }
.stat-grid b { font-size: 20px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.ach { padding: 8px; border-radius: 8px; background: rgba(255,255,255,.03); border: 1px solid var(--line); opacity: .45; }
.ach.on { opacity: 1; border-color: var(--line-hot); }
.ach i { font-style: normal; font-size: 20px; color: var(--gold); }
.ach b { display: block; font-size: 14px; }
.ach small { color: var(--muted); font-size: 12px; }
.history { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.history li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.win { color: var(--green); } .loss { color: #ff7a7a; }
.settings-card, .notice, .howto-card { padding: 20px; max-width: 640px; width: 100%; }
.notice p { color: #c9cfe4; line-height: 1.45; }
.slider, .toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0; font-size: 16px; }
.toggle { justify-content: flex-start; }
.slider input { flex: 1; max-width: 55%; margin-left: auto; accent-color: var(--gold); touch-action: none; }
.vol-val { width: 44px; text-align: right; font-size: 14px; color: var(--gold); }
.toggle input { width: 20px; height: 20px; accent-color: var(--gold); }
.settings-card h3 { margin-top: 16px; }
.howto-card dl { display: grid; grid-template-columns: 170px 1fr; gap: 10px 16px; margin: 0; font-size: 15px; }
.howto-card dt { color: var(--gold); }
.howto-card dd { margin: 0; color: #c9cfe4; }
kbd { font-family: var(--ui); font-size: 13px; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: rgba(255,255,255,.05); }

/* ── HUD ────────────────────────────────────────── */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#hud .card, #hud button, #hud input, #weapon-tray { pointer-events: auto; }
.hud-top { position: absolute; top: 10px; left: calc(10px + var(--safe-l)); right: calc(10px + var(--safe-r)); display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hud-player { padding: 10px 14px; min-width: 230px; position: relative; overflow: hidden; }
.hud-player > :not(.hp-banner) { position: relative; }
.hp-banner { position: absolute; inset: 0; opacity: .55; pointer-events: none; }
.hp-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,12,22,.35), rgba(8,12,22,.85)); }
.hp-bdg { color: #ffd24a; margin-right: 5px; }
.res-banner { display: flex; align-items: center; justify-content: center; gap: 8px; margin: -4px auto 10px; max-width: 360px; padding: 6px 14px; border-radius: 8px; font-family: var(--display); letter-spacing: .06em; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); text-shadow: 0 1px 3px #000; }
.vfx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 35; }
.hp-head { display: flex; align-items: center; gap: 8px; }
.hp-head .lvl-badge { width: 30px; height: 30px; font-size: 13px; }
.hp-name { font-family: var(--display); font-size: 16px; letter-spacing: .04em; }
.hp-cls { font-size: 11px; letter-spacing: .14em; }
.hpbar { position: relative; height: 12px; background: rgba(0,0,0,.45); border-radius: 6px; overflow: hidden; margin-top: 8px; }
.hpbar i { position: absolute; inset: 0 auto 0 0; transition: width .3s ease; }
.hpbar .hp-fill { background: linear-gradient(90deg, #2fd12a, var(--green)); box-shadow: 0 0 10px rgba(93,255,106,.6); }
.hpbar .hp-ghost { background: rgba(255,255,255,.35); transition: width .9s ease .3s; }
.hpbar span { position: absolute; right: 6px; top: -2px; font-size: 12px; text-shadow: 0 1px 2px #000; }
.status-row { display: flex; gap: 5px; margin-top: 6px; min-height: 16px; font-size: 11px; letter-spacing: .08em; }
.status-row span { padding: 0 6px; border-radius: 3px; background: rgba(255,255,255,.08); }
.hud-center { text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 18px 8px; min-width: 150px; pointer-events: auto; }
.hud-turn { font-size: 12px; letter-spacing: .2em; color: var(--muted); }
.hud-turn b { color: var(--text); }
.hud-timer { font-family: var(--display); font-size: 26px; line-height: 1.1; }
.hud-timer.low { color: var(--red); animation: pulse .5s ease infinite alternate; }
@keyframes pulse { to { opacity: .55; } }
.hud-wind { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 16px; color: var(--cyan); }
.hud-wind b { min-width: 22px; }
.wind-arrow { display: inline-block; height: 10px; background: linear-gradient(90deg, rgba(74,216,255,.1), var(--cyan)); position: relative; border-radius: 2px; transition: width .4s; }
.wind-arrow::after { content: ''; position: absolute; right: -8px; top: -5px; border: 10px solid transparent; border-left: 10px solid var(--cyan); border-right: 0; }
.wind-arrow.left { transform: scaleX(-1); }
.hud-enemies { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.enemy-card { padding: 7px 12px; min-width: 190px; }
.enemy-card.active { border-color: var(--line-hot); box-shadow: 0 0 14px rgba(255,194,51,.25); }
.enemy-card.dead { opacity: .4; }
.enemy-card .ec-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.enemy-card .ec-top small { color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.enemy-card .hpbar { height: 7px; margin-top: 5px; }
.hud-tools { position: absolute; top: 118px; left: calc(10px + var(--safe-l)); display: flex; gap: 6px; }
.icon-btn { width: 40px; height: 40px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); font-size: 16px; display: grid; place-items: center; }
.icon-btn.on { border-color: var(--gold); color: var(--gold); }
.hud-bottom { position: absolute; left: calc(10px + var(--safe-l)); right: calc(10px + var(--safe-r)); bottom: calc(10px + var(--safe-b)); display: flex; align-items: flex-end; gap: 10px; }
.hud-move { padding: 10px 12px; width: 180px; }
.lbl { font-size: 11px; letter-spacing: .16em; color: var(--muted); }
.lbl b { color: var(--text); float: right; letter-spacing: 0; font-size: 13px; }
.fuelbar { height: 8px; background: rgba(0,0,0,.45); border-radius: 5px; overflow: hidden; margin: 5px 0 8px; }
.fuelbar i { display: block; height: 100%; background: linear-gradient(90deg, #ff9a1a, var(--gold)); transition: width .1s; }
.move-btns { display: flex; gap: 8px; }
.move-btns button { flex: 1; height: 44px; border-radius: 8px; background: rgba(255,255,255,.06); border: 1px solid var(--line); font-size: 18px; }
.move-btns button:active, .hold.pressed { background: rgba(255,194,51,.2); border-color: var(--gold); }
.hud-aim { padding: 8px 12px; width: 230px; }
.aim-row { display: grid; grid-template-columns: 58px 36px 1fr 36px; align-items: center; gap: 6px; margin-bottom: 5px; }
.aim-row b { text-align: center; font-family: var(--display); font-weight: 400; font-size: 22px; }
.step { height: 34px; border-radius: 7px; background: rgba(255,255,255,.06); border: 1px solid var(--line); font-size: 18px; }
#pow-slider { width: 100%; accent-color: var(--gold); margin: 2px 0 0; }
.fire-btn { width: 118px; height: 118px; border-radius: 50%; font-family: var(--display); font-size: 28px; letter-spacing: .08em; color: #fff; flex-shrink: 0;
  background: radial-gradient(circle at 40% 30%, #ffb05a, #ff3b1f 55%, #a3120a); border: 3px solid rgba(255,220,160,.7);
  box-shadow: 0 0 0 6px rgba(255,80,30,.18), 0 0 34px rgba(255,80,30,.6); text-shadow: 0 2px 0 rgba(80,0,0,.6); transition: transform .1s, filter .1s; }
.fire-btn:hover { filter: brightness(1.1); }
.fire-btn:active { transform: scale(.94); }
.fire-btn.ready { animation: fireGlow 1.4s ease-in-out infinite; }
@keyframes fireGlow { 50% { box-shadow: 0 0 0 10px rgba(255,80,30,.12), 0 0 50px rgba(255,120,40,.85); } }
#hud.waiting .hud-bottom .card, #hud.waiting .fire-btn { opacity: .45; pointer-events: none; }
#weapon-tray { position: absolute; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; padding-bottom: calc(96px + var(--safe-b)); }
.tray-inner { padding: 12px; width: min(760px, 94vw); max-height: 70vh; overflow-y: auto; touch-action: pan-y; }
.tray-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--display); letter-spacing: .1em; margin-bottom: 10px; }
.tray-head .icon-btn { width: 32px; height: 32px; }
.tray-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.tray-grid .wcard .ammo { position: absolute; top: 4px; right: 4px; font-size: 12px; background: rgba(0,0,0,.75); padding: 0 6px; border-radius: 3px; }
.tray-grid .wcard.empty { opacity: .35; }
#turn-banner { position: absolute; top: 34%; left: 0; right: 0; text-align: center; font-family: var(--display); font-size: clamp(30px, 5vw, 56px); letter-spacing: .1em; opacity: 0; transform: scale(.9); transition: opacity .25s, transform .25s; text-shadow: 0 4px 20px rgba(0,0,0,.8); pointer-events: none; }
#turn-banner.show { opacity: 1; transform: scale(1); }
#turn-banner small { display: block; font-family: var(--ui); font-size: 16px; letter-spacing: .3em; color: #d8def0; }
#fps { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); }

/* ── modal / toast ──────────────────────────────── */
#modal { position: fixed; inset: 0; z-index: 30; background: rgba(3,5,12,.72); display: grid; place-items: center; padding: 16px; }
.modal-card { width: min(620px, 100%); max-height: 94vh; overflow-y: auto; padding: 22px 24px; text-align: center; touch-action: pan-y; }
.modal-card h2 { font-size: 40px; letter-spacing: .1em; }
.modal-card h2.victory { background: linear-gradient(180deg, #fff3b0, var(--gold) 55%, #c47a00); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 16px rgba(255,194,51,.5)); }
.modal-card h2.defeat { color: #ff5a4a; text-shadow: 0 0 16px rgba(255,59,59,.5); }
.modal-card .sub { color: var(--muted); letter-spacing: .2em; font-size: 14px; margin: 4px 0 14px; }
.res-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.res-stats div { background: rgba(255,255,255,.04); border-radius: 8px; padding: 8px; }
.res-stats small { display: block; color: var(--muted); font-size: 12px; letter-spacing: .08em; }
.res-stats b { font-size: 22px; }
.rewards { display: flex; justify-content: center; gap: 22px; font-size: 22px; margin: 6px 0 10px; }
.rewards .xp { color: var(--cyan); }
.rewards .cr { color: var(--gold); }
.unlocks { list-style: none; padding: 0; margin: 8px 0 12px; display: flex; flex-direction: column; gap: 6px; }
.unlocks li { background: rgba(255,194,51,.08); border: 1px solid rgba(255,194,51,.3); border-radius: 6px; padding: 6px 10px; font-size: 15px; }
.modal-btns { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.modal-card .big-stars { font-size: 34px; letter-spacing: 6px; }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--panel-2); border: 1px solid var(--line-hot); padding: 10px 18px; border-radius: 8px; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 40; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#rotate-hint { display: none; }

/* ── store ──────────────────────────────────────── */
.coin.sc { background: radial-gradient(circle at 35% 35%, #e8f6ff, #4ad8ff 45%, #2a4aff); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); border-radius: 0; box-shadow: none; }
.coin.big { width: 28px; height: 28px; vertical-align: -6px; }
.store-wallet { gap: 18px; }
.store-wallet > span { display: inline-flex; align-items: center; gap: 6px; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; align-items: start; }
.pk { position: relative; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.pk.owned { opacity: .6; }
.pk h3 { margin: 0; color: #fff; font-size: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pk p { margin: 0; color: #c9cfe4; font-size: 14px; }
.pk-tag { position: absolute; top: -8px; right: 12px; font-size: 11px; letter-spacing: .12em; padding: 3px 9px; border-radius: 4px; background: linear-gradient(90deg, #ff3b1f, #ff9a1a); color: #fff; }
.pk-save { font-family: var(--ui); font-size: 11px; padding: 2px 7px; border-radius: 4px; background: var(--green); color: #032a08; letter-spacing: .08em; }
.pk-icons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.pk-icons img { width: 100%; border-radius: 6px; display: block; }
.pk-tanks { display: flex; gap: 4px; justify-content: center; }
.pk-tanks img { flex: 1; min-width: 0; height: 84px; object-fit: contain; -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 55%, #000 50%, transparent 100%); mask-image: radial-gradient(ellipse 60% 60% at 50% 55%, #000 50%, transparent 100%); }
.pk-list { list-style: none; padding: 0; margin: 0; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.pk-list li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 8px; background: rgba(255,255,255,.03); border-radius: 4px; }
.pk-list li.have { color: var(--muted); text-decoration: line-through; }
.pk-list em { font-style: normal; font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.pk-note { font-size: 12px; color: var(--green); }
.pk-prices { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.pk-prices .btn-main, .pk-prices .btn-sec { font-size: 17px; padding: 9px 18px; display: inline-flex; align-items: center; gap: 6px; }
.coin-pack { text-align: center; align-items: center; }
.cp-coins { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 32px; font-family: var(--display); margin: 10px 0 4px; flex-wrap: wrap; }
.cp-coins small { font-family: var(--ui); font-size: 12px; color: var(--green); letter-spacing: .08em; width: 100%; }
.coin-pack .pk-prices { justify-content: center; }
.rm-strip, .ingame-strip { grid-column: 1 / -1; font-size: 12px; letter-spacing: .2em; padding: 6px 12px; border-radius: 6px; text-align: center; }
.rm-strip { background: rgba(255,59,59,.12); border: 1px solid rgba(255,59,59,.5); color: #ff8a8a; }
.ingame-strip { background: rgba(93,255,106,.08); border: 1px solid rgba(93,255,106,.4); color: var(--green); display: inline-block; margin-top: 8px; }
.rm-banner { display: inline-block; font-family: var(--display); font-size: 18px; letter-spacing: .14em; padding: 8px 18px; border-radius: 6px; background: #b3140a; color: #fff; box-shadow: 0 0 20px rgba(255,59,59,.45); }
.confirm-row { display: flex; justify-content: space-between; max-width: 360px; margin: 6px auto; font-size: 17px; padding: 6px 10px; background: rgba(255,255,255,.04); border-radius: 6px; }
.confirm-row span { color: var(--muted); }
.pay-off { font-size: 14px; color: #ffd8a0; background: rgba(255,154,26,.08); border: 1px solid rgba(255,154,26,.35); border-radius: 8px; padding: 10px 12px; margin: 10px auto 0; max-width: 440px; line-height: 1.45; }
.btn-main:disabled { filter: grayscale(.8) brightness(.7); cursor: not-allowed; transform: none; }
.history-card { grid-column: 1 / -1; padding: 14px; }
.tx { width: 100%; border-collapse: collapse; font-size: 14px; }
.tx th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: .1em; padding: 6px; border-bottom: 1px solid var(--line); }
.tx td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tx td small { display: block; color: var(--muted); font-size: 11px; }
.store-fine { font-size: 12px; color: var(--muted); margin: 0; }

/* ── battle: weapon card, loadout list, supply toast, chat ── */
.hud-weapon { flex: 0 1 300px; max-width: 320px; margin: 0 0 0 auto; display: grid; grid-template-columns: 46px 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 0 10px; padding: 8px 10px; text-align: left; border-left: 3px solid var(--rc, var(--line)); cursor: pointer; }
.hud-weapon img { width: 46px; height: 46px; border-radius: 6px; grid-row: span 2; }
.w-txt { min-width: 0; display: flex; flex-direction: column; }
.w-txt small { font-size: 10px; letter-spacing: .16em; color: var(--muted); }
.w-txt b { font-family: var(--display); font-weight: 400; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-txt em { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-ammo { font-family: var(--display); font-size: 20px; color: var(--gold); }
.w-open { grid-column: 3; font-size: 10px; letter-spacing: .12em; color: var(--muted); }
.hud-weapon.pulse { animation: wpulse 1.2s ease 2; }
@keyframes wpulse { 50% { box-shadow: 0 0 0 3px rgba(255,194,51,.55), 0 0 26px rgba(255,194,51,.5); } }
#weapon-tray { align-items: flex-end; justify-content: flex-end; padding: 0 calc(140px + var(--safe-r)) calc(96px + var(--safe-b)) 16px; background: rgba(0,0,0,.25); }
#weapon-tray .tray-inner { width: min(380px, 94vw); max-height: 62vh; }
.tray-head small { font-family: var(--ui); font-size: 11px; color: var(--muted); letter-spacing: .08em; margin-left: 8px; }
.wl { display: flex; flex-direction: column; gap: 5px; }
.wl-row { display: grid; grid-template-columns: 38px 1fr auto auto; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 7px; background: rgba(255,255,255,.035); border: 1px solid transparent; border-left: 3px solid var(--rc); text-align: left; }
.wl-row:hover:not(.empty) { background: rgba(255,255,255,.07); }
.wl-row.on { border-color: var(--line-hot); border-left-color: var(--rc); background: rgba(255,194,51,.07); }
.wl-row img { width: 38px; height: 38px; border-radius: 5px; }
.wl-txt { min-width: 0; display: flex; flex-direction: column; }
.wl-txt b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-txt small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-ammo { font-family: var(--display); font-size: 16px; color: var(--gold); }
.wl-row.empty { opacity: .38; cursor: not-allowed; filter: grayscale(1); }
.wl-row.empty .wl-ammo { color: var(--muted); font-size: 12px; letter-spacing: .1em; }
.wl-row.fresh { animation: fresh 1s ease 3; }
@keyframes fresh { 50% { background: rgba(93,255,106,.18); } }
.wl-row kbd { font-size: 10px; opacity: .6; }
#supply-toast { position: absolute; right: calc(140px + var(--safe-r)); bottom: calc(110px + var(--safe-b)); background: rgba(8,14,26,.94); border: 1px solid rgba(93,255,106,.5); border-radius: 10px; padding: 10px 14px; font-size: 14px; pointer-events: none; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
#supply-toast b { display: block; font-family: var(--display); font-weight: 400; letter-spacing: .1em; color: var(--green); margin-bottom: 4px; }
#supply-toast.show { animation: stoast .35s ease; }
@keyframes stoast { from { transform: translateY(16px); opacity: 0; } }
.chat-btn { position: absolute; left: calc(10px + var(--safe-l)); bottom: calc(150px + var(--safe-b)); height: 38px; padding: 0 12px; border-radius: 19px; background: var(--panel); border: 1px solid var(--line); display: flex; align-items: center; gap: 6px; font-size: 16px; }
.chat-btn span { font-size: 11px; letter-spacing: .14em; }
.chat-btn i { font-style: normal; min-width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 4px; }
#chat { position: absolute; left: calc(10px + var(--safe-l)); bottom: calc(196px + var(--safe-b)); width: min(360px, 92vw); max-height: 46vh; display: flex; flex-direction: column; background: rgba(8,12,24,.94); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.55); pointer-events: auto; z-index: 3; }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); font-family: var(--display); font-size: 13px; letter-spacing: .1em; }
.chat-head small { font-family: var(--ui); font-size: 10px; color: var(--muted); letter-spacing: .04em; flex: 1; }
.chat-head .icon-btn { width: 28px; height: 28px; }
.chat-log { flex: 1; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 7px; min-height: 90px; touch-action: pan-y; user-select: text; -webkit-user-select: text; }
.cm { font-size: 14px; }
.cm.sys { color: var(--muted); font-size: 12px; font-style: italic; }
.cm-head { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.cm-head b { font-weight: 700; }
.cm-head time { color: var(--muted); font-size: 11px; }
.cm-ai { font-size: 9px; padding: 0 4px; border-radius: 3px; background: rgba(255,255,255,.12); letter-spacing: .1em; }
.cm-actions { margin-left: auto; display: none; gap: 4px; }
.cm:hover .cm-actions, .cm:focus-within .cm-actions { display: flex; }
.cm-actions button { font-size: 10px; padding: 1px 6px; border-radius: 4px; background: rgba(255,255,255,.08); color: var(--muted); }
.cm-actions button:hover { color: var(--text); }
.cm-text { color: #e4e8f4; word-wrap: break-word; overflow-wrap: anywhere; }
.cm.self .cm-text { color: #fff4c8; }
.chat-quick { display: flex; flex-wrap: wrap; gap: 5px; padding: 6px 10px; border-top: 1px solid var(--line); max-height: 62px; overflow-y: auto; scrollbar-width: none; }
.chat-quick::-webkit-scrollbar { display: none; }
.chat-quick button { flex-shrink: 0; font-size: 12px; padding: 4px 9px; border-radius: 12px; background: rgba(255,255,255,.07); border: 1px solid var(--line); white-space: nowrap; }
.chat-form { display: flex; gap: 6px; padding: 8px 10px 10px; }
.chat-form input { flex: 1; min-width: 0; font: inherit; font-size: 15px; color: var(--text); background: rgba(0,0,0,.4); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; user-select: text; -webkit-user-select: text; }
.chat-form .btn-main { font-size: 14px; padding: 7px 14px; }
@media (max-height: 560px), (max-width: 760px) {
  #chat { left: 0; right: 0; top: 0; bottom: 0; width: auto; max-height: none; border-radius: 0; z-index: 20; }
  .chat-btn { bottom: calc(118px + var(--safe-b)); }
  .hud-weapon { flex-basis: 220px; grid-template-columns: 36px 1fr auto; padding: 5px 8px; } .hud-weapon img { width: 36px; height: 36px; } .w-txt em, .w-open { display: none; }
  #weapon-tray { padding: 10px; align-items: center; justify-content: center; }
  #supply-toast { right: 10px; bottom: 100px; font-size: 12px; }
}

/* ── store: premium weapons, cosmetics, sections ── */
.store-h { grid-column: 1 / -1; margin: 8px 0 -2px; font-size: 12px; letter-spacing: .2em; color: var(--muted); }
.rar { font-family: var(--ui); font-size: 10px; letter-spacing: .12em; padding: 1px 6px; border-radius: 3px; border: 1px solid var(--rc); color: var(--rc); }
.pk.pw, .pk.cos { border-top: 2px solid var(--rc); }
.pw-art { position: relative; display: block; border-radius: 8px; overflow: hidden; }
.pw-art img { width: 100%; display: block; aspect-ratio: 2/1; object-fit: cover; }
.pw-art span { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,.7); padding: 6px 12px; border-radius: 20px; font-size: 12px; letter-spacing: .14em; opacity: .85; }
.pw-art:hover span { opacity: 1; background: rgba(255,154,26,.85); }
.pw-stats { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.pw-stats b { color: var(--text); }
.cos-art { height: 96px; display: grid; place-items: center; background: rgba(0,0,0,.25); border-radius: 8px; overflow: hidden; }
.cos-art img { max-width: 100%; max-height: 96px; }
.owned-cos { outline: 1px solid rgba(93,255,106,.35); }
.sw-trail { width: 80%; height: 34px; background: linear-gradient(90deg, transparent, var(--c)); clip-path: polygon(0 55%, 100% 20%, 100% 80%, 0 65%); filter: drop-shadow(0 0 8px var(--c)); }
.sw-boom { width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle, #fff 0 10%, var(--c2) 25%, var(--c) 55%, transparent 70%); }
.sw-muzzle { width: 90px; height: 40px; background: radial-gradient(ellipse at 20% 50%, #fff 0 10%, var(--c) 35%, transparent 70%); }
.sw-banner { width: 90%; padding: 12px; border-radius: 6px; font-family: var(--display); letter-spacing: .06em; text-align: center; border: 1px solid rgba(255,255,255,.15); }
.sw-badge { font-size: 42px; color: var(--gold); text-shadow: 0 0 14px rgba(255,194,51,.6); }
.sw-decal { width: 64px; height: 64px; border-radius: 8px; }
.sw-victory { font-size: 30px; letter-spacing: 8px; color: var(--gold); }
.bd-art { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.cos-mini { height: 58px; display: grid; place-items: center; background: rgba(0,0,0,.25); border-radius: 6px; overflow: hidden; transform: scale(1); }
.cos-mini > * { transform: scale(.62); }
.pv-head { display: flex; align-items: center; justify-content: center; gap: 10px; }
.pv-canvas { display: block; width: 100%; aspect-ratio: 560/260; border-radius: 10px; margin-top: 10px; border: 1px solid var(--line); background: #070b16; }
.pv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: left; }
.pv-stats div { background: rgba(255,255,255,.04); border-radius: 6px; padding: 6px 8px; }
.pv-stats small { display: block; font-size: 10px; color: var(--muted); letter-spacing: .1em; }
.pv-stats b { font-size: 14px; }

/* ── artillery garage + customisation ── */
.gcard .g-hero { width: 100%; height: 130px; object-fit: contain; -webkit-mask-image: none; mask-image: none; }
.gbars { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 10px; text-align: left; }
.gbar { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.gbar i { height: 5px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.gbar b { display: block; height: 100%; background: var(--cls); }
.g-actions { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.customise { padding: 16px; flex-shrink: 0; }
.cz-body { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 16px; align-items: start; }
.cz-preview { background: radial-gradient(ellipse at 50% 80%, rgba(255,255,255,.07), transparent 70%); border-radius: 10px; text-align: center; padding: 8px; }
.cz-preview img { width: 100%; max-height: 180px; object-fit: contain; }
.cz-preview small { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }
.cz-rows { display: flex; flex-direction: column; gap: 7px; }
.cz-row { display: grid; grid-template-columns: 78px 1fr; gap: 8px; align-items: start; }
.cz-row > span { font-size: 11px; letter-spacing: .14em; color: var(--muted); padding-top: 6px; }
.cz-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.cz { font-size: 12px; padding: 5px 10px; border-radius: 6px; background: rgba(255,255,255,.05); border: 1px solid var(--line); border-left: 3px solid var(--rc, var(--line)); }
.cz.on { border-color: var(--gold); color: var(--gold); background: rgba(255,194,51,.08); }
.cz.locked { opacity: .5; }
@media (max-width: 900px) { .cz-body { grid-template-columns: 1fr; } .pv-stats { grid-template-columns: repeat(2, 1fr); } }

/* ── concept-art cards (garage, setup) ──────────── */
.g-art { position: relative; }
.gcard .g-hero { width: 100%; height: 150px; object-fit: contain; -webkit-mask-image: radial-gradient(ellipse 62% 60% at 50% 55%, #000 55%, transparent 100%); mask-image: radial-gradient(ellipse 62% 60% at 50% 55%, #000 55%, transparent 100%); }
.g-battle { position: absolute; right: 0; bottom: -2px; margin: 0; background: rgba(5,8,18,.85); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px 3px; text-align: center; }
.g-battle img { display: block; width: 88px; height: 38px; object-fit: contain; }
.g-battle figcaption { font-size: 9px; letter-spacing: .14em; color: var(--muted); }
.gcard .cls { color: var(--cls); margin-top: 6px; }
.gcard.premium { border-color: rgba(255,210,74,.35); background: linear-gradient(180deg, rgba(60,44,8,.55), var(--panel) 45%); }
.tank-chip img { height: 72px; object-fit: contain; -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 55%, #000 50%, transparent 100%); mask-image: radial-gradient(ellipse 60% 60% at 50% 55%, #000 50%, transparent 100%); }

/* ── loading screen ─────────────────────────────── */
#loading { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; background: #05070f; transition: opacity .4s ease; padding: 16px; }
#loading.out { opacity: 0; pointer-events: none; }
.ld-bg { position: absolute; inset: -30px; background-size: cover; background-position: center; filter: blur(18px) brightness(.45) saturate(1.2); }
.ld-inner { position: relative; width: min(680px, 100%); text-align: center; }
.ld-mode { font-size: 13px; letter-spacing: .3em; color: var(--gold); margin-bottom: 10px; }
.ld-art { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.ld-art img { display: block; width: 100%; aspect-ratio: 508/200; object-fit: cover; }
.ld-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 12px; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.85)); }
.ld-title h2 { font-size: clamp(24px, 4vw, 36px); color: #fff; letter-spacing: .06em; }
.ld-title p { margin: 2px 0 0; color: #d8def0; font-size: 15px; }
.ld-facts { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.ld-facts span { font-size: 13px; padding: 3px 10px; border-radius: 20px; background: rgba(255,255,255,.07); border: 1px solid var(--line); }
.ld-vs { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.ld-vs .side { display: flex; gap: 6px; }
.ld-vs figure { margin: 0; width: 104px; text-align: center; }
.ld-vs img { width: 104px; height: 70px; object-fit: contain; -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 55%, #000 50%, transparent 100%); mask-image: radial-gradient(ellipse 60% 60% at 50% 55%, #000 50%, transparent 100%); }
.ld-vs figcaption { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-vs .vs { font-family: var(--display); font-size: 26px; color: var(--red); text-shadow: 0 0 14px rgba(255,59,59,.6); }
.ld-bar { height: 4px; background: rgba(255,255,255,.08); border-radius: 4px; overflow: hidden; margin: 14px auto 8px; width: 60%; }
.ld-bar i { display: block; height: 100%; width: 30%; background: linear-gradient(90deg, var(--gold-2), var(--gold)); animation: boot 1s ease-in-out infinite; }
.ld-tip { color: #c9cfe4; font-size: 15px; margin: 0; }
.ld-tip b { color: var(--gold); }

/* ── responsive ─────────────────────────────────── */
@media (max-width: 900px) {
  .lobby-right { width: 250px; }
  .armory-body { grid-template-columns: 1fr; }
  .weapon-detail { position: static; }
}
@media (max-height: 560px), (max-width: 760px) {
  #lobby { padding: 10px calc(12px + var(--safe-l)); }
  .lobby-left .logo { margin-bottom: 10px; }
  .logo-word { font-size: 34px; } .logo-arena span { font-size: 20px; } .logo-tag { margin-top: 6px; font-size: 10px; }
  .menu { gap: 5px; }
  .menu-btn { padding: 6px 16px; } .menu-btn span { font-size: 16px; } .menu-btn small { display: none; } .menu-btn.primary span { font-size: 20px; }
  .menu-sm { padding: 7px 4px; font-size: 12px; }
  .lobby-right { width: 220px; gap: 8px; } .pilot { padding: 10px; } .daily { padding: 10px; } .daily li { font-size: 12px; }
  .lobby-foot { display: none; }
  .hud-player { min-width: 160px; padding: 6px 10px; } .hp-name { font-size: 13px; }
  .enemy-card { min-width: 140px; padding: 4px 8px; } .enemy-card .ec-top { font-size: 12px; }
  .hud-center { padding: 3px 10px 5px; min-width: 110px; } .hud-timer { font-size: 20px; }
  .hud-tools { top: 86px; } .icon-btn { width: 34px; height: 34px; }
  .hud-move { width: 128px; padding: 6px 8px; } .move-btns button { height: 38px; }
  .hud-aim { width: 190px; padding: 6px 8px; } .aim-row { grid-template-columns: 46px 32px 1fr 32px; } .aim-row b { font-size: 18px; } .step { height: 30px; }
  .fire-btn { width: 88px; height: 88px; font-size: 21px; }
  #weapon-tray { padding-bottom: 10px; align-items: center; }
  .modal-card { padding: 14px; } .modal-card h2 { font-size: 30px; } .res-stats b { font-size: 17px; }
  .ld-art img { aspect-ratio: 508/150; } .ld-facts { margin: 6px 0; } .ld-vs img { height: 44px; } .ld-vs figure { width: 80px; } .ld-tip { font-size: 13px; } .ld-bar { margin: 8px auto 4px; }
}
@media (max-width: 600px) and (orientation: portrait) {
  #rotate-hint { display: flex; position: fixed; inset: 0; z-index: 60; background: var(--bg); flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; }
  #rotate-hint div { font-size: 60px; color: var(--gold); animation: spin 2s ease-in-out infinite; }
  @keyframes spin { 50% { transform: rotate(90deg); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}