/* ---------- Шрифты (лежат локально в vendor/fonts) ---------- */
@font-face { font-family: "Russo One"; src: url(vendor/fonts/russo-one-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0400-04FF, U+2116; font-display: swap; }
@font-face { font-family: "Russo One"; src: url(vendor/fonts/russo-one-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; font-display: swap; }
@font-face { font-family: "Rubik"; font-weight: 300 900; src: url(vendor/fonts/rubik-vf-cyrillic-wght-normal.woff2) format("woff2"); unicode-range: U+0400-04FF, U+2116; font-display: swap; }
@font-face { font-family: "Rubik"; font-weight: 300 900; src: url(vendor/fonts/rubik-vf-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; font-display: swap; }

:root {
  --bg: #0a1220;
  --panel: rgba(16, 28, 46, 0.92);
  --line: rgba(174, 233, 255, 0.18);
  --ink: #f2f7fb;
  --muted: #93a9bf;
  --accent: #ffc93c;
  --cold: #aee9ff;
  --font: Rubik, "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --display: "Russo One", Rubik, "Trebuchet MS", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); overflow: hidden; user-select: none; }
#app { position: fixed; inset: 0; }
#game { display: block; position: absolute; inset: 0; cursor: crosshair; }
#overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border-radius: 6px; background: #e8eef4; color: #223; font: 600 12px var(--font); text-align: center; box-shadow: 0 2px 0 #8fa2b3; }
.tag { background: #fff3c9; color: #6b3a10; border-radius: 6px; padding: 1px 7px; font-weight: 700; font-size: 13px; }
img.ico, img.wi { display: block; pointer-events: none; }

/* ======================= HUD ======================= */
#hud { position: absolute; inset: 0; pointer-events: none; }
#hud button, #weaponMenu { pointer-events: auto; }
#top { position: absolute; top: 8px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
#teams { display: flex; gap: 6px; flex-wrap: wrap; max-width: 40%; }
.team { background: var(--panel); border: 2px solid transparent; border-radius: 12px; padding: 6px 10px; min-width: 128px; transition: transform .2s; }
.team.active { border-color: var(--tc); transform: translateY(2px); box-shadow: 0 0 16px color-mix(in srgb, var(--tc) 50%, transparent); }
.team.dead { opacity: .35; filter: grayscale(1); }
.team .tn { font-weight: 700; font-size: 13px; color: var(--tc); white-space: nowrap; }
.team .fresh { height: 9px; background: #2b3a4c; border-radius: 5px; margin: 4px 0 2px; overflow: hidden;
  background-image: repeating-linear-gradient(90deg, transparent 0 9px, rgba(0,0,0,.25) 9px 10px); }
.team .fresh i { display: block; height: 100%; background: linear-gradient(var(--tc), var(--td)); transition: width .4s; }
.team .tc { font-size: 11px; color: var(--muted); }

#timerBox { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.mw { display: flex; background: linear-gradient(#f0f3f6, #c3ccd5); border-radius: 12px; padding: 6px; gap: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.5), inset 0 1px 0 #fff; }
.mw-door { background: #0c1a0c; border-radius: 7px; padding: 4px 14px; box-shadow: inset 0 0 8px #000; }
#timer { font: bold 30px "Consolas", "Courier New", monospace; color: #7dff7d; text-shadow: 0 0 8px #3f3; letter-spacing: 2px; }
#timer.warn { color: #ff5a4a; text-shadow: 0 0 8px #f33; animation: blink .5s steps(2) infinite; }
#timer.retreat { color: var(--accent); text-shadow: 0 0 8px #fa0; }
.mw-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; align-content: center; width: 30px; }
.mw-panel i { width: 11px; height: 7px; background: #7d8a96; border-radius: 2px; }
.mw-panel b { width: 11px; height: 11px; border-radius: 50%; background: #5b6570; }
#turnInfo { font-size: 12px; font-weight: 600; background: var(--panel); padding: 2px 12px; border-radius: 8px; }
@keyframes blink { 50% { opacity: .3; } }

#windBox { background: var(--panel); border-radius: 12px; padding: 6px 12px; min-width: 190px; text-align: center; }
.wind-head { font-size: 12px; color: var(--cold); font-weight: 600; }
#fan { display: inline-block; font-size: 16px; }
.windbar { display: flex; justify-content: center; height: 10px; margin: 4px 0; background: #2b3a4c; border-radius: 5px; overflow: hidden; }
.windbar > div { height: 100%; max-width: 50%; }
#windL { margin-left: auto; background: linear-gradient(270deg, #cfefff, #3fa3ff); }
#windR { margin-right: auto; background: linear-gradient(90deg, #cfefff, #3fa3ff); }
#events { font-size: 11px; color: var(--accent); min-height: 13px; }

#log { position: absolute; top: 96px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; width: min(640px, 90vw); }
#log div { background: rgba(8, 14, 24, .82); padding: 4px 14px; border-radius: 10px; font-size: 14px; transition: opacity 1s; animation: slidein .3s; }
#log div.fade { opacity: 0; }
@keyframes slidein { from { transform: translateY(-8px); opacity: 0; } }

#banner { position: absolute; top: 32%; left: 0; right: 0; text-align: center; opacity: 0; pointer-events: none; }
#banner.on { animation: banner 2.2s ease-out forwards; }
#banner .b1 { font: 400 clamp(30px, 5vw, 64px) var(--display); color: var(--bc); -webkit-text-stroke: 2px #141018; paint-order: stroke fill; text-shadow: 0 6px 0 rgba(0,0,0,.45); }
#banner .b2 { font-size: clamp(14px, 2vw, 22px); font-weight: 600; color: #fff; text-shadow: 0 2px 4px #000; }
@keyframes banner { 0% { opacity: 0; transform: scale(1.6); } 12% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-20px); } }

#bottom { position: absolute; bottom: 8px; left: 12px; right: 12px; display: flex; gap: 10px; align-items: center; }
#fighterCard { display: flex; gap: 8px; align-items: center; background: var(--panel); border-radius: 14px; padding: 4px 14px 4px 4px; }
#portrait { background: rgba(255,255,255,.08); border-radius: 10px; }
.fc-info { display: flex; flex-direction: column; min-width: 160px; }
.fc-info b { font-family: var(--display); font-weight: 400; }
.fc-info small { color: var(--muted); font-size: 11px; }
.hpbar { height: 6px; background: #2b3a4c; border-radius: 3px; margin-top: 3px; overflow: hidden; }
.hpbar i { display: block; height: 100%; background: linear-gradient(90deg, #ff5a4a, #ffd23f, #7ed957); background-size: 200px 100%; transition: width .3s; }
#weaponBtn { display: flex; align-items: center; gap: 10px; background: var(--panel); color: var(--ink); border: 2px solid #33485f; border-radius: 14px; padding: 5px 12px 5px 8px; text-align: left; max-width: 440px; }
#weaponBtn:hover { border-color: var(--accent); }
#weaponBtn.locked { border-color: #b77dff; }
#wIcon img { width: 44px; height: 44px; }
.w-text { display: flex; flex-direction: column; }
#wName { font-weight: 700; }
#wDesc { color: var(--muted); font-size: 11px; }
#hint { flex: 1; text-align: center; font-size: 14px; color: #fff; }
#hint:not(:empty) { flex: 0 1 auto; margin: 0 auto; background: rgba(8,14,24,.82); padding: 6px 14px; border-radius: 10px; }
#pauseBtn { background: var(--panel); color: var(--ink); border: 0; border-radius: 12px; width: 44px; height: 44px; font-size: 16px; }
#homeBtn { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; background: var(--panel); color: var(--ink); border: 0; border-radius: 12px; font-size: 14px; font-weight: 600; }
#homeBtn:hover, #pauseBtn:hover { background: #24384f; }
.small-panel p { margin: 0 0 6px; color: var(--muted); }

#weaponMenu { position: absolute; left: 12px; bottom: 76px; width: min(600px, 94vw); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.6); }
.wm-head { font-family: var(--display); margin-bottom: 8px; color: var(--cold); }
.wm-head small { font-family: var(--font); color: var(--muted); margin-left: 8px; }
#weaponGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.wcell { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; background: #1b2c40; color: var(--ink); border: 2px solid transparent; border-radius: 12px; transition: transform .1s; }
.wcell:hover { border-color: var(--accent); transform: translateY(-2px); }
.wcell.sel { border-color: var(--accent); background: #2a425c; }
.wcell.off { opacity: .3; pointer-events: none; filter: grayscale(.8); }
.wcell .wi { width: 46px; height: 46px; }
.wcell .wn { font-size: 11px; text-align: center; line-height: 1.15; min-height: 25px; }
.wcell kbd { position: absolute; top: 4px; left: 4px; font-size: 10px; min-width: 15px; padding: 0 3px; }
.wcell .tag { position: absolute; top: 4px; right: 4px; font-size: 10px; padding: 0 5px; }

/* ======================= Экраны ======================= */
.screen { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(6, 12, 22, .6); padding: 16px; overflow: auto; }
.panel { background: var(--panel); border-radius: 20px; padding: 24px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.6); border: 1px solid var(--line); max-height: 100%; overflow: auto; }
.panel h2 { font-family: var(--display); font-weight: 400; }
button.big { font: 400 22px var(--display); letter-spacing: 1px; padding: 14px 46px; border: 0; border-radius: 16px; background: linear-gradient(#ffe680, #ffb02e); color: #3a1a00; box-shadow: 0 6px 0 #b86f00, 0 12px 26px rgba(255,170,40,.35); position: relative; overflow: hidden; transition: transform .1s, box-shadow .1s; }
button.big::after { content: ''; position: absolute; top: 0; left: 0; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.7), transparent); transform: translateX(-150%); will-change: transform; animation: shine 3s infinite; }
button.big:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #b86f00, 0 16px 30px rgba(255,170,40,.45); }
button.big:active { transform: translateY(4px); box-shadow: 0 2px 0 #b86f00; }
@keyframes shine { 0%, 60% { transform: translateX(-150%); } 100% { transform: translateX(330%); } }
.panel > button:not(.big), button.ghost { padding: 11px 22px; border-radius: 12px; border: 1px solid var(--line); background: rgba(174,233,255,.08); color: var(--ink); font-size: 15px; font-weight: 600; }
.panel > button:not(.big):hover, button.ghost:hover { background: rgba(174,233,255,.18); }
.small-panel { display: flex; flex-direction: column; gap: 10px; align-items: stretch; text-align: center; min-width: 340px; }
.small-panel h2 { margin: 0 0 6px; }
.help-panel { width: min(920px, 100%); }
.help-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.help-panel li { margin: 6px 0; line-height: 1.5; }
.help-panel h3 { color: var(--cold); font-family: var(--display); font-weight: 400; }
#goStats { border-collapse: collapse; margin: 6px auto 10px; }
#goStats td, #goStats th { padding: 5px 14px; border-bottom: 1px solid var(--line); }
#goStats th { color: var(--muted); font-weight: 500; font-size: 13px; }
.fatal { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg); color: #ff8080; font-size: 20px; text-align: center; z-index: 100; }

/* ======================= Главное меню =======================
 * Стиль «мультяшной наклейки»: тёмно-синяя ночная кухня, жирный контур,
 * жёсткая тень снизу, слегка повёрнутые кнопки. За меню — живая арена. */
.menu-screen { --ink: #1d2033; --night: #0e1630; --paper: #f7fbff; --ice: #eaf6ff; --sun: #ffd23f; --sky: #9fd3ff;
  display: block; padding: 0; overflow: hidden; background: none; color: #1d2033; font-weight: 700; }
.menu-screen::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, #0e1630 0, #0e1630 22%, rgba(14,22,48,.9) 32%, rgba(14,22,48,.4) 44%, rgba(14,22,48,0) 56%),
    linear-gradient(0deg, rgba(10,16,36,.7), rgba(10,16,36,0) 20%); }
.m-tiles { position: absolute; inset: 0 auto 0 0; width: 46%; pointer-events: none; opacity: .55;
  background-image: linear-gradient(#24305c 2px, transparent 2px), linear-gradient(90deg, #24305c 2px, transparent 2px); background-size: 60px 60px;
  -webkit-mask-image: linear-gradient(90deg, #000 40%, transparent); mask-image: linear-gradient(90deg, #000 40%, transparent); }
.menu-screen.sub::before { background: #111a3a; }
.menu-screen.sub .m-tiles { width: 100%; opacity: .6; -webkit-mask-image: none; mask-image: none; }
.menu-screen button:focus-visible { outline: 3px solid #9fe3ff; outline-offset: 3px; }

/* --- левая колонка --- */
.m-side { position: absolute; left: 0; top: 0; bottom: 0; width: min(500px, 100%); display: flex; flex-direction: column;
  padding: clamp(16px, 6vh, 54px) 28px 22px clamp(18px, 3.5vw, 56px); overflow-y: auto; }
.m-title { margin: 0; display: flex; flex-direction: column; font-weight: 400; }
.m-title .t1 { font: 400 clamp(58px, min(6.6vw, 13vh), 104px)/1 var(--display); color: #fff; letter-spacing: .02em;
  -webkit-text-stroke: 4px #1d2033; paint-order: stroke fill; text-shadow: 0 8px 0 #e2342c, 0 12px 0 #1d2033; }
.m-title .t2 { font: 400 clamp(22px, min(2.5vw, 5vh), 38px)/1.1 var(--display); color: #9fe3ff; margin-top: 18px; letter-spacing: .03em;
  -webkit-text-stroke: 2px #1d2033; paint-order: stroke fill; text-shadow: 0 5px 0 #1d2033; }
.m-tag { margin: 14px 0 0; font-size: clamp(14px, 1.2vw, 18px); font-weight: 800; color: #c7d6f5; }
.m-nav { display: flex; flex-direction: column; gap: clamp(10px, 1.8vh, 16px); width: min(400px, 100%); margin-top: clamp(18px, 4.5vh, 44px); }
.m-error { margin: 14px 0 0; min-height: 20px; color: #ff9a8f; font-weight: 800; font-size: 15px; }
.m-foot { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; font-weight: 700; color: #8fa0c8; }
#gpuNote { font-size: 13px; color: #6d7cab; }

/* --- кнопки --- */
.cbtn { display: flex; align-items: center; gap: 16px; height: clamp(46px, 6.6vh, 58px); padding: 0 24px; background: #eaf6ff; color: #1d2033;
  border: 4px solid #1d2033; border-radius: 14px; box-shadow: 0 6px 0 #1d2033; font: 800 clamp(18px, 2.5vh, 23px) var(--font); text-align: left;
  transform: rotate(var(--r, 0deg)); transition: transform .08s, box-shadow .08s, background .12s; }
.cbtn svg { flex: none; }
.cbtn small { margin-left: auto; padding: 2px 10px; background: #fff; border: 2px solid #1d2033; border-radius: 10px; font-size: 13px; font-weight: 800; }
.cbtn:hover { transform: rotate(var(--r, 0deg)) translateY(-2px); box-shadow: 0 8px 0 #1d2033; background: #fff; }
.cbtn:active { transform: rotate(var(--r, 0deg)) translateY(4px); box-shadow: 0 2px 0 #1d2033; }
.cbtn.primary { height: clamp(52px, 7.6vh, 68px); background: #ffd23f; border-radius: 16px; box-shadow: 0 7px 0 #1d2033; font-size: clamp(22px, 3.1vh, 28px); font-weight: 900; }
.cbtn.primary:hover { background: #ffe07a; box-shadow: 0 9px 0 #1d2033; }
.cbtn.primary:active { box-shadow: 0 2px 0 #1d2033; }
.cbtn.dark { background: #3a4670; color: #eaf0ff; box-shadow: 0 6px 0 #0a1024; }
.cbtn.dark:hover { background: #4a588a; box-shadow: 0 8px 0 #0a1024; }
.cbtn.dark:active { box-shadow: 0 2px 0 #0a1024; }
.cbtn.sm { height: 56px; padding: 0 22px; gap: 10px; font-size: 20px; flex: none; }
.cbtn.go { height: 60px; padding: 0 36px; gap: 12px; font: 400 22px var(--display); box-shadow: 0 6px 0 #000; flex: none; }
.cbtn.go:hover { box-shadow: 0 8px 0 #000; }
.cbtn.go:active { box-shadow: 0 2px 0 #000; }
.m-nav .cbtn:nth-child(1) { --r: -1.2deg; }
.m-nav .cbtn:nth-child(2) { --r: .8deg; }
.m-nav .cbtn:nth-child(3) { --r: -.6deg; }
.m-nav .cbtn:nth-child(4) { --r: .9deg; }
.m-nav .cbtn:nth-child(5) { --r: -.5deg; }

/* --- вложенные экраны --- */
.m-view { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 22px; overflow: auto;
  padding: clamp(14px, 4vh, 36px) clamp(14px, 4.5vw, 72px) 22px; }
.mv-head { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.mv-title { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 260px; }
.mv-title b { font: 400 clamp(26px, 3.2vw, 40px)/1 var(--display); color: #fff; text-shadow: 0 4px 0 #e2342c; }
.mv-title span { font-size: clamp(14px, 1.3vw, 18px); font-weight: 800; color: #c7d6f5; }
.mv-chips { display: flex; gap: 12px; flex-wrap: wrap; }
.mv-chips span { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; background: var(--c); border: 3px solid #1d2033; border-radius: 22px;
  box-shadow: 0 4px 0 #1d2033; font-weight: 900; font-size: 16px; white-space: nowrap; }
.mv-chips span i { width: 12px; height: 12px; border-radius: 6px; background: #1d2033; }
.mv-chips .empty { background: transparent; border-style: dashed; border-color: #6d7cab; color: #a9b6dc; box-shadow: none; }
.mv-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-top: auto; padding-top: 6px;
  font-size: 16px; font-weight: 800; color: #a9b6dc; }
.mv-foot .m-error { margin: 0; flex: 1; text-align: right; }

/* --- карточки команд --- */
#teamPick { display: grid; grid-template-columns: repeat(auto-fit, minmax(262px, 1fr)); gap: 32px; padding: 14px 12px 4px; }
.tcard { position: relative; display: flex; flex-direction: column; background: #f7fbff; border: 4px solid #1d2033; border-radius: 24px; box-shadow: 0 8px 0 #0a1024; }
.tcard::after { content: ''; position: absolute; inset: -12px; border: 6px solid var(--ring); border-radius: 34px; pointer-events: none; opacity: 0; transition: opacity .15s; }
.tcard.on::after { opacity: 1; }
.tcard.human { --ring: #ffd23f; }
.tcard.cpu { --ring: #9fd3ff; }
.tc-art { position: relative; height: 150px; display: flex; justify-content: space-evenly; align-items: flex-end; background: var(--band);
  border-bottom: 4px solid #1d2033; border-radius: 20px 20px 0 0; overflow: hidden; }
.tc-art::after { content: ''; position: absolute; left: -4px; right: -4px; bottom: -4px; height: 20px; background: var(--shelf, #bfe6fb); border: 3px solid #1d2033; }
.tc-art canvas { position: relative; z-index: 1; width: 108px; height: 108px; margin: 0 -8px 2px; }
.tcard:not(.on) .tc-art { filter: saturate(.25) brightness(.8); }
.tcard:not(.on) .tc-body > :not(.tc-mode) { opacity: .5; }
.tc-body { display: flex; flex-direction: column; gap: 12px; padding: 16px 20px 20px; flex: 1; }
.tc-head { font: 400 20px/1.1 var(--display); text-transform: uppercase; }
.tc-home { align-self: flex-start; margin-top: -4px; padding: 3px 10px; background: var(--chip); border: 2px solid #1d2033; border-radius: 10px; font-weight: 800; font-size: 13px; }
.tc-motto { margin: 0; font-size: 15px; line-height: 1.35; color: #3b4060; min-height: 40px; }
.tc-members { list-style: none; margin: 0; padding: 10px 0 0; display: flex; flex-direction: column; gap: 8px; border-top: 3px dashed #c9d6e6; flex: 1; }
.tc-members li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tc-members b { display: block; font-weight: 900; font-size: 16px; }
.tc-members small { display: block; font-size: 13px; font-weight: 700; color: #5a6080; line-height: 1.25; }
.pips { display: flex; align-items: center; gap: 3px; flex: none; }
.pips i { width: 11px; height: 11px; border-radius: 3px; border: 2px solid #1d2033; background: #fff; box-sizing: content-box; }
.pips i.f { background: #3fbf8a; }
.pips em { font-style: normal; font-size: 12px; font-weight: 800; color: #5a6080; min-width: 26px; text-align: right; }
.tc-mode { display: grid; grid-template-columns: 1fr 1fr 1.35fr; height: 50px; background: #eaf6ff; border: 4px solid #1d2033; border-radius: 14px; box-shadow: 0 5px 0 #1d2033; overflow: hidden; }
.tc-mode button { border: 0; border-left: 3px solid #1d2033; background: transparent; color: #1d2033; font: 900 15px var(--font); padding: 0 4px; transition: background .12s; }
.tc-mode button:first-child { border-left: 0; }
.tc-mode button:hover { background: #fff; }
.tc-mode button.sel[data-m="human"] { background: #ffd23f; }
.tc-mode button.sel[data-m="cpu"] { background: #9fd3ff; }
.tc-mode button.sel[data-m="off"] { background: #3a4670; color: #eaf0ff; }
.tc-badge { position: absolute; right: 18px; top: -18px; padding: 6px 14px; background: var(--ring); border: 3px solid #1d2033; border-radius: 12px;
  font: 400 13px var(--display); letter-spacing: .04em; transform: rotate(4deg); z-index: 2; }
.tcard.cpu .tc-badge { transform: rotate(-3deg); }
.tcard:not(.on) .tc-badge { display: none; }

/* --- настройки --- */
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; align-items: start; max-width: 1180px; }
.scard { display: flex; flex-direction: column; background: #f7fbff; border: 4px solid #1d2033; border-radius: 24px; box-shadow: 0 8px 0 #0a1024; padding: 18px 22px 12px; }
.scard h3 { margin: 0 0 8px; font: 400 20px/1.1 var(--display); text-transform: uppercase; }
.opt, .sw { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 3px dashed #c9d6e6; font-size: 17px; font-weight: 800; }
.opt small, .sw small { display: block; margin-top: 2px; font-size: 13px; font-weight: 700; color: #5a6080; }
.seg { display: inline-flex; flex: none; background: #eaf6ff; border: 3px solid #1d2033; border-radius: 12px; overflow: hidden; }
.seg button { border: 0; border-left: 3px solid #1d2033; background: transparent; color: #1d2033; padding: 7px 14px; font: 900 16px var(--font); }
.seg button:first-child { border-left: 0; }
.seg button:hover { background: #fff; }
.seg button.sel { background: #ffd23f; }
.sw { cursor: pointer; position: relative; }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.sw i { position: relative; flex: none; width: 54px; height: 30px; border: 3px solid #1d2033; border-radius: 16px; background: #d4dbe8; transition: background .15s; box-sizing: border-box; }
.sw i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #1d2033; transition: left .15s; }
.sw input:checked + i { background: #3fbf8a; }
.sw input:checked + i::after { left: 27px; }
.sw input:focus-visible + i { outline: 3px solid #2f6fd6; outline-offset: 2px; }

/* --- арсенал: список оружия и сценка-показ --- */
.ars { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 560px); gap: 28px; align-items: start; }
#arsenalGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 18px 20px; padding: 8px 4px 10px 8px; }
.acard { position: relative; display: flex; align-items: center; gap: 12px; background: #f7fbff; color: #1d2033; border: 3px solid #1d2033; border-radius: 16px; box-shadow: 0 5px 0 #0a1024;
  padding: 9px 12px 9px 9px; font: inherit; text-align: left; transition: transform .08s, box-shadow .08s, background .12s; }
.acard:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #0a1024; background: #fff; }
.acard.sel { background: #fff3c4; outline: 4px solid #ffd23f; outline-offset: 3px; }
.acard .a-ico { flex: none; width: 54px; height: 54px; display: grid; place-items: center; background: #dbeeff; border: 2px solid #1d2033; border-radius: 12px; }
.acard.sel .a-ico { background: #ffd23f; }
.acard .a-ico img { width: 44px; height: 44px; }
.acard b { display: block; font-weight: 900; font-size: 15px; line-height: 1.2; padding-right: 38px; }
.acard small { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 700; color: #5a6080; }
.acard .a-ammo { position: absolute; right: 9px; top: 8px; padding: 1px 8px; background: #ffd23f; border: 2px solid #1d2033; border-radius: 9px; font-size: 13px; font-weight: 900; }
.acard.sel .a-ammo { background: #fff; }
.acard kbd { position: absolute; left: -8px; top: -8px; min-width: 24px; background: #1d2033; color: #fff; box-shadow: none; border-radius: 8px; font-weight: 800; }
.ars-demo { position: sticky; top: 0; background: #f7fbff; border: 4px solid #1d2033; border-radius: 24px; box-shadow: 0 8px 0 #0a1024; overflow: hidden; }
.ars-demo canvas { display: block; width: 100%; aspect-ratio: 2 / 1; border-bottom: 4px solid #1d2033; background: #dff1fc; }
.ars-info { padding: 16px 20px 18px; }
.ars-info h3 { margin: 0; font: 400 22px/1.15 var(--display); text-transform: uppercase; }
.ars-info p { margin: 8px 0 12px; font-size: 16px; line-height: 1.4; color: #3b4060; min-height: 44px; }
.ars-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.ars-stats span { padding: 3px 11px; background: #dbeeff; border: 2px solid #1d2033; border-radius: 10px; font-size: 14px; font-weight: 800; }
.ars-stats span.warn { background: #ffe0d8; }
@media (max-width: 1000px) {
  .ars { grid-template-columns: 1fr; }
  .ars-demo { position: static; order: -1; }
}

/* ======================= Выключатель звука ======================= */
#muteBtn { position: absolute; right: 16px; top: 16px; z-index: 60; width: 50px; height: 50px; display: grid; place-items: center; padding: 0;
  background: #eaf6ff; color: #1d2033; border: 4px solid #1d2033; border-radius: 14px; box-shadow: 0 5px 0 #0a1024; transition: transform .08s, box-shadow .08s, background .12s; }
#muteBtn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #0a1024; }
#muteBtn:active { transform: translateY(3px); box-shadow: 0 2px 0 #0a1024; }
#muteBtn:focus-visible { outline: 3px solid #9fe3ff; outline-offset: 3px; }
#muteBtn .i-off, #muteBtn.off .i-on { display: none; }
#muteBtn.off .i-off { display: block; }
#muteBtn.off { background: #e2342c; color: #fff; }
/* в бою кнопка встаёт в нижний ряд, рядом с паузой, и выглядит как остальной HUD */
#app.playing #muteBtn { top: auto; bottom: 8px; right: 12px; width: 44px; height: 44px; background: var(--panel); color: var(--ink); border: 0; border-radius: 12px; box-shadow: none; transform: none; }
#app.playing #muteBtn.off { background: #a8322d; }
#app.playing #bottom { right: 64px; }
.mv-head { padding-right: 62px; }

@media (max-width: 760px) {
  .menu-screen::before { background: linear-gradient(90deg, #0e1630 0, rgba(14,22,48,.92) 60%, rgba(14,22,48,.7)); }
  .m-tiles { width: 100%; }
  .mv-chips { display: none; }
  .mv-foot > span:first-child { display: none; }
}
@media (max-width: 800px) {
  #teams { max-width: 50%; }
  .team { min-width: 90px; }
  #windBox { min-width: 110px; }
  #wDesc, #hint, .fc-info small, #homeBtn span { display: none; }
}
