/* ═══ Shoofly Exec — MOBILE-FIRST layer ═══
   EVERY rule is double-scoped: this file is loaded via <link media="(max-width:768px)">
   AND every selector is under body.is-mobile. Desktop (≥769px / no is-mobile) NEVER matches. */
@media (max-width: 768px) {
  /* hide the entire desktop shell on phones */
  body.is-mobile .main-wrap,
  body.is-mobile #sideNav,
  body.is-mobile .sidebar,
  body.is-mobile #chatFloat,
  body.is-mobile #mo-fab,
  body.is-mobile #mo-panel,
  body.is-mobile #mo-backdrop,   /* a stray moOpen (Ctrl+M, auto-setup) must not leave a backdrop over the shell; the Mo tab mirrors the laptop instead */
  body.is-mobile .sw-wrap { display: none !important; }
  body.is-mobile { overflow: hidden; }

  #mobileRoot { display: none; }
  body.is-mobile #mobileRoot {
    display: flex; flex-direction: column;
    position: fixed; inset: 0; z-index: 60;
    background: var(--bg, #08080a); color: var(--text, #fff);
    height: 100vh; height: 100dvh;   /* dvh last so iOS uses it (2026-10-08) */
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, sans-serif;
  }

  /* header */
  body.is-mobile .m-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: calc(env(safe-area-inset-top) + 10px) 16px 10px; gap: 10px;
    border-bottom: 1px solid var(--border); background: var(--card); flex-shrink: 0;
  }
  body.is-mobile .m-logo { height: 20px; width: auto; object-fit: contain; }
  body.is-mobile .m-head-r { display: flex; align-items: center; gap: 10px; }
  body.is-mobile .m-role { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--gold); background: rgba(244,184,68,.12); padding: 3px 9px; border-radius: 99px; }
  body.is-mobile .m-iconbtn { background: none; border: none; color: var(--muted); font-size: 17px; cursor: pointer; padding: 4px; }

  /* scroll area */
  /* one scroller per tab (2026-10-28): #mScroll holds My Today, Needs you, the clients strip, #mMain and the personal cards, so
     nothing on the landing tab can squeeze the home any more. #mMain is plain flow inside it; 16px side gutters. */
  body.is-mobile .m-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  body.is-mobile .m-main { padding: 14px 16px 0; }

  /* bottom nav */
  body.is-mobile .m-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
    display: flex; justify-content: space-around; align-items: stretch;
    background: var(--card); border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
  }
  body.is-mobile .m-nav-b { flex: 1; background: none; border: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 2px 8px; cursor: pointer; min-height: 52px; }
  body.is-mobile .m-nav-b .i { font-size: 19px; line-height: 1; }
  body.is-mobile .m-nav-b .l { font-size: 9.5px; font-weight: 700; }
  body.is-mobile .m-nav-b.on { color: var(--gold); }

  /* sections + cards */
  body.is-mobile .m-sec { display: flex; align-items: baseline; justify-content: space-between; margin: 16px 2px 9px; font-size: 13px; font-weight: 800; color: var(--text); }
  body.is-mobile .m-sec:first-child { margin-top: 2px; }
  body.is-mobile .m-sec-r, body.is-mobile .m-sec .m-link { font-size: 11px; font-weight: 600; color: var(--muted); }
  body.is-mobile .m-link { color: var(--gold); }
  body.is-mobile .m-card { background: var(--card); border: 1px solid var(--border); border-radius: 13px; padding: 14px; margin-bottom: 11px; }
  body.is-mobile .m-empty { background: var(--card); border: 1px solid var(--border); border-radius: 13px; padding: 24px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.6; }
  body.is-mobile .m-empty.sm, body.is-mobile .m-load.sm { padding: 14px; font-size: 12px; }
  body.is-mobile .m-load { padding: 28px; text-align: center; color: var(--muted); font-size: 13px; }

  /* ── Mo call mirror tab (2026-10-03): phone as second screen ───────────────────────── */
  body.is-mobile .m-mo-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 4px 2px 8px; }
  body.is-mobile .m-mo-title { font-size: 16px; font-weight: 800; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.is-mobile .m-mo-clock { font-size: 16px; font-weight: 800; color: var(--teal, #0fa5a2); font-variant-numeric: tabular-nums; flex: none; }
  body.is-mobile .m-mo-ph { display: flex; gap: 3px; margin: 0 0 12px; }
  body.is-mobile .m-mo-ph .seg { flex: 1; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: 9px; background: var(--card); border: 1px solid var(--border); color: var(--muted); font-size: 11px; font-weight: 800; }
  body.is-mobile .m-mo-ph .seg .n { font-size: 14px; }
  body.is-mobile .m-mo-ph .seg .nm { font-size: 10px; font-weight: 700; letter-spacing: .02em; }
  body.is-mobile .m-mo-ph .seg .t { font-size: 10px; opacity: .85; font-variant-numeric: tabular-nums; }
  body.is-mobile .m-mo-ph .seg.done { color: var(--teal, #0fa5a2); border-color: color-mix(in srgb, var(--teal, #0fa5a2) 45%, transparent); }
  body.is-mobile .m-mo-ph .seg.active { background: var(--teal, #0fa5a2); border-color: var(--teal, #0fa5a2); color: #fff; }
  body.is-mobile .m-mo-ph .seg.active.over { background: var(--amber, #f59e0b); border-color: var(--amber, #f59e0b); color: #1e1b18; }
  body.is-mobile .m-mo-stage { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 22px 18px; margin-bottom: 12px; text-align: center; min-height: 38dvh; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
  body.is-mobile .m-mo-script { font-size: 16px; font-weight: 800; color: var(--green, #3dd68c); opacity: .9; }
  body.is-mobile .m-mo-say { font-size: 2rem; line-height: 1.3; font-weight: 800; color: var(--text); letter-spacing: -.01em; text-wrap: balance; }
  body.is-mobile .m-mo-say.mo-long { font-size: 1.6rem; } body.is-mobile .m-mo-say.mo-xlong { font-size: 1.3rem; line-height: 1.4; } /* never cut the SAY line (2026-10-22) */
  body.is-mobile .m-mo-reply { font-size: 17px; line-height: 1.5; color: var(--text); text-align: left; white-space: pre-wrap; }
  body.is-mobile .m-mo-ask { font-size: 1.2rem; line-height: 1.35; font-weight: 800; color: var(--teal, #0fa5a2); }
  body.is-mobile .m-mo-why { font-size: 16px; color: var(--muted); font-style: italic; }
  body.is-mobile .m-mo-bant { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; font-size: 14px; font-weight: 800; color: var(--muted); }
  body.is-mobile .m-mo-b { padding: 4px 8px; border-radius: 8px; background: color-mix(in srgb, var(--muted) 12%, transparent); }
  body.is-mobile .m-mo-b.ok { color: var(--green, #3dd68c); }
  body.is-mobile .m-mo-b.mid { color: var(--amber, #f59e0b); }
  body.is-mobile .m-mo-b.bad { color: var(--red, #ef4444); }
  body.is-mobile .m-mo-conf { margin-left: auto; color: var(--text); }
  body.is-mobile .m-mo-path { color: var(--teal, #0fa5a2); }
  body.is-mobile .m-mo-foot { padding: 12px 2px calc(12px + env(safe-area-inset-bottom)); font-size: 13px; color: var(--muted); text-align: center; }
  body.is-mobile .m-mo-empty { font-size: 16px; }

  /* KPI grid */
  body.is-mobile .m-kgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  body.is-mobile .m-kpi { background: var(--card); border: 1px solid var(--border); border-radius: 13px; padding: 13px 14px; }
  body.is-mobile .m-kpi .kl { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
  body.is-mobile .m-kpi .kv { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-top: 5px; }
  body.is-mobile .m-kpi .ks { font-size: 10.5px; color: var(--muted); margin-top: 3px; }

  /* delta strip */
  body.is-mobile .m-delta { font-size: 11px; color: var(--muted); margin-bottom: 10px; line-height: 1.9; }
  body.is-mobile .m-delta-chip { display: inline-block; font-weight: 700; padding: 2px 8px; border-radius: 99px; margin: 0 4px 4px 0; }
  body.is-mobile .m-delta-chip.good { color: #10b981; background: rgba(16,185,129,.12); }
  body.is-mobile .m-delta-chip.bad { color: #ef4444; background: rgba(239,68,68,.12); }

  /* AR aging */
  body.is-mobile .m-aging { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  body.is-mobile .m-aging .ac .l { font-size: 9.5px; text-transform: uppercase; color: var(--muted); }
  body.is-mobile .m-aging .ac .v { font-size: 16px; font-weight: 800; margin-top: 2px; }

  /* to-do rows */
  body.is-mobile .m-todo { display: flex; align-items: flex-start; gap: 10px; background: var(--card); border: 1px solid var(--border); border-radius: 11px; padding: 11px 12px; margin-bottom: 8px; }
  body.is-mobile .m-todo-st { background: none; border: none; font-size: 16px; line-height: 1.2; cursor: pointer; padding: 0; flex-shrink: 0; min-width: 24px; min-height: 24px; }
  body.is-mobile .m-todo-b { flex: 1; min-width: 0; }
  body.is-mobile .m-todo-b .t { font-size: 13px; line-height: 1.4; color: var(--text); }
  body.is-mobile .m-todo-b .a { font-size: 11px; color: var(--teal); margin-top: 3px; }
  body.is-mobile .m-todo-b .a.dim { color: var(--dim); }
  body.is-mobile .m-pri { font-size: 8.5px; font-weight: 800; margin-left: 6px; padding: 1px 5px; border-radius: 5px; vertical-align: middle; }
  body.is-mobile .m-pri.urgent { background: #c0392b; color: #fff; }
  body.is-mobile .m-pri.high { background: #e67e22; color: #fff; }
  /* age + department chips on a todo row (2026-10-04). Quiet by design: they are context for
     the title, not competing with the priority badge. */
  body.is-mobile .m-age { font-size: 8.5px; font-weight: 700; margin-left: 6px; padding: 1px 5px; border-radius: 5px; vertical-align: middle; background: transparent; color: var(--muted, #888); border: 1px solid var(--border, #333); }
  /* the pre-dispatch brief: exactly what the agent will receive, so it must be readable and must
     not silently truncate — scroll it rather than clip it. */
  body.is-mobile .m-brief:not(.m-card) { max-height: 40vh; overflow: auto; margin: 0 0 8px; padding: 10px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--fill, rgba(0,0,0,.04)); font: 500 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word; color: var(--text); }
  /* undo bar for Remove. Sits above the bottom nav and clears the phone's home-bar inset. */
  body.is-mobile .m-undo { position: fixed; left: 12px; right: 12px; bottom: calc(66px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border-radius: 11px; background: #1f2937; color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.3); font-size: 12.5px; }
  body.is-mobile .m-undo button { background: transparent; border: 0; color: #fbbf24; font-weight: 800; font-size: 12.5px; padding: 4px 2px; }
  /* Recently decided rows + status chips (approvals, 2026-10-04) */
  body.is-mobile .m-done { display: flex; align-items: center; gap: 8px; padding: 9px 4px; border-bottom: 1px solid var(--border); font-size: 12px; }
  body.is-mobile .m-done .t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
  body.is-mobile .m-done .w { flex: 0 0 auto; font-size: 10.5px; color: var(--muted); }
  body.is-mobile .m-stchip { flex: 0 0 auto; font-size: 8.5px; font-weight: 800; padding: 2px 6px; border-radius: 5px; text-transform: uppercase; letter-spacing: .03em; background: rgba(0,0,0,.06); color: var(--muted); }
  body.is-mobile .m-stchip.cleared, body.is-mobile .m-stchip.live, body.is-mobile .m-stchip.applied, body.is-mobile .m-stchip.decided { background: rgba(22,163,74,.14); color: #16a34a; }
  body.is-mobile .m-stchip.declined, body.is-mobile .m-stchip.rejected, body.is-mobile .m-stchip.blocked { background: rgba(248,97,90,.14); color: #f8615a; }
  /* approved and on the way (SEO pipeline stages, builds asked for changes, data change ran) — 2026-10-06 */
  body.is-mobile .m-stchip.approved, body.is-mobile .m-stchip.queued, body.is-mobile .m-stchip.building, body.is-mobile .m-stchip.preview, body.is-mobile .m-stchip.shipping { background: rgba(20,184,166,.15); color: #0d9488; }
  body.is-mobile .m-stchip.ran { background: rgba(22,163,74,.14); color: #16a34a; }
  body.is-mobile .m-stchip.changes, body.is-mobile .m-stchip.held, body.is-mobile .m-stchip.stalled { background: rgba(245,158,11,.15); color: #b45309; }
  /* the seven status words (2026-10-22, lib/status-words.mjs): Done / Approved green, Failed / Declined red, With teal, Waiting and Archived neutral */
  body.is-mobile .m-stchip.Done, body.is-mobile .m-stchip.Approved { background: rgba(22,163,74,.14); color: #16a34a; }
  body.is-mobile .m-stchip.Failed, body.is-mobile .m-stchip.Declined { background: rgba(248,97,90,.14); color: #f8615a; }
  body.is-mobile .m-stchip.With { background: rgba(20,184,166,.14); color: #0f766e; }
  /* Mo second screen: what Mo is using (2026-10-23) */
  body.is-mobile .m-mo-using { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px 0 8px; }
  body.is-mobile .m-mo-use { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 7px; background: rgba(0,0,0,.06); color: var(--muted); }
  body.is-mobile .m-dept { font-size: 8.5px; font-weight: 700; margin-left: 5px; padding: 1px 5px; border-radius: 5px; vertical-align: middle; background: transparent; color: var(--muted, #888); text-transform: uppercase; letter-spacing: .03em; }

  /* insight cards */
  body.is-mobile .m-ic { background: var(--card); border: 1px solid var(--border); border-left-width: 4px; border-radius: 11px; padding: 12px 13px; margin-bottom: 9px; }
  body.is-mobile .m-ic.sev-critical { border-left-color: #ef4444; } body.is-mobile .m-ic.sev-warning { border-left-color: #fbbf24; }
  body.is-mobile .m-ic.sev-positive { border-left-color: #10b981; } body.is-mobile .m-ic.sev-info { border-left-color: #3b82f6; }
  body.is-mobile .m-ic-h { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
  body.is-mobile .m-ic-h .dot { width: 8px; height: 8px; border-radius: 99px; flex-shrink: 0; }
  body.is-mobile .m-ic.sev-critical .dot { background: #ef4444; } body.is-mobile .m-ic.sev-warning .dot { background: #fbbf24; }
  body.is-mobile .m-ic.sev-positive .dot { background: #10b981; } body.is-mobile .m-ic.sev-info .dot { background: #3b82f6; }
  body.is-mobile .m-ic-h .t { font-size: 12.5px; font-weight: 800; flex: 1; }
  body.is-mobile .m-ic-ag { font-size: 9px; font-weight: 800; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: var(--card2); color: var(--muted); }
  body.is-mobile .m-ic-b { font-size: 12px; line-height: 1.5; color: var(--text); opacity: .92; }
  body.is-mobile .m-ic-a { font-size: 11.5px; color: var(--gold); margin-top: 6px; font-weight: 600; }

  /* health banner */
  body.is-mobile .m-health { display: flex; align-items: center; gap: 13px; }
  body.is-mobile .m-grade { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 21px; font-weight: 900; flex-shrink: 0; background: var(--card2); }
  body.is-mobile .m-grade.g-A { color: #10b981; } body.is-mobile .m-grade.g-B { color: #84cc16; } body.is-mobile .m-grade.g-C { color: #fbbf24; } body.is-mobile .m-grade.g-D, body.is-mobile .m-grade.g-F { color: #ef4444; }
  body.is-mobile .m-hl { font-size: 13px; line-height: 1.5; font-weight: 600; }

  /* client cards */
  body.is-mobile .m-client { background: var(--card); border: 1px solid var(--border); border-left-width: 4px; border-radius: 11px; padding: 12px 13px; margin-bottom: 9px; }
  body.is-mobile .m-client-h { display: flex; justify-content: space-between; align-items: baseline; }
  body.is-mobile .m-client-h .n { font-size: 13.5px; font-weight: 800; }
  body.is-mobile .m-client-h .c { font-size: 12px; font-weight: 700; color: var(--muted); }
  body.is-mobile .m-client-m { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
  body.is-mobile .m-client-d { font-size: 11px; color: var(--dim); margin-top: 4px; }

  /* rows / links in More */
  body.is-mobile .m-row-link { display: block; padding: 11px 4px; font-size: 13px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); cursor: pointer; }
  body.is-mobile .m-row-link:last-child { border-bottom: none; }
  body.is-mobile .m-foot { text-align: center; color: var(--dim); font-size: 11px; line-height: 1.7; margin: 22px 0; }

  /* bottom action sheet */
  body.is-mobile .m-sheet-wrap { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; }
  body.is-mobile .m-sheet { width: 100%; background: var(--card); border-radius: 18px 18px 0 0; padding: 14px 14px calc(18px + env(safe-area-inset-bottom)); max-height: 70vh; overflow-y: auto; }
  body.is-mobile .m-sheet-h { font-size: 13px; font-weight: 800; padding: 4px 4px 10px; }
  body.is-mobile .m-sheet-grp { font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 10px 4px 4px; }
  body.is-mobile .m-sheet-b { display: block; width: 100%; text-align: left; background: var(--card2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-top: 7px; font-size: 13px; color: var(--text); cursor: pointer; }
  /* Sheet-button variants, matching .m-btn.pri / .m-btn.bad (:268, :270). The confirm action and
     the destructive one must not look like the three neutral rows above them. */
  body.is-mobile .m-sheet-b.pri { background: var(--gold); border-color: var(--gold); color: #160a02; font-weight: 700; text-align: center; }
  body.is-mobile .m-sheet-b.bad { background: rgba(248,97,90,.12); border-color: #f8615a; color: #f8615a; }
  body.is-mobile .m-sheet-b.cancel { background: none; text-align: center; color: var(--muted); margin-top: 12px; }

  /* daily brief + alerts */
  body.is-mobile .m-alerts { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
  body.is-mobile .m-alert { font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 99px; }
  body.is-mobile .m-alert.bad { color: #f8615a; background: rgba(248,97,90,.12); }
  body.is-mobile .m-alert.warn { color: #f5c451; background: rgba(245,196,81,.12); }
  body.is-mobile .m-alert.info { color: var(--gold); background: rgba(244,184,68,.12); }
  body.is-mobile .m-brief .m-brief-h { font-size: 12.5px; font-weight: 800; margin-bottom: 7px; }
  body.is-mobile .m-brief .m-brief-b { font-size: 12.5px; line-height: 1.55; color: var(--text); max-height: 168px; overflow-y: auto; }
  /* decisions / directives */
  body.is-mobile .m-dir { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--border); border-radius: 11px; padding: 11px 12px; margin-bottom: 8px; }
  body.is-mobile .m-dir .t { flex: 1; font-size: 12.5px; line-height: 1.4; }
  body.is-mobile .m-dir-ok { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; color: var(--gold); background: rgba(244,184,68,.1); border: 1px solid var(--gold); border-radius: 9px; padding: 7px 11px; cursor: pointer; }
  body.is-mobile .m-dir-ok.done { color: var(--pos,#34d399); border-color: var(--pos,#34d399); background: rgba(52,211,153,.12); }
  /* chat view */
  body.is-mobile .m-chatlog { display: flex; flex-direction: column; gap: 11px; padding-bottom: 8px; }
  body.is-mobile .m-cm { font-size: 13.5px; line-height: 1.55; }
  body.is-mobile .m-cm.u { align-self: flex-end; background: var(--gold); color: #160a02; font-weight: 600; padding: 9px 13px; border-radius: 13px 13px 4px 13px; max-width: 84%; }
  body.is-mobile .m-cm.a { align-self: flex-start; background: var(--card); border: 1px solid var(--border); padding: 12px 14px; border-radius: 13px 13px 13px 4px; max-width: 92%; }
  body.is-mobile .m-cin { position: sticky; bottom: 0; display: flex; gap: 9px; padding: 10px 0 calc(6px + env(safe-area-inset-bottom)); background: var(--bg); }
  body.is-mobile .m-cin input { flex: 1; background: var(--panel); border: 1px solid var(--line2,var(--border)); border-radius: 13px; padding: 13px 15px; color: var(--text); font-size: 16px; outline: none; }
  body.is-mobile .m-cin button { background: var(--gold); color: #160a02; border: none; border-radius: 13px; padding: 0 20px; font-weight: 800; cursor: pointer; }
  /* toast */
  body.is-mobile .m-toast { position: fixed; bottom: calc(80px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: #0d9668; color: #fff; padding: 9px 16px; border-radius: 10px; font-size: 12px; z-index: 90; opacity: 0; transition: opacity .2s; pointer-events: none; }

  /* ── approvals (added 2026-09-29) ────────────────────────────────────────────
     Portals had no mobile surface at all, so approving a client-facing publish from a phone was
     impossible. Three rules govern this block: every tappable thing clears 44px; the way out and
     the decision are pinned, never scrolled; and Approve is visually and physically separated from
     Reject because it publishes to a client and cannot be undone. */
  body.is-mobile .m-appr { display: flex; align-items: center; gap: 10px; min-height: 60px;
    background: var(--card); border: 1px solid var(--border); border-radius: 11px;
    padding: 11px 13px; margin-bottom: 8px; cursor: pointer; }
  body.is-mobile .m-appr-b { flex: 1; min-width: 0; }
  body.is-mobile .m-appr-t { font-size: 13.5px; font-weight: 700; line-height: 1.35;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.is-mobile .m-appr-s { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
  body.is-mobile .m-appr-go { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; color: var(--gold);
    background: rgba(244,184,68,.1); border: 1px solid var(--gold); border-radius: 9px;
    padding: 0 14px; min-height: 44px; display: flex; align-items: center; }
  body.is-mobile .m-appr-lock { flex: 0 0 auto; font-size: 11px; color: var(--muted);
    border: 1px solid var(--border); border-radius: 9px; padding: 0 12px;
    min-height: 44px; display: flex; align-items: center; }

  /* the full-screen review surface */
  body.is-mobile .m-full { position: fixed; inset: 0; z-index: 85; background: var(--bg, #08080a);
    display: none; flex-direction: column; height: 100vh; height: 100dvh; }   /* dvh LAST so it wins: the overlay shrinks when the keyboard opens */
  body.is-mobile .m-full-h { flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
    padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
    border-bottom: 1px solid var(--border); background: var(--panel, var(--card)); }
  body.is-mobile .m-full-x { flex: 0 0 auto; min-height: 44px; min-width: 64px; background: none;
    border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-size: 13px;
    font-weight: 600; cursor: pointer; }
  body.is-mobile .m-full-t { flex: 1; min-width: 0; font-size: 14px; font-weight: 800;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.is-mobile .m-full-b { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 14px 14px 20px; }
  body.is-mobile .m-full-f { flex: 0 0 auto; border-top: 1px solid var(--border);
    background: var(--panel, var(--card));
    padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); }

  /* Full-screen review (2026-10-04): the body IS the preview. No padding, frame fills the height. */
  body.is-mobile .m-full-b.m-review { padding: 0; display: flex; flex-direction: column; background: #fff; }
  body.is-mobile .m-review iframe { flex: 1 1 auto; width: 100%; min-height: 60vh; border: 0; display: block; background: #fff; }
  body.is-mobile .m-review-ctx { padding: 14px 14px 20px; background: var(--bg, #08080a); }
  body.is-mobile .m-review-why { margin: 0 0 12px; padding: 12px 13px; border-radius: 11px; background: var(--card); border: 1px solid var(--border); color: var(--muted); font-size: 12.5px; line-height: 1.5; }
  body.is-mobile .m-full-f .m-note { margin-bottom: 8px; }
  body.is-mobile .m-full-f { max-height: 60vh; max-height: 60dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; }   /* a note box + button must not push the actions off-screen */
  /* "Show N more" under a capped Approvals section (2026-10-04) */
  body.is-mobile button.m-more-btn { width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 12px; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; margin: 2px 0 10px; }
  body.is-mobile .m-more { display: block; }
  body.is-mobile .m-more[hidden] { display: none; }
  body.is-mobile .m-appr-kind { font-size: 10px; text-transform: uppercase; letter-spacing: .06em;
    font-weight: 700; color: var(--muted); }
  body.is-mobile .m-appr-title { font-size: 16px; font-weight: 800; line-height: 1.35; margin: 5px 0 14px; }
  body.is-mobile .m-appr-h { font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
    font-weight: 700; color: var(--muted); margin: 16px 0 7px; }
  body.is-mobile .m-appr-card { background: var(--card); border: 1px solid var(--border);
    border-radius: 11px; padding: 12px 13px; margin-bottom: 8px; }
  body.is-mobile .m-appr-tab { font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
  /* diffs wrap rather than scrolling sideways: a phone cannot discover a horizontal scroller */
  body.is-mobile .m-appr-ul { margin: 0; padding-left: 17px; font-size: 12.5px; line-height: 1.55;
    overflow-wrap: anywhere; }
  body.is-mobile .m-appr-ul li { margin: 3px 0; }
  body.is-mobile .m-appr-ul.add li { color: var(--pos, #34d399); }
  body.is-mobile .m-appr-ul.rem li { color: #f8615a; text-decoration: line-through; }
  body.is-mobile .m-appr-li { font-size: 12.5px; line-height: 1.55; overflow-wrap: anywhere; margin: 3px 0; }
  body.is-mobile .m-appr-link { display: block; min-height: 44px; line-height: 44px; text-align: center;
    margin-top: 14px; border: 1px solid var(--border); border-radius: 11px; color: var(--gold);
    font-size: 13px; font-weight: 600; text-decoration: none; }
  body.is-mobile .m-appr-warn { margin-top: 14px; font-size: 12px; line-height: 1.5;
    color: var(--gold); background: rgba(244,184,68,.1); border: 1px solid rgba(244,184,68,.3);
    border-radius: 10px; padding: 10px 12px; }

  /* a refusal is prose the approver must act on, so it gets its own scrollable block */
  body.is-mobile .m-appr-msg:empty { display: none; }
  body.is-mobile .m-appr-msg { font-size: 12.5px; line-height: 1.55; color: var(--muted);
    margin-bottom: 9px; max-height: 34vh; overflow-y: auto; overflow-wrap: anywhere;
    white-space: pre-wrap; }
  body.is-mobile .m-appr-msg.warn { color: var(--gold); font-weight: 600; }
  body.is-mobile .m-appr-msg.ok { color: var(--pos, #34d399); background: rgba(52,211,153,.1);
    border: 1px solid rgba(52,211,153,.3); border-radius: 10px; padding: 10px 12px; }
  body.is-mobile .m-appr-msg.err { color: #f8615a; background: rgba(248,97,90,.1);
    border: 1px solid rgba(248,97,90,.35); border-radius: 10px; padding: 10px 12px; }

  body.is-mobile .m-appr-acts { display: flex; gap: 10px; }
  body.is-mobile .m-btn { min-height: 48px; border-radius: 12px; font-size: 14px; font-weight: 700;
    font-family: inherit; cursor: pointer; padding: 0 12px; }
  /* proportional, so two buttons read as 38/62 and three read as equal thirds */
  body.is-mobile .m-appr-acts .m-btn { flex: 1 1 0; min-width: 0; }
  body.is-mobile .m-appr-acts .m-btn.pri { flex: 1.6 1 0; }
  body.is-mobile .m-btn.ghost { background: none; border: 1px solid var(--border); color: var(--muted); }
  body.is-mobile .m-btn.pri { background: var(--gold); border: 1px solid var(--gold); color: #160a02; }
  body.is-mobile .m-btn.warn { background: rgba(244,184,68,.12); border: 1px solid var(--gold); color: var(--gold); }
  body.is-mobile .m-btn.bad { background: rgba(248,97,90,.12); border: 1px solid #f8615a; color: #f8615a; }
  body.is-mobile .m-appr-mv { font-weight: 700; color: var(--gold); }
  body.is-mobile .m-appr-chg { font-weight: 600; color: var(--muted); font-size: 11px; }
  body.is-mobile .m-appr-bad { font-size: 12.5px; line-height: 1.55; color: #f8615a;
    background: rgba(248,97,90,.1); border: 1px solid rgba(248,97,90,.35); border-radius: 11px;
    padding: 11px 13px; margin-bottom: 12px; overflow-wrap: anywhere; }
  body.is-mobile .m-appr-bad b { display: block; margin-bottom: 5px; }
  body.is-mobile .m-appr-bad .m-appr-s { color: var(--muted); margin-top: 7px; }
  /* armed: the label changes, the colour changes, and it is no longer where the first tap landed */
  body.is-mobile .m-btn.pri.arm { background: #f8615a; border-color: #f8615a; color: #fff; }
  /* a real disabled state: publishing takes one to three minutes and the old button looked untouched */
  body.is-mobile .m-btn.off, body.is-mobile .m-btn:disabled { opacity: .45; cursor: default; }

  /* ── agent queue (added 2026-09-29) ──────────────────────────────────────── */
  body.is-mobile .m-chips { display: flex; gap: 7px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 0 0 10px; margin: 0 -14px 4px; padding-left: 14px; padding-right: 14px; scrollbar-width: none; }
  body.is-mobile .m-chips::-webkit-scrollbar { display: none; }
  body.is-mobile .m-chip { flex: 0 0 auto; min-height: 44px; padding: 0 15px; border-radius: 99px;
    background: var(--card); border: 1px solid var(--border); color: var(--muted);
    font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer; }
  body.is-mobile .m-chip.on { background: rgba(244,184,68,.12); border-color: var(--gold); color: var(--gold); }
  body.is-mobile .m-chip .n { font-weight: 800; opacity: .8; }

  body.is-mobile .m-q { background: var(--card); border: 1px solid var(--border); border-radius: 11px;
    padding: 11px 13px; margin-bottom: 8px; }
  body.is-mobile .m-q-h { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; flex-wrap: wrap; }
  body.is-mobile .m-q-a { font-size: 10px; font-weight: 800; letter-spacing: .05em;
    text-transform: uppercase; color: var(--gold); }
  body.is-mobile .m-q-p { font-size: 9.5px; font-weight: 800; letter-spacing: .05em;
    text-transform: uppercase; border-radius: 99px; padding: 2px 7px; }
  body.is-mobile .m-q-p.urgent { color: #f8615a; background: rgba(248,97,90,.14); }
  body.is-mobile .m-q-p.high { color: #f5c451; background: rgba(245,196,81,.14); }
  body.is-mobile .m-q-s { margin-left: auto; font-size: 10.5px; font-weight: 700; border-radius: 99px;
    padding: 3px 9px; white-space: nowrap; }
  body.is-mobile .m-q-s.run { color: var(--gold); background: rgba(244,184,68,.12); }
  body.is-mobile .m-q-s.ok { color: var(--pos, #34d399); background: rgba(52,211,153,.12); }
  body.is-mobile .m-q-s.bad { color: #f8615a; background: rgba(248,97,90,.14); }
  body.is-mobile .m-q-s.warn { color: #f5c451; background: rgba(245,196,81,.12); }
  body.is-mobile .m-q-s.dim { color: var(--muted); background: var(--card2, rgba(255,255,255,.04)); }
  body.is-mobile .m-q-t { font-size: 13.5px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
  body.is-mobile .m-q-r { margin-top: 8px; font-size: 12px; line-height: 1.5; color: var(--muted);
    background: var(--card2, rgba(255,255,255,.04)); border-radius: 9px; padding: 9px 11px;
    max-height: 30vh; overflow-y: auto; overflow-wrap: anywhere; }
  body.is-mobile .m-q-r a { color: var(--gold); }

  /* 16px, always: anything smaller makes iOS zoom the whole shell on focus */
  body.is-mobile .m-in { display: block; width: 100%; box-sizing: border-box; margin-bottom: 9px;
    min-height: 46px; background: var(--panel, var(--card2)); color: var(--text);
    border: 1px solid var(--border); border-radius: 11px; padding: 12px 13px;
    font-size: 16px; font-family: inherit; outline: none; }
  body.is-mobile textarea.m-in { min-height: 84px; resize: vertical; line-height: 1.5; }
}

  /* 2026-10-04: approvals inbox + fixes */
  /* Signed out on a phone: the sign-in gate (z 50) sat UNDER the mobile shell (z 60), so an expired login
     looked like "Could not load" everywhere. The gate now covers the shell whenever it is shown. */
  body.is-mobile .auth-gate:not(.hidden) { z-index: 100 !important; position: fixed; inset: 0; }
  body.is-mobile .m-nav-b { position: relative; }
  body.is-mobile .m-badge { position: absolute; top: 4px; right: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; background: #f8615a; color: #fff; font-size: 10.5px; font-weight: 800; line-height: 18px; text-align: center; }
  body.is-mobile .m-note { width: 100%; box-sizing: border-box; margin-top: 8px; padding: 10px 12px; border-radius: 10px; font: inherit; font-size: 16px;
    background: var(--card); color: var(--text); border: 1px solid var(--border); resize: vertical; }
  body.is-mobile .m-sql { white-space: pre-wrap; word-break: break-word; font-size: 11.5px; line-height: 1.5; margin: 8px 0 0; padding: 10px;
    border-radius: 10px; background: rgba(0,0,0,.25); border: 1px solid var(--border); max-height: 220px; overflow: auto; }
  body.is-mobile .m-seo-b, body.is-mobile .m-seo-a { font-size: 13px; line-height: 1.5; margin-top: 6px; padding: 8px 10px; border-radius: 8px; }
  body.is-mobile .m-seo-b { background: rgba(248,97,90,.08); }
  body.is-mobile .m-seo-a { background: rgba(52,211,153,.08); }
  /* Tap targets: approve buttons, status dots and More rows were under 44px */
  body.is-mobile .m-dir-ok { min-height: 44px; padding: 0 14px; font-size: 13px; }
  body.is-mobile .m-iconbtn { min-width: 44px; min-height: 44px; }

/* A card a tapped notification pointed at (mobile.js focusAppr, 2026-10-04) */
@keyframes m-flash { 0%, 60% { box-shadow: 0 0 0 3px var(--gold); } 100% { box-shadow: 0 0 0 0 transparent; } }
body.is-mobile .m-flash { animation: m-flash 2.4s ease-out 1; scroll-margin-top: 70px; }

/* Client sheet rebuild (2026-10-05): contact box, at-a-glance tiles, pills, folding sections */
body.is-mobile .m-lbl { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
body.is-mobile .m-contact { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; background: var(--card); }
body.is-mobile .m-contact-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
body.is-mobile .m-contact-v { font-size: 14px; font-weight: 700; margin-top: 2px; }
body.is-mobile .m-contact-s { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
body.is-mobile .m-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
body.is-mobile .m-tile { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 11px; min-width: 0; }
body.is-mobile .m-tile-v { font-size: 17px; font-weight: 800; margin-top: 2px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
body.is-mobile .m-tile-s { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
body.is-mobile .m-pill { display: inline-block; font-size: 9px; font-weight: 800; border-radius: 999px; padding: 1px 6px; border: 1px solid var(--border); color: var(--muted); }
body.is-mobile .m-pill.amber { color: #fbbf24; border-color: rgba(251,191,36,.5); background: rgba(251,191,36,.12); }
body.is-mobile .m-sec-tog { cursor: pointer; min-height: 40px; align-items: center; }
body.is-mobile .m-chips { display: flex; gap: 8px; flex-wrap: wrap; }
body.is-mobile #mClient .mc-mbar { margin: 0 -14px; }

  /* iOS zooms the viewport when a focused field is under 16px — the "UI blows up" on Changes (2026-10-04) */
  body.is-mobile input, body.is-mobile textarea, body.is-mobile select { font-size: 16px; }

  /* Duplicate versions (2026-10-04): "Replaced by #N" rows, the duplicate chip, meeting groups per client */
  body.is-mobile .m-stchip.replaced { background: rgba(245,158,11,.15); border-color: rgba(245,158,11,.4); }
  body.is-mobile .m-done.go { cursor: pointer; }
  body.is-mobile .m-dup { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  body.is-mobile .m-dup-chip { font: inherit; font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 6px 12px; min-height: 36px; border: 1px solid rgba(245,158,11,.5); background: rgba(245,158,11,.12); color: inherit; text-align: left; }
  body.is-mobile .m-dup-chip:disabled { opacity: .6; }
  body.is-mobile .m-grp-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; margin-top: 4px; border-top: 1px solid var(--border, #2a3a3e); min-height: 48px; cursor: pointer; }
  body.is-mobile .m-grp-row .m-grp-b { border: 0; border-radius: 0; background: none; padding: 0; display: block; flex: 1; min-width: 0; }
  body.is-mobile .m-grp-row .m-grp-k { font-size: 12px; color: var(--muted, #8aa); }
  body.is-mobile .m-grp-row .m-grp-t { font-size: 14.5px; line-height: 1.3; margin-top: 1px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  body.is-mobile .m-grp-row .m-grp-chev { color: var(--muted, #8aa); font-size: 26px; line-height: 1; padding: 0 4px; }
  body.is-mobile .m-grp-all { width: 100%; margin-top: 10px; font-size: 14px; }

/* AI usage bar under the phone header (usage-bar.js renders into #mUsage, 2026-10-05) */
body.is-mobile .m-usage { flex-shrink: 0; background: var(--card); border-bottom: 1px solid var(--border); padding: 0 12px; }
body.is-mobile .m-usage .ub { padding: 8px 0 7px; border: none; border-radius: 0; background: none; }
body.is-mobile .m-usage .ub-gauge { margin: 6px 0 4px; gap: 10px; }
body.is-mobile .m-usage .ub-bulb { width: 46px; height: 46px; } body.is-mobile .m-usage .ub-bulb b { font-size: 13px; }
body.is-mobile .m-usage .ub-tube { height: 12px; }
body.is-mobile .m-usage .ub-tog button { min-height: 28px; padding: 0 10px; font-size: 11px; }
body.is-mobile .m-usage .ub-txt { font-size: 11.5px; margin-top: 10px; }
body.is-mobile .m-usage .ub-more { display: none; }
body.is-mobile .m-usage .ub-panel { max-height: 45vh; overflow-y: auto; margin: 0 0 6px; border-radius: 10px; border-top: 1px solid var(--border); }
body.is-mobile .m-usage .ub-rl { flex-basis: 110px; }
body.is-mobile .m-usage .ub-row { font-size: 11.5px; padding: 5px 0; }

  /* Client sheet header (2026-10-05): sticky bar carrying the safe-area inset; was an inline row under the status bar */
  body.is-mobile #mClient .mc-top { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px;
    margin: 0 -14px 10px; padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
    background: var(--panel, var(--card)); border-bottom: 1px solid var(--border, #2a3a3e); }
  body.is-mobile #mClient .mc-rag { flex: 0 0 auto; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
  body.is-mobile .m-stchip.contact { background: rgba(20,184,166,.15); border-color: rgba(20,184,166,.4); }
  body.is-mobile .m-stchip.portal { background: rgba(99,102,241,.15); border-color: rgba(99,102,241,.4); }
  body.is-mobile .m-stchip.meeting { background: rgba(245,158,11,.15); border-color: rgba(245,158,11,.4); }
/* AI Usage page on the phone (ai-usage.js, 2026-10-05) */
body.is-mobile .au-head { align-items: center; }
body.is-mobile .au-title { font-size: 18px; }
body.is-mobile .au-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
body.is-mobile .au-card .card-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
body.is-mobile .au-card .card-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
body.is-mobile .au-tbl { font-size: 12px; } body.is-mobile .au-tbl td { padding: 8px 6px 8px 0; }
body.is-mobile .au-b { width: 28%; }
body.is-mobile .au-ev { grid-template-columns: 1fr auto; gap: 4px 10px; }
body.is-mobile .au-ev .au-d:first-child { grid-column: 1 / -1; }
body.is-mobile .ub-tog button { min-height: 32px; }
/* AI Usage page phone fixes (2026-10-05): table bars collapsed to a sliver; "since …" ran off the edge */
body.is-mobile .au-tbl { table-layout: fixed; }
body.is-mobile .au-tbl td.au-n { width: 34%; white-space: normal; }
body.is-mobile .au-tbl td.au-b { width: 22%; }
body.is-mobile .au-tbl td.au-v:nth-child(3) { width: 12%; }
body.is-mobile .au-tbl td.au-v { white-space: normal; text-align: right; }
body.is-mobile .au-tbl td.au-t { width: 18%; white-space: normal; }
body.is-mobile .au-tbl td.au-t .au-d { display: block; font-size: 9.5px; }
body.is-mobile .au-b .ub-tube { display: block; height: 8px; min-width: 40px; }

/* ── Phone home revamp (2026-10-28): inside #mScroll the landing extras are cards in the flow, not capped panes. My Today's own
   pane rules (my-today.js: max-height 32vh, card background, bottom border) and #mPersonal's below are overridden here. */
body.is-mobile #mScroll #mToday { max-height: none; margin: 12px 16px 0; padding: 0 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); position: relative; overflow: hidden; }
body.is-mobile #mScroll #mToday:empty { display: none; }
body.is-mobile #mScroll #mToday::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--teal), color-mix(in srgb, var(--teal) 20%, transparent)); }
body.is-mobile #mScroll #mToday .mt-card { padding: 14px 0 12px; }
body.is-mobile #mScroll #mToday .mt-tg, body.is-mobile #mScroll #mToday .mt-rate { min-height: 36px; min-width: 44px; }
body.is-mobile #mScroll #mToday .mt-card[onclick] .mt-rate { display: none; }   /* collapsed: the greeting gets the width; rating shows once opened */
body.is-mobile #mNow { margin: 14px 16px 0; }
body.is-mobile #mNow:empty { display: none; }
body.is-mobile .m-now-h { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 2px 8px; }
body.is-mobile .m-now-g { display: grid; gap: 8px; }
body.is-mobile .m-now-t { min-width: 0; min-height: 84px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 1px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--text); font-family: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .12s; }
body.is-mobile .m-now-t:active { transform: scale(.97); }
body.is-mobile .m-now-n { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
body.is-mobile .m-now-l { font-size: 12.5px; font-weight: 700; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-mobile .m-now-s { font-size: 10.5px; color: var(--muted); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-mobile .m-now-t.hot { border-color: color-mix(in srgb, var(--teal) 45%, var(--border)); background: color-mix(in srgb, var(--teal) 8%, var(--card)); }
body.is-mobile .m-now-t.hot .m-now-n { color: var(--teal); }
body.is-mobile .m-now-t.calm .m-now-n, body.is-mobile .m-now-t.unk .m-now-n { color: var(--muted); }
body.is-mobile #mAmClients:empty { display: none; }
body.is-mobile #mScroll #mAmClients .m-sheet .amc-chips { margin-top: 2px; }

/* ── Personal cockpit on the phone (my-cockpit.js, 2026-10-08): #mPersonal sits under My Today on the first tab. */
body.is-mobile #mPersonal { flex-shrink: 0; background: var(--card); border-bottom: 1px solid var(--border); padding: 10px 12px 2px; max-height: 32vh; overflow: auto; }
body.is-mobile #mPersonal:empty { display: none; }
body.is-mobile #mPersonal .mc-grid { grid-template-columns: 1fr; gap: 8px; }
body.is-mobile #mPersonal .mc-card { box-shadow: none; padding: 11px 12px; min-height: 0; }
body.is-mobile #mPersonal .mc-big { font-size: 24px; }
body.is-mobile #mPersonal .mc-banner { padding: 12px 13px; }
body.is-mobile #mPersonal .mc-btn { min-height: 38px; padding: 6px 14px; font-size: 12.5px; }
body.is-mobile #mScroll #mPersonal { max-height: none; overflow: visible; background: none; border-bottom: 0; padding: 4px 16px 0; }   /* in the flow (2026-10-28) */

/* Horizontal lock (2026-10-17, Jonathan: "lock horizontal viewport so when im swiping down the page its not going everywhere").
   overflow-x:clip, not hidden: hidden on html/body kills position:sticky (memory reference_portal_roadmap_mobile_cards).
   touch-action on the page allows vertical scroll and pinch zoom only; inner horizontal scrollers (.m-chips, tables) are their
   own scroll containers, so they still pan sideways. overscroll-behavior stops the rubber-band sideways and the pull-through. */
html { overflow-x: clip; overscroll-behavior-x: none; }
body.is-mobile { overflow-x: clip; max-width: 100vw; overscroll-behavior-x: none; touch-action: pan-y pinch-zoom; }
body.is-mobile img, body.is-mobile video, body.is-mobile iframe, body.is-mobile table { max-width: 100%; }
body.is-mobile pre, body.is-mobile code { white-space: pre-wrap; overflow-wrap: anywhere; }
html.ah-lr-open, html.ah-lr-open body { overflow: hidden; }
body.is-mobile .m-lr-go { width: 100%; margin: 4px 0 12px; min-height: 48px; font-size: 15px; }

/* Parked tasks (2026-10-19): a long agent description folds to two lines; "more" opens it */
body.is-mobile .m-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.is-mobile .m-clamp.is-open { display: block; -webkit-line-clamp: unset; }

/* In motion (2026-10-19, scratchpad/queue/CONTRACT.md; mobile.js motionCard): the stage line on a card someone already decided,
   red when it is past its expected time; a card decided by someone else is dimmed. Section state lines reuse .m-appr-msg. */
body.is-mobile .m-motion-l { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; font-weight: 700; color: #0d9488; line-height: 1.45; overflow-wrap: anywhere; }
body.is-mobile .m-motion-l::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; animation: mPulse 1.6s ease-in-out infinite; }
body.is-mobile .m-motion.overdue .m-motion-l { color: #f8615a; }
body.is-mobile .m-motion.overdue .m-motion-l::before { animation: none; }
body.is-mobile .m-motion.overdue { border-color: rgba(248,97,90,.45); }
body.is-mobile .m-motion.other { opacity: .78; }
@keyframes mPulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body.is-mobile .m-motion-l::before { animation: none; } }
body.is-mobile .m-motion.settled .m-motion-l { color: #16a34a; }
body.is-mobile .m-motion.settled .m-motion-l::before { animation: none; }

/* Batch 1.6b (2026-10-22): Mine / Waiting on others / Done on the phone's Approvals */
.m-appr-seg{display:flex;gap:3px;padding:3px;border-radius:12px;background:var(--fill,rgba(0,0,0,.06));margin:0 2px 10px}
.m-seg-b{flex:1 1 0;min-height:40px;border:0;border-radius:10px;background:transparent;color:var(--text);font:inherit;font-size:12.5px;font-weight:600;cursor:pointer}
.m-seg-b.on{background:var(--teal);color:var(--on-accent,#fff);font-weight:800}

/* One line per card + one sheet anatomy (2026-10-24, card-view.js; the desktop hub's twin). Rules kept: 44px targets, the
   decision pinned in the footer, Approve (right) separated from Decline (left), More folds the rest. */
body.is-mobile .m-appr.m-row { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; cursor: pointer; }
body.is-mobile .m-appr.m-row.other { opacity: .88; }
body.is-mobile .m-appr.m-row .m-pill.sw { flex: 0 0 auto; font-size: 10px; max-width: 34%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.is-mobile .m-pill.teal { color: #2dd4bf; border-color: rgba(45,212,191,.5); background: rgba(45,212,191,.12); }
body.is-mobile .m-pill.green { color: #34d399; border-color: rgba(52,211,153,.5); background: rgba(52,211,153,.12); }
body.is-mobile .m-pill.red { color: #f8615a; border-color: rgba(248,97,90,.5); background: rgba(248,97,90,.12); }
body.is-mobile .m-appr-t.one { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; -webkit-line-clamp: unset; }
body.is-mobile .m-btn.m-row-go { flex: 0 0 auto; min-height: 44px; padding: 0 14px; font-size: 13px; }
body.is-mobile .m-appr-chev { flex: 0 0 auto; color: var(--muted); font-size: 22px; line-height: 1; padding: 0 4px; }
body.is-mobile .m-sentence { font-size: 15px; line-height: 1.5; margin: 0 0 10px; color: var(--text); }
body.is-mobile .m-fact { display: flex; align-items: baseline; gap: 8px; font-size: 13px; line-height: 1.45; padding: 8px 10px; margin: 6px 0; border-radius: 10px; border-left: 3px solid var(--border); background: var(--card); color: var(--text); }
body.is-mobile .m-fact.bad { border-left-color: #f8615a; }
body.is-mobile .m-fact.warn { border-left-color: var(--gold); }
body.is-mobile .m-fact.go { cursor: pointer; }
body.is-mobile .m-fact-go { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--gold); white-space: nowrap; }
body.is-mobile .m-preview { height: 220px; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: #fff; margin-top: 4px; }
body.is-mobile .m-preview iframe { display: block; width: 100%; height: 100%; border: 0; }
body.is-mobile .m-preview-img img { display: block; max-width: 100%; border-radius: 10px; margin-top: 6px; }
body.is-mobile .m-linkbtn { width: 100%; background: none; border: 0; font: inherit; color: var(--gold); font-weight: 700; cursor: pointer; }
body.is-mobile .m-text { color: var(--text); font-size: 13px; }
body.is-mobile .m-clamp.l8 { -webkit-line-clamp: 8; }
body.is-mobile .m-sql.rem { border-left: 3px solid #f8615a; }
body.is-mobile .m-sql.add { border-left: 3px solid #34d399; }
body.is-mobile .m-details { margin-top: 16px; border-top: 1px solid var(--border); }
body.is-mobile .m-details > summary { list-style: none; min-height: 44px; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
body.is-mobile .m-details > summary::-webkit-details-marker { display: none; }
body.is-mobile .m-details > summary::before { content: '▸'; font-size: 11px; }
body.is-mobile .m-details[open] > summary::before { content: '▾'; }
body.is-mobile .m-more-acts > summary { list-style: none; min-height: 44px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; margin-top: 8px; border: 1px dashed var(--border); border-radius: 12px; }
body.is-mobile .m-more-acts > summary::-webkit-details-marker { display: none; }
body.is-mobile .m-appr-acts { flex-wrap: wrap; }
body.is-mobile .m-says { margin-top: 6px; }
/* failed cards say why on the row and in the sheet (2026-10-26) */
body.is-mobile .m-appr-why { font-size: 12px; font-weight: 500; line-height: 1.35; color: var(--muted); margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.is-mobile .m-sentence.fail { border-left: 3px solid var(--red); padding-left: 10px; }
/* "+N waiting on this" (2026-10-29, Approvals Phase 4): the cards waiting on a card fold under it */
body.is-mobile .m-fold { margin: -4px 0 8px 14px; padding-left: 8px; border-left: 2px solid var(--border-strong); }
body.is-mobile .m-fold > summary { font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 0 6px; cursor: pointer; list-style: none; }
body.is-mobile .m-fold > summary::after { content: ' ▸'; }
body.is-mobile .m-fold[open] > summary::after { content: ' ▾'; }
