/* army — армии замка (js/screens/army.js): окно «Армии», выбор героя, набор войск, выбор армии для марша.
   Классы модуля — с приставкой ar-; кнопки, разделы, требования и списки — из kod.css. */

.ar-wait { flex: 1; display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 160px; font-family: var(--title); font-weight: 700; font-size: 24px; color: var(--w-accent, var(--bronze-l)); }
.ar-wait .spinner { width: 34px; height: 34px; border-width: 3px; }
.ar-ph { width: 44px; height: 60px; flex-shrink: 0; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid var(--w-line, var(--bronze-d)); border-radius: 6px; background: rgba(52, 68, 94, 0.5); font-family: var(--title); font-weight: 700; font-size: 24px; color: var(--w-accent, var(--bronze-l)); }
.ar-ph.big { width: 62px; height: 85px; }

/* ——— окно «Армии»: список армий слева, выбранная армия справа ——— */
.ar-win .modal-body { display: flex; padding: 0; overflow: hidden; }
.ar-side {
  width: 212px; flex-shrink: 0; box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; padding: 10px 10px 12px 12px;
  overflow-y: auto; background: rgba(16, 20, 28, 0.38); border-right: 1px solid var(--w-line, var(--bronze-d));
}
.ar-main { flex: 1; min-width: 0; box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; padding: 10px 16px 14px; overflow-y: auto; }
.ar-side::-webkit-scrollbar, .ar-main::-webkit-scrollbar { width: 8px; }
.ar-side::-webkit-scrollbar-thumb, .ar-main::-webkit-scrollbar-thumb { background: var(--bronze-d); border-radius: 4px; }

.ar-slot {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 70px; padding: 5px 8px 5px 5px; box-sizing: border-box; flex-shrink: 0;
  background: var(--w-well, rgba(16, 20, 28, 0.6)); border: 1px solid var(--w-line, #3a4658); border-radius: 8px; color: var(--text); font-family: var(--sans); text-align: left; cursor: pointer;
}
.ar-slot:hover { border-color: var(--bronze); }
.ar-slot.on { padding: 4px 7px 4px 4px; border: 2px solid var(--bronze-l); background: linear-gradient(90deg, rgba(236, 196, 120, 0.22), rgba(16, 20, 28, 0.6)); }
.ar-slot.locked { border-style: solid; border-color: rgba(138, 106, 58, 0.58); background: rgba(16, 20, 28, 0.35); }
.ar-slot .face { width: 44px; height: 60px; flex-shrink: 0; box-sizing: border-box; border: 2px solid var(--bronze); border-radius: 6px; object-fit: cover; object-position: top; background: var(--navy-l); }
.ar-slot .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.ar-slot .tx b { font-family: var(--title); font-weight: 700; font-size: 20px; line-height: 1; color: var(--w-accent, var(--bronze-l)); }
.ar-slot.locked .tx b { color: var(--muted); }
.ar-slot .st { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.ar-slot.locked .st { white-space: normal; } /* «Королевская грамота» лёжа — в две строки, не многоточием */
.ar-slot .st.home { color: var(--good); }
.ar-slot .st.go { color: #9cc6f0; }
.ar-slot .st.away { color: var(--gold); }
.ar-slot .st.busy { color: var(--w-accent, var(--bronze-l)); }
.ar-slot .tr { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.ar-sum { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid var(--w-line, var(--bronze-d)); font-size: 13px; line-height: 1.35; color: var(--muted); }
.ar-sum b { color: var(--text); }
.ar-sum .btn { width: 100%; padding: 0 8px; }

/* шапка армии */
.ar-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 36px; }
.ar-head .t { font-family: var(--title); font-weight: 700; font-size: 28px; line-height: 1; color: var(--w-accent, var(--bronze-l)); }
.ar-chip { padding: 4px 11px; border-radius: 14px; background: var(--w-field, var(--navy-d)); border: 1px solid var(--w-line, var(--bronze-d)); font-size: 14px; font-weight: 700; white-space: nowrap; }
.ar-chip.home { color: var(--good); border-color: var(--green); }
.ar-chip.go { color: #9cc6f0; border-color: var(--steel-l); }
.ar-chip.away { color: var(--gold); border-color: var(--bronze); }
.ar-chip.busy { color: var(--w-accent, var(--bronze-l)); border-color: var(--bronze); }
.ar-where { display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); }
.ar-head .btn.small { gap: 6px; }
.ar-stats { margin-left: auto; display: flex; gap: 14px; font-size: 14px; color: var(--muted); }
.ar-stats > span { display: flex; align-items: center; gap: 5px; }
.ar-stats b { font-size: 17px; color: var(--text); }
.ar-stats b.bad { color: var(--bad); }
.ar-notes { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.ar-notes span { display: flex; align-items: center; gap: 5px; }
.ar-notes .ok { color: var(--good); }

/* герои по местам */
.ar-heroes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; flex-shrink: 0; } /* отряд из пяти героев */
.ar-hero {
  position: relative; display: flex; flex-direction: column; gap: 6px; width: 100%; min-height: 156px; padding: 22px 8px 8px; box-sizing: border-box;
  background: var(--w-well, rgba(16, 20, 28, 0.62)); border: 1px solid var(--w-line, var(--bronze-d)); border-radius: 8px; color: var(--text); font-family: var(--sans); text-align: left;
}
.ar-hero.main { border-color: var(--bronze); background: linear-gradient(rgba(236, 196, 120, 0.13), rgba(16, 20, 28, 0.62) 55%); }
.ar-hero:not(.lock):hover { border-color: var(--bronze-l); }
.ar-hero .role {
  position: absolute; left: 50%; top: -1px; z-index: 2; transform: translateX(-50%); padding: 1px 14px 3px; white-space: nowrap; pointer-events: none;
  background: linear-gradient(#b8343a, #7a1a1e); border: 1px solid var(--bronze); border-top: 0; border-radius: 0 0 8px 8px;
  font-family: var(--title); font-weight: 700; font-size: 14px; color: var(--w-hi, #ffe8b0);
}
.ar-hero.main .role { background: linear-gradient(var(--bronze-l), var(--bronze)); color: var(--ink); }
.ar-hero .top { display: flex; gap: 8px; }
.ar-hero .top .face { width: 50px; height: 69px; flex-shrink: 0; box-sizing: border-box; border: 2px solid var(--bronze); border-radius: 6px; object-fit: cover; object-position: top; background: var(--navy-l); }
.ar-hero .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 13px; }
.ar-hero .info > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-hero .info b { font-size: 15px; }
.ar-hero .stars, .ar-pick .stars { color: var(--w-gold, #f0c040); font-size: 12px; letter-spacing: 1px; }
.ar-hero .s { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.ar-hero .troops { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 13px; }
.ar-hero .troops > span:first-child { display: flex; align-items: center; gap: 4px; }
.ar-hero .rec { color: var(--w-accent, var(--bronze-l)); font-size: 12px; white-space: nowrap; }
.ar-hero .note-s { font-size: 12px; color: var(--muted); }
.ar-hero .swap { position: absolute; left: 7px; top: 5px; z-index: 2; opacity: 0.75; pointer-events: none; }
.ar-bar { height: 8px; flex-shrink: 0; background: var(--w-field, var(--navy-d)); border: 1px solid var(--w-line, var(--bronze-d)); border-radius: 5px; overflow: hidden; }
.ar-bar i { display: block; height: 100%; background: linear-gradient(var(--green-l), var(--green)); }
.ar-hit { position: absolute; inset: 0; z-index: 1; padding: 0; background: none; border: 0; border-radius: 8px; cursor: pointer; }
.ar-hit:disabled { cursor: default; }
.ar-x {
  position: absolute; right: 5px; top: 5px; z-index: 3; width: 24px; height: 24px; padding: 0; display: flex; align-items: center; justify-content: center;
  border-radius: 12px; background: var(--crimson); border: 1px solid var(--bronze-l); color: #fff; font-size: 12px; font-weight: 700; line-height: 1; cursor: pointer;
}
.ar-x:hover { filter: brightness(1.15); }
.ar-x:disabled { display: none; }
.ar-hero.empty { align-items: center; justify-content: center; gap: 4px; border-style: dashed; border-color: var(--bronze); cursor: pointer; text-align: center; }
.ar-hero.empty b { font-size: 16px; color: var(--w-accent, var(--bronze-l)); }
.ar-hero.empty:hover { background: rgba(236, 196, 120, 0.1); }
.ar-hero.empty:disabled { cursor: default; opacity: 0.6; }
.ar-hero.lock { align-items: center; justify-content: center; gap: 4px; border-style: dashed; border-color: #8a6a3a; text-align: center; font-size: 14px; line-height: 1.3; color: var(--muted); }
.ar-hero.lock .role { background: linear-gradient(#4a4f5c, #2a2f3a); color: var(--muted); }

/* закрытая армия */
.ar-locked { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px 40px; text-align: center; }
.ar-locked .big { font-family: var(--title); font-weight: 700; font-size: 30px; color: var(--w-accent, var(--bronze-l)); }
.ar-locked p { margin: 0; max-width: 460px; color: var(--muted); }
.ar-locked .req { width: min(560px, 100%); }
/* у запрета — синяя кнопка к постройке (army.js goBuildBtn: «Перейти» / «Построить», docs/UI_PLAN.md §2.3) */
.ar-locked .req .btn, .hl-build .btn { flex: none; }
.hl-build { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.hl-build .ar-note { flex: 1; min-width: 0; }

/* закрытая армия (аудит geroi-08): то, что откроется, — крупно (Плац нужной стадии / Королевская грамота) под замком,
   одна строка и большая кнопка */
.ar-lpic { position: relative; display: flex; align-items: center; justify-content: center; width: 340px; max-width: 80%; aspect-ratio: 1.15;
  border-radius: 24px; background: radial-gradient(circle at 50% 55%, rgba(255, 214, 140, 0.55), rgba(255, 214, 140, 0) 68%); }
.ar-lpic .ar-lart { width: 100%; height: 100%; object-fit: contain; filter: saturate(0.75) brightness(0.92) drop-shadow(0 10px 14px rgba(0, 0, 0, 0.35)); }
.ar-lpic.gold .ar-lart { width: 70%; height: 70%; }
.ar-llock { position: absolute; inset-inline-end: 6%; bottom: 8%; width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 35%, #4a586d, #1d2738); border: 3px solid #ffe39a; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45); }
.ar-llock > img, .ar-llock > svg { width: 56px; height: 56px; }
.ar-locked p { font-size: max(15px, var(--fs-sub)); }
.ar-locked p .lack { color: var(--bad); }
.ar-choose .ar-lpic { width: 200px; }
.ar-choose .ar-llock { width: 56px; height: 56px; }
.ar-choose .ar-llock > img, .ar-choose .ar-llock > svg { width: 36px; height: 36px; }

/* места героев (аудит geroi-19): нарисованная подложка места ui.army_slot, герой — на всю карточку на свету цвета
   редкости (--rc из css/heroes.css .hz-rN), «Ур. N» плашкой, воин ступени в кружке, имя, выносливость и войска внизу;
   закрытое — подложка ui.army_slot_locked, замок и одна строка; свободное — «+» крупно */
.ar-hero.full, .ar-hero.lock, .ar-hero.empty, body.vertical .ar-hero.full, body.vertical .ar-hero.lock, body.vertical .ar-hero.empty { aspect-ratio: 100 / 132; min-height: 0; padding: 0; background-color: transparent; background-position: center; background-size: 100% 100%; background-repeat: no-repeat; }
.ar-hero.full[style], .ar-hero.lock[style], .ar-hero.empty[style] { border-color: transparent; }
.ar-hero.full { overflow: visible; }
.ar-hero.main.full { background-color: transparent; }
.ar-face { position: absolute; left: 7%; right: 7%; top: 6%; bottom: 40%; border-radius: 10px; overflow: hidden; pointer-events: none;
  background: radial-gradient(circle at 50% 30%, var(--rc, #5c9ad8) 0, #2a3040 72%, #1b1f2a 100%); box-shadow: 0 0 0 2px var(--rc, #5c9ad8); }
.ar-face .bface { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; display: block; }
.ar-hero.main .ar-face { box-shadow: 0 0 0 3px #ffd75e, 0 0 12px rgba(255, 210, 94, 0.6); }
.ar-hlv { position: absolute; inset-inline-start: 10%; top: 9%; z-index: 2; padding: 2px 8px; border-radius: 6px; pointer-events: none;
  background: rgba(16, 20, 28, 0.82); border: 1px solid var(--bronze); color: #f6ead0; font: 700 13px/1.2 var(--sans); }
.ar-harm { position: absolute; inset-inline-end: 9%; top: calc(60% - 40px); z-index: 2; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; pointer-events: none;
  background: #2a3442; border: 2px solid #ffe39a; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45); display: flex; align-items: center; justify-content: center; }
.ar-harm .arm { width: 100%; height: 100%; object-fit: cover; }
.ar-hft { position: absolute; left: 7%; right: 7%; bottom: 5%; top: 61%; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; pointer-events: none; color: #1f2a38; }
.ar-hft > b { font: 700 15px/1.1 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-hst { position: absolute; inset-inline-start: 10%; top: calc(60% - 30px); z-index: 2; display: inline-flex; align-items: center; gap: 2px; padding: 1px 7px 1px 4px; border-radius: 10px;
  pointer-events: none; background: rgba(16, 20, 28, 0.78); color: #ffe9a8; font: 700 13px/1.3 var(--sans); }
.ar-hft .s, .ar-hft .troops { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #34445e; }
.ar-hft .troops { justify-content: space-between; }
.ar-hft .troops > span:first-child { display: flex; align-items: center; gap: 4px; }
.ar-hero.full .swap { left: auto; inset-inline-end: 34px; top: 6px; }
.ar-hero.lock { justify-content: center; gap: 8px; border-style: solid; }
.ar-lk { display: flex; } .ar-lk > img, .ar-lk > svg { width: 64px; height: 64px; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.45)); }
.ar-lkt { padding: 0 8px; color: #fff; font: 700 14px/1.2 var(--sans); text-align: center; text-shadow: var(--t-outline); }
.ar-hero.empty { justify-content: center; gap: 6px; border-style: solid; }
.ar-hero.empty b { color: #1f4f86; }
.ar-plus { display: flex; width: 72px; height: 72px; border-radius: 50%; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.55); border: 3px dashed #3d6e9e; }
.ar-plus > img, .ar-plus > svg { width: 44px; height: 44px; }
/* строй армии: двор под героями — воины фигурами (army.js yardDraw) */
.ar-yard {
  position: relative; flex: none; height: 140px; border-radius: 12px; overflow: hidden;
  background: radial-gradient(130% 90% at 50% 100%, #b99a6a 0, #8f7350 55%, #6c5538 100%); box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.35);
}
.ar-yard::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 46%; background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.05) 0 2px, rgba(0, 0, 0, 0) 2px 46px); }
.ar-yard.empty { display: none; }
.ar-ycv { position: absolute; inset: 0; width: 100%; height: 100%; }
/* выбор героя на место (аудит geroi-20): сетка карточек, как список героев */
.ar-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.ar-pick.hz-r1, .ar-pick.hz-r2, .ar-pick.hz-r3, .ar-pick.hz-r4, .ar-pick.hz-r5 {
  position: relative; display: block; width: auto; aspect-ratio: 3 / 4.2; padding: 0; overflow: hidden; border-radius: 12px; border: 3px solid var(--rc);
  background: radial-gradient(circle at 50% 30%, var(--rc) 0, #2a3040 70%, #1b1f2a 100%); color: #fff;
}
.ar-pick:not(:disabled):hover { filter: brightness(1.1); border-color: var(--rc); }
.ar-pick:disabled { opacity: 1; }
.ar-pick:disabled .ar-pface { filter: grayscale(0.7) brightness(0.55); }
.ar-pface { position: absolute; inset: 0; }
.ar-pface .bface { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; display: block; }
.ar-plv, .ar-pcost { position: absolute; top: 6px; z-index: 1; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 8px;
  background: rgba(16, 20, 28, 0.82); border: 1px solid var(--bronze); font: 700 13px/1.2 var(--sans); }
.ar-plv { inset-inline-start: 6px; }
.ar-pcost { inset-inline-end: 6px; }
.ar-pcost > img, .ar-pcost > svg { width: 18px; height: 18px; }
.ar-parm { position: absolute; inset-inline-start: 6px; bottom: 30%; z-index: 1; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; border: 2px solid #ffe39a; background: #2a3442; }
.ar-parm .arm { width: 100%; height: 100%; object-fit: cover; }
.ar-pft { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 20px 4px 6px;
  background: linear-gradient(rgba(10, 12, 18, 0), rgba(10, 12, 18, 0.85) 40%); }
.ar-pft b { max-width: 100%; font: 700 14px/1.15 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px #000; }
.ar-pcap { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 10px; background: rgba(63, 143, 79, 0.85); font: 700 13px/1.3 var(--sans); }
.ar-pick .why { position: absolute; left: 0; right: 0; top: 40%; z-index: 2; padding: 4px 6px; background: rgba(163, 38, 42, 0.88); color: #fff; font: 700 12px/1.2 var(--sans); text-align: center; }
/* «Как растут армии» (аудит geroi-21): плитки — картинка постройки, что даёт, сейчас; правила — под «Подробнее» */
.modal.ar-ruleswin { width: 760px; }
.ar-rtiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.ar-rtile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px 10px; border-radius: 12px; text-align: center;
  background: var(--w-well, rgba(16, 20, 28, 0.5)); border: 1px solid var(--w-line, #3a4658); }
.ar-rtile.off .ar-rp { filter: grayscale(0.8) brightness(0.85); opacity: 0.7; }
.ar-rp { width: 100%; height: 92px; display: flex; align-items: center; justify-content: center; }
.ar-rp .ar-rpic { max-width: 100%; max-height: 100%; object-fit: contain; }
.ar-rp .ar-rpic.ban { height: 80px; }
.ar-rtile b { font: 700 16px/1.15 var(--sans); color: var(--w-hi, var(--text)); }
.ar-rtile .nm { font-size: 13px; color: var(--muted); }
.ar-rtile i { margin-top: 2px; padding: 1px 10px; border-radius: 10px; background: rgba(192, 138, 62, 0.22); font: 700 14px/1.3 var(--sans); font-style: normal; color: var(--w-accent, #8a5a12); }
.ar-more { margin-top: 12px; }
.ar-more summary { cursor: pointer; font-weight: 700; color: var(--w-accent, #3d6e9e); }

/* набор войск: ползунок с −/+ и полем числа, как в казармах KoA */
.ar-sect { display: flex; align-items: baseline; gap: 12px; flex-shrink: 0; }
.ar-why { margin-left: auto; font-family: var(--sans); font-weight: 400; font-size: 13px; color: var(--bad); }
.ar-rows { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.ar-row {
  display: grid; grid-template-columns: 205px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 44px; padding: 4px 10px; box-sizing: border-box;
  background: var(--w-well, rgba(16, 20, 28, 0.5)); border: 1px solid var(--w-line, #3a4658); border-radius: 8px;
}
.ar-row .nm { min-width: 0; display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.ar-row .nm b { font-size: 15px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-row .nm b i { font-style: normal; font-weight: 400; font-size: 13px; color: var(--muted); }
.ar-row .nm span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-sl { display: flex; align-items: center; gap: 8px; }
.ar-step {
  width: 32px; height: 32px; flex-shrink: 0; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 16px;
  border: 2px solid var(--bronze-l); background: radial-gradient(circle at 50% 35%, var(--navy-l), var(--navy)); color: #fff; font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer;
}
.ar-step:hover { filter: brightness(1.2); }
.ar-step:active { transform: translateY(1px); }
.ar-range {
  flex: 1; min-width: 60px; height: 12px; margin: 0; -webkit-appearance: none; appearance: none; cursor: pointer; outline: none;
  background: linear-gradient(90deg, var(--bronze-l) var(--p, 0%), var(--navy-d) var(--p, 0%)); border: 1px solid var(--w-line, var(--bronze-d)); border-radius: 6px;
}
.ar-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 26px; height: 26px; border-radius: 13px;
  background: radial-gradient(circle at 50% 35%, var(--gold), var(--bronze)); border: 2px solid #5a3a12; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.ar-range::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 13px;
  background: radial-gradient(circle at 50% 35%, var(--gold), var(--bronze)); border: 2px solid #5a3a12; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.ar-range::-moz-range-track { background: transparent; }
.ar-num {
  width: 78px; height: 34px; flex-shrink: 0; box-sizing: border-box; padding: 0 6px; text-align: center; outline: none;
  font-family: var(--sans); font-size: 16px; font-weight: 700; color: var(--text); background: var(--w-field, var(--navy-d)); border: 2px solid var(--w-line, var(--bronze-d)); border-radius: 6px;
  -moz-appearance: textfield; appearance: textfield;
}
.ar-num:focus { border-color: var(--bronze-l); }
.ar-num::-webkit-inner-spin-button, .ar-num::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ar-busy, .ar-full { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--w-accent, var(--bronze-l)); }
.ar-full { color: var(--good); }
.ar-note { margin: 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
.ar-note b { color: var(--text); }
.ar-note .warn { color: var(--bad); }
.ar-foot { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.ar-cost {
  flex: 1; min-width: 0; min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 6px 12px; box-sizing: border-box;
  background: var(--w-well, rgba(16, 20, 28, 0.5)); border: 1px solid var(--w-line, #3a4658); border-radius: 8px; font-size: 15px;
}
.ar-cost .c { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.ar-cost .c i { font-style: normal; font-size: 13px; color: var(--muted); }
.ar-cost .c.lack b { color: var(--bad); }
.btn.two.ar-go { width: 160px; height: auto; min-height: 56px; flex-shrink: 0; } /* длинная надпись — кнопка выше */

/* окна поменьше: вопрос «да / нет», выбор героя */
.modal.ar-small { width: 470px; }
.ar-confirm { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.ar-pickwin .ar-note { margin-bottom: 10px; }
.ar-list { display: flex; flex-direction: column; gap: 8px; }
.ar-pick {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px 12px 6px 6px; box-sizing: border-box; flex-shrink: 0;
  background: var(--w-well, rgba(16, 20, 28, 0.55)); border: 1px solid var(--w-line, #3a4658); border-radius: 8px; color: var(--text); font-family: var(--sans); text-align: left; cursor: pointer;
}
.ar-pick:hover:not(:disabled) { border-color: var(--bronze-l); background: rgba(236, 196, 120, 0.1); }
.ar-pick:disabled { cursor: default; opacity: 0.62; }
.ar-pick .face, .ar-pick .ar-ph { width: 54px; height: 74px; flex-shrink: 0; box-sizing: border-box; border: 2px solid var(--bronze); border-radius: 6px; object-fit: cover; object-position: top; background: var(--navy-l); }
.ar-pick .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.ar-pick .t b { font-size: 17px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-pick .t > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-pick .why { color: var(--bad); }
.ar-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; }
.ar-meta span { display: flex; align-items: center; gap: 4px; }
.ar-eta { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; color: var(--muted); text-align: right; }
.ar-eta > span { display: flex; align-items: center; gap: 4px; }
.ar-eta b { color: var(--text); }
.ar-eta .tm { font-size: 20px; color: var(--gold); }

/* как растут армии */
.ar-rules td, .ar-rules th { vertical-align: top; }
.ar-rules td:first-child { white-space: nowrap; font-weight: 700; }
.ar-rules td:last-child, .ar-rules th:last-child { text-align: right; white-space: nowrap; }
.modal p.ar-rules-p { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.ar-rules-p b { color: var(--w-accent, var(--bronze-l)); }

/* цена похода — в пояснении «!» окна выбора армии */
.ar-costs { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 2px 10px; font-size: var(--fs-sub); }
.ar-costs span { display: flex; align-items: center; gap: 5px; }
.ar-costs .lack { color: var(--bad); }

/* лазарет: раненые и лечение (army.js healHtml) */
.ar-heal { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; }
.ar-heal .ar-cost { flex: 1; }
.ar-heal .ar-note { margin: 0; }

/* стоя (css/portrait.css): список отрядов — строкой сверху, герои — по три в ряд */
body.vertical .ar-win .modal-body { flex-direction: column; }
body.vertical .ar-side { width: auto; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--w-line, var(--bronze-d)); max-height: none; overflow: visible; }
body.vertical .ar-side .ar-slot { width: calc(50% - 3px); }
body.vertical .ar-side .ar-sum { flex-basis: 100%; }
body.vertical .ar-heroes { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* окно атаки: мощь против мощи и оценка боя (план 5.6.5) */
.ar-odds { font-size: 13px; color: var(--muted); }
.ar-odds b { font-weight: 700; }
.ar-odds.easy b { color: var(--w-good, #7fd08e); } .ar-odds.good b { color: #b8e08a; }
.ar-odds.even b { color: #f0d070; } .ar-odds.bad b { color: var(--w-bad, #ff8a7a); }

/* ——— выбор армии для марша (army.js chooseArmy, docs/UI_PLAN.md §3 п. 3): сила против силы и оценка боя, герои ячейками
   с числом воинов, полоса войск, сбор ралли плашками, время и цена похода, внизу — главная кнопка; армии — в полосе
   армий (.ar-dock). Над целью (карта, map.js anchorAt) окно — нижняя панель, поставленная у клетки (left/top — карта),
   хвостик к цели (data-tail, --tx); вне карты — всплывающее окно с полосой армий в нём ——— */
.modal.ar-choose { width: 470px; }
.modal.ar-choose .modal-body { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; }
.modal.ar-choose .modal-body > * { flex-shrink: 0; }
.modal.sheet.ar-anchor {
  position: absolute; left: 0; top: 0; width: 500px !important; max-height: calc(100% - 140px) !important; overflow: visible;
  border: 4px solid #2a3442; border-radius: 14px; padding-bottom: 0; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}
.modal.sheet.ar-anchor > .modal-title { border-radius: 10px 10px 0 0; cursor: default; }
.modal.sheet.ar-anchor .sheet-grab { display: none; }
.modal.sheet.ar-anchor > .modal-body { border-radius: 0 0 10px 10px; }
.ar-anchor::before { content: ''; position: absolute; width: 0; height: 0; border: 16px solid transparent; pointer-events: none; }
.ar-anchor[data-tail="up"]::before { top: -36px; left: var(--tx, 50%); margin-left: -16px; border-bottom-color: #2a3442; }
.ar-anchor[data-tail="down"]::before { bottom: -36px; left: var(--tx, 50%); margin-left: -16px; border-top-color: #2a3442; }
.ar-anchor[data-tail="left"]::before { left: -36px; top: var(--tx, 50%); margin-top: -16px; border-right-color: #2a3442; }
.ar-anchor[data-tail="right"]::before { right: -36px; top: var(--tx, 50%); margin-top: -16px; border-left-color: #2a3442; }
.ac-vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); border-radius: 12px; overflow: hidden; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.ac-vs .us, .ac-vs .them { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; padding: 8px 6px; color: #fff; text-shadow: var(--t-outline); }
.ac-vs .us { background: linear-gradient(#5d87b8, #3d6493); }
.ac-vs .them { background: linear-gradient(#d65248, #a3262a); }
.ac-vs b { font: 700 22px/1 var(--sans); font-variant-numeric: tabular-nums; }
.ac-vs span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.ac-vs .x { display: flex; align-items: center; justify-content: center; width: 44px; background: linear-gradient(90deg, #3d6493, #a3262a); }
.ac-odds { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 16px; }
.ac-odds.easy { color: #23803e; }
.ac-odds.good { color: #4f7f12; }
.ac-odds.even { color: #9a6200; }
.ac-odds.bad { color: #c0392b; }
.ac-heroes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.ac-hero { position: relative; aspect-ratio: 1; box-sizing: border-box; border-radius: 10px; border: 2px solid #8a9bb2; background: #34445e; overflow: hidden; }
.ac-hero .face { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ac-hero.main { border-color: #ec9a1e; }
.ac-hero .lv { position: absolute; inset-inline-start: 3px; top: 3px; padding: 0 5px; border-radius: 8px; background: rgba(16, 20, 28, 0.7); color: #fff; font: 700 12px/16px var(--sans); font-style: normal; }
.ac-hero .n { position: absolute; left: 0; right: 0; bottom: 0; padding: 1px 2px; background: rgba(16, 20, 28, 0.78); color: #fff; font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }
.ac-hero.empty, .ac-hero.lock { border-style: dashed; background: rgba(52, 68, 94, 0.18); }
.ac-hero.lock { display: flex; align-items: center; justify-content: center; }
.ac-troops { display: flex; align-items: center; gap: 8px; }
.ac-troops .bar, .ad-bar .bar, .hl-cap .bar { position: relative; flex: 1; min-width: 0; height: 22px; border-radius: 11px; background: rgba(30, 48, 76, 0.22); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25); }
.ac-troops .bar i, .hl-cap .bar i { display: block; height: 100%; background: linear-gradient(#7fd08e, #3f8f4f); }
.ac-troops .bar b, .ad-bar .bar b, .hl-cap .bar b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; text-shadow: var(--t-outline); font-variant-numeric: tabular-nums; }
/* «n / max» справа налево (арабский) — слева направо, иначе bidi переставит числа */
.ac-troops .bar b, .ad-bar .bar b, .hl-cap .bar b, .ar-row .nm i { direction: ltr; unicode-bidi: isolate; }
.ac-wset { display: flex; flex-direction: column; gap: 4px; }
.ac-wset > span { color: var(--muted); font-size: 14px; }
.ac-waits { display: flex; gap: 8px; }
.ac-wait { flex: 1 1 0; min-width: 0; height: 40px; padding: 0 4px; border-radius: 10px; border: 2px solid #a5b6cc; background: #e8eef6; color: #1f2a38; font: 700 16px/1 var(--sans); cursor: pointer; }
.ac-wait.on { border-color: #ec9a1e; background: linear-gradient(#fff4d6, #f2d9a0); box-shadow: 0 0 0 2px #ffd25e; }
.ac-info { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--muted); }
.ac-info > span { display: flex; align-items: center; gap: 5px; }
.ac-info .eta b { color: var(--text); }
.ac-info .lack { color: var(--bad); }
.ac-why { margin: 0; color: var(--bad); font-weight: 700; font-size: 14px; }
.ar-choose .act-bar { margin-top: 0; }
/* тронули закрытую армию в полосе (army.js lockAt): вместо армии и «В бой» — почему закрыта и кнопка к Плацу (4-я —
   золотая к грамоте), без пустых полей окна «Армии» */
.ar-choose .ar-locked { flex: none; gap: 10px; padding: 6px 4px 10px; }
.ar-choose .ar-locked > svg { width: 40px; height: 40px; }
.ar-choose .ar-locked .big { font-size: 24px; }
.ar-choose .ar-locked .req { width: 100%; }
/* лёжа: длинный заголовок («Охота: …», «Ралли: …») — одной строкой с многоточием, «!» рядом с ним, мимо ✕ */
body:not(.vertical) .modal.ar-choose > .modal-title { justify-content: flex-start; padding-inline: 18px 64px; font: 700 24px/1.1 var(--sans); letter-spacing: 0; text-shadow: var(--t-outline); }
body:not(.vertical) .modal.ar-choose > .modal-title > span:first-of-type { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-choose .act-bar .btn.cta { flex: 0 1 auto; min-width: 220px; gap: 10px; }
/* полоса армий: номер, лицо командира и что с армией (дома, в походе, устала, набор), закрытые — замок, 4-я — грамота;
   под ней — выносливость, войска и раненые выбранной армии (касание раненых — «Лазарет») */
.ar-dock {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; gap: 8px; pointer-events: auto;
  padding: 10px calc(12px + var(--sar, 0px)) calc(10px + var(--sab, 0px)) calc(12px + var(--sal, 0px));
  background: linear-gradient(rgba(16, 20, 28, 0.82), rgba(16, 20, 28, 0.94)); border-top: 2px solid #3a4656; box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.4);
}
.ar-dock.in { position: static; padding: 4px 0 0; background: none; border: 0; box-shadow: none; }
.ad-slots { display: flex; justify-content: center; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 8px 6px 4px; }
.ad-slots::-webkit-scrollbar { display: none; }
.ad-slot { position: relative; flex: none; width: 90px; height: 72px; padding: 0; box-sizing: border-box; border-radius: 10px; border: 3px solid #5c6b80; background: #34445e; cursor: pointer; }
.ad-slot .fc { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 7px; overflow: hidden; }
.ad-slot .fc .face { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ad-slot .no { position: absolute; inset-inline-start: -7px; bottom: -7px; min-width: 22px; height: 22px; border-radius: 11px; background: #2a3442; border: 2px solid #fff; color: #fff; font: 700 13px/18px var(--sans); font-style: normal; text-align: center; }
.ad-slot .st { position: absolute; inset-inline-end: -7px; top: -7px; width: 24px; height: 24px; border-radius: 12px; border: 2px solid #fff; display: flex; align-items: center; justify-content: center; }
.ad-slot .st svg { width: 70%; height: 70%; }
.ad-slot.home .st { background: #3f8f4f; }
.ad-slot.go .st { background: #3f7fc4; }
.ad-slot.rest .st { background: #9a6a2a; }
.ad-slot.busy .st { background: #a3262a; }
.ad-slot.go .fc, .ad-slot.rest .fc, .ad-slot.busy .fc { filter: grayscale(0.55) brightness(0.8); }
.ad-slot.on { border-color: #ffd25e; box-shadow: 0 0 0 3px rgba(255, 210, 94, 0.45), 0 0 14px rgba(255, 210, 94, 0.6); }
.ad-slot.on .fc { filter: none; }
.ad-slot.lock, .ad-slot.empty { border-style: dashed; background: rgba(52, 68, 94, 0.55); }
.ad-slot.buy { border-color: #ec9a1e; background: linear-gradient(#7a4f18, #3a240a); }
.ad-bars { display: flex; align-items: center; gap: 10px; }
.ad-bars.off { visibility: hidden; } /* тронули закрытую армию: полосы выбранной — прочь, место — за ними */
.ad-bar { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 6px; color: #fff; }
.ad-bar .bar { background: rgba(0, 0, 0, 0.45); }
.ad-bar.st .bar i { display: block; height: 100%; background: linear-gradient(#ffe39a, #c08a10); }
.ad-bar.tr .bar i { display: block; height: 100%; background: linear-gradient(#9fd0ff, #3f7fc4); }
.ad-bar.wd { flex: none; height: 30px; padding: 0 12px; border: 2px solid rgba(255, 255, 255, 0.5); border-radius: 15px; background: rgba(0, 0, 0, 0.45); font: 700 15px/1 var(--sans); cursor: pointer; }
.ad-bar.wd.on { border-color: #ff9a8a; color: #ffd0c8; }
.ar-dock.in .ad-bar { color: var(--text); }
.ar-dock.in .ad-bar .bar { background: rgba(30, 48, 76, 0.22); }
.ar-dock.in .ad-bar.wd { background: var(--w-well, #d4e0ef); border-color: var(--w-line, #a5b6cc); color: var(--text); }
.ar-dock.in .ad-bar.wd.on { border-color: var(--bad); color: var(--bad); }

/* ——— «Лазарет» (army.js openHeal, §3 п. 8): вместимость, армии с ранеными (сколько лечить), цена, «Сразу» и «Лечить» ——— */
.modal.ar-healwin { width: 600px; }
.hl-cap { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.hl-cap .t { flex: none; display: flex; align-items: center; gap: 6px; font-weight: 700; }
.hl-cap .bar.full i { background: linear-gradient(#e0705f, #a3262a); }
.hl-list { display: flex; flex-direction: column; gap: 8px; }
.hl-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "fc tx" "fc sl"; align-items: center; gap: 4px 12px;
  padding: 8px 10px; border-radius: 10px; background: var(--w-well, rgba(16, 20, 28, 0.5)); border: 1px solid var(--w-line, #3a4658);
}
.hl-row .fc { grid-area: fc; width: 56px; height: 56px; box-sizing: border-box; border-radius: 10px; overflow: hidden; border: 2px solid var(--bronze); background: var(--navy-l); }
.hl-row .fc .face { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hl-row .tx { grid-area: tx; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.hl-row .tx span { color: var(--bad); font-weight: 700; }
.hl-row .tx .hl-why { flex-basis: 100%; color: var(--muted); font-weight: 400; font-size: 14px; }
.hl-row .ar-sl, .hl-row .ar-note { grid-area: sl; }
.hl-cost { margin-top: 10px; }
.ar-healwin .act-bar .btn.two { width: auto; }

/* стоя (§2.1, §3 п. 3, 8): окно над целью шире (600), сила — 30, герои — по 84 с числом 18, сбор — плашки 56, кнопка
   80; полоса армий — места 120×96, полосы 20; лазарет — лица 72, «−/+» 60, ползунок с ручкой 40 */
body.vertical .modal.sheet.ar-anchor { width: min(600px, calc(100% - 24px)) !important; max-height: calc(100% - 220px - var(--sab)) !important; border-radius: 18px; }
body.vertical .modal.ar-choose .modal-body { gap: 12px; padding: 14px; }
body.vertical .ac-vs b { font-size: 30px; }
body.vertical .ac-vs span { font-size: 18px; }
body.vertical .ac-vs .us, body.vertical .ac-vs .them { padding: 10px 8px; }
body.vertical .ac-vs .x { width: 56px; }
body.vertical .ac-odds { font-size: 22px; }
body.vertical .ac-heroes { grid-template-columns: repeat(5, 84px); justify-content: center; gap: 10px; }
body.vertical .ac-hero { width: 84px; height: 84px; border-radius: 12px; border-width: 3px; }
body.vertical .ac-hero .lv { font-size: 16px; line-height: 20px; }
body.vertical .ac-hero .n { font-size: 18px; }
body.vertical .ac-troops .bar, body.vertical .ad-bar .bar, body.vertical .hl-cap .bar { height: 30px; border-radius: 15px; }
body.vertical .ac-troops .bar b, body.vertical .ad-bar .bar b, body.vertical .hl-cap .bar b { font-size: 20px; }
body.vertical .ac-waits { gap: 10px; }
body.vertical .ac-wset > span { font-size: var(--fs-sub); }
body.vertical .ac-wait { height: 56px; border-radius: 14px; font-size: 20px; }
body.vertical .ac-info, body.vertical .ac-why { font-size: 18px; }
body.vertical .ar-choose .act-bar .btn.cta { min-width: var(--w-cta); }
body.vertical .ar-dock { gap: 10px; padding-top: 12px; }
body.vertical .ad-slots { gap: 14px; padding-top: 10px; }
body.vertical .ad-slot { width: 120px; height: 96px; border-radius: 14px; border-width: 4px; }
body.vertical .ad-slot .fc { border-radius: 10px; }
body.vertical .ad-slot .no { min-width: 30px; height: 30px; border-radius: 15px; font-size: 18px; line-height: 26px; }
body.vertical .ad-slot .st { width: 34px; height: 34px; border-radius: 17px; }
body.vertical .ad-bar { gap: 8px; }
body.vertical .ad-bar.wd { height: 40px; padding: 0 14px; border-radius: 20px; font-size: 20px; }
body.vertical .modal.ar-healwin { width: calc(100% - 24px); }
body.vertical .hl-cap { gap: 12px; }
body.vertical .hl-build { gap: 14px; }
body.vertical .hl-build .ar-note { font-size: var(--fs-sub); }
body.vertical .hl-cap .t { font-size: var(--fs-body); }
body.vertical .hl-list { gap: 10px; }
body.vertical .hl-row { gap: 6px 14px; padding: 10px 12px; border-radius: 14px; }
body.vertical .hl-row .fc { width: 72px; height: 72px; border-radius: 12px; }
body.vertical .hl-row .tx b { font-size: var(--fs-list); }
body.vertical .hl-row .tx span { font-size: var(--fs-sub); }
body.vertical .hl-row .ar-sl { gap: 10px; }
body.vertical .hl-row .ar-step, body.vertical .ar-win .ar-step { width: 60px; height: 60px; border-radius: 30px; font-size: 30px; }
body.vertical .hl-row .ar-range, body.vertical .ar-win .ar-range { height: 16px; border-radius: 8px; }
body.vertical .hl-row .ar-range::-webkit-slider-thumb, body.vertical .ar-win .ar-range::-webkit-slider-thumb { width: 40px; height: 40px; border-radius: 20px; }
body.vertical .hl-row .ar-num, body.vertical .ar-win .ar-num { width: 100px; height: 60px; font-size: 22px; border-radius: 10px; }
body.vertical .hl-row .ar-note { font-size: var(--fs-sub); }
body.vertical .ar-healwin .ar-cost { font-size: var(--fs-body); }
body.vertical .ar-costs { font-size: var(--fs-sub); }

/* стоя: карточки мест, строй, выбор героя, «Как растут армии» — крупнее, текст не мельче 22 */
body.vertical .ar-hlv { font-size: var(--fs-min); padding: 3px 10px; border-radius: 8px; }
body.vertical .ar-harm { width: 58px; height: 58px; top: calc(60% - 52px); border-width: 3px; }
body.vertical .ar-hft > b { font-size: var(--fs-min); }
body.vertical .ar-hft .troops, body.vertical .ar-hst { font-size: var(--fs-min); }
body.vertical .ar-hst { top: calc(60% - 40px); }
body.vertical .ar-hero.full .swap { inset-inline-end: 46px; top: 8px; }
body.vertical .ar-lkt { font-size: var(--fs-min); }
body.vertical .ar-lk > img, body.vertical .ar-lk > svg { width: 84px; height: 84px; }
body.vertical .ar-plus { width: 96px; height: 96px; }
body.vertical .ar-plus > img, body.vertical .ar-plus > svg { width: 56px; height: 56px; }
body.vertical .ar-hero.empty b, body.vertical .ar-hero.empty .note-s { font-size: var(--fs-min); text-align: center; padding: 0 6px; }
body.vertical .ar-yard { height: 170px; border-radius: 14px; }
body.vertical .ar-lpic { width: 460px; }
body.vertical .ar-llock { width: 104px; height: 104px; }
body.vertical .ar-llock > img, body.vertical .ar-llock > svg { width: 68px; height: 68px; }
body.vertical .ar-pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
body.vertical .ar-plv, body.vertical .ar-pcost, body.vertical .ar-pcap { font-size: var(--fs-min); }
body.vertical .ar-pcost > img, body.vertical .ar-pcost > svg { width: 24px; height: 24px; }
body.vertical .ar-parm { width: 52px; height: 52px; }
body.vertical .ar-pft b { font-size: var(--fs-min); white-space: normal; overflow-wrap: anywhere; text-align: center; }
body.vertical .ar-pick .why { font-size: var(--fs-min); }
body.vertical .modal.ar-ruleswin { width: calc(100% - 24px); }
body.vertical .ar-rtiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
body.vertical .ar-rp { height: 120px; }
body.vertical .ar-rtile b { font-size: var(--fs-body); }
body.vertical .ar-rtile .nm { font-size: var(--fs-min); }
body.vertical .ar-rtile i { font-size: var(--fs-min); }
body.vertical .ar-more summary { font-size: var(--fs-sub); padding: 8px 0; }

/* окно «Армии» стоя: текст не мельче 16 (§2.1), надписи дела — рубленым PT Sans, не узорным заголовочным (§2.1.4) */
body.vertical :is(.ar-slot .tx b, .ar-head .t, .ar-locked .big, .ar-wait, .ar-ph, .ar-hero .role) { font-family: var(--sans); }
body.vertical .ar-slot { min-height: 88px; gap: 10px; }
body.vertical .ar-slot .face, body.vertical .ar-slot .ar-ph { width: 56px; height: 76px; }
body.vertical .ar-slot .tx { font-size: var(--fs-sub); }
body.vertical .ar-slot .tx b { font-size: 22px; }
body.vertical .ar-slot .st { white-space: normal; overflow-wrap: anywhere; } /* «Королевская грамота» — в две строки, не многоточием */
body.vertical .ar-sum { font-size: var(--fs-sub); }
body.vertical .ar-head .t { font-size: 30px; }
body.vertical .ar-chip, body.vertical .ar-where, body.vertical .ar-stats { font-size: var(--fs-sub); }
body.vertical .ar-stats b { font-size: 22px; }
body.vertical .ar-notes { font-size: var(--fs-sub); }
body.vertical .ar-hero { min-height: 190px; padding-top: 30px; }
body.vertical .ar-hero .role { font-family: var(--sans); font-size: var(--fs-min); }
body.vertical .ar-hero .info, body.vertical .ar-hero .troops { font-size: var(--fs-min); }
body.vertical .ar-hero .info b { font-size: 18px; }
body.vertical .ar-hero .info > b { white-space: normal; overflow-wrap: anywhere; } /* имя героя — в две строки */
body.vertical .ar-hero .stars, body.vertical .ar-pick .stars { font-size: 16px; }
body.vertical .ar-hero .rec, body.vertical .ar-hero .note-s { font-size: var(--fs-min); }
body.vertical .ar-hero.lock { font-size: var(--fs-min); }
body.vertical .ar-x { width: 40px; height: 40px; border-radius: 20px; font-size: 22px; }
body.vertical .ar-win .btn.two .sub { font-size: var(--fs-min); } /* время набора под «Набрать» — не мельче 22 */
body.vertical .ar-row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px 12px; }
body.vertical .ar-row .nm { font-size: var(--fs-sub); }
body.vertical .ar-row .nm b { font-size: var(--fs-body); }
body.vertical .ar-row .nm b i { font-size: var(--fs-sub); }
body.vertical .ar-row .nm span { white-space: normal; } /* место · герой · войска — переносом, а не многоточием */
body.vertical .ar-busy, body.vertical .ar-full, body.vertical .ar-note, body.vertical .ar-why { font-size: var(--fs-sub); }
body.vertical .ar-cost { font-size: var(--fs-body); min-height: 60px; }
body.vertical .ar-cost .c i { font-size: var(--fs-sub); }
body.vertical .ar-foot { flex-wrap: wrap; }
body.vertical .btn.two.ar-go { width: auto; min-width: 200px; }
body.vertical .ar-pick { padding: 8px 14px 8px 8px; }
body.vertical .ar-pick .t { font-size: var(--fs-sub); }
body.vertical .ar-pick .t b { font-size: var(--fs-list); }
body.vertical .ar-eta { font-size: var(--fs-sub); }
body.vertical .ar-eta .tm { font-size: 24px; }
body.vertical .ar-wait { font-size: 26px; }
body.vertical .ar-locked .big { font-size: 32px; }
body.vertical .modal p.ar-rules-p { font-size: var(--fs-sub); }
body.vertical .ar-odds { font-size: var(--fs-sub); }

/* ——— «Идёт лечение» в Лазарете (docs/ref/TABS_GAP.md п. 7): армия, сколько воинов и сколько ещё; «Просить помощи» у
   альянса или полоса «Помощь соратников: N / M» ——— */
.hl-goings { margin-bottom: 12px; }
.hl-row.hl-going { background: linear-gradient(#e6f4dc, #d2eac4); border-color: #7fb06c; }
.hl-row .tx .hl-on { display: inline-flex; align-items: center; gap: 6px; color: var(--w-good, #23803e); }
.hl-row .tx .hl-on span { color: inherit; font-variant-numeric: tabular-nums; }
.hl-help { grid-area: sl; display: flex; align-items: center; min-width: 0; }
.hl-help .bar { position: relative; flex: 1; min-width: 0; max-width: 380px; height: 22px; border-radius: 11px; overflow: hidden; background: rgba(30, 48, 76, 0.22); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25); }
.hl-help .bar i { display: block; height: 100%; background: linear-gradient(#8fd060, #3f8f4f); }
.hl-help .bar b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; text-shadow: var(--t-outline); white-space: nowrap; }
.hl-help .btn { flex: none; display: inline-flex; align-items: center; gap: 6px; }
body.vertical .hl-help .bar { height: 32px; border-radius: 16px; }
body.vertical .hl-help .bar b { font-size: 18px; }
body.vertical .hl-row .tx .hl-on { font-size: var(--fs-sub); }

/* лёжа на телефоне: подписи карточек мест, выбора героя и плиток — не мельче --fs-min (20) */
body.phone-land :is(.ar-hlv, .ar-hft > b, .ar-hft .s, .ar-hft .troops, .ar-lkt, .ar-plv, .ar-pcost, .ar-pcap, .ar-pft b, .ar-rtile .nm, .ar-rtile i, .ar-pick .why) { font-size: var(--fs-min); }
body.phone-land .ar-rtile b { font-size: var(--fs-sub); }
body.phone-land .ar-harm { width: 52px; height: 52px; top: calc(60% - 46px); }
/* лёжа на телефоне: список армий (состояние и войска под «Армия N»), итог под списком, шапка армии (состояние, где,
   мощь и воины), пояснения набора и похода — были 13–14 (7,4–8 px экрана; проверка 08.11), теперь не мельче --fs-min
   (20) и --fs-sub (22): столбец списка 212 — у строки состояния многоточие, шапка и пояснения переносятся */
body.phone-land .ar-slot .tx { font-size: var(--fs-min); }
body.phone-land :is(.ar-sum, .ar-notes, .ar-chip, .ar-where, .ar-stats) { font-size: var(--fs-sub); }
body.phone-land .ar-stats b { font-size: var(--fs-list); }
body.phone-land :is(.ar-note, .ar-busy, .ar-full, .ar-why) { font-size: var(--fs-sub); }
/* лёжа на телефоне, как стоя: роль на карточке героя («Командир»), выносливость, строки войск (род войск и число, место ·
   герой), цена набора — были 12–15 (6,9–8,6 px экрана; проверка 09.11); в строке войск имя и места — многоточием,
   строка растёт, цена переносится */
body.phone-land .ar-cost { font-size: var(--fs-sub); }
body.phone-land .ar-cost .c i { font-size: var(--fs-min); }
body.phone-land .ar-hero .role { font-family: var(--sans); font-size: var(--fs-min); }
body.phone-land .ar-hst { top: calc(60% - 40px); font-size: var(--fs-min); }
body.phone-land .ar-row .nm { font-size: var(--fs-min); }
body.phone-land .ar-row .nm b { font-size: var(--fs-sub); }
body.phone-land .ar-row .nm b i { font-size: var(--fs-min); }
