/**
 * css/mobile-shell.css
 * ─────────────────────────────────────────────────────────────────────────────
 * Mobile-only app shell chrome (see modules/mobileShell.js). Loaded lazily,
 * only when the shell initializes (<=768px). Scoped under body.dx-mobile-shell
 * / .dxm-* so it never leaks onto desktop.
 *
 * Token bridge: map the design's token names onto the app's existing dual-mode
 * tokens (style.css :root / body.light-theme) instead of a parallel system.
 */

body.dx-mobile-shell {
  --dxm-bg:        var(--bg-base);
  --dxm-card:      var(--bg-card);
  --dxm-inset:     var(--bg-inset);
  --dxm-border:    var(--border-subtle);
  --dxm-text:      var(--text-primary);
  --dxm-text-dim:  var(--text-dim);
  --dxm-muted:     var(--muted);
  --dxm-accent:    #f5a623;

  /* Re-establish the --bg-card-2 -> --rd-bg-2 alias (dashboard.css ~3862).
     Custom-property var() chains resolve at the declaring element (:root)
     before inheritance, so --bg-card-2 inherits :root's dark default and
     never picks up body.light-theme's --rd-bg-2 override. Only visible once
     .card/.card-dark (e.g. #proximityCard, #flowCard) render inside the
     shell in light mode — re-declare here so it resolves against this
     element's own --rd-bg-2. */
  --bg-card-2: var(--rd-bg-2);

  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  /* Prevent browser zoom and double-tap zoom gestures across mobile view */
  touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Kill the @supports safe-area body padding (style.css ~1765) — the shell's
     bottom nav handles safe-area itself via env(safe-area-inset-bottom). */
  padding-bottom: 0 !important;
}

body.dx-mobile-shell button,
body.dx-mobile-shell a,
body.dx-mobile-shell input,
body.dx-mobile-shell select,
body.dx-mobile-shell textarea,
body.dx-mobile-shell .dxm-nav-btn,
body.dx-mobile-shell .dxm-subnav-btn,
body.dx-mobile-shell .sw-view-tab,
body.dx-mobile-shell .nd-pill,
body.dx-mobile-shell .dx-act {
  touch-action: manipulation;
}

/* ─────────────────────────────────────────────────────────────────────────────
   HIDE DESKTOP CONTAINERS — now-empty after relocation, or simply not part of
   the mobile IA. Desktop CSS is untouched; this only applies under the shell.
   ───────────────────────────────────────────────────────────────────────────── */
/* Non-relocated desktop containers — empty after relocation or not in mobile IA */
body.dx-mobile-shell > .header,
body.dx-mobile-shell > .sebi-marquee-wrap,
body.dx-mobile-shell > .error-bar,
body.dx-mobile-shell > .warn-bar,
body.dx-mobile-shell > #alertDock,
body.dx-mobile-shell > .top-pair,
body.dx-mobile-shell > .stats-grid,
body.dx-mobile-shell > .charts-row,
body.dx-mobile-shell > .nd-ocs-row,
body.dx-mobile-shell > .dx-footer,
body.dx-mobile-shell > #dataDots,
body.dx-mobile-shell > #bxChartsGate,
body.dx-mobile-shell > #dxMarketLockPanel {
  display: none !important;
}
/* Relocated nodes: hide them only while still a direct child of body (i.e.
   before JS moves them into panels). Once relocated deeper, this stops
   matching and their own controllers can toggle visibility normally. */
body.dx-mobile-shell > #regime-context-banner,
body.dx-mobile-shell > .dx-onboard-bar,
body.dx-mobile-shell > .cx-eod-handoff,
body.dx-mobile-shell > #refPromoCard {
  display: none !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SHELL ROOT
   ───────────────────────────────────────────────────────────────────────────── */
.dxm-shell {
  position: fixed;
  inset: 0;
  max-width: 100vw;
  overflow-x: hidden;
  z-index: 500;
  display: flex;
  flex-direction: column;
  background: var(--dxm-bg);
  color: var(--dxm-text);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.dxm-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(circle 220px at var(--dxm-glow-x, 50%) var(--dxm-glow-y, 0%),
    rgba(245,166,35,0.10), transparent 70%);
}
body.dx-mobile-shell.light-theme .dxm-glow {
  background: radial-gradient(circle 220px at var(--dxm-glow-x, 50%) var(--dxm-glow-y, 0%),
    rgba(0,0,0,0.06), transparent 70%);
}

/* ─────────────────────────────────────────────────────────────────────────────
   HEADER
   ───────────────────────────────────────────────────────────────────────────── */
.dxm-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 10px;
  border-bottom: 1px solid var(--dxm-border);
  background: rgba(10, 16, 28, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-shrink: 0;
}

.dxm-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.dxm-header-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.dxm-brand {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--dxm-text, #EEF2F7);
}

.dxm-clock {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
  color: var(--dxm-muted, #8290A6);
  white-space: nowrap;
}
.dxm-clock-time {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-weight: 500;
  color: inherit;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.dxm-colon { opacity: 0.6; padding: 0 1px; }

/* Relocated #liveClockDate */
.dxm-clock #liveClockDate {
  font-size: 12px;
  letter-spacing: normal;
  text-transform: none;
  color: inherit;
}

.dxm-clock-dot {
  font-size: 12px;
  color: inherit;
}

.dxm-me-btn {
  margin-left: auto;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--dxm-inset, #141D2E);
  border: 1px solid var(--border-subtle, rgba(148,163,184,.28));
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary, #A7B1C2);
  position: relative;
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s ease, background 0.15s ease;
  touch-action: manipulation;
}
.dxm-me-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
}
.dxm-me-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.08);
}
.dxm-me-initials {
  line-height: 1;
}
.dxm-me-dot {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--dxm-accent, #E8A33D);
  border: 2px solid var(--dxm-bg, #020817);
}
.dxm-me-dot[hidden] {
  display: none !important;
}

.dxm-mode-slot {
  display: none;
}

.dxm-bell {
  display: none;
}
.dxm-bell-badge {
  display: none;
}

/* Right-side action cluster: broadcast (mast) · bell · avatar */
.dxm-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.dxm-broadcast-slot {
  display: flex;
  align-items: center;
}
/* The AIR mentor button, in the header next to Me (2026-11-08). */
.dxm-voice-slot { margin-left: auto; }
.dxm-voice-slot + .dxm-me-btn { margin-left: 0; }
.dxm-avatar-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--dxm-border);
  background: var(--dxm-inset);
  color: var(--dxm-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  position: relative;
  transition: transform 0.12s ease, background 0.15s ease;
}
.dxm-avatar-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
}
.dxm-avatar-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.08);
}
/* ─────────────────────────────────────────────────────────────────────────────
   THE BROADCAST BUTTON (mobile)
   ─────────────────────────────────────────────────────────────────────────────
   The relocated desktop broadcast button (#c3VoiceBtn .dn-voice-btn) — the
   mobile form of the desktop pill (dashboard.css ~5492), NOT a separate
   design. Same language, compressed into the 36px circular geometry the
   gear/bell/avatar siblings already use, then given the depth the desktop
   pill gets for free from its size:

     layer 4  status dot          ::before
     layer 3  brand-gradient ring border-box background layer, pans
     layer 2  glass dome          specular background layer + inset shadows
     layer 1  live orb canvas     .vx-orb-mini
     behind   sonar bloom         ::after, one ping per spoken word

   The ring uses the SAME --dx-voiceA..D custom properties orbEngine.setMode()
   overrides, so a mentor read tints it red/pink and a market read tints it
   blue/cyan, exactly like desktop.

   REPLACES the 2026-08 "iridescent Siri Voice Beacon" (fixed rainbow conic
   ring + blurred spinning halo + purple "AI" text sticker). Three reasons:
   its palette was hardcoded, so it was the only header chrome that never
   recolored with the broadcast channel; the constant scale-pulse made it the
   one control in the row that never sat still on its baseline; and the
   sticker broke the OFF state outright (see the ::after note below). */
body.dx-mobile-shell #c3VoiceBtn.dn-voice-btn {
  position: relative !important;
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  gap: 0 !important;
  border-radius: 50% !important;
  justify-content: center !important;
  align-items: center !important;
  overflow: visible !important;
  /* OFF matches its siblings' fill — an honest "not on" control, the same
     call desktop's dim outlined OFF pill makes. The old beacon glowed
     identically whether voice was armed or off.
     The dome (below) still applies here, so even at rest this reads as a
     recessed instrument rather than another flat icon chip. */
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0) 48%) padding-box,
    var(--dxm-inset) padding-box !important;
  border: 1px solid var(--dxm-border) !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.12),
    inset 0 -2px 4px rgba(0, 0, 0, 0.45),
    0 1px 2px rgba(0, 0, 0, 0.45) !important;
  animation: none !important;
  transition: transform .12s ease, box-shadow .25s ease, border-color .2s ease !important;
}

/* dashboard.css's OFF-state diagonal sweep (`.dn-voice-btn:not(.on)::after`,
   ~5527) is a full-bleed wash sized for a 480px pill — wrong effect on a
   36px circle, so ::after is cleared here and re-used for the sonar bloom.
   THIS IS ALSO THE BUG THE OLD BADGE HIT: that rule sets `inset:0`, and the
   old `#c3VoiceBtn::after` badge overrode only `bottom`/`right`, leaving
   `top:0; left:0` live. The badge therefore stretched to 37x36 and covered
   the entire button with a blue rounded square in the OFF state — i.e. the
   default state on first load, before the user has ever armed voice. Any
   ::after here must reset top/left, not just bottom/right (the sonar rule
   below sets all four via `inset`). */
body.dx-mobile-shell #c3VoiceBtn.dn-voice-btn::after { content: none !important; }

/* ARMED: desktop's `.on` treatment (dashboard.css ~5536) — same gradient
   stops, same 7s pan — over the dome.
   Mobile needs its OWN pan keyframe rather than sharing desktop's
   `vxBorderPan`: that keyframe animates a two-layer background-position list
   (`0 0, 320% 0`), and this rule carries three layers (specular / fill /
   ring). Reusing it would leave the ring layer unanimated. If the desktop
   gradient stops ever change, change them in both places. */
body.dx-mobile-shell #c3VoiceBtn.dn-voice-btn.on {
  border: 1px solid transparent !important;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 48%) padding-box,
    radial-gradient(circle at 50% 55%, rgba(18, 27, 44, 0.94), rgba(5, 9, 17, 0.99)) padding-box,
    linear-gradient(120deg, var(--dx-voiceA), var(--dx-voiceB), var(--dx-voiceC), var(--dx-voiceD), var(--dx-voiceA)) border-box !important;
  background-size: 100% 100%, 100% 100%, 320% 100% !important;
  background-position: 0 0, 0 0, 0 0 !important;
  box-shadow:
    inset 0 1px 1.5px rgba(255, 255, 255, 0.20),
    inset 0 -2px 5px rgba(0, 0, 0, 0.55),
    0 1px 2px rgba(0, 0, 0, 0.45),
    0 0 14px -4px var(--dx-voiceA) !important;
  animation: dxmVoiceRingPan 7s linear infinite !important;
}
@keyframes dxmVoiceRingPan { to { background-position: 0 0, 0 0, 320% 0; } }

/* SPEAKING: glow lifts, dome highlight brightens. Deliberately NOT the old
   scale(1.08) — the button sits in a fixed-height flex row next to the bell
   and avatar, so growing it mid-read nudged the whole cluster's baseline. */
body.dx-mobile-shell #c3VoiceBtn.dn-voice-btn.speaking {
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.28),
    inset 0 -2px 5px rgba(0, 0, 0, 0.5),
    0 0 16px -2px var(--dx-voiceA),
    0 0 30px -8px var(--dx-voiceC) !important;
}

/* SONAR BLOOM — two rings expand out of the rim on every spoken word.
   Driven by real speech: voicePill.js alternates .ping-a/.ping-b on each
   narratorVoice:boundary, and the two keyframes below are identical apart
   from their names — swapping the name is what restarts the animation. That
   alternation is deliberate: the usual `void offsetWidth` restart idiom
   forces a synchronous layout on every word, which is a bad trade on a
   phone; a name swap costs nothing.
   The pseudo has no background of its own — it is a bare box-shadow emitter
   sized to the rim (inset:0), so the rings only ever paint OUTSIDE the
   button and nothing is obscured. It must NOT be z-index:-1: the button
   creates no stacking context (position:relative, no z-index), so a negative
   layer sinks behind .dxm-header's near-opaque background and the rings
   disappear entirely. The status dot sits at z-index:2 and stays on top.
   Gated on .speaking so an armed-but-silent button never pings. */
body.dx-mobile-shell #c3VoiceBtn.dn-voice-btn.speaking.ping-a::after,
body.dx-mobile-shell #c3VoiceBtn.dn-voice-btn.speaking.ping-b::after {
  content: '' !important;
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
body.dx-mobile-shell #c3VoiceBtn.dn-voice-btn.speaking.ping-a::after {
  animation: dxmVoiceSonarA .95s cubic-bezier(.15, .7, .3, 1) both;
}
body.dx-mobile-shell #c3VoiceBtn.dn-voice-btn.speaking.ping-b::after {
  animation: dxmVoiceSonarB .95s cubic-bezier(.15, .7, .3, 1) both;
}
@keyframes dxmVoiceSonarA {
  0% {
    box-shadow: 0 0 0 0 color-mix(in oklab, var(--dx-voiceA) 78%, transparent),
                0 0 0 0 color-mix(in oklab, var(--dx-voiceC) 0%, transparent);
  }
  38% {
    box-shadow: 0 0 0 5px color-mix(in oklab, var(--dx-voiceA) 44%, transparent),
                0 0 0 1px color-mix(in oklab, var(--dx-voiceC) 52%, transparent);
  }
  100% {
    box-shadow: 0 0 0 11px color-mix(in oklab, var(--dx-voiceA) 0%, transparent),
                0 0 0 9px color-mix(in oklab, var(--dx-voiceC) 0%, transparent);
  }
}
@keyframes dxmVoiceSonarB {
  0% {
    box-shadow: 0 0 0 0 color-mix(in oklab, var(--dx-voiceA) 78%, transparent),
                0 0 0 0 color-mix(in oklab, var(--dx-voiceC) 0%, transparent);
  }
  38% {
    box-shadow: 0 0 0 5px color-mix(in oklab, var(--dx-voiceA) 44%, transparent),
                0 0 0 1px color-mix(in oklab, var(--dx-voiceC) 52%, transparent);
  }
  100% {
    box-shadow: 0 0 0 11px color-mix(in oklab, var(--dx-voiceA) 0%, transparent),
                0 0 0 9px color-mix(in oklab, var(--dx-voiceC) 0%, transparent);
  }
}

/* BLOCKED (mirrors dashboard.css ~5550): a submitted read never reached
   onstart, so silence is never mistaken for "nothing scheduled yet". */
body.dx-mobile-shell #c3VoiceBtn.dn-voice-btn.on.blocked {
  border-color: rgba(232, 89, 63, 0.45) !important;
  background: rgba(232, 89, 63, 0.10) padding-box !important;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.4) !important;
  animation: none !important;
}

/* Status dot — the 36px stand-in for desktop's "ARMED"/"ON AIR" text chip,
   which has no room here. Absent while OFF (nothing to announce), mint while
   armed, voice-tinted while speaking. Reads like the bell's unread badge,
   which is the vocabulary this header already has. */
body.dx-mobile-shell #c3VoiceBtn.dn-voice-btn::before {
  content: '';
  position: absolute;
  top: auto; left: auto; right: -1px; bottom: -1px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #2ee6a0;
  border: 2px solid var(--dxm-bg);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity .2s ease, transform .2s cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
  filter: none;
  animation: none;
  z-index: 2;
}
body.dx-mobile-shell #c3VoiceBtn.dn-voice-btn.on::before {
  opacity: 1;
  transform: scale(1);
}
body.dx-mobile-shell #c3VoiceBtn.dn-voice-btn.speaking::before {
  background: var(--dx-voiceA);
  box-shadow: 0 0 7px color-mix(in oklab, var(--dx-voiceA) 70%, transparent);
}
body.dx-mobile-shell #c3VoiceBtn.dn-voice-btn.on.blocked::before {
  background: #E8593F;
  box-shadow: none;
}

body.dx-mobile-shell #c3VoiceBtn.dn-voice-btn:active {
  transform: scale(0.92) !important;
}

/* Orb sized to leave the ring reading as a ring. Desktop can run a 72px orb
   because its pill crops it (overflow:hidden); here the button IS the frame,
   so the orb has to sit inside it. */
body.dx-mobile-shell #c3VoiceBtn .vx-orb-mini {
  width: 26px !important;
  height: 26px !important;
  filter: saturate(1.7) brightness(1.15) !important;
  opacity: 1 !important;
  position: relative;
  z-index: 1;
}
/* OFF is only mildly muted, not greyed out. Desktop keeps its OFF orb at
   full colour (dashboard.css ~5515, opacity .95) and lets the "Voice off"
   label carry the state; there is no room for that label here, so the ring
   and the status dot carry it instead — the orb still has to read as an orb
   rather than a smudge, or the control stops being recognisable at rest. */
body.dx-mobile-shell #c3VoiceBtn:not(.on) .vx-orb-mini {
  filter: saturate(0.85) brightness(0.9) !important;
  opacity: 0.72 !important;
}

/* Light theme — the old beacon hardcoded a near-black radial fill, which sat
   as a dark blot in an otherwise light header. The dome inverts too: the
   specular highlight goes to a soft white bloom and the inner shadow
   softens, or the button reads as a hole punched in the header. */
body.dx-mobile-shell.light-theme #c3VoiceBtn.dn-voice-btn {
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 52%) padding-box,
    rgba(26, 22, 18, 0.05) padding-box !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(26, 22, 18, 0.10),
    0 1px 2px rgba(26, 22, 18, 0.10) !important;
}
body.dx-mobile-shell.light-theme #c3VoiceBtn.dn-voice-btn.on {
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 52%) padding-box,
    radial-gradient(circle at 50% 55%, rgba(255, 253, 250, 0.98), rgba(243, 239, 233, 0.98)) padding-box,
    linear-gradient(120deg, var(--dx-voiceA), var(--dx-voiceB), var(--dx-voiceC), var(--dx-voiceD), var(--dx-voiceA)) border-box !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    inset 0 -2px 5px rgba(26, 22, 18, 0.12),
    0 0 14px -5px var(--dx-voiceA) !important;
}

/* `.ck-voice-wrap` is styled as `.dn-center .ck-voice-wrap` (dashboard.css
   ~5491), so relocating it here drops those styles — including the height
   that kept it aligned. Restate the parts this slot needs; without them the
   bare inline span's line-height made this the tallest item in the row and
   silently set the header's height. */
body.dx-mobile-shell .dxm-broadcast-slot .ck-voice-wrap {
  display: inline-flex;
  align-items: center;
  height: 36px;
  position: relative;
}

body.dx-mobile-shell #c3VoiceBtn .dn-vp-caption,
body.dx-mobile-shell #c3VoiceBtn .dn-vp-off,
body.dx-mobile-shell #c3VoiceBtn .vx-pill-state { display: none; }

/* The Broadcast popover → bottom sheet on mobile (desktop renders a dropdown).
   Open state is `:not([hidden])`; voiceBroadcast/index.js toggles the attr.
   NOTE: the popover's surface styles (bg/border/display:flex) were scoped to
   `.dn-center .ck-voice-popover` — relocating out of .dn-center drops them, so
   this rule must restate them. Inner element styles are global and survive.
   The 0 0 0 100vmax shadow is a CSS-only scrim; outside-tap close is already
   handled by voiceBroadcast's document click handler. */
body.dx-mobile-shell #c3VoicePopover:not([hidden]) {
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  /* Reset desktop transform */
  transform: none;
  z-index: 960;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: none;
  max-height: 82vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  white-space: normal;
  background: rgba(11, 16, 15, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--dxb-bd, rgba(196, 214, 200, 0.10));
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  font-family: 'Plus Jakarta Sans', 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--dxb-dim, #8595ad);
  padding: 0 0 calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -20px 48px rgba(0,0,0,0.7), 0 1px 0 rgba(255,255,255,0.06) inset, 0 0 0 100vmax rgba(0,0,0,0.55);
  animation: dxmSheetUp 0.28s cubic-bezier(.2,.8,.2,1);
}
body.dx-mobile-shell #c3VoicePopover > .vx-instrument-body { display: contents; }

/* Grip handle */
body.dx-mobile-shell .vx-sheet-handle {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 18px;
  padding: 10px 0 4px;
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(11, 16, 15, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
body.dx-mobile-shell.light-theme .vx-sheet-handle {
  background: rgba(250, 246, 239, 0.98);
}
body.dx-mobile-shell .vx-sheet-handle::after {
  content: '';
  width: 42px;
  height: 4.5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.25);
}
body.dx-mobile-shell.light-theme .vx-sheet-handle::after {
  background: rgba(0, 0, 0, 0.2);
}

/* Light theme sheet surface */
body.dx-mobile-shell.light-theme #c3VoicePopover:not([hidden]) {
  background: rgba(250, 246, 239, 0.97);
  border-color: rgba(26,22,18,0.18);
  border-top-color: rgba(255, 255, 255, 0.6);
  color: var(--dxb-dim, #7A6F65);
  box-shadow: 0 -20px 48px rgba(120,108,92,0.35), 0 0 0 100vmax rgba(0,0,0,0.4);
}
@keyframes dxmSheetUp { from { transform: translateY(100%); } to { transform: none; } }

body.dx-mobile-shell #c3VoicePopover .dxb-body { flex: none; overflow: visible; min-height: 0; }

/* Sticky Popover Header */
body.dx-mobile-shell .vx-pop-head {
  position: sticky;
  top: 18px;
  z-index: 3;
  background: rgba(11, 16, 15, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--dxb-bd, rgba(196, 214, 200, 0.10));
}
body.dx-mobile-shell.light-theme .vx-pop-head {
  background: rgba(250, 246, 239, 0.98);
}

body.dx-mobile-shell #vxOrbPop {
  filter: drop-shadow(0 0 12px rgba(235, 197, 140, 0.35));
}
body.dx-mobile-shell .vx-pop-name {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
body.dx-mobile-shell .vx-pop-sub {
  font-size: 11px;
  color: var(--dxb-dim);
}

body.dx-mobile-shell .vx-sheet-fade { display: block; }

/* Backdrop open state for broadcast sheet */
.dxm-sheet-backdrop.dx-broadcast-open {
  opacity: 1;
  pointer-events: auto;
}

/* Close button inside the broadcast popover header — mobile only */
body.dx-mobile-shell .ck-voice-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s, transform .1s;
}
body.dx-mobile-shell .ck-voice-close:active {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  transform: scale(0.95);
}
body.dx-mobile-shell.light-theme .ck-voice-close {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
  color: #7A6F65;
}

/* Hide on desktop — desktop has the outside-click dismiss */
.ck-voice-close { display: none; }

/* Now Playing / Audio Queue Display */
body.dx-mobile-shell #c3VoicePopover .vx-queue {
  margin: 10px 14px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #101513;
  border: 1px solid rgba(196, 214, 200, 0.12);
  box-shadow: none;
}
body.dx-mobile-shell.light-theme #c3VoicePopover .vx-queue {
  background: linear-gradient(180deg, rgba(238, 230, 218, 0.9), rgba(245, 240, 233, 0.95));
  border-color: rgba(26, 22, 18, 0.12);
}

/* "HEAR IT" Preview Strip & Chips */
body.dx-mobile-shell #c3VoicePopover .vx-try {
  margin: 12px 14px 4px;
  gap: 8px;
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
body.dx-mobile-shell #c3VoicePopover .vx-chip {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
body.dx-mobile-shell #c3VoicePopover .vx-chip:active {
  transform: scale(0.95);
}
body.dx-mobile-shell #c3VoicePopover .vx-chip[data-vx-demo="mentor"] {
  border: 1px solid rgba(235, 197, 140, 0.35);
  background: rgba(235, 197, 140, 0.07);
  color: #f3dcb6;
}
body.dx-mobile-shell #c3VoicePopover .vx-chip[data-vx-demo="motivation"] {
  border: 1px solid rgba(159, 212, 178, 0.32);
  background: rgba(159, 212, 178, 0.06);
  color: #cfe9d8;
}

/* Mentor Hero Card & Intensity Tiers */
body.dx-mobile-shell #c3VoicePopover .dxb-hero {
  margin: 12px 14px;
  padding: 16px 14px;
  border-radius: 14px;
}
body.dx-mobile-shell #c3VoicePopover .dxb-tier-group {
  gap: 8px;
}
body.dx-mobile-shell #c3VoicePopover .dxb-tier {
  min-height: 52px;
  padding: 10px 4px;
  border-radius: 10px;
  transition: transform .12s ease, border-color .15s ease, background .15s ease;
}
body.dx-mobile-shell #c3VoicePopover .dxb-tier:active {
  transform: scale(0.96);
}
body.dx-mobile-shell #c3VoicePopover .dxb-tier.sel {
  background: linear-gradient(180deg, rgba(235, 197, 140, 0.22), rgba(235, 197, 140, 0.08)) !important;
  border: 1.5px solid var(--dxb-mentor, #ebc58c) !important;
  box-shadow: 0 0 14px -2px rgba(235, 197, 140, 0.35) !important;
}
body.dx-mobile-shell #c3VoicePopover .dxb-tier-name {
  font-size: 12px;
  font-weight: 700;
}
body.dx-mobile-shell #c3VoicePopover .dxb-tier-min {
  font-size: 9px;
  opacity: 0.85;
}

/* Auto sign-off 4-Column Balanced Grid */
body.dx-mobile-shell #c3VoicePopover .vx-autooff-group {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 6px !important;
  margin-top: 10px !important;
}
body.dx-mobile-shell #c3VoicePopover .vx-autooff-pill {
  width: 100% !important;
  min-height: 40px !important;
  padding: 8px 2px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  border-radius: 8px !important;
}
body.dx-mobile-shell #c3VoicePopover .vx-autooff-pill .dxb-tier-name {
  font-size: 11px;
}

/* Secondary Sections */
body.dx-mobile-shell #c3VoicePopover .dxb-sec {
  padding: 12px 14px;
}
body.dx-mobile-shell #c3VoicePopover .dxb-sec-title {
  font-size: 13px;
  font-weight: 600;
}
body.dx-mobile-shell #c3VoicePopover .dxb-sec-desc {
  font-size: 11px;
}
body.dx-mobile-shell #c3VoicePopover .dxb-sec-row {
  min-height: 44px;
}
body.dx-mobile-shell #c3VoicePopover .dxb-mini-switch { padding: 10px; margin: -10px; }
body.dx-mobile-shell #c3VoicePopover .vx-pop-master { padding: 12px; margin: -12px; }
body.dx-mobile-shell #c3VoicePopover .dxb-close { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

/* Market Read Segmented Control */
body.dx-mobile-shell #c3VoicePopover .dxb-segmented {
  min-height: 40px;
  border-radius: 10px;
  background: rgba(11, 16, 15, 0.85);
  border: 1px solid rgba(46, 120, 200, 0.25);
  padding: 3px;
  margin-top: 10px;
}
body.dx-mobile-shell #c3VoicePopover .dxb-segment {
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  padding: 8px 4px;
  border: none !important;
}
body.dx-mobile-shell #c3VoicePopover .dxb-segment:has(input:checked) {
  background: rgba(235, 197, 140, 0.16) !important;
  color: #ebc58c !important;
  box-shadow: none;
}

/* "What should I drill?" — stack label over select at phone widths */
body.dx-mobile-shell #c3VoicePopover #c3VoiceAnchorSec { flex-direction: column; align-items: stretch; gap: 6px; }
body.dx-mobile-shell #c3VoicePopover #c3VoiceAnchorSec .dxb-ctl-label { width: auto; }

/* Voice Settings Disclosure & Controls */
body.dx-mobile-shell #c3VoicePopover .dxb-disclosure {
  min-height: 50px;
  font-size: 13px;
  font-weight: 600;
  padding: 14px 16px;
}
body.dx-mobile-shell #c3VoicePopover .dxb-ctl-row {
  min-height: 46px;
  align-items: center;
  gap: 12px;
}
body.dx-mobile-shell #c3VoicePopover .dxb-ctl-label {
  font-size: 11px;
  font-weight: 600;
  width: 48px;
}
body.dx-mobile-shell #c3VoicePopover .dxb-select {
  font-size: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  min-height: 44px;
}
body.dx-mobile-shell #c3VoicePopover input.dxb-range {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  margin: 10px 0;
  font-size: 16px;
}
body.dx-mobile-shell #c3VoicePopover input.dxb-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--dxb-mentor, #ebc58c);
  box-shadow: 0 0 10px rgba(235, 197, 140, 0.7);
  cursor: pointer;
}
body.dx-mobile-shell #c3VoicePopover .dxb-test {
  min-height: 44px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  transition: transform .12s ease, background .15s ease;
}
body.dx-mobile-shell #c3VoicePopover .dxb-test:active {
  transform: scale(0.97);
}

/* ─────────────────────────────────────────────────────────────────────────────
   TICKER TAPE — hidden on Narrator / Discipline (the two focused hero tabs)
   ───────────────────────────────────────────────────────────────────────────── */
.dxm-tape {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  background: var(--dxm-inset);
  border-bottom: 1px solid var(--dxm-border);
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.dxm-tape::-webkit-scrollbar { display: none; }
.dxm-tape.dxm-tape-hidden { display: none; }

.dxm-tape-marquee {
  display: inline-flex;
  align-items: center;
  width: max-content;
  animation: dxmTapeScroll var(--dxm-tape-duration, 30s) linear infinite;
  will-change: transform;
}
.dxm-tape-marquee.dxm-tape-paused {
  animation-play-state: paused;
}
@keyframes dxmTapeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.dxm-tape-track {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 6px 14px;
  flex-shrink: 0;
}

.dxm-tape-seg {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  white-space: nowrap;
}
.dxm-tape-label {
  font-size: 9px;
  letter-spacing: 1.4px;
  color: var(--dxm-text-dim);
  text-transform: uppercase;
}
.dxm-tape-seg + .dxm-tape-seg::before {
  content: '';
}

/* ─────────────────────────────────────────────────────────────────────────────
   MAIN / PANELS
   ───────────────────────────────────────────────────────────────────────────── */
.dxm-main {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.dxm-panel {
  display: none;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 8px calc(12px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}
.dxm-panel.dxm-panel-active {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Relocated desktop cards: reset grid/positioning leftovers so they stack
   full-width inside the new panels. */
.dxm-panel > * {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  grid-column: auto !important;
  grid-row: auto !important;
  box-sizing: border-box;
}

/* ─────────────────────────────────────────────────────────────────────────────
   MARKET ROOM — sub-nav + nested sections (Build 3)
   Narrator/Analytics/Highlights/Charts used to be top-level .dxm-panel siblings
   of Discipline; they're now .dxm-subpanel children living inside the single
   Market .dxm-panel, switched by the pill strip below instead of the bottom
   nav. The Market .dxm-panel is still the thing that scrolls (overflow-y:auto
   from the rule above) — the sub-nav pins to its top via `sticky` so it stays
   reachable while a tall section (e.g. Charts) scrolls underneath it.
   ───────────────────────────────────────────────────────────────────────────── */
.dxm-market-subnav {
  position: sticky;
  top: 0;
  z-index: 3;
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 8px 10px;
  margin: -8px -8px 6px;
  background: rgba(10, 16, 28, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  scrollbar-width: none;
}
.dxm-market-subnav::-webkit-scrollbar { display: none; }

.dxm-subnav-btn {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--dxm-border);
  background: rgba(16, 26, 44, 0.7);
  color: var(--dxm-text-dim);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1px;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}
.dxm-subnav-btn:active {
  transform: scale(0.95);
}
.dxm-subnav-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.dxm-subnav-btn.dxm-subnav-active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(232, 163, 61, 0.28), rgba(232, 163, 61, 0.1));
  border-color: rgba(232, 163, 61, 0.55);
  box-shadow: 0 0 14px -2px rgba(232, 163, 61, 0.4);
  font-weight: 700;
}

.dxm-market-sections { width: 100%; }

.dxm-subpanel { display: none; }
.dxm-subpanel.dxm-subpanel-active {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
/* Same reset as .dxm-panel > * above, one level deeper — the four ex-tab
   cards are now grandchildren of .dxm-panel-market, not direct children. */
.dxm-subpanel > * {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  grid-column: auto !important;
  grid-row: auto !important;
  box-sizing: border-box;
}

/* ── Narrator: the DATA SAYS console sizes to its content ───────────────────
   `flex:1 1 auto` stretched card3 to the full panel height, exposing the
   absolutely-positioned `.ck-ai-bg` scan layer as a large empty zone below
   short narration. `flex:0 0 auto` + height:auto lets the card be exactly as
   tall as `.inner`, so the AI background fills only behind real content — no
   dead space. If content overflows, the panel (not the card) scrolls. */
.dxm-panel-narrator > #card3 {
  flex: 0 0 auto;
  min-height: 0;
  max-height: none !important;
  height: auto !important;
  overflow-y: visible !important;
  border-radius: 14px !important;
}

/* ── Narrator header (DATA SAYS console) — compact for mobile ───────────────
   The desktop `#card3 .head` (dashboard.css ~5590) is a single non-wrapping
   flex row built for a wide card. On a phone it can't fit "DATA SAYS" + the
   live dot + the verbose ctx meta ("NIFTY · OI READ · RECORDED · scan N") + the
   History/Story buttons on one line, so it wraps into a ~110px tower above the
   narration. Re-flow it into a deliberate 2 rows and shrink the type:
     Row 1:  DATA SAYS ▮
     Row 2:  ● NIFTY · OI READ · RECORDED · scan N …          History ›  Story › */
.dxm-panel-narrator > #card3 .head {
  flex-wrap: wrap;
  gap: 4px 8px !important;
  padding: 9px 14px 8px !important;
}
.dxm-panel-narrator > #card3 .head .kick {
  font-size: 10px !important;
  letter-spacing: .18em !important;
  white-space: nowrap;          /* keep "DATA SAYS" on one line */
}
/* ctx cluster drops to its own full-width line (was margin-left:auto on one row) */
.dxm-panel-narrator > #card3 .head .ctx {
  margin-left: 0 !important;
  flex: 1 1 100%;
  min-width: 0;
  gap: 6px !important;
  font-size: 9px !important;
  letter-spacing: .08em !important;
}
/* verbose scan meta clips to one line instead of wrapping to 3-4 — and it's the
   only thing allowed to clip, so the status tail stays intact */
.dxm-panel-narrator > #card3 .head .ctx #c3CtxText {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* keep the "· closed" session status (#c3Tele) on one line, never split to two */
.dxm-panel-narrator > #card3 .head .ctx #c3Tele {
  white-space: nowrap;
  flex-shrink: 0;
}
/* push the History/Story buttons to the right end of row 2 */
.dxm-panel-narrator > #card3 .head .ctx #openHistoryBtn {
  margin-left: auto;
}
.dxm-panel-narrator > #card3 .head .ck-hist-btn {
  padding: 6px 10px !important;
  font-size: 11px !important;
  min-height: 32px !important;
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.dxm-panel-narrator > #card3 .head .ck-hist-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
}

/* ── Discipline: room-relationship hint (mirrors deskShell's nav-hint line) ── */
.dxm-room-hint {
  margin: 4px 12px 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-secondary, #94a3b8);
  text-align: center;
  opacity: 0.75;
}
body.light-theme .dxm-room-hint { color: var(--text-secondary, #5a5550); }

/* ── Discipline: the commitment-cycle panel owns the whole panel ────────── */
.dxm-panel-discipline > #cxTodayPanel {
  flex: 0 0 auto !important;
  min-height: 0;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  border-radius: 14px !important;
}

/* When Today Companion is active on mobile, hide the redundant rotating carousel in #cxTodayPanel
   so mobile doesn't show two competing "Today" cards. On Day 0 (NO_CYCLE), #dxCompanion is hidden
   and #cxTodayPanel stays visible to present the commitment CTA.
   Dead-selector sweep (open item 4, Dashboard Continuity Plan §6a, 2026-09-23):
   this rule used to also match `.dxm-panel-discipline.dxm-has-active-companion`,
   a class no JS in this codebase ever sets (grep confirmed) — the live :has()
   selector below was already doing the real work. Removed the dead half. */
.dxm-panel-discipline:has(#dxCompanion:not([hidden])) > #cxTodayPanel {
  display: none !important;
}

/* Unmeasured-session bar (vacation / cooldown / alignment-bypassed) — compact
   for mobile. dashboard.css (~4190) forces `padding:10px 44px` + `letter-spacing:
   2px`, sized for a wide desktop card; the 88px of horizontal inset crushes
   "UNMEASURED SESSION — ALIGNMENT BYPASSED" + its context note into a stacked
   tower. Trim the insets, soften the tracking, and drop the context line below
   the headline instead of fighting it for the same row. */
.dxm-panel-discipline #cxUnmeasuredBar {
  padding: 9px 14px !important;
  letter-spacing: .6px !important;
  flex-wrap: wrap;
  gap: 3px 8px !important;
  align-items: baseline;
}
.dxm-panel-discipline #cxUnmeasuredBar .cx-unmeasured-text {
  letter-spacing: .6px !important;
  line-height: 1.32;
}
.dxm-panel-discipline #cxUnmeasuredBar .cx-unmeasured-ctx {
  margin-left: 0 !important;
  flex: 1 1 100%;               /* context note on its own line under the headline */
}

/* ── Discipline: Calendar compact on mobile ─────────────────────────────── */
body.dx-mobile-shell .cx-discipline-calendar {
  padding: 12px 14px !important;
  border-radius: 12px !important;
  margin-bottom: 12px !important;
}
body.dx-mobile-shell .cxdc-dow,
body.dx-mobile-shell .cxdc-grid {
  margin: 0 !important;
  gap: 3px !important;
}
body.dx-mobile-shell .cxdc-cell {
  height: 40px !important;
  font-size: 10.5px !important;
  border-radius: 6px !important;
}
body.dx-mobile-shell .cxdc-month {
  font-size: 13px !important;
}

/* ── Discipline: SOS emergency brake button (tactile 46px touch target) ──── */
body.dx-mobile-shell #sosLockBtn,
.dxm-panel-discipline #sosLockBtn {
  min-height: 46px !important;
  padding: 10px 18px !important;
  font-size: 11px !important;
  border-radius: 8px !important;
  letter-spacing: 1.2px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform .12s ease, background .15s ease !important;
}
body.dx-mobile-shell #sosLockBtn:active {
  transform: scale(0.97) !important;
}

/* ── Relocated banners (atop the Discipline panel) ──────────────────────── */
/* Full-width desktop strips — reset fixed heights so they sit as compact bars
   above cxTodayPanel. Their own controllers toggle `hidden`; relocation only
   moves them, so a hidden banner stays hidden until its controller reveals
   it. Build 3: moved here from .dxm-panel-narrator — Discipline is the actual
   landing room (see mobileShell.js _relocateBanners). */
.dxm-panel-discipline > #regime-context-banner,
.dxm-panel-discipline > .dx-onboard-bar,
.dxm-panel-discipline > .cx-eod-handoff,
.dxm-panel-discipline > .dx-pre-expiry-bar {
  flex-shrink: 0;
  width: 100% !important;
  border-radius: 10px !important;
  box-sizing: border-box;
}

/* ── Discipline Mirror: full-width seamless embedding (kills double-nested borders & black side margins) ── */
body.dx-mobile-shell #dxStandingSection,
body.dx-mobile-shell .dx-standing-section {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

body.dx-mobile-shell .dx-standing-label {
  display: none !important;
}

body.dx-mobile-shell .bx-mv2-wrap {
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.dx-mobile-shell .dm-mirror-page {
  padding: 0 !important;
  width: 100% !important;
  margin: 0 !important;
}

body.dx-mobile-shell .dm-jump-nav {
  margin: 0 0 12px 0 !important;
  padding: 6px 4px 8px !important;
  gap: 6px !important;
  width: 100% !important;
  border-radius: 12px !important;
  background: rgba(10, 16, 28, 0.95) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-sizing: border-box !important;
}

body.dx-mobile-shell .dm-jump-btn {
  font-size: 11.5px !important;
  padding: 10px 14px !important;
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

body.dx-mobile-shell .dm-zone {
  width: 100% !important;
  margin-bottom: 16px !important;
  box-sizing: border-box !important;
}

body.dx-mobile-shell .dm-hero {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 18px 14px 16px !important;
  border-radius: 18px !important;
  margin: 0 0 14px 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 12px 36px -12px var(--dm-tone-g, rgba(14,203,129,.28)), 0 1px 0 rgba(255,255,255,0.08) inset !important;
}

body.dx-mobile-shell .dm-hero-l {
  width: 100% !important;
}

body.dx-mobile-shell .dm-hero-verdict {
  font-size: 34px !important;
  letter-spacing: -1px !important;
  line-height: 1.1 !important;
}

body.dx-mobile-shell .dm-hero-meta {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 6px !important;
  width: 100% !important;
}

body.dx-mobile-shell .dm-hero-meta-item {
  padding: 8px 6px !important;
  border-radius: 10px !important;
  text-align: center;
}

body.dx-mobile-shell .dm-hero-share-wrap {
  width: 100% !important;
  margin-top: 14px !important;
}

body.dx-mobile-shell .dm-hero-share-wrap .dx-share-affordance {
  width: 100% !important;
  display: flex !important;
  gap: 8px !important;
}

body.dx-mobile-shell .dm-hero-share-wrap .dx-share-btn {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  padding: 10px 8px !important;
  font-size: 11px !important;
}

body.dx-mobile-shell #dxCompanion {
  margin: 0 0 12px 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

body.dx-mobile-shell .dxc-card {
  padding: 14px 14px !important;
  border-radius: 14px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* ── Analytics / Highlights / Charts: simple vertical stack ────────────── */
.dxm-panel-analytics > *,
.dxm-panel-highlights > *,
.dxm-panel-charts > * {
  flex-shrink: 0;
}

/* Analytics tab: `.prox-card`/`.card-analytics` get a `max-height:380px;
   overflow:hidden` cap from style.css that's normally neutralized by
   `.stats-grid > .card { min-height:416px!important }` (min-height > max-height
   makes max-height inert). That scoped rule no longer matches once relocated,
   so the cap bites for real and clips the last section of each card (ATM Theta
   tile / Walls & Spot Channel). Lift the cap here. */
.dxm-panel-analytics > .prox-card,
.dxm-panel-analytics > .card-analytics {
  max-height: none !important;
  overflow: visible !important;
}

/* Charts tab: let the relocated candle card breathe to fill the panel */
.dxm-panel-charts > .nd-card {
  display: flex;
  flex-direction: column;
  min-height: 60vh;
}
.dxm-panel-charts > .nd-card .nd-chart {
  flex: 1 1 auto;
  min-height: 360px;
}

/* The mobile header stack (title row, then 2x2 index pills) is normally
   scoped to `.nd-ocs-row .nd-head`, which no longer matches once relocated —
   `.nd-head` falls back to its row layout while `#ndPills` still gets
   `width:100%`, overflowing and getting clipped by `.nd-card{overflow:hidden}`.
   Restore the stacked layout here (mirrors dashboard.css ~9085-9094). */
.dxm-panel-charts .nd-head {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 8px !important;
  padding: 10px 12px !important;
}
.dxm-panel-charts .nd-head-l {
  justify-content: space-between !important;
  width: 100% !important;
}

/* Highlights tab: option-chain card shouldn't force desktop min-widths */
.dxm-panel-highlights > .ocs-card {
  overflow-x: auto;
}

/* #chartPanelL's toolbar row layout + compact pill sizing is normally scoped
   to `.charts-row > .chart-card`, which no longer matches once relocated.
   Restore it here (mirrors dashboard.css ~3628-3690). */
.dxm-panel-highlights #chartPanelL > .chart-controls-row {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  /* 14px inset so "NIFTY OI Flow" + the ⛶ don't sit flush against the card
     edge. The inset normally comes from `.charts-row > .chart-card >
     .chart-controls-row { padding:0 14px }` — dead once relocated, and
     `.nd-card` forces card padding:0. (The #chartPanelL ::after line-break +
     order:1 pills from dashboard.css @980px still give the title/pills split.) */
  padding: 10px 14px 6px !important;
  margin: 0 !important;
  gap: 4px !important;
  row-gap: 6px !important;
  min-height: 0 !important;
  overflow: visible !important;
}
.dxm-panel-highlights #chartPanelL .chart-tab,
.dxm-panel-highlights #chartPanelL .oiflow-pill {
  min-height: 0 !important;
  height: auto !important;
  line-height: 1.1 !important;
}
.dxm-panel-highlights #chartPanelL .chart-tab {
  padding: 4px 8px !important;
  font-size: 10px !important;
}
.dxm-panel-highlights #chartPanelL .oiflow-pill {
  padding: 2px 5px !important;
  font-size: 9px !important;
  min-width: 0 !important;
  letter-spacing: 0 !important;
  border-radius: 3px !important;
}
.dxm-panel-highlights #chartPanelL .oiflow-pill.active,
.dxm-panel-highlights #chartPanelL .chart-tab.active {
  background: #26a69a !important;
  border-color: #26a69a !important;
  color: #0a0f1e !important;
  font-weight: 700 !important;
}

/* ⛶ maximize (+ ⟲ reset) — the desktop `.nd-tool` is tiny (padding 1px 6px),
   awkward to tap on a phone. Give it a clean, square touch target. Sits at the
   right end of the OI Flow title row / the Spot+Walls footer. */
.dxm-panel-highlights #chartPanelL #oiFlowMax,
.dxm-panel-highlights #chartPanelR .nd-tool {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 28px !important;
  min-height: 26px !important;
  padding: 3px 7px !important;
  font-size: 13px !important;
  border-radius: 6px !important;
}

/* Footer legend — `.chart-footer`'s flex layout is `.charts-row`-scoped, so the
   relocated #oiFlowLegend / #chartSubtitleR fall back to block flow and stack
   the title + each of the 4 swatches on its own line (the "5 lines" look).
   Restore a horizontal, wrapping legend with a matching 14px inset. */
.dxm-panel-highlights #chartPanelL .chart-footer,
.dxm-panel-highlights #chartPanelR .chart-footer {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 4px 12px !important;
  margin: 0 !important;
  padding: 8px 14px !important;
  border-top: 1px solid var(--border) !important;
  font-size: 9px;
  letter-spacing: .4px;
  line-height: 1.2;
  color: var(--muted);
}
/* "CHANGE IN OI FLOW" on its own line; the swatches wrap below it — 2 compact
   rows instead of 5. */
.dxm-panel-highlights #chartPanelL .chart-footer .chart-footer-title {
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  opacity: .9;
  margin-bottom: 1px;
}

/* Chart area — drop the base `.chart-container` border/box (it's stripped on
   desktop via the now-unmatched `.charts-row` scope) so the canvas sits flush
   inside the card instead of in a nested bordered well. */
.dxm-panel-highlights #chartPanelL .chart-container {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Maximize (.nd-fs): the chart-area growth rule is normally scoped to
   `.charts-row > .chart-card.nd-fs > .chart-container`, which no longer
   matches once relocated — `.chart-container` keeps its global 340px height
   (style.css), so the canvas resizes to that small box instead of filling the
   fullscreen overlay (looks frozen/"stuck"). Restore the growth here, covering
   both the highlights panel location and the portal (see #dxm-fs-portal). */
.dxm-panel-highlights #chartPanelL.nd-fs .chart-container,
.dxm-panel-highlights #chartPanelR.nd-fs .chart-container,
#dxm-fs-portal #chartPanelL.nd-fs .chart-container,
#dxm-fs-portal #chartPanelR.nd-fs .chart-container {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  flex: 1 1 auto !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   FULLSCREEN PORTAL — escapes .dxm-main stacking context so maximized charts
   paint above the header and bottom nav (z-index: 900 > header/nav z-index: 2).
   Charts are moved here via JS on enlargePanel / _maximize and restored on
   minimizePanel / _minimize (chartEngine.js, niftyDaily.js).
   ───────────────────────────────────────────────────────────────────────────── */
#dxm-fs-portal {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
}
#dxm-fs-portal:not(:empty) {
  pointer-events: auto;
}

/* ── Portal: restore rules lost when panels leave their ancestor context ──── */

#dxm-fs-portal .chart-card {
  padding-top: calc(8px + env(safe-area-inset-top, 0px)) !important;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
  height: 100% !important;
  box-sizing: border-box !important;
}

/* 1. Keep the legacy fs-bar hidden — close is via the ⛶→✕ button. */
#dxm-fs-portal .chart-card > .chart-fs-bar {
  display: none !important;
}

/* 2. OI Flow controls row (chartPanelL): undo style.css @media(680px)
      flex-direction:column. The 2-row layout (title row / pills row) is
      driven by dashboard.css #chartPanelL rules that scope to the element
      directly, so they still apply in the portal — we only need to restore
      flex-direction and the 14px padding. */
#dxm-fs-portal #chartPanelL > .chart-controls-row {
  flex-direction: row !important;
  padding: 0 14px !important;
}

/* Kill the 44px touch-target min-height (style.css @media(768px)) for OI
   Flow pills/tab — same override as .dxm-panel-highlights context. */
#dxm-fs-portal #chartPanelL .chart-tab,
#dxm-fs-portal #chartPanelL .oiflow-pill {
  min-height: 0 !important;
  height: auto !important;
  line-height: 1.1 !important;
}
#dxm-fs-portal #chartPanelL .chart-tab {
  padding: 6px 10px !important;
  font-size: 11px !important;
  min-height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
}
#dxm-fs-portal #chartPanelL .oiflow-pill {
  padding: 6px 9px !important;
  font-size: 11px !important;
  min-height: 32px !important;
  min-width: 0 !important;
  letter-spacing: 0 !important;
  border-radius: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  position: relative !important;
}
#dxm-fs-portal #chartPanelL .oiflow-pill::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
}
#dxm-fs-portal #chartPanelL .oiflow-pill.active {
  background: #26a69a !important;
  border-color: #26a69a !important;
  color: #0a0f1e !important;
  font-weight: 700 !important;
}

/* 3. Footer: push to bottom of the flex column and restore spacing. */
#dxm-fs-portal .chart-card .chart-footer {
  margin: auto 0 0 0 !important;
  padding: 6px 14px 0 14px !important;
  border-top: 1px solid var(--border) !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap;
  gap: 14px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   BOTTOM NAV — glass, red glow (dx-navglass)
   ───────────────────────────────────────────────────────────────────────────── */
.dxm-bottomnav {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(10, 16, 28, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.4);
}

.dxm-nav-btn {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 48px;
  padding: 4px 6px;
  background: none;
  border: none;
  color: var(--dxm-text-dim, #8595ad);
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  touch-action: manipulation;
  transition: color 0.15s ease, transform 0.12s ease;
}
.dxm-nav-btn:active {
  transform: scale(0.95);
}

.dxm-nav-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 32px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.18s cubic-bezier(.2,.8,.2,1), box-shadow 0.15s ease;
}

.dxm-nav-label {
  transition: color 0.15s ease;
}

.dxm-nav-btn.dxm-nav-active {
  color: var(--gold, #E8A33D);
}
.dxm-nav-btn.dxm-nav-active .dxm-nav-chip {
  transform: scale(1.06);
  background: linear-gradient(135deg, rgba(232, 163, 61, 0.25), rgba(232, 163, 61, 0.08));
  border-color: rgba(232, 163, 61, 0.5);
  box-shadow: 0 0 18px -2px rgba(232, 163, 61, 0.45);
}
.dxm-nav-btn.dxm-nav-active .dxm-nav-label {
  color: var(--gold, #E8A33D);
  font-weight: 700;
}

/* ─────────────────────────────────────────────────────────────────────────────
   ACCOUNT SHEET — avatar-triggered slide-up (replaces the old "You" tab).
   Holds the relocated #headerProfileName dropdown + Invite promo + support/SEBI.
   ───────────────────────────────────────────────────────────────────────────── */
.dxm-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 940;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.dxm-sheet-backdrop.dxm-sheet-open {
  opacity: 1;
  pointer-events: auto;
}

.dxm-account-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 950;
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  background: rgba(10, 16, 28, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -18px 44px -12px rgba(0,0,0,0.7);
  transform: translateY(100%);
  visibility: hidden;
  transition: transform 0.32s cubic-bezier(.2,.8,.2,1), visibility 0.32s;
  background: #0B1220 !important;
  border-top-left-radius: 20px !important;
  border-top-right-radius: 20px !important;
  border-top: 1px solid rgba(148,163,184,.28) !important;
  height: 88%;
  max-height: 88vh;
  box-shadow: 0 -20px 48px rgba(0,0,0,0.7);
}
.dxm-account-sheet.dxm-sheet-open {
  transform: none;
  visibility: visible;
}
.dxm-sheet-grip {
  width: 40px !important;
  height: 4px !important;
  border-radius: 2px !important;
  background: rgba(148, 163, 184, 0.28) !important;
  margin: 10px auto 4px;
  flex-shrink: 0;
}
.dxm-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px 8px;
  flex-shrink: 0;
}
.dxm-sheet-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--dxm-text, #EEF2F7);
}
.dxm-sheet-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(148,163,184,.28);
  background: var(--dxm-inset, #141D2E);
  color: var(--text-secondary, #A7B1C2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.12s ease, background 0.15s ease;
  padding: 0;
}
.dxm-sheet-close:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.1);
}
.dxm-sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  flex: 1;
}

/* ── Me Sheet Profile Hero ── */
.dxm-prof {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 2px 10px;
}
.dxm-prof-av {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--dxm-inset, #141D2E);
  border: 1px solid rgba(148,163,184,.28);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--text-secondary, #A7B1C2);
  font-size: 16px;
  flex-shrink: 0;
}
.dxm-prof-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
.dxm-prof-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--dxm-text, #EEF2F7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dxm-prof-plan {
  font-size: 13px;
  color: var(--text-secondary, #A7B1C2);
}
.dxm-prof-up {
  margin-left: auto;
  font-size: 14px;
  font-weight: 700;
  color: var(--on-gold, #1A1305);
  background: var(--dxm-accent, #E8A33D);
  border-radius: 10px;
  padding: 9px 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Me Sheet Section Labels & Grouped Lists ── */
.dxm-sec {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dxm-muted, #8290A6);
  font-weight: 600;
  padding: 12px 4px 6px;
}
.dxm-list {
  background: var(--dxm-card, #0F1624);
  border: 1px solid rgba(148,163,184,.16);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 12px;
}
.dxm-it {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 52px;
  font-size: 15px;
  color: var(--dxm-text, #EEF2F7);
  text-decoration: none;
  border: none;
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.12s ease;
}
.dxm-it:active {
  background: rgba(255, 255, 255, 0.04);
}
.dxm-it > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dxm-list .dxm-it + .dxm-it {
  border-top: 1px solid rgba(148,163,184,.16);
}
.dxm-it-val {
  margin-left: auto;
  color: var(--dxm-muted, #8290A6);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 auto;
}
.dxm-it-val.ok {
  color: var(--pos, #3FB984) !important;
  font-weight: 600;
}
.dxm-it-val.warn {
  color: var(--dxm-accent, #E8A33D) !important;
  font-weight: 600;
}
.dxm-chev {
  color: var(--dxm-muted, #8290A6);
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.dxm-profile-preserved {
  display: none !important;
}

/* ── Messages View (inside Me sheet) ── */
.dxm-messages-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0 12px;
  border-bottom: 1px solid rgba(148,163,184,.16);
  margin-bottom: 8px;
}
.dxm-messages-back {
  background: transparent;
  border: none;
  color: var(--text-secondary, #A7B1C2);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px 4px 0;
  font-family: inherit;
}
.dxm-messages-back:active {
  opacity: 0.7;
}
.dxm-messages-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--dxm-text, #EEF2F7);
}
.dxm-messages-sub {
  margin-left: auto;
  font-size: 13px;
  color: var(--dxm-muted, #8290A6);
}
.dxm-messages-body {
  display: flex;
  flex-direction: column;
}
.dxm-msg {
  padding: 12px 16px;
}
.dxm-list .dxm-msg + .dxm-msg {
  border-top: 1px solid rgba(148,163,184,.16);
}
.dxm-msg-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--dxm-text, #EEF2F7);
}
.dxm-msg-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dxm-accent, #E8A33D);
  flex-shrink: 0;
}
.dxm-msg-time {
  margin-left: auto;
  font-size: 12px;
  color: var(--dxm-muted, #8290A6);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.dxm-msg-body {
  font-size: 14px;
  color: var(--text-secondary, #A7B1C2);
  margin-top: 4px;
  line-height: 1.4;
}
.dxm-msg-channel {
  font-size: 11px;
  color: var(--dxm-muted, #8290A6);
  margin-top: 6px;
}
.dxm-msg-empty {
  padding: 36px 16px;
  text-align: center;
  color: var(--dxm-muted, #8290A6);
}
.dxm-msg-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--dxm-text, #EEF2F7);
  margin-bottom: 6px;
}
.dxm-msg-empty-sub {
  font-size: 13px;
  color: var(--dxm-muted, #8290A6);
  line-height: 1.45;
  max-width: 290px;
  margin: 0 auto;
}
.dxm-msg-loading {
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--dxm-muted, #8290A6);
}

/* ── Regulatory Notice (Me sheet) ── */
.dxm-you-sebi {
  padding: 16px 4px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dxm-you-sebi-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8290A6;
}
.dxm-you-sebi-body {
  font-size: 12px;
  line-height: 1.5;
  color: #8290A6;
}
.dxm-you-sebi-copy {
  font-size: 11px;
  color: #8290A6;
  margin-top: 4px;
}

/* ── Record Room Shell ── */
.dxm-panel-record {
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.dxm-record-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dxm-record-shell .dxm-record-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--dxm-text, #EEF2F7);
  margin-bottom: 8px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   GLASS + REVEAL — glossy edge/top-sheen + staggered card entrance (plan §7)
   ───────────────────────────────────────────────────────────────────────────── */
@keyframes dxmRevealIn { from { transform: translateY(10px); } to { transform: none; } }

.dxm-reveal {
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 14px 30px -12px rgba(0,0,0,.6);
  animation: dxmRevealIn .55s cubic-bezier(.2,.8,.2,1) both;
}
.dxm-reveal::before {
  content: '';
  position: absolute;
  left: 7px; right: 7px; top: 0;
  height: 13px;
  border-radius: 16px 13px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,0));
  pointer-events: none;
}
body.dx-mobile-shell.light-theme .dxm-reveal {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 0 0 1px rgba(255,255,255,.4), 0 12px 26px -12px rgba(120,108,92,.28);
}
body.dx-mobile-shell.light-theme .dxm-reveal::before {
  background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,0));
}

.dxm-panel-active > .dxm-reveal:nth-child(1) { animation-delay: .03s; }
.dxm-panel-active > .dxm-reveal:nth-child(2) { animation-delay: .11s; }
.dxm-panel-active > .dxm-reveal:nth-child(3) { animation-delay: .19s; }
.dxm-panel-active > .dxm-reveal:nth-child(4) { animation-delay: .27s; }
.dxm-panel-active > .dxm-reveal:nth-child(5) { animation-delay: .35s; }

/* Same stagger, one level deeper — the four ex-tab cards are .dxm-subpanel
   children now (Build 3), not direct .dxm-panel children. */
.dxm-subpanel-active > .dxm-reveal:nth-child(1) { animation-delay: .03s; }
.dxm-subpanel-active > .dxm-reveal:nth-child(2) { animation-delay: .11s; }
.dxm-subpanel-active > .dxm-reveal:nth-child(3) { animation-delay: .19s; }
.dxm-subpanel-active > .dxm-reveal:nth-child(4) { animation-delay: .27s; }
.dxm-subpanel-active > .dxm-reveal:nth-child(5) { animation-delay: .35s; }

/* Bottom nav — luxury obsidian glass */
.dxm-navglass {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 -12px 32px rgba(0,0,0,.6);
}
.dxm-navglass::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 163, 61, 0.4), rgba(46, 230, 160, 0.4), transparent);
  pointer-events: none;
}
body.dx-mobile-shell.light-theme .dxm-navglass {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 -12px 32px rgba(0,0,0,.08);
}
body.dx-mobile-shell.light-theme .dxm-navglass::before {
  background: linear-gradient(90deg, transparent, rgba(232, 163, 61, 0.2), transparent);
}

/* ─────────────────────────────────────────────────────────────────────────────
   PRESS + REDUCED MOTION
   ───────────────────────────────────────────────────────────────────────────── */
.dxm-shell button:active {
  transform: scale(0.96);
}

@media (prefers-reduced-motion: reduce) {
  .dxm-shell * {
    transition: none !important;
    animation-duration: 0.01ms !important;
  }
  /* `.dxm-shell *` matches elements only — animation-duration is not an
     inherited property, so it never reaches ::before/::after. The Broadcast
     button's two animated pseudo-surfaces have to be named explicitly or
     they keep running: the sonar bloom pings on every spoken word, and the
     status dot's glow.
     The button element itself needs naming too: `.dxm-shell *` loses the
     cascade to `.on`'s `animation: … !important` shorthand (id + 2 classes
     beats one class + universal), so the ring pan survives that rule. Killed
     here to match desktop's own reduced-motion block (dashboard.css ~5675,
     which does `.dn-voice-btn.on { animation: none }`). */
  body.dx-mobile-shell #c3VoiceBtn.dn-voice-btn,
  body.dx-mobile-shell #c3VoiceBtn.dn-voice-btn.on,
  body.dx-mobile-shell #c3VoiceBtn.dn-voice-btn::after,
  body.dx-mobile-shell #c3VoiceBtn.dn-voice-btn::before {
    animation: none !important;
    transition: none !important;
  }
  .dxm-reveal {
    transform: none;
    animation: none;
  }
  .dxm-tape-marquee {
    animation: none;
    transform: none;
  }
  .dxm-tape-marquee > .dxm-tape-track[aria-hidden] {
    display: none;
  }
}

/* ── Mobile Scroll-Lock when sheets or modals are open ───────────────────────── */
.dxm-scroll-locked {
  overflow: hidden !important;
  touch-action: none !important;
}

/* ── Mobile Bottom Sheet adaptation for Daily Check-In Modal ─────────────────── */
body.dx-mobile-shell #cxCheckInModal .cx-checkin-dialog,
@media (max-width: 768px) {
  #cxCheckInModal .cx-checkin-dialog {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    max-width: 100% !important;
    width: 100% !important;
    max-height: 88dvh !important;
    border-radius: 20px 20px 0 0 !important;
    border-bottom: none !important;
    padding-bottom: max(16px, env(safe-area-inset-bottom, 16px)) !important;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.6) !important;
  }
}

/* ── Floating "Active Session" anchor in Discipline Room ─────────────────────── */
.dxm-scroll-anchor {
  position: fixed;
  bottom: calc(var(--dxm-bottom-nav-h, 60px) + env(safe-area-inset-bottom, 0px) + 14px);
  right: 16px;
  z-index: 95;
  background: rgba(14, 18, 27, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(232, 163, 61, 0.4);
  color: #F5CB6B;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  touch-action: manipulation;
}
.dxm-scroll-anchor.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.dxm-scroll-anchor:active {
  transform: scale(0.94);
}

/* ── iOS PWA Add to Home Screen tip in Account Sheet ─────────────────────────── */
.dxm-ios-install-card {
  margin: 12px 16px;
  padding: 12px 14px;
  background: rgba(232, 163, 61, 0.08);
  border: 1px solid rgba(232, 163, 61, 0.28);
  border-radius: 12px;
}
.dxm-ios-install-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: #F5CB6B;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}
.dxm-ios-install-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--dxm-dim, #94a3b8);
  line-height: 1.5;
}
.dxm-ios-install-sub b {
  color: #fff;
}

/* ── Light-theme adaptations for Me Sheet, Header, and Record Shell ── */
body.dx-mobile-shell.light-theme .dxm-header {
  background: rgba(250, 246, 239, 0.96);
  border-bottom-color: rgba(26, 22, 18, 0.12);
}
body.dx-mobile-shell.light-theme .dxm-brand {
  color: #1a1612;
}
body.dx-mobile-shell.light-theme .dxm-me-btn {
  background: rgba(26, 22, 18, 0.05);
  border-color: rgba(26, 22, 18, 0.15);
  color: #5a5550;
}
body.dx-mobile-shell.light-theme .dxm-me-dot {
  border-color: #FAF6EF;
}
body.dx-mobile-shell.light-theme .dxm-account-sheet {
  background: #FAF6EF !important;
  border-top-color: rgba(26, 22, 18, 0.18) !important;
}
body.dx-mobile-shell.light-theme .dxm-sheet-grip {
  background: rgba(0, 0, 0, 0.2) !important;
}
body.dx-mobile-shell.light-theme .dxm-sheet-title {
  color: #1a1612;
}
body.dx-mobile-shell.light-theme .dxm-sheet-close {
  background: rgba(26, 22, 18, 0.05);
  border-color: rgba(26, 22, 18, 0.15);
  color: #5a5550;
}
body.dx-mobile-shell.light-theme .dxm-prof-av {
  background: rgba(26, 22, 18, 0.05);
  border-color: rgba(26, 22, 18, 0.15);
  color: #5a5550;
}
body.dx-mobile-shell.light-theme .dxm-prof-name {
  color: #1a1612;
}
body.dx-mobile-shell.light-theme .dxm-list {
  background: #ffffff;
  border-color: rgba(26, 22, 18, 0.12);
}
body.dx-mobile-shell.light-theme .dxm-it {
  color: #1a1612;
}
body.dx-mobile-shell.light-theme .dxm-list .dxm-it + .dxm-it {
  border-top-color: rgba(26, 22, 18, 0.08);
}
body.dx-mobile-shell.light-theme .dxm-messages-title {
  color: #1a1612;
}
body.dx-mobile-shell.light-theme .dxm-msg-top {
  color: #1a1612;
}
body.dx-mobile-shell.light-theme .dxm-record-shell .dxm-record-title {
  color: #1a1612;
}



/* ═════════════════════════════════════════════════════════════════════════════
   PHASE 1 · landscape phones (pointer:coarse + max-height:500px)
   Mirrors the second clause of MOBILE_SHELL_QUERY (config/constants.js). The
   header, demo bar and bottom nav together used to eat ~210px of a 390px-tall
   screen; compact them so the panel gets the room.
   ═════════════════════════════════════════════════════════════════════════════ */
@media (pointer: coarse) and (max-height: 500px) {
  :root { --dx-demo-bar-h: 26px; }
  .dxm-header { min-height: 48px; padding-top: calc(3px + env(safe-area-inset-top, 0px)); padding-bottom: 3px; }
  .dxm-header-text { flex-direction: row; align-items: baseline; gap: 10px; }
  body.dx-demo .dxm-header { padding-top: 3px; }
  .dxm-bottomnav { padding-top: 2px; padding-bottom: calc(2px + env(safe-area-inset-bottom, 0px)); }
  .dxm-nav-btn { flex-direction: row; gap: 8px; min-height: 44px; padding: 2px 6px; }
  .dxm-nav-chip { width: 34px; height: 28px; }
  /* the AIR mentor card etc. keep their natural flow; only chrome is trimmed */
  .dxm-panel { overscroll-behavior: contain; }

  /* Today in landscape: ≥2 content rows above the nav. Demo bar, header and day strip shrink; the stage keeps
     its headline and evidence and drops the eyebrow and the quiet sub-line (never the cooldown timer). */
  .dx-demo-bar { gap: 8px; }
  .dxm-header { min-height: 44px; padding-top: 2px; padding-bottom: 2px; }
  body.dx-demo.dx-mobile-shell .dxm-header { padding-top: 2px; }
  .dxm-logo { width: 26px; height: 26px; }
  .dxm-brand { font-size: 15px; }
  body.dx-mobile-shell #dxJourneyRail { margin: 0 0 6px 0; padding: 5px 12px; }
  :is(#dxCompanion, #dxmPanel-discipline) .dxt-hero > .dxt-eyebrow,
  :is(#dxCompanion, #dxmPanel-discipline) .dxt-hero > .dxt-sub:not(:has(#dxtCoolLeft)) { display: none; }
  :is(#dxCompanion, #dxmPanel-discipline) .dxt-hero { margin-bottom: 10px; }
  :is(#dxCompanion, #dxmPanel-discipline) .dxt-plan { font-size: 24px; line-height: 1.15; }
  :is(#dxCompanion, #dxmPanel-discipline) .dx-ans { min-height: 48px; }
}


/* ═════════════════════════════════════════════════════════════════════════════
   Market Analytics / Highlights type floor (phone and landscape phone): nothing
   under 11px. The tape, the Price/OI/IV/flow modules and the option-chain strip
   were authored at 7 to 10.5px for the desktop; these !important rules beat the
   dashboard.css ones they shadow.
   ═════════════════════════════════════════════════════════════════════════════ */
body.dx-mobile-shell .dt-spot-val,
body.dx-mobile-shell .dt-vix-val,
body.dx-mobile-shell .dt-macro-val,
body.dx-mobile-shell .dt-flow-net,
body.dx-mobile-shell .dt-spot-change,
body.dx-mobile-shell .dt-vix-change,
body.dx-mobile-shell .dt-macro-chg,
body.dx-mobile-shell .dt-flow-sub,
body.dx-mobile-shell .dxm-tape-label,
body.dx-mobile-shell .dxm-tape-seg > span,
body.dx-mobile-shell .ph-mod-eyebrow,
body.dx-mobile-shell .ph-bias-text,
body.dx-mobile-shell .ph-oi-k,
body.dx-mobile-shell .ph-oi-ratio-k,
body.dx-mobile-shell .ph-flow-k,
body.dx-mobile-shell .ph-wall-label,
body.dx-mobile-shell .ph-wall-tag,
body.dx-mobile-shell .ph-spot-sub,
body.dx-mobile-shell .ph-channel-end,
body.dx-mobile-shell .ti-mod-eyebrow,
body.dx-mobile-shell .ti-bias-text,
body.dx-mobile-shell .ti-mod-badge,
body.dx-mobile-shell .ti-iv-cell-k,
body.dx-mobile-shell .ti-iv-vs,
body.dx-mobile-shell .ti-iv-skewbar-end,
body.dx-mobile-shell .ti-iv-foot-k,
body.dx-mobile-shell .ti-tile-k,
body.dx-mobile-shell .ti-tile-sub,
body.dx-mobile-shell .ti-tile-foot,
body.dx-mobile-shell .ti-premium-leg,
body.dx-mobile-shell .thb-rate-unit,
body.dx-mobile-shell .thb-remain-k,
body.dx-mobile-shell .thb-remain-sub,
body.dx-mobile-shell .thb-cap,
body.dx-mobile-shell .thb-note,
body.dx-mobile-shell .flow-eyebrow,
body.dx-mobile-shell .flow-leg,
body.dx-mobile-shell .flow-foot-k,
body.dx-mobile-shell .flow-foot-v,
body.dx-mobile-shell .flow-foot-date,
body.dx-mobile-shell .dx-context-row-sub,
body.dx-mobile-shell .dx-context-card-eyebrow,
body.dx-mobile-shell .dx-context-footnote,
body.dx-mobile-shell .dx-context-sub-tag,
body.dx-mobile-shell .dx-side-pill,
body.dx-mobile-shell .dx-brokerage-prefix,
body.dx-mobile-shell .dx-cost-breakdown-row > span,
body.dx-mobile-shell .dx-breakdown-item > span,
body.dx-mobile-shell .dx-bullet,
body.dx-mobile-shell .dx-breakdown-toggle-arrow,
body.dx-mobile-shell .dx-event-upcoming-head,
body.dx-mobile-shell .dx-event-date,
body.dx-mobile-shell .dx-event-tag,
body.dx-mobile-shell .dx-event-title,
body.dx-mobile-shell .ocs-title,
body.dx-mobile-shell .ocs-snap,
body.dx-mobile-shell .ocs-legend-cell,
body.dx-mobile-shell .ocs-liq,
body.dx-mobile-shell .ocs-rc-title,
body.dx-mobile-shell .ocs-rc-theta { font-size: 11px !important; }
body.dx-mobile-shell text.nr-halo { font-size: 11px; }

/* OI pressure card on phones: the "52% P / C 48%" ratio stays on one line (the middle column is as wide as its text,
   the two OI values share what is left), and the card never outgrows the screen. */
body.dx-mobile-shell .ph-oi-grid { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important; gap: 8px !important; }
body.dx-mobile-shell .ph-oi-ratio { padding: 0 8px; }
body.dx-mobile-shell .ph-oi-ratio-v { white-space: nowrap !important; display: flex; flex-direction: column; align-items: center; line-height: 1.25; }
body.dx-mobile-shell .ph-oi-ratio-v .ph-pc-sep { display: none; }
body.dx-mobile-shell .ph-oi-k { letter-spacing: .6px; }
@media (max-width: 380px) { body.dx-mobile-shell .ph-oi-v { font-size: 26px !important; } }

/* Priced-move card (#dxCardPricedMove): the context grid is one column and every part shrinks to it. */
body.dx-mobile-shell .dx-context-row, body.dx-mobile-shell .dx-context-grid { min-width: 0; max-width: 100%; box-sizing: border-box; }
body.dx-mobile-shell .dx-context-grid { grid-template-columns: minmax(0, 1fr) !important; }
body.dx-mobile-shell .dx-context-card { min-width: 0; max-width: 100%; box-sizing: border-box; }
body.dx-mobile-shell .dx-context-card * { min-width: 0; max-width: 100%; }
body.dx-mobile-shell .dx-context-hero, body.dx-mobile-shell .dx-context-metric-row, body.dx-mobile-shell .dx-context-card-head, body.dx-mobile-shell .dx-context-card-foot { flex-wrap: wrap; }
