:root {
  --bg: #1b1d18; --panel: #262921; --panel2: #31352b; --line: #3a3e31; --text: #e6e2cf; --dim: #9a977f;
  --accent: #d9b84a; --blue: #3f7fe0; --red: #d0453a; --cell: 52px;
}
/* общая палитра нового интерфейса (макет 15.11.2026) — для экрана боя и остальных экранов.
   Объявляет агент «Бой»; остальные экраны берут эти переменные, свои цвета не заводят. */
:root {
  --ui-bg: #141612; --ui-bg2: #191b16; --ui-panel: #21241d; --ui-panel2: #272b23; --ui-panel3: #2c3026;
  --ui-line: #3b4033; --ui-line2: #4a503b; --ui-ink: #f1eadb; --ui-muted: #bab7a7;
  --ui-gold: #e8bc70; --ui-gold-hi: #f6d294; --ui-gold-ink: #18170f; --ui-gold-bg: #393021;
  --ui-ally: #a9d5e5; --ui-enemy: #ef9a81; --ui-ok: #b2c98c; --ui-warn: #ffcc80;
  --ui-enemy-bg: #221c17; --ui-enemy-line: #ad745e;
  --ui-radius: 5px; --ui-shadow: 0 7px 24px rgba(0,0,0,.55);
  --ui-font: "Avenir Next", -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 -apple-system, "Helvetica Neue", Arial, sans-serif; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 14px 18px 40px; }
.top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
h1 { font-size: 20px; margin: 0; } .sub { color: var(--dim); }
h2 { font-size: 18px; margin: 24px 0 10px; } h3 { font-size: 15px; margin: 0 0 4px; }
button { font: inherit; color: var(--text); background: #3a3e31; border: 1px solid #55594a; border-radius: 6px; padding: 5px 10px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; }
button:hover:not(:disabled) { background: #4a4f3f; }
button:disabled { opacity: .4; cursor: default; }
button.on, button.primary { background: var(--accent); color: #1b1d18; border-color: var(--accent); }
button.on .dim, button.primary .dim { color: #4a4020; }
button.primary { font-weight: 600; } button.big { font-size: 16px; padding: 9px 18px; }
select { font: inherit; background: #3a3e31; color: var(--text); border: 1px solid #55594a; border-radius: 6px; padding: 4px 6px; max-width: 100%; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.c0 { color: #7db4ff; } .c1 { color: #ff8a80; } .dim { color: var(--dim); } .bad { color: #ff8a80; } .small { font-size: 12px; }
.btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sec { color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; margin: 12px 0 4px; }

/* ---------- значки предметов ---------- */
.ii { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 22px; padding: 0 3px; border-radius: 5px;
  font-size: 10px; font-weight: 800; color: #1b1d18; background: #b9ae84; flex: none; }
.ii.k-melee { background: #d1a679; } .ii.k-gun { background: #a8bac4; } .ii.k-ammo { background: #e2c25a; }
.ii.k-armor { background: #95b37a; } .ii.k-med { background: #ef9a9a; } .ii.empty { background: #45493c; color: var(--dim); }
img.ii-img { width: 34px; height: 34px; object-fit: contain; flex: none; }
img.art { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ---------- описание ---------- */
.hero { background: var(--panel); background-size: cover; background-position: center; border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.hero h2 { margin: 0 0 8px; font-size: 22px; } .hero p { max-width: 720px; font-size: 15px; margin: 0 0 16px; }
.cc { display: flex; flex-direction: column; gap: 8px; }
.cc-head { display: flex; gap: 12px; align-items: center; }
.role { color: var(--accent); font-weight: 600; }
.portrait { width: 88px; height: 88px; flex: none; border-radius: 10px; background: radial-gradient(circle at 50% 40%, #4a4f3f, #2b2e26); overflow: hidden; padding: 4px; }
.portrait.sm { width: 52px; height: 52px; padding: 2px; }
.portrait svg, .portrait img { width: 100%; height: 100%; object-fit: cover; }
.flip > svg, .flip > img { transform: scaleX(-1); }
.bio { margin: 0; font-style: italic; color: #cfcab3; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px 10px; font-size: 13px; background: var(--panel2); border-radius: 8px; padding: 8px; }
.stats span { color: var(--dim); }
.ability { font-size: 13px; }
.pm { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 13px; } .pm ul { margin: 2px 0 0; padding-left: 16px; }
.plus li::marker { color: #6fcf72; } .minus li::marker { color: #ff8a80; }
.tip { background: #33372c; border-left: 3px solid var(--accent); padding: 6px 10px; border-radius: 4px; font-size: 13px; }
.rules ul { margin: 0; padding-left: 18px; } .rules li { margin: 4px 0; }
details.card { margin-bottom: 10px; } details summary { cursor: pointer; font-weight: 600; font-size: 15px; }
table.ref { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
table.ref th { text-align: left; color: var(--dim); font-weight: 500; border-bottom: 1px solid var(--line); padding: 4px 6px; white-space: nowrap; }
table.ref td { border-bottom: 1px solid var(--line); padding: 6px; vertical-align: top; }
table.ref td.ic { width: 44px; }

/* ---------- набор отряда ---------- */
.topbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.tab { padding: 8px 14px; }
.tab.on { background: var(--panel2); color: var(--text); border-color: var(--accent); }
.sgrid { display: grid; grid-template-columns: 400px 1fr; gap: 14px; align-items: start; }
.sgrid > * { min-width: 0; }   /* узкий экран: длинная строка в .sq (nowrap) не раздувает колонку шире окна */
.sq { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.sq:hover { background: #2f3329; } .sq.sel { border-color: var(--accent); background: #33372c; }
.mini { width: 40px; height: 40px; flex: none; display: inline-block; }
.hire .mini { width: 24px; height: 24px; }
.sq .nm { flex: 1; min-width: 0; } .sq .nm small { display: block; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sq .price { white-space: nowrap; font-weight: 600; }
.sq button { padding: 2px 8px; } .sq .lock { color: var(--accent); width: 30px; text-align: center; }
.hire { display: flex; flex-wrap: wrap; gap: 6px; }
.wl { display: flex; justify-content: space-between; margin: 10px 0 4px; font-size: 13px; }
.wbar { height: 8px; background: #3a3e31; border-radius: 4px; overflow: hidden; }
.wbar i { display: block; height: 100%; background: #8fa874; transition: width .2s; } .wbar.over i { background: var(--red); }
.slot { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px; align-items: center; margin: 6px 0 2px; }
.slot label { display: flex; align-items: center; gap: 6px; color: var(--dim); }
.note { font-size: 12px; color: var(--dim); margin: 0 0 6px 158px; }
.irow { display: flex; align-items: center; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.irow .nm { flex: 1; } .irow .cnt { width: 40px; text-align: center; font-weight: 600; }
.irow button { width: 28px; padding: 2px 0; justify-content: center; }

/* ---------- бой ---------- */
#queue { display: flex; gap: 4px; align-items: center; overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin-bottom: 8px; }
.rnd { font-weight: 700; margin-right: 6px; white-space: nowrap; }
.qi { width: 54px; flex: none; text-align: center; font-size: 10px; line-height: 1.2; border-radius: 6px; padding: 3px 2px; cursor: pointer; border-bottom: 3px solid transparent; transition: opacity .3s; }
.qi.p0 { border-bottom-color: var(--blue); } .qi.p1 { border-bottom-color: var(--red); }
.qi .mini { width: 32px; height: 32px; display: block; margin: 0 auto 2px; }
.qi.done { opacity: .35; } .qi.cur { background: #4a4f3f; box-shadow: 0 0 0 2px var(--accent); }
.qi span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#fieldwrap { position: relative; box-sizing: content-box; width: calc(var(--cell) * 14); height: calc(var(--cell) * 10); border: 3px solid #55594a; border-radius: 6px; overflow: hidden; }
.cell { position: relative; border: 1px solid rgba(0,0,0,.06); cursor: pointer; }
.cell.mv { background: rgba(60,170,80,.26); }
.cell.mv:hover { background: rgba(60,170,80,.45); }
.cell.path::after, .cell.pend::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: #2f9e44; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.cell.pend::after { width: 18px; height: 18px; margin: -9px; }
.cell.med { box-shadow: inset 0 0 0 3px #57d163; }
.cost { position: absolute; left: 0; right: 0; bottom: 1px; text-align: center; font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 0 3px #000; z-index: 1; }
.obj { position: absolute; inset: 5px; pointer-events: none; }
.obj-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.o-wall { inset: 0; background: #4b4a44; border: 2px solid #2c2b27;
  background-image: repeating-linear-gradient(0deg, rgba(0,0,0,.28) 0 2px, transparent 2px 13px), repeating-linear-gradient(90deg, rgba(0,0,0,.22) 0 2px, transparent 2px 26px); }
.o-crate { background: #a47843; border: 3px solid #6b4a23;
  background-image: linear-gradient(45deg, transparent 46%, #6b4a23 46% 54%, transparent 54%), linear-gradient(-45deg, transparent 46%, #6b4a23 46% 54%, transparent 54%); }
.o-barrel { border-radius: 50%; background: radial-gradient(circle at 40% 35%, #d0733a, #8e3f17); border: 3px solid #5b2609; inset: 8px; }
.o-sandbag { background: #cdb98a; border: 2px solid #86754d; border-radius: 14px; inset: 12px 3px; background-image: repeating-linear-gradient(90deg, transparent 0 13px, #86754d 13px 15px); }
.o-tires { border-radius: 50%; border: 9px solid #1e1e1e; background: #6c6c64; inset: 6px; }
.o-bush { inset: 2px; border-radius: 46% 54% 50% 50%; background: radial-gradient(circle at 35% 35%, #5fae4a, #2f6f2c); opacity: .78; }

#units { position: absolute; inset: 0; pointer-events: none; }
.u { position: absolute; left: 0; top: 0; width: var(--cell); height: var(--cell); transform-origin: 50% 85%;
  transition: transform .125s linear, translate .13s ease-out; }
.u .base { position: absolute; left: 7px; right: 7px; bottom: 4px; height: 12px; border-radius: 50%; }
.u.p0 .base { background: radial-gradient(ellipse, rgba(63,127,224,.95), rgba(63,127,224,.3) 65%, transparent 70%); }
.u.p1 .base { background: radial-gradient(ellipse, rgba(208,69,58,.95), rgba(208,69,58,.3) 65%, transparent 70%); }
.u.active .base { box-shadow: 0 0 0 2px var(--accent); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.25); opacity: .7; } }
@keyframes bob { 50% { top: -6px; } }
.u.hit { animation: shake .34s; }
@keyframes shake {
  0%, 100% { translate: 0 0; filter: none; }
  20% { translate: -4px 0; filter: drop-shadow(0 0 6px #ff2a1a) brightness(1.5); }
  40% { translate: 4px 0; } 60% { translate: -3px 0; filter: drop-shadow(0 0 5px #ff2a1a); } 80% { translate: 2px 0; }
}
.u.dying { animation: die .65s forwards; }
@keyframes die { to { rotate: 80deg; opacity: 0; filter: grayscale(1); } }
@keyframes heal { 50% { filter: drop-shadow(0 0 9px #57d163) brightness(1.3); } }
.bar { position: absolute; left: 6px; right: 6px; bottom: 1px; height: 5px; background: #3a1512; border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: #57d163; transition: width .25s; }
.pct { position: absolute; right: -2px; top: -2px; font-size: 11px; font-weight: 800; background: #c62f25; color: #fff; border-radius: 7px; padding: 0 4px; z-index: 3; box-shadow: 0 0 0 1px #000; }
.pct.noap { background: #6d6d6d; }

#fx { position: absolute; inset: 0; pointer-events: none; }
#fx svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tracer { stroke: #f4f4f4; stroke-width: 2; stroke-dasharray: 7 6; animation: fade .26s forwards; }
.tracer.hit { stroke: #ffe066; stroke-width: 3; stroke-dasharray: none; }
@keyframes fade { to { opacity: 0; } }
.flash { position: absolute; width: 18px; height: 18px; margin: -9px; border-radius: 50%; background: radial-gradient(circle, #fff7c0, #ffb020 50%, rgba(255,120,0,0) 72%); animation: flash .15s forwards; }
@keyframes flash { to { opacity: 0; transform: scale(1.7); } }
.puff { position: absolute; width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: rgba(220,210,180,.8); animation: puff .5s forwards; }
@keyframes puff { to { opacity: 0; transform: scale(2.4); } }
.float { position: absolute; transform: translate(-50%, -50%); font-weight: 800; font-size: 16px; text-shadow: 0 0 3px #000, 0 0 3px #000; white-space: nowrap; animation: rise 1s ease-out forwards; z-index: 5; }
.float.hit { color: #ffd84a; } .float.crit { color: #ff7043; font-size: 20px; } .float.miss { color: #e8e8e8; font-size: 14px; }
.float.heal { color: #7dff8a; } .float.info { color: #cfe3ff; font-size: 13px; }
@keyframes rise { from { opacity: 1; margin-top: 0; } to { opacity: 0; margin-top: -36px; } }
#banner { position: absolute; left: 50%; top: 45%; font-size: 36px; font-weight: 800; color: #fff; text-shadow: 0 2px 10px #000; opacity: 0; pointer-events: none; white-space: nowrap; transform: translate(-50%, -50%); }
#banner.show { animation: ban 1.3s forwards; }
@keyframes ban { 0% { opacity: 0; transform: translate(-50%, -20%); } 20%, 70% { opacity: 1; transform: translate(-50%, -50%); } 100% { opacity: 0; transform: translate(-50%, -80%); } }

#side { display: flex; flex-direction: column; gap: 10px; min-width: 300px; }
.act { border-left: 4px solid var(--blue); } .act.p1 { border-left-color: var(--red); }
.ah { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; } .ah .nm { font-weight: 700; font-size: 16px; }
.hpline { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); }
.hpbar { height: 9px; background: #3a1512; border-radius: 5px; overflow: hidden; margin: 2px 0 6px; }
.hpbar i { display: block; height: 100%; background: #57d163; transition: width .3s; }
.status { font-size: 12px; color: #ffcc80; margin-bottom: 4px; }
.wslot { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; margin-bottom: 4px; padding: 5px 8px; border-radius: 6px; border: 1px solid #55594a; background: #3a3e31; }
.wslot.on { border-color: var(--accent); background: #4a4730; }
.wslot small { display: block; color: var(--dim); font-size: 11px; }
.btns.end { margin-top: 12px; }
.brk { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; font-size: 13px; }
.brk .pos { color: #8fdc8f; } .brk .neg { color: #ff9e94; } .brk .tot { font-weight: 700; border-top: 1px solid var(--line); padding-top: 2px; }
#log { max-height: 220px; overflow-y: auto; font-size: 12.5px; }
#log div { padding: 3px 0; border-bottom: 1px solid var(--line); }
.win { background: var(--accent); color: #1b1d18; font-weight: 700; font-size: 17px; padding: 10px 14px; border-radius: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.win button { font-size: 13px; }
@media (max-width: 1120px) { .sgrid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 0.4: дальность, урон, предметы, взрывы ---------- */
.pct.obj { right: 1px; top: 1px; }
.scorch { position: absolute; inset: 2px; border-radius: 50%; background: radial-gradient(circle, rgba(20,15,10,.75), rgba(20,15,10,0) 72%); }
.o-debris { inset: 10px; background: radial-gradient(circle at 30% 40%, #8a6a40 0 4px, transparent 5px), radial-gradient(circle at 70% 60%, #8a6a40 0 5px, transparent 6px), radial-gradient(circle at 55% 25%, #a8956a 0 4px, transparent 5px), radial-gradient(circle at 25% 75%, #a8956a 0 3px, transparent 4px); }
.float.obj { color: #ffc977; font-size: 13px; }
.boom { position: absolute; width: 150px; height: 150px; margin: -75px; border-radius: 50%; pointer-events: none; z-index: 6;
  background: radial-gradient(circle, #fff6c8 0 10%, #ffb030 25%, #e8541e 45%, rgba(90,40,20,.6) 60%, rgba(60,50,40,0) 72%); animation: boom .7s ease-out forwards; }
@keyframes boom { 0% { transform: scale(.2); opacity: 1; } 60% { opacity: .9; } 100% { transform: scale(1.15); opacity: 0; } }

.obj-ic { position: relative; width: 40px; height: 40px; background: #8f9a5c; border-radius: 6px; overflow: hidden; }

/* ---------- 0.4: настоящие картинки ---------- */
#ground { position: absolute; inset: 0; background-size: calc(var(--cell) * 3) calc(var(--cell) * 3); filter: saturate(.55) brightness(.8) contrast(.9); }
.obj-img { inset: -3px; width: calc(100% + 6px); height: calc(100% + 6px); }
.u .base { height: 14px; bottom: 3px; }
.u.p0 .base { background: radial-gradient(ellipse, rgba(63,127,224,1), rgba(63,127,224,.45) 60%, transparent 70%); }
.u.p1 .base { background: radial-gradient(ellipse, rgba(220,60,50,1), rgba(220,60,50,.45) 60%, transparent 70%); }
.u .bar { z-index: 2; }
.qi .mini img { filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.portrait img { object-fit: cover; }

/* ---------- засада ---------- */
.cell.amb { box-shadow: inset 0 0 0 2px rgba(255,70,50,.75); background-image: linear-gradient(rgba(255,60,40,.16), rgba(255,60,40,.16)); }
.cost.risk { color: #ffb4a8; }
.warn-box { background: #3e2420; border-left: 3px solid var(--red); padding: 5px 8px; border-radius: 4px; font-size: 12px; margin: 4px 0; }

/* ---------- 0.6: крупное поле, карты, расстановка, дальность ---------- */
:root { --cell: 64px; }
.wrap { max-width: 1760px; }
#side { max-width: 460px; }
.fieldcol { display: flex; flex-direction: column; gap: 6px; }
.lg { display: inline-block; width: 18px; height: 0; vertical-align: middle; margin: 0 2px; }
.lg.l0 { border-top: 3px solid #ffd84a; } .lg.l1 { border-top: 3px dashed #ff6a4d; }
.lg.l2 { height: 12px; background: rgba(0,0,0,.55); border-radius: 2px; }
.lg.dz { width: 14px; height: 14px; background: rgba(90,160,255,.35); box-shadow: inset 0 0 0 2px rgba(120,180,255,.9); border-radius: 2px; }
.cell.dz { background-color: rgba(90,160,255,.22) !important; box-shadow: inset 0 0 0 1px rgba(120,180,255,.6); }
.cell.dz:hover { background-color: rgba(90,160,255,.4) !important; }
.tip { position: absolute; transform: translate(-50%, -100%); margin-top: -2px; z-index: 8; pointer-events: none; white-space: nowrap;
  font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: #1b1d18; border: 1px solid #ffd84a; color: #ffd84a; }
.tip.z1 { border-color: #ff6a4d; color: #ffb4a8; } .tip.z2 { border-color: #777; color: #bbb; }
.tip[hidden] { display: none; }
/* масштаб бойцов от размера клетки */
.u .base { left: 10%; right: 10%; bottom: 5%; height: 26%; border-radius: 50%; }
.u.p0 .base { background: radial-gradient(ellipse, rgba(70,140,255,.95) 0 45%, rgba(70,140,255,.35) 62%, transparent 72%); box-shadow: 0 0 0 2px rgba(120,180,255,.95); }
.u.p1 .base { background: radial-gradient(ellipse, rgba(235,70,55,.95) 0 45%, rgba(235,70,55,.35) 62%, transparent 72%); box-shadow: 0 0 0 2px rgba(255,120,100,.95); }
.u.active .base { box-shadow: 0 0 0 3px var(--accent); }
#ground { filter: saturate(.35) brightness(.62) contrast(.85); }
.bar { left: 8%; right: 8%; bottom: 1px; height: 6px; border: 1px solid rgba(0,0,0,.6); }
.pct { font-size: 12px; }
.cost { font-size: 12px; }
/* выбор карты */
.maps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 12px 0; }
.mapcard { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.mapcard:hover { background: #2f3329; } .mapcard.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.mapcard small { color: var(--dim); font-size: 11px; line-height: 1.3; }
.mprev { display: grid; grid-template-columns: repeat(14, 1fr); aspect-ratio: 14 / 10; background: #6f6a4f; border-radius: 4px; overflow: hidden; }
.mprev i { border: .5px solid rgba(0,0,0,.08); } .mprev i.z0 { box-shadow: inset 0 0 0 20px rgba(70,140,255,.25); } .mprev i.z1 { box-shadow: inset 0 0 0 20px rgba(235,70,55,.25); }
.mprev.rand { display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 800; color: var(--accent); }
@media (max-width: 1300px) { .maps { grid-template-columns: repeat(3, 1fr); } }

/* ---------- проход, грязь, проволока, гранаты, дым ---------- */
.pass { position: absolute; left: 2px; bottom: 2px; z-index: 2; font-size: 11px; font-weight: 800; line-height: 1; padding: 2px 4px; border-radius: 5px; pointer-events: none; box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
.pass.static { position: static; display: inline-block; box-shadow: none; margin-right: 4px; }
.p-block { background: #2a1210; color: #ff8a80; } .p-vault { background: #1e2a3a; color: #9cc8ff; } .p-rough { background: #2f2a12; color: #ffd84a; }
.passleg { margin-top: 3px; } .passleg .pass { position: static; display: inline-block; margin: 0 2px; }
.o-mud { inset: 3px; border-radius: 40% 55% 45% 50%; background: radial-gradient(circle at 40% 45%, #5a4a30, #3e3222 60%, rgba(62,50,34,.6)); }
.o-wire { inset: 6px; background: repeating-linear-gradient(45deg, transparent 0 6px, #9a9a92 6px 7px), repeating-linear-gradient(-45deg, transparent 0 6px, #9a9a92 6px 7px); opacity: .9; }
.cell.thr { box-shadow: inset 0 0 0 1px rgba(255,216,74,.55); }
.cell.blast { background-color: rgba(255,90,40,.45) !important; box-shadow: inset 0 0 0 2px #ff7043; }
.cell.blast.smk { background-color: rgba(220,220,220,.45) !important; box-shadow: inset 0 0 0 2px #eee; }
.smoke { position: absolute; inset: -12%; z-index: 3; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle at 35% 40%, rgba(225,225,220,.85), rgba(200,200,195,.55) 45%, rgba(190,190,185,0) 72%); animation: drift 3s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate(-3px, 1px) scale(1); } to { transform: translate(3px, -2px) scale(1.08); } }
@keyframes lob { 0% { transform: translate(0, 0); } 50% { transform: translate(calc(var(--dx) / 2), calc(var(--dy) / 2 - 50px)); } 100% { transform: translate(var(--dx), var(--dy)); } }
.ii.k-throw { background: #c3b06a; }

/* ---------- точка и счёт ---------- */
.cell.pt { box-shadow: inset 0 0 0 2px rgba(255,216,74,.85); }
.cell.pt::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,216,74,.13) 0 6px, transparent 6px 12px); pointer-events: none; }
.score { margin: 0 10px 0 4px; white-space: nowrap; font-size: 15px; } .score small { color: var(--dim); font-size: 11px; margin-left: 4px; }
.goal { font-size: 12.5px; color: var(--dim); }
.win .small { font-size: 12px; font-weight: 500; }

/* ---------- масштаб поля ---------- */
#side { max-width: none; min-width: 0; }
.fieldcol { min-width: 0; }
#zoombar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
#zoombar button { padding: 3px 10px; }
#zoombar #zoomval { min-width: 46px; text-align: center; font-weight: 700; }
#fieldscroll { overflow: auto; max-height: calc(100vh - 200px); border-radius: 8px; overscroll-behavior: contain; }
#fieldscroll::-webkit-scrollbar { width: 10px; height: 10px; } #fieldscroll::-webkit-scrollbar-thumb { background: #55594a; border-radius: 5px; }
.wrap { max-width: none; }

/* ---------- 0.9: поле во всю ширину, информация в нижней панели ---------- */
body.in-game .top { display: none; }
body.in-game .wrap { padding: 8px 12px 0; }
#game { display: flex; flex-direction: column; gap: 6px; height: calc(100vh - 8px); }
#game[hidden] { display: none; }
#queue { margin-bottom: 0; padding: 4px 8px; flex: none; }
#zoombar { flex: none; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; }
.fieldcol { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 4px; }
#fieldscroll { flex: 1; min-height: 0; max-height: none; background: #14150f; display: flex; }
#fieldwrap { margin: 0 auto; flex: none; }
.passleg { margin-top: 0; display: inline; margin-left: 10px; }
#side { flex: none; height: 210px; display: flex; flex-direction: row; gap: 6px; max-width: none; min-width: 0; padding-bottom: 6px; }
.hcol { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; overflow-y: auto; min-width: 0; font-size: 13px; }
.hcol .sec { margin: 0 0 3px; } .hcol .sec + .btns, .hcol .btns { margin-top: 2px; gap: 4px; }
.hcol .sec:not(:first-child) { margin-top: 6px; }
.hcol button { padding: 3px 7px; font-size: 12.5px; }
.deplist { display: flex; flex-wrap: wrap; gap: 4px; }
.deplist .sq { width: 190px; padding: 3px 5px; } .deplist .mini { width: 32px; height: 32px; }

/* ---------- подготовка арены: сценарий, размер поля, карта генератора (29.11.2026) ---------- */
.ar-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 8px; margin: 6px 0 8px; }
#setup button.ar-mode { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 4px; text-align: left; padding: 10px 12px; }
.ar-mode b { font-size: 15px; } .ar-mode span { font-size: 12.5px; line-height: 1.35; } .ar-mode small { margin-top: auto; font-size: 11px; color: var(--dim); }
#setup button.ar-mode.on { box-shadow: 0 0 0 1px var(--ui-gold); }
.ar-desc { margin: 0 0 12px; font-size: 13.5px; line-height: 1.45; color: var(--ui-muted); }
.ar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.ar-label { min-width: 90px; font-size: 14px; color: var(--ui-muted); }
#setup button.ar-chip { padding: 4px 12px; } .ar-chip small { color: var(--dim); font-size: 11px; }
.ar-note { flex: 1 1 260px; font-size: 12.5px; line-height: 1.4; color: var(--ui-muted); }
.ar-best { color: var(--ui-gold); }
.ar-map { display: grid; grid-template-columns: minmax(0, 620px) minmax(220px, 1fr); gap: 14px; align-items: start; margin: 4px 0 14px; }
.mprev.gen { width: 100%; grid-auto-rows: 1fr; border: 1px solid var(--ui-line2); }
.mprev.gen i { position: relative; min-width: 0; min-height: 0; }
.mprev.gen i.pt { box-shadow: inset 0 0 0 20px rgba(255,216,74,.38); }
.mprev.gen i.cg::after { content: ""; position: absolute; inset: 12%; background: #ffcf4a; border: 2px solid #4a3200; border-radius: 2px; }
.mprev.gen i b { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1; font: 800 14px/1 var(--ui-font); font-style: normal; color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000; }
.ar-side h3 { margin: 0 0 4px; } .ar-side p { margin: 4px 0 8px; font-size: 13px; }
.ar-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 10px; font-size: 12.5px; }
.ar-legend .lz { display: inline-block; width: 12px; height: 12px; margin-right: 4px; vertical-align: -1px; border-radius: 2px; background: #6f6a4f; }
.ar-legend .lz.z0 { background: #5a7bb0; } .ar-legend .lz.z1 { background: #a85a4a; } .ar-legend .lz.pt { background: #b8a04a; } .ar-legend .lz.cg { background: #ffcf4a; box-shadow: inset 0 0 0 2px #4a3200; }
.ar-seed { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.ar-seed input { width: 100px; min-height: 34px; padding: 4px 8px; font: inherit; color: var(--ui-ink); background: var(--ui-panel); border: 1px solid var(--ui-line2); border-radius: 4px; }
#setup h2.ar-h2 { margin: 16px 0 0; }
@media (max-width: 900px) { .ar-map { grid-template-columns: minmax(0, 1fr); } }

