/* Lab below 900 px: the Atlas (docs/specs/17-mobile.md). Desktop (>= 900 px) is untouched: every rule but the first sits in
   a media query. Prefix atl- (mobile-atlas.js), mll- (mobile-loadout.js), mla- (mobile-armor.js). */
.mls-host, .atl-bar, .atl-layers, .atl-results, .atl-sheet { display: none; }

/* ---------------------------------------------------------------- Atlas: top bar, layers, map, bottom sheet */
@media (max-width: 899px) {
  html body.mlpage.deckpage { overflow: visible; overflow-x: clip; padding-top: 0; padding-bottom: 0; }
  body.mlpage[data-ml-step="map"] { overflow: hidden; overscroll-behavior: none; }
  body.mlpage #topbar { position: sticky; top: 0; z-index: 40; height: auto; min-height: var(--tb-h); flex-wrap: nowrap; gap: 6px;
    padding-left: max(8px, env(safe-area-inset-left, 0px)); }
  body.mlpage #mechTabs { display: none !important; }
  body.mlpage .dk-toast { bottom: calc(var(--atl-sheet-h, 0px) + 12px + env(safe-area-inset-bottom, 0px)); }
  body.mlpage[data-ml-step="map"] #notice, body.mlpage[data-ml-step="skills"] #notice { display: none; }

  /* search bar in the top bar: menu button first, then the bar; the brand and title give it their room */
  body.mlpage #dkMenuBtn { order: -1; }
  body.mlpage:not([data-ml-step="mech"]) #topbar > :is(.tb-brand, .dk-title, #variantLabel, .tb-spacer, #saveState) { display: none; }
  .atl-bar { display: flex; align-items: center; gap: 2px; flex: 1 1 auto; min-width: 0; height: 50px; margin: 4px 0; padding: 0 4px;
    background: var(--surface-1); border: 1px solid var(--line); border-radius: 23px; }
  .atl-bar [hidden] { display: none !important; }
  body[data-ml-step="mech"] .atl-bar { flex: 0 1 auto; background: none; border: 0; order: 5; }
  body[data-ml-step="mech"] .atl-bar:not(:has(.atl-back:not([hidden]))) { display: none; }
  .atl-search { flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 6px; background: none; border: 0; color: var(--text-strong); font-size: 16px; }
  .atl-search:focus { outline: none; }
  .atl-search::-webkit-search-cancel-button { display: none; }
  .atl-title { flex: 1 1 auto; min-width: 0; overflow: hidden; padding: 0 4px; text-overflow: ellipsis; white-space: nowrap; color: var(--text-strong);
    font-size: 16px; }
  .atl-title span { color: var(--muted); }
  .atl-back, .atl-x { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; margin: 0; background: none; border: 0;
    border-radius: 50%; color: var(--text); }
  .atl-badge { flex: none; height: 44px; min-width: 44px; padding: 0 10px; margin: 0; border: 1px solid var(--accent); border-radius: 22px;
    background: var(--accent-bg); color: var(--accent); font: 700 11px/1 var(--f-data); letter-spacing: .04em; }

  /* layer chips (and the Skills chip) */
  .atl-layers { display: flex; gap: 8px; overflow-x: auto; padding: 4px 12px 8px; background: var(--bg); scrollbar-width: none; }
  .atl-layers::-webkit-scrollbar { display: none; }
  body[data-ml-step="mech"] .atl-layers { display: none; }
  .atl-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; margin: 0; border: 1px solid var(--line);
    border-radius: 22px; background: var(--surface-1); color: var(--text); font: 600 14px/1 var(--f-display); letter-spacing: .02em; }
  .atl-chip .ml-ico { display: grid; place-items: center; }
  .atl-chip em { font: 12px/1 var(--f-data); font-style: normal; opacity: .75; }
  .atl-chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

  /* universal search results: over the page, under the top bar */
  .atl-results { display: block; position: fixed; left: 0; right: 0; top: var(--atl-tb, 56px); bottom: 0; z-index: 45; overflow-y: auto;
    padding: 4px 16px calc(24px + env(safe-area-inset-bottom, 0px)); background: var(--bg); overscroll-behavior: contain; }
  .atl-results[hidden] { display: none; }
  .atl-results h3 { margin: 14px 0 4px; color: var(--muted); font: 600 11px/1.4 var(--f-display); letter-spacing: .08em; text-transform: uppercase; }
  .atl-results ul { margin: 0; padding: 0; list-style: none; }
  .atl-res { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; width: 100%; min-height: 52px;
    padding: 6px 10px; margin: 0; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); border-left: 3px solid transparent;
    border-radius: 0; color: var(--text-strong); font-size: 15px; }
  .atl-res small { color: var(--muted); font: 12px/1.3 var(--f-data); }
  .atl-hint { margin: 16px 4px; color: var(--muted); font-size: 13px; }

  /* the map */
  #lab.ml-main { display: block; padding: 0; }
  body[data-ml-step="map"] #lab > :not(.mls-host[data-host="map"]) { display: none !important; }
  body[data-ml-step="skills"] #lab > :not(#skillsPane) { display: none !important; }
  body[data-ml-step="skills"] #skillsPane { display: block; padding: 0 12px 24px; border: 0; background: none; }
  .mls-host[data-host="map"] { position: fixed; left: 0; right: 0; top: var(--atl-top, 110px); bottom: var(--atl-sheet-h, 300px); z-index: 1; }
  body[data-ml-step="map"] .mls-host[data-host="map"] { display: block; }
  .atl-map { position: relative; width: 100%; height: 100%; overflow: hidden;
    background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 24px 24px; background-position: center; }
  .atl-svg { display: block; width: 100%; height: 100%; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; }
  .atl-map.pinning .atl-svg { height: calc(100% - 72px); margin-top: 72px; }
  .atl-zoom { transform-origin: 0 0; transition: transform .3s ease; }
  .atl-body path { --z: #3a4452; fill: var(--z); stroke: #0b0d10; stroke-width: 1; stroke-linejoin: round; transition: opacity .2s; }
  .atl-body .z-hd { --z: var(--z-hd); } .atl-body .z-ct { --z: var(--z-ct); } .atl-body .z-lt { --z: var(--z-lt); } .atl-body .z-rt { --z: var(--z-rt); }
  .atl-body .z-la { --z: var(--z-la); } .atl-body .z-ra { --z: var(--z-ra); } .atl-body .z-ll { --z: var(--z-ll); } .atl-body .z-rl { --z: var(--z-rl); }
  .atl-svg:not([data-sel=""]) .atl-body path { opacity: .25; }
  .atl-svg[data-sel="hd"] .z-hd, .atl-svg[data-sel="ct"] .z-ct, .atl-svg[data-sel="lt"] .z-lt, .atl-svg[data-sel="rt"] .z-rt,
  .atl-svg[data-sel="la"] .z-la, .atl-svg[data-sel="ra"] .z-ra, .atl-svg[data-sel="ll"] .z-ll, .atl-svg[data-sel="rl"] .z-rl { opacity: 1 !important; }
  .atl-svg .k-ballistic { --kc: var(--k-ballistic); } .atl-svg .k-energy { --kc: var(--k-energy); } .atl-svg .k-missile { --kc: var(--k-missile); }
  .atl-svg .k-ams { --kc: var(--k-ams); }
  .atl-marks { pointer-events: none; }
  .atl-muzzle { fill: var(--kc, #fff); stroke: #0b0d10; stroke-width: 1; }
  .atl-leader { fill: none; stroke: var(--kc, #fff); stroke-width: .8; opacity: .55; }
  .atl-wlbl { fill: var(--kc, #fff); font: 600 12.5px/1 var(--f-data); paint-order: stroke; stroke: var(--bg); stroke-width: 3px; }
  .atl-muzzle.free { fill: var(--bg); stroke: var(--kc, #fff); stroke-width: 1.4; }
  .atl-leader.free { stroke-dasharray: 2 2; opacity: .4; }
  .atl-wlbl.free { opacity: .6; font-weight: 500; }
  .atl-lbl { fill: var(--text-strong); font: 700 13px/1 var(--f-data); paint-order: stroke; stroke: rgba(8, 10, 13, .75); stroke-width: 3px; }
  .atl-lbl .sub { fill: var(--text); font-size: 10px; font-weight: 500; }
  .atl-lbl.big { font-size: 22px; }
  .atl-pin { cursor: pointer; }
  .atl-pin .hit { fill: transparent; stroke: none; }
  .atl-pin rect:not(.hit) { fill: var(--surface-1); stroke: var(--accent); stroke-width: 1; }
  .atl-pin.swap rect { stroke: var(--blu); }
  .atl-pin text { fill: var(--text-strong); font: 600 11px/1 var(--f-data); }
  .atl-pin text.sub { fill: var(--muted); font-weight: 400; font-size: 10px; }
  .atl-pin.on rect:not(.hit) { fill: var(--accent); stroke: var(--accent); }
  .atl-pin.on text { fill: var(--accent-ink); }
  .atl-pin .stem { stroke: var(--accent); stroke-width: 1.2; }
  .atl-pin .dot { fill: var(--accent); stroke: #0b0d10; stroke-width: 1.5; }
  .atl-banner { position: absolute; left: 12px; right: 12px; top: 6px; z-index: 2; display: flex; margin: 0; padding: 10px 12px; border: 1px solid var(--accent);
    border-radius: 10px; background: var(--accent-bg); color: var(--text); font-size: 13px; line-height: 1.35; }
  .atl-banner.bad { border-color: var(--danger); }
  .atl-banner[hidden] { display: none; }
  .atl-fab { position: absolute; bottom: 12px; z-index: 2; display: flex; flex-direction: column; gap: 8px; }
  .atl-fab.left { left: 12px; } .atl-fab.right { right: 12px; }
  .atl-fab button { display: grid; place-items: center; width: 48px; height: 48px; min-width: 48px; padding: 0; margin: 0; border: 1px solid var(--line);
    border-radius: 14px; background: var(--surface-1); color: var(--text); }
  .atl-fab button:disabled { opacity: .4; }

  /* bottom sheet: three detents (height set by mobile-atlas.js) */
  .atl-sheet { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; z-index: 32; height: 300px; max-height: calc(100dvh - 60px);
    padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--surface-1); border-top: 1px solid var(--line-strong); border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .45); transition: height .22s ease; }
  .atl-sheet[hidden], body[data-ml-step="mech"] .atl-sheet { display: none; }
  .atl-sheet.dragging { transition: none; }
  .atl-handle { flex: none; display: grid; place-items: center; width: 100%; height: 44px; min-height: 44px; margin-bottom: -18px !important; padding: 0; margin: 0; background: none;
    border: 0; border-radius: 16px 16px 0 0; touch-action: none; }
  .atl-handle i { width: 44px; height: 4px; border-radius: 2px; background: var(--line-strong); }
  .atl-mode[hidden] { display: none; }
  .atl-sheetbody { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 16px 16px; overscroll-behavior: contain; }
  .atl-peekhead { touch-action: pan-x; }
  .atl-peekhead h2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0; color: var(--text-strong); font: 700 20px/1.2 var(--f-display); }
  .atl-peekhead h2 small { color: var(--muted); font: 500 12px/1.2 var(--f-data); letter-spacing: .04em; text-transform: uppercase; }
  .atl-status { margin: 2px 0 10px; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
  .atl-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
  .atl-stat { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; margin: 0; border: 1px solid var(--line); border-radius: 15px;
    background: var(--surface-2); color: var(--text-strong); font: 12px/1 var(--f-data); font-variant-numeric: tabular-nums; }
  button.atl-stat { min-height: 44px; }
  .atl-stat i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
  .atl-stat.warn i { background: var(--accent); } .atl-stat.bad i { background: var(--danger); } .atl-stat.bad { color: var(--danger); }
  .atl-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 12px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
  .atl-kpi { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 8px 2px; border-right: 1px solid var(--line); }
  .atl-kpi:last-child { border-right: 0; }
  .atl-kpi b { color: var(--text-strong); font: 600 18px/1.1 var(--f-data); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .atl-kpi span { overflow: hidden; max-width: 100%; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .atl-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
  .atl-actions.two { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; margin-top: 12px; }
  .atl-actions button { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 48px; margin: 0; font-weight: 600; }
  .atl-actions button > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .atl-actions :is(.ml-pod, .atl-engine) { display: flex; align-items: stretch; min-width: 0; margin: 0; }
  .atl-actions .ml-pod > span:first-child, .atl-actions .atl-engine .lbl { display: none; }
  .atl-actions select { flex: 1 1 auto; width: 100%; min-width: 0; min-height: 48px; font-size: 16px; }
  .atl-engine .ml-engine { display: flex; gap: 4px; width: 100%; margin: 0; }
  .atl-engine .ml-engine button { min-width: 36px; min-height: 48px; }
  .atl-card { margin-top: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
  .atl-card h3 { margin: 0 0 8px; color: var(--muted); font: 600 11px/1.4 var(--f-display); letter-spacing: .06em; text-transform: uppercase; }
  .atl-build { display: flex; flex-direction: column; gap: 8px; }
  .atl-build #buildName, .atl-build #saveTarget { flex: none !important; width: 100%; max-width: none; height: 44px; min-height: 44px; font-size: 16px; }
  .atl-build #saveTarget:empty { display: none; }
  .atl-card .ml-engine { gap: 6px; margin: 0 0 6px; font-size: 13px; }
  .atl-card .ml-engine .lbl { display: none; }
  .atl-card .ml-engine select { flex: 1 1 0; min-width: 0; min-height: 44px; font-size: 16px; }
  .atl-card .ml-engine button { min-width: 44px; min-height: 44px; }
  .atl-card .ml-enginehs { margin: 0; font-size: 12px; }
  .atl-opts .ml-ups { margin: 0; padding: 0; border: 0; gap: 8px; }
  .atl-opts .ml-up { grid-template-columns: minmax(0, 1fr); }
  .atl-opts .ml-seg { display: flex; flex-wrap: wrap; gap: 4px; }
  .atl-opts .ml-seg button { flex: 1 1 auto; justify-content: center; min-height: 44px; padding: 0 8px; font-size: 13px; }
  .atl-toolgrid, .atl-sharelist { display: flex; flex-direction: column; gap: 6px; }
  .atl-tool { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; margin: 0; text-align: left; }
  .atl-tool[hidden] { display: none; }
  .atl-statscard { padding: 0; overflow: hidden; }
  .atl-statscard #statsPanel { position: static; display: block; width: auto; max-width: none; height: auto; max-height: none; margin: 0; overflow: visible;
    border: 0; }
  .atl-statscard #statsPanel .ml-tabs [data-tab="skills"] { display: none; }
  .atl-statscard :is(.ml-tabs button, .ml-sechead, .skl-edit) { min-height: 44px; }
  .atl-statscard .ml-qrail { min-width: 44px; }

  /* component place card */
  .atl-comphead .atl-peekhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .atl-navs { display: flex; gap: 8px; }
  .atl-nav { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; margin: 0; border-radius: 50%; }
  .atl-hps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 6px; }
  .atl-hps .ml-hp { padding: 2px 6px; border: 1px solid currentColor; border-radius: 4px; font: 600 12px/1.2 var(--f-data); }
  .atl-pod { color: var(--muted); font-size: 12px; }
  .atl-slotbar { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2px; height: 16px; margin: 8px 0 4px; }
  .atl-slotbar i { background: var(--k-equip); border-radius: 1px; }
  .atl-slotbar .k-ballistic { background: var(--k-ballistic); } .atl-slotbar .k-energy { background: var(--k-energy); }
  .atl-slotbar .k-missile { background: var(--k-missile); } .atl-slotbar .k-ams { background: var(--k-ams); } .atl-slotbar .k-ecm { background: var(--k-ecm); }
  .atl-slotbar .int, .atl-slotbar .fix { background-image: repeating-linear-gradient(135deg, rgba(0, 0, 0, .45) 0 3px, transparent 3px 6px); }
  .atl-slotbar .int { background-color: var(--k-internal); }
  .atl-slotbar .fix.k-engine, .atl-slotbar .fix:not([class*="k-"]) { background-color: var(--k-fixed); }
  .atl-slotbar .free { background: none; border: 1px solid var(--line-strong); }
  .atl-slotline { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 8px; color: var(--muted); font: 12px/1.4 var(--f-data); }
  .atl-slotline .ok { color: var(--ok); font-weight: 500; } .atl-slotline .bad { color: var(--danger); }
  .atl-armor { margin-top: 10px; }
  .atl-sheet .ml-act { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; font-size: 12px; }
  .atl-sheet .ml-act select { flex: 1 1 100%; min-height: 44px; font-size: 16px; }

  /* searched item card */
  .atl-itemhead { display: flex; align-items: center; gap: 10px; }
  .atl-itemhead h2 { flex: 1 1 auto; min-width: 0; }
  .atl-abbr { flex: none; display: grid; place-items: center; min-width: 48px; height: 48px; padding: 0 4px; border-radius: 8px; background: var(--kc, var(--k-equip));
    color: #0b0d10; font: 700 12px/1 var(--f-data); }
  .atl-abbr.k-ballistic { --kc: var(--k-ballistic); } .atl-abbr.k-energy { --kc: var(--k-energy); } .atl-abbr.k-missile { --kc: var(--k-missile); }
  .atl-abbr.k-ams { --kc: var(--k-ams); } .atl-abbr.k-ecm { --kc: var(--k-ecm); }
  .atl-found { flex: none; align-self: flex-start; padding: 3px 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font: 11px/1.2 var(--f-data); }
  .atl-itemhead + .atl-kpis { margin-top: 10px; }
  .atl-swap { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-left: 3px solid var(--accent); background: var(--surface-2); }
  .atl-swap b { color: var(--text-strong); font-size: 14px; }
  .atl-swap small { color: var(--muted); font: 12px/1.4 var(--f-data); }
  .atl-same .mll-whrow { min-height: 48px; }
  .atl-same .mll-whrow.on { background: var(--accent-soft); }
}
@media (max-width: 899px) and (prefers-reduced-motion: reduce) {
  .atl-zoom, .atl-sheet, .atl-body path { transition: none; }
}

/* === lot 4 : picker === */
.ml-pickfiltersbtn { display: none; }
@media (max-width: 899px) {
  .ml-pickpane { padding: var(--sp-2) var(--sp-3); min-width: 0; }
  /* row 1: search + sort; row 2: Filters (n) + Import */
  .ml-pickbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-2); }
  .ml-pickbar .ml-picksearch { grid-column: 1; grid-row: 1; flex: none; max-width: none; }
  .ml-pickbar .ml-picksort { grid-column: 2; grid-row: 1; margin: 0; }
  .ml-pickbar .ml-picksort select { width: 132px; max-width: 36vw; height: 44px; font-size: 16px; }
  .ml-pickbar .ml-pickfiltersbtn { display: inline-flex; grid-column: 1; grid-row: 2; justify-content: center; min-height: 44px; }
  .ml-pickbar .ml-pickfiltersbtn.on { border-color: var(--accent); color: var(--accent); }
  .ml-pickpane .ml-pickbar #pickImport { grid-column: 2; grid-row: 2; height: 44px; min-width: 44px; justify-content: center; }
  .ml-pickbar .ml-pickfield > input { height: 44px; font-size: 16px; }
  .ml-pickbar .ml-pickweapon, .ml-pickfilters { display: none; }
  .ml-pickstatus { flex-wrap: wrap; }
  .ml-pickchips { max-height: 88px; }
  .ml-pickchipx { width: 32px; height: 32px; }
  .ml-pickclear { height: 36px; }

  /* chassis accordion: 48 px cards */
  .ml-pickhead { min-height: 48px; padding: 6px 10px; }
  .ml-pickch { margin-bottom: 6px; }
  .ml-pickch .ml-pickvars { padding: 6px 0 6px 6px; gap: 8px; }
  .ml-pickvar { min-height: 44px; }
  .ml-pickcell { max-width: 100%; }
  .ml-pickbody { grid-template-columns: minmax(0, 1fr); }
  .ml-pickpane .list.ml-picklist { height: auto; overflow: visible; }

  /* variant preview sheet */
  .ml-pickpreview { font-size: 13px; }
  .ml-pickpreview table { border-collapse: collapse; width: 100%; margin: 4px 0; }
  .ml-pickpreview th { text-align: left; color: var(--muted); font-weight: 400; }
  .ml-pickpreview td { text-align: right; }
  .ml-pickpreview h5 { margin: 10px 0 4px; color: var(--muted); font: 600 11px/1.3 var(--f-display); letter-spacing: .08em; text-transform: uppercase; }
  .ml-pickopen { position: sticky; bottom: 0; width: 100%; min-height: 48px; justify-content: center; margin-top: var(--sp-3); }

  /* filters sheet: the popover contents, stacked */
  .ml-advlist { z-index: 95; }
  .ml-pfsheet { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
  .ml-pfsection[hidden] { display: none; }
  .ml-pfsection h3 { margin: 0 0 var(--sp-1); color: var(--muted); font: 600 11px/1.4 var(--f-display); letter-spacing: .06em; text-transform: uppercase; }
  .ml-pfsheet .ml-seg { display: flex; flex-wrap: wrap; gap: 6px; max-width: 100%; }
  .ml-pfsheet .ml-seg button { min-height: 44px; min-width: 44px; padding: 0 12px; }
  .ml-pfsheet .ml-seg .ml-clslong { display: inline; white-space: nowrap; }
  .ml-pfsheet .ml-seg .ml-clsshort { display: none; }
  .ml-pfsheet .ml-seg.ml-pfcol { flex-direction: row; }
  .ml-pfsheet .ml-pickfield > input { height: 44px; font-size: 16px; }
  .ml-pfsheet input, .ml-pfsheet select { font-size: 16px; }
  .ml-pfsheet input:not([type="checkbox"]):not([type="radio"]), .ml-pfsheet select { min-height: 44px; }
  .ml-pfsheet button { min-height: 44px; }
  .ml-pfsheet .ml-hpfmobility { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ml-pfsheet .ml-advfilter { max-width: none; }
  .ml-pfsheetclear { align-self: stretch; justify-content: center; }
}

/* === armure (mobile-armor.js) === */
@media (max-width: 899px) {
  .mla-top, .mla-dist { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
  .mla-info { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; font-size: 13px; min-width: 0; }
  .mla-info .bad { color: var(--danger); }
  .mla-btn { min-height: 44px; min-width: 44px; padding: 0 14px; font-size: 14px; }
  .mla-dist label { display: flex; align-items: center; gap: 8px; font-size: 13px; }
  .mla-total { width: 84px; min-height: 44px; font-size: 16px; text-align: center; }
  .mla-disttons { flex: 1 1 auto; font-size: 13px; opacity: .8; }
  .mla-row { display: flex; align-items: center; gap: 8px; }
  .mla-row.bad .mla-bartxt { color: var(--danger); }
  .mla-name { display: flex; flex-direction: column; flex: none; min-width: 3.6em; color: var(--muted); font-size: 12px; }
  .mla-bartxt { color: var(--text); font: 11px/1.3 var(--f-data); font-variant-numeric: tabular-nums; }
  .mla-sides { display: flex; flex: 1 1 auto; gap: 6px; min-width: 0; }
  .mla-side { display: flex; align-items: center; flex: 1 1 0; min-width: 0; border: 1px solid var(--line-strong); border-radius: 24px; }
  .mla-lbl { flex: none; padding-left: 10px; color: var(--muted); font: 600 11px/1 var(--f-display); }
  .mla-lbl:empty { display: none; }
  .mla-step { flex: none; width: 44px; height: 44px; min-width: 44px; padding: 0; margin: 0; background: none; border: 0; border-radius: 50%;
    color: var(--text-strong); font-size: 20px; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
  .mla-val { flex: 1 1 auto; width: 2.6em; min-width: 44px; height: 44px; padding: 0; text-align: center; background: none; border: 0;
    color: var(--text-strong); font: 600 16px/1 var(--f-data); font-variant-numeric: tabular-nums; }
}

/* === loadout (mobile-loadout.js): items of a component, warehouse sheet === */
@media (max-width: 899px) {
  .mll-items { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
  .mll-item { display: flex; align-items: center; gap: 8px; min-height: 48px; padding-left: 10px; background: var(--surface-2);
    border-left: 3px solid var(--k-fixed); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  .mll-item.fixed { opacity: .75; padding-right: 10px; }
  .mll-item .nm { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
  .mll-item .nm b { overflow: hidden; color: var(--text-strong); font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
  .mll-item .nm small { color: var(--muted); font: 11px/1.2 var(--f-data); font-variant-numeric: tabular-nums; }
  .mll-item .lock { flex: none; color: var(--muted); font: 10px/1 var(--f-data); letter-spacing: .06em; text-transform: uppercase; }
  .mll-rm { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; margin: 0; background: none; border: 0;
    border-radius: 0; color: var(--muted); }
  .mll-rm:active { color: var(--danger); background: var(--surface-3); }
  .mll-none { color: var(--muted); font-size: 13px; padding: 6px 0; list-style: none; }
  .mll-none .why { display: block; margin-top: 4px; color: var(--danger); }
  .mll-wh button { min-height: 44px; }
  .ui-sheet__panel.mll-whsheet { height: 90vh; height: 90dvh; }
  .mll-whsheet .ui-sheet__body { padding-top: 0; }
  .mll-whtop { position: sticky; top: 0; z-index: 1; display: flex; flex-direction: column; gap: 6px; padding: var(--sp-2) 0; background: var(--surface-1); }
  .mll-search { width: 100%; min-height: 44px; font-size: 16px; }
  .mll-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .mll-cats button { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; padding: 0 4px; font-size: 13px; }
  .mll-cats button > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mll-cats button.on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
  .mll-free, .mll-status { margin: 0; color: var(--muted); font: 12px/1.4 var(--f-data); }
  .mll-status { color: var(--ok); }
  .mll-status:empty { display: none; }
  .mll-status.bad { color: var(--danger); }
  .mll-status.flash { animation: mll-flash .6s ease; }
  @keyframes mll-flash { from { background: var(--ok-soft); } to { background: transparent; } }
  .mll-whlist { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0 0 var(--sp-2); list-style: none; }
  .mll-whrow { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 0 0 10px; margin: 0; text-align: left;
    background: var(--surface-2); border: 0; border-left: 3px solid var(--k-fixed); border-radius: 0; color: var(--text-strong); font-size: 14px;
    -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  .mll-whrow .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mll-whrow .n { flex: none; min-width: 2.5em; text-align: right; color: var(--muted); font: 12px/1 var(--f-data); font-variant-numeric: tabular-nums; }
  .mll-whrow > .ml-ico { flex: none; display: grid; place-items: center; width: 44px; align-self: stretch; color: var(--accent); border-left: 1px solid var(--line); }
  .mll-whrow:active, .mll-whrow.done { background: var(--ok-soft); }
  .mll-tip table { border-collapse: collapse; margin-top: 4px; width: 100%; }
  .mll-tip th { text-align: left; color: var(--muted); font-weight: 400; padding-right: 10px; }
  .mll-tip td { text-align: right; font-variant-numeric: tabular-nums; }
  .mll-tip tr.grp th { color: var(--text-strong); padding-top: 4px; }
  .mll-tip td .delta.good { color: var(--ok); }
  .mll-tip td .delta.bad { color: var(--danger); }
}
@media (max-width: 899px) and (prefers-reduced-motion: reduce) {
  .mll-status.flash { animation: none; }
}
