/* ============================================================================================
   VOLURR — SOVEREIGN UI · V2-H · the MOBILE COMMAND DOCK (≤ 760 px) and what moves for it
   (app/static/css/sovereign-mobile.css — loads last; tokens only)
   ============================================================================================
   On a phone the command rail has no column to live in, so it becomes the bottom command dock:
   the same element, the same items, the same state read from the product — laid out as five
   labelled targets across the bottom (Rooms · Direct · Room · Search · Intelligence). The room's
   own tab strip stays inside the sheet, where a thumb can reach it; the modes belong to a
   desktop and are not offered. Everything anchored to the bottom of a phone (the sheet, the reopen
   pill, the video box, the voice bar, the hub) rises by the dock's height, through one token.   */
:root{ --sv-mdock-h:56px; }

body.sv-mdock .sv-rail, body.sv-mdock .sv-rail:hover, body.sv-mdock .sv-rail:focus-within{
  inset:auto 0 0 0; width:auto; height:calc(var(--sv-mdock-h) + env(safe-area-inset-bottom, 0px));
  padding:0 var(--sv-1) env(safe-area-inset-bottom, 0px); flex-direction:row; align-items:stretch; justify-content:space-around; gap:0;
  border-inline-start:0; border-top:1px solid var(--sv-border-subtle); background:var(--sv-surface-0); box-shadow:var(--sv-el-floating);
  z-index:calc(var(--sv-z-floating) + 1); }
body.sv-mdock .sv-rail-it{ flex:1 1 0%; width:auto; max-width:none; min-width:0; margin:0; min-height:var(--sv-mdock-h); flex-direction:column; justify-content:center; gap:3px; padding:0 2px; border-radius:0; }   /* measured 32 px wide on the first proof: every item takes its share of the bar */
body.sv-mdock .sv-rail-it svg{ width:22px; height:22px; flex:0 0 auto; }
body.sv-mdock .sv-rail-lbl{ display:block; opacity:1; visibility:visible; position:static; transform:none; font:var(--sv-t-caption); letter-spacing:0; text-transform:none;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
body.sv-mdock .sv-rail-it.on::before{ inset-block:auto 0; inset-inline:calc(50% - 12px) auto; width:24px; height:3px; border-radius:3px 3px 0 0; }
body.sv-mdock .sv-rail-ct{ position:absolute; inset-block-start:5px; inset-inline-start:calc(50% + 4px); }
body.sv-mdock .sv-rail-dot{ position:absolute; inset-block-start:7px; inset-inline-start:calc(50% + 8px); }
body.sv-mdock .sv-rail-sep, body.sv-mdock .sv-rail-grow, body.sv-mdock .sv-rail-mode{ display:none; }

@media (max-width:760px){
  /* the sheet sits on the dock; the chart keeps its margin above both */
  body.sv-mdock .lrd-dock{ bottom:var(--sv-mdock-h); }
  html body.sv-mdock.lr-docked .pcstage{ margin-bottom:calc(var(--lr-sheet) + var(--sv-mdock-h)) !important; }
  html body.sv-mdock:not(.lr-docked) .pcstage{ margin-bottom:var(--sv-mdock-h) !important; }
  body.sv-mdock .lrd-fab{ bottom:calc(var(--sv-mdock-h) + 12px); }
  body.sv-mdock .lrd-vidgrid{ bottom:calc(var(--lr-sheet) + var(--sv-mdock-h) + 16px); }
  body.sv-mdock:not(.lr-docked) .lrd-vidgrid{ bottom:calc(var(--sv-mdock-h) + 16px); }
  body.sv-mdock .lrd-voicebar{ bottom:calc(var(--sv-mdock-h) + 14px); }
  /* the hub and Direct end where the dock begins */
  html body.sv-mdock #lrhub .lrh-panel{ height:calc(100dvh - var(--sv-mdock-h)) !important; }
  body.sv-mdock #lrdm{ inset-block-end:var(--sv-mdock-h); }
  /* DM-PHONE-FIT-01 (2026-10-07). sovereign-room.css moves the Messages card off the rail's column
     (inset-inline-end: --sv-rail-w) - but on a phone the rail IS this bottom dock and has no column, while the card is
     the screen's full width (liverooms.css), so 64 px of it sat past the edge of the screen: MEASURED (room-nav, 390x844,
     ku) card 64..454 on a 390 screen - the conversation's «‹» at 393..437, off screen and untappable, the composer cut.
     ART.15 ROLLBACK: PC.lrDmPhoneFit=false (room-dm.js marks <html>) restores the offset. */
  html:not(.lr-rb-dmfit) body.sv-mdock.sv-rail-on #lrdm .lrdm-card{ inset-inline-end:0; }
}

/* ── what the first proof measured, and what closes it ──────────────────────────────────── */
/* the hub's search input was 36 px on a phone (DR-7 set 36 for the pointer); a finger needs 44 */
@media (pointer:coarse){ html #lrhub .lrh-search input{ min-height:var(--sv-target-touch) !important; } }
/* the platform's off-canvas drawer (chart-panel.css: .side translated off the viewport under 901 px)
   still counted as 21 reachable controls at x = -199 while closed; a closed drawer is not reachable -
   by keyboard, by a screen reader, or by a census. Visible again the moment it opens. */
@media (max-width:900px){
  .side:not(.open){ visibility:hidden; transition:transform var(--sv-panel) var(--sv-ease), visibility 0s linear var(--sv-panel); }
  .side.open{ visibility:visible; transition:transform var(--sv-panel) var(--sv-ease), visibility 0s; }
}

/* ── V2-J · what certification measured on a coarse pointer, and what closes it ─────────── */
/* 768x1024 and 390x844 measured: cmdkIn 32, intel-sym 36, rpScrub 24, rpSpeed 40 wide, su-out 30, the
   rail's mode buttons 40. A finger needs 44 on every one of them. */
@media (pointer:coarse){
  #cmdk .ck-in{ min-height:var(--sv-target-touch); }
  .intel-sym{ min-height:var(--sv-target-touch); padding:0 12px; }
  #lrdDock .lrd-rp-scrub{ height:var(--sv-target-touch); }
  #lrdDock .lrd-rp-spd{ min-width:var(--sv-target-touch); }
  html body .sideuser .su-out{ min-width:var(--sv-target-touch); min-height:var(--sv-target-touch); }
  .sv-rail .sv-rail-mode{ min-height:var(--sv-target-touch); }
}

/* the open navigation drawer is a menu: it opened UNDER the room sheet and the command dock on a phone
   (measured side x lrdDock 208x490, side x svRail 208x56) - the drawer rises to the menu order, its
   scrim just beneath it */
@media (max-width:900px){
  .side.open{ z-index:var(--sv-z-menu); }
  .overlay.on{ z-index:calc(var(--sv-z-menu) - 1); }
}

/* the launcher yields to a full-screen plane on a phone: with the hub open (100dvh less the dock) it had
   nowhere to step and sat on the command dock (measured agiLauncher x svRail 84x38 on every phone
   configuration). Hidden only while the plane is open; back the moment it closes. */
@media (max-width:760px){
  body:has(> #lrhub.on) #agiLauncher{ display:none !important; }   /* `>`: #lrhub is <body>'s child — a whole-document search ties the chart to this rule (docs/chart/evidence/drag-style-2026-09-25/) */
}

/* the members pane's search field (the dock renders it once a room has more than five members) had no
   touch floor: measured 323x38 on a Kurdish tablet in the closure re-certification, while every other
   control in that pane was raised to 44 in V2-G/V2-J. It had simply never rendered in a run before. */
@media (pointer:coarse){ #lrdDock .lrd-memsrch{ min-height:var(--sv-target-touch); } }
