/* «Интерфейсы перегружены» (Grisha, tg 3542–3543): the phone HUD's declutter prototype, only under body.hudlean
   (on by default on a touch phone since v0.13.8.6, ?hud=full turns it off: public/ui/hud-lean.js). Spec: designer · 09 (SOC-144); plan + frames:
   .tide/arcs/03-@main/arcs/04-main-2/output/hud-declutter/plan.md.
   In a fight at most five zones stay on the field: (1) the phase plate on top, (2) the weapon block top right, (3) the left
   column (minimap 44 · radio · eye), (4) one goal arrow, (5) the controls. The rest comes on an event or under the eye. */

/* ---------- (1) the phase plate: the phase + the clock big, the sides' score small under them; the altars, «до затмения»,
   lit and SATAN flash in for 3 s on a change (.fl, ui/efir.js) and stay under the eye ---------- */
body.hudlean.touchp #efir .ef-bug{padding:3px 12px 4px;gap:6px}
body.hudlean.touchp #efir .ef-bug:not(.fl) .ef-alts,body.hudlean.touchp #efir .ef-bug .ef-tm small{display:none}   /* «до затмения»: under the eye only (the plate keeps its 3 lines, ≤58 px) */
body.hudlean.touchp.peek #efir .ef-bug :is(.ef-alts,.ef-tm small){display:flex}
body.hudlean.touchp.peek #efir .ef-bug .ef-tm small{display:block}
body.hudlean.touchp #efir .ef-bug.fl{box-shadow:0 0 0 1px var(--amber)}

/* ---------- (2) the weapon block top right: no lens, its hit count in the block; «тап · сюрикены» only while the
   newcomer's hint is up ---------- */
body.hudlean.touchp #efir .ef-pme .ef-lens.sm{display:none}
@media (orientation:portrait){ html body.hudlean.touchp.efir #efir .ef-pme{top:calc(64px + var(--safe-t))} }
body.hudlean.touchp #efir .ef-col{min-height:44px;min-width:44px}
body.hudlean.touchp #efir .ef-hp{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 4px;margin-left:2px;
  border:1px solid var(--you,var(--cyan));color:#fff;font:600 12px/1 var(--mono);font-variant-numeric:tabular-nums}
body.hudlean.touchp #efir .ef-hp::before{content:"·";margin-right:5px;color:var(--mute)}
body.hudlean.touchp #efir .ef-hp.wd{border-color:var(--red,#ff3355);color:var(--red,#ff3355)}
body.hudlean.touchp:not(:has(#nbHint:not([hidden]))) #efir .ef-fsw{display:none}

/* ---------- (3) the left column: the minimap small (a tap opens it, minimap.js), the radio, the eye. STORM / HOLD / BACK
   fan out of the radio on a tap (ui/squad.js puts them into #sqMenu), the squad's size on the radio ---------- */
@media (orientation:portrait){
  html body.hudlean.touchp.efir .mmap:not(.full){top:calc(40% - 112px);left:calc(8px + var(--safe-l));width:44px;height:44px;padding:0;overflow:hidden}
  html body.hudlean.touchp.efir .mmap:not(.full) canvas{width:100%!important;height:100%!important;object-fit:contain}
  /* the first-shift card «Первая смена? … ОТКРЫТЬ» (#nudge, y≈248) starts right of the column: it lay over the minimap (y 226–270) */
  html body.hudlean.touchp.efir #nudge{left:calc(62px + var(--safe-l))}
}
body.hudlean.touchp #sqBar{display:none!important}
body.hudlean.touchp #radioBtn[data-sq]:not([data-sq=""])::after{content:attr(data-sq);position:absolute;top:-6px;right:-6px;min-width:16px;height:16px;border-radius:8px;
  background:var(--cyan);color:#07050b;font:700 9px/16px var(--mono);text-align:center;pointer-events:none}
body.hudlean.touchp #radioBtn{position:absolute}
body.hudlean.touchp #sqMenu.lean:not([hidden]){top:calc(40% - 58px)}
body.hudlean.touchp #sqMenu.lean .sq-b .n{display:none}

/* ---------- (4) one goal arrow: ui/poi.js (lean: the goal, a second only nearer than 25 m) ---------- */

/* ---------- the newcomer's hint (#nbHint, newbie.js): never over the controls — right under the weapon block, a corner
   pointing at it, ≤260 px, 1–2 lines; gone with the life ---------- */
body.hudlean.touchp #nbHint{left:auto!important;right:calc(12px + var(--safe-r))!important;top:calc(122px + var(--safe-t))!important;transform:none!important;box-sizing:border-box!important;
  max-width:min(260px,calc(100vw - 80px))!important;padding:7px 10px!important;font-size:11.5px!important;line-height:1.35!important;letter-spacing:.03em!important;z-index:9!important}
body.hudlean.touchp #nbHint::before{content:"";position:absolute;right:22px;top:-7px;border:7px solid transparent;border-top:0;border-bottom-color:var(--amber)}
body.hudlean.touchp:has(#dead:not([hidden])) #nbHint{display:none!important}

/* ---------- the possessed: no keys card mid-field (ui/tips.js opened(): one line over the buttons when an ability
   opens) ---------- */
body.hudlean.touchp #possKeys{display:none!important}

/* ---------- bugs 4 / 5: the Гидра clear of РЫВОК / SMOKE; the radio line under the goal line ---------- */
html body.hudlean.touchp.efir #itemBtn{right:calc(72px + var(--safe-r));bottom:calc(204px + var(--safe-b))}
@media (orientation:portrait){ html body.hudlean.touchp #radioFeed{top:calc(190px + var(--safe-t))} }

/* ---------- the watcher (dead / waiting for the wave), phone portrait ---------- */
@media (orientation:portrait){
  body.hudlean.touchp #eyesK{display:none}
  body.hudlean.touchp #dead .eyes-tag{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.hudlean.touchp #deadKd{display:none!important}
  body.hudlean.touchp #deadNext{display:none!important}
  body.hudlean.touchp #deadSub{display:none!important}
  body.hudlean.touchp #deadSpawn .dsp-h{display:flex;align-items:baseline;flex-wrap:nowrap;gap:8px;white-space:nowrap;overflow:hidden}
  body.hudlean.touchp #deadSpawn .dsp-pick{font-size:18px}
  body.hudlean.touchp #deadSpawn .dsp-st{font-size:10px}
  body.hudlean.touchp #deadSpawn .dsp-st:not(:empty)::before{content:"· ";color:var(--mute)}
  body.hudlean.touchp #deadSpawn .dsp-next b{font-size:15px}
  body.hudlean.touchp #deadSpawn .dsp-map{height:min(160px,20vh)!important}
  body.hudlean.touchp #deadBackN:not(:empty):not(.in)::before{content:"· ";color:var(--mute)}
}
