/* ===========================================================
   MAX3 Momentum OS — phone layout pass 2 (2026-10-29)
   Everything here is phone-only: rules on the shell sit under .os.phone
   inside the ≤760px media query, and the .ph-* sheets/modals (portalled to
   <body>) are only ever mounted by phone code (app/phone.jsx). Desktop
   renders none of it.
   =========================================================== */

/* ---------- avatar + photo/full-name list ---------- */
.ph-av{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;
  background:var(--m3-surface-3) center/cover no-repeat;color:var(--m3-text-2);font-weight:800;letter-spacing:.3px;
  border:1px solid var(--m3-line)}
.ph-av-ic{width:40px;height:40px;font-size:17px}
.ph-faces{display:inline-flex;flex:0 0 auto}
.ph-faces .ph-av + .ph-av{margin-left:-10px;box-shadow:0 0 0 2px var(--m3-surface)}
.ph-nl{display:flex;flex-direction:column}
.ph-nl-row{display:flex;align-items:center;gap:12px;width:100%;min-height:58px;padding:9px 14px;border:0;
  border-bottom:1px solid var(--m3-line-2);background:none;color:var(--m3-text-hi);text-align:left;cursor:pointer;
  -webkit-tap-highlight-color:transparent}
.ph-nl-row:active{background:var(--m3-surface-2)}
/* the FULL name — wraps, never an ellipsis */
.ph-nl-name{flex:1 1 auto;min-width:0;font-size:16px;font-weight:700;line-height:1.25;white-space:normal;overflow-wrap:anywhere}
.ph-nl-badge{flex:0 0 auto;font-size:10.5px;font-weight:800;letter-spacing:.3px;text-transform:uppercase;color:var(--m3-text-3)}
.ph-nl-chev{flex:0 0 auto;color:var(--m3-text-3);font-size:18px}
.ph-nl-empty{padding:28px 18px;text-align:center;color:var(--m3-text-3);font-size:14px}

/* ---------- bottom sheet ---------- */
.ph-sheet-wrap{position:fixed;inset:0;z-index:1200}
.ph-sheet-scrim{position:absolute;inset:0;background:var(--m3-scrim)}
.ph-sheet{position:absolute;left:0;right:0;bottom:0;max-height:calc(88 * var(--m3-vh));display:flex;flex-direction:column;
  background:var(--m3-surface);border-top:1px solid var(--m3-line);border-radius:16px 16px 0 0;
  padding-bottom:env(safe-area-inset-bottom);box-shadow:0 -10px 40px var(--m3-shadow-2)}
.ph-sheet.full{top:0;max-height:none;border-radius:0;padding-top:env(safe-area-inset-top)}
.ph-sheet-h{display:flex;align-items:center;gap:10px;padding:14px 16px 10px;border-bottom:1px solid var(--m3-line-2)}
.ph-sheet-t{flex:1;font-size:16px;font-weight:800;color:var(--m3-text-hi)}
.ph-sheet-x{width:40px;height:40px;border:0;border-radius:50%;background:var(--m3-surface-2);color:var(--m3-text-2);font-size:15px;cursor:pointer}
.ph-sheet-b{overflow:auto;padding:14px 16px 18px;display:flex;flex-direction:column;gap:12px}

/* ---------- full-screen search ---------- */
.ph-search{position:fixed;inset:0;z-index:1200;display:flex;flex-direction:column;background:var(--m3-bg);padding-top:env(safe-area-inset-top)}
.ph-search-h{display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid var(--m3-line)}
.ph-search-box{flex:1;min-width:0;display:flex;align-items:center;gap:8px;height:44px;padding:0 12px;border-radius:12px;
  background:var(--m3-surface-2);border:1px solid var(--m3-line);color:var(--m3-text-3)}
.ph-search-box input{flex:1;min-width:0;border:0;outline:0;background:none;color:var(--m3-text-hi);font-size:16px}
.ph-search-clear{border:0;background:none;color:var(--m3-text-3);font-size:14px;padding:6px;cursor:pointer}
.ph-search-cancel{border:0;background:none;color:var(--m3-primary-ink);font-size:15px;font-weight:700;padding:8px 2px;cursor:pointer}
.ph-search-b{flex:1;overflow:auto;padding-bottom:env(safe-area-inset-bottom)}
.ph-search-gh{display:flex;align-items:center;justify-content:space-between;padding:14px 14px 6px;font-size:11px;font-weight:800;
  letter-spacing:.5px;text-transform:uppercase;color:var(--m3-text-3)}
.ph-linkbtn{border:0;background:none;color:var(--m3-primary-ink);font-size:13px;font-weight:700;padding:4px;cursor:pointer;text-transform:none;letter-spacing:0}
.ph-recent{display:flex;align-items:center;gap:12px;width:100%;min-height:48px;padding:8px 14px;border:0;border-bottom:1px solid var(--m3-line-2);
  background:none;color:var(--m3-text-hi);font-size:15px;text-align:left;cursor:pointer}
.ph-recent-ic{width:28px;text-align:center;color:var(--m3-text-3)}
.ph-recent-q{flex:1;min-width:0;overflow-wrap:anywhere}

/* ---------- top bar ---------- */
@media (max-width:760px){
  .os.phone .scr-head.greet.ph-top{gap:6px}
  .os.phone .ph-top-sp{flex:1}
  .os.phone .ph-top .locmenu{flex:0 1 auto;min-width:0}
  .os.phone .ph-top .locbtn{max-width:calc(58 * var(--m3-vw))}
  .os.phone .ph-locstatic{cursor:default}
  .os.phone .ph-ib{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:44px;height:44px;
    padding:0 10px;border-radius:22px;border:1px solid var(--m3-line);background:var(--m3-surface);color:var(--m3-text-2);cursor:pointer;
    -webkit-tap-highlight-color:transparent}
  .os.phone .ph-clock.on{border-color:var(--m3-success-edge);background:var(--m3-success-wash);color:var(--m3-success-ink)}
  .os.phone .ph-clock-t{font-size:13px;font-weight:800;font-variant-numeric:tabular-nums}
  .os.phone .ph-clock .ph-clock-dot{position:absolute;top:7px;right:7px}
  .os.phone .ph-clock-warn{font-size:11px}
}
.ph-clock-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--m3-text-3)}
.ph-clock-dot.on{background:var(--m3-success);box-shadow:0 0 0 3px var(--m3-success-wash-2)}
.ph-clock-dot.big{width:11px;height:11px}

/* ---------- clock sheet ---------- */
.ph-clock-status{display:flex;align-items:center;gap:10px;font-size:17px;font-weight:800;color:var(--m3-text-hi)}
.ph-clock-at{font-size:14px;color:var(--m3-text-2);line-height:1.4}
.ph-clock-at b{color:var(--m3-text-hi)}
.ph-chipbtn{min-height:40px;padding:0 14px;border-radius:20px;border:1px solid var(--m3-line);background:var(--m3-surface-2);
  color:var(--m3-text-2);font-size:14px;font-weight:700;cursor:pointer}
.ph-chipbtn.on{border-color:var(--m3-primary-edge-2);background:var(--m3-primary-wash-2);color:var(--m3-primary-ink)}
.ph-clock-big{width:100%;min-height:64px;border:0;border-radius:14px;background:var(--m3-success);color:var(--m3-on-success);
  font-size:20px;font-weight:800;cursor:pointer}
.ph-clock-big.out{background:var(--m3-red);color:var(--m3-on-red)}
.ph-clock-big:disabled{opacity:.6}
.ph-clock-today{text-align:center;font-size:14px;color:var(--m3-text-2)}
.ph-clock-today b{color:var(--m3-text-hi);font-variant-numeric:tabular-nums}
.ph-warn{font-size:13px;color:var(--m3-amber-ink)}

/* ---------- conversation mode: no top bar, no bottom tabs (iMessage-style) ---------- */
@media (max-width:760px){
  .os.phone.phone-immersive .scr-head.greet,.os.phone.phone-immersive .phone-tabs{display:none}
  .os.phone.phone-immersive .shell-col{padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
}

/* ---------- More drawer ---------- */
@media (max-width:760px){
  .os.phone .rail{overflow:hidden}
  .os.phone .ph-more{flex:1 1 auto;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:6px 0 14px}
  .os.phone .ph-more-user{padding:6px 6px 2px}
  .os.phone .ph-more-g{display:flex;align-items:center;width:100%;padding:16px 18px 6px;border:0;background:none;
    font-size:11px;font-weight:800;letter-spacing:.6px;text-transform:uppercase;color:var(--m3-text-3);text-align:left}
  .os.phone .ph-more-fold{cursor:pointer;min-height:44px;margin-top:6px;border-top:1px solid var(--m3-line-2)}
  .os.phone .ph-more-caret{margin-left:auto;font-size:12px}
  .os.phone .ph-more-row{display:flex;align-items:center;gap:13px;width:100%;min-height:50px;padding:8px 18px;border:0;background:none;
    color:var(--m3-text-hi);text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent}
  .os.phone .ph-more-row:active{background:var(--m3-surface-2)}
  .os.phone .ph-more-ic{width:24px;display:inline-flex;justify-content:center;color:var(--m3-text-2)}
  .os.phone .ph-more-lbl{flex:1;min-width:0;font-size:15.5px;font-weight:700;line-height:1.25}
  .os.phone .ph-more-lbl small{display:block;font-size:12.5px;font-weight:500;color:var(--m3-text-3);margin-top:1px}
  .os.phone .ph-more-theme{padding:0 8px}
  .os.phone .ph-more-text{display:flex;flex-direction:column;gap:8px;padding:10px 16px 12px 22px}
  .os.phone .ph-textsize{display:flex;flex-wrap:wrap;gap:8px}
  .os.phone .ph-more-desk .rail-nav{overflow:visible;flex:none}
  .os.phone .ph-more-deskhint{padding:0 18px;font-size:12.5px;color:var(--m3-text-3)}
}

/* ---------- Inbox on a phone: one list, one thread, nothing explaining itself ---------- */
@media (max-width:760px){
  .os.phone .comm-tabs,.os.phone .cm-shared,.os.phone .cm-identity{display:none}
  .os.phone .cm-pin.slim{padding:6px 10px;gap:8px;align-items:center;cursor:pointer}
  .os.phone .cm-pin.slim .cm-pintext,.os.phone .cm-pin.slim .cm-pinlink,.os.phone .cm-pin.slim .cm-pinexp{display:none}
  .os.phone .cm-pin.slim .cm-pinic{font-size:13px}
  .os.phone .cm-pin.slim .cm-pinbody{flex:1;min-width:0}
  .os.phone .cm-pin.slim .cm-pinlab::after{content:" · tap to read"}
}

/* ---------- Today: the one "Numbers" row ---------- */
@media (max-width:760px){
  .os.phone .ph-dash{gap:12px}
  /* Text size: at Large / Extra large a message row's name · tag · time wraps instead of cutting the time */
  .os.phone .msg .mtop{flex-wrap:wrap;row-gap:0}
  .os.phone .retq-sub{min-width:min(180px,100%)}
  /* Checkout up top — a filled primary bar (fill + its own on-colour, never a literal ink) */
  .os.phone .ph-checkout{display:flex;align-items:center;gap:12px;width:100%;min-height:64px;padding:0 16px;border:0;border-radius:14px;
    background:var(--m3-primary);color:var(--m3-on-primary);cursor:pointer;text-align:left}
  .os.phone .ph-checkout .ic{display:inline-flex}
  .os.phone .ph-checkout-t{display:flex;flex-direction:column;font-size:19px;font-weight:800;line-height:1.15}
  .os.phone .ph-checkout-t small{font-size:12.5px;font-weight:600;opacity:.8}
  .os.phone .ph-checkout-go{margin-left:auto;display:inline-flex}
  .os.phone .ph-numbers{border:1px solid var(--m3-line);border-radius:12px;background:var(--m3-surface)}
  .os.phone .ph-numbers-h{display:flex;align-items:center;gap:10px;width:100%;min-height:52px;padding:0 14px;border:0;background:none;
    color:var(--m3-text-hi);cursor:pointer;text-align:left}
  .os.phone .ph-numbers-h .ic{display:inline-flex;transition:transform .15s;color:var(--m3-text-3)}
  .os.phone .ph-numbers.open .ph-numbers-h .ic{transform:rotate(90deg)}
  .os.phone .ph-numbers-t{font-size:13px;font-weight:800;letter-spacing:.5px;text-transform:uppercase}
  .os.phone .ph-numbers-s{margin-left:auto;font-size:12.5px;color:var(--m3-text-3)}
  .os.phone .ph-numbers-b{display:flex;flex-direction:column;gap:12px;padding:0 12px 12px}
  .os.phone .ph-numbers-b .tf-row .ix-link{display:none}
  .os.phone .ph-pastdue .ct.red{background:var(--m3-red-wash);color:var(--m3-red-ink)}
  .os.phone .ph-more-link{display:block;width:100%;min-height:44px;border:0;border-top:1px solid var(--m3-line-2);background:none;
    color:var(--m3-primary-ink);font-size:14px;font-weight:700;cursor:pointer}
}

/* ---------- Lead Flow on a phone: photo + full name + unread dot + count ---------- */
@media (max-width:760px){
  .os.phone .ph-lrow{display:flex;align-items:center;gap:12px;width:100%;min-height:58px;padding:9px 12px;margin:0 0 6px;
    border:1px solid var(--m3-line);border-radius:12px;background:var(--m3-surface);color:var(--m3-text-hi);text-align:left;cursor:pointer;
    -webkit-tap-highlight-color:transparent}
  .os.phone .ph-lrow.unread{border-color:var(--m3-primary-edge-2);background:var(--m3-primary-wash)}
  .os.phone .ph-lrow-name{flex:1 1 auto;min-width:0;font-size:16px;font-weight:700;line-height:1.25;overflow-wrap:anywhere}
  .os.phone .ph-lrow.unread .ph-lrow-name{font-weight:800}
  .os.phone .ph-lrow-dot{flex:0 0 auto;width:10px;height:10px;border-radius:50%;background:var(--m3-primary)}
  .os.phone .ph-lrow-ct{flex:0 0 auto;min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:var(--m3-primary);
    color:var(--m3-on-primary);font-size:12px;font-weight:800;line-height:22px;text-align:center}
  .os.phone .ph-lrow-chev{flex:0 0 auto;color:var(--m3-text-3);font-size:18px}
  /* the open lead: Call / Text, and Enroll · Move · ⋯ (the rest folds into ⋯) */
  .os.phone .ph-calltext{display:flex;gap:6px;margin-left:auto;flex:0 0 auto;align-self:flex-start}
  .os.phone .ph-ct{display:inline-flex;align-items:center;justify-content:center;min-width:52px;height:38px;padding:0 10px;border-radius:19px;
    border:1px solid var(--m3-success-edge);background:var(--m3-success-wash);color:var(--m3-success-ink);font-size:13.5px;font-weight:800;text-decoration:none}
  .os.phone .leads .panel.phone .ch .acts.ph-acts{overflow:visible;flex-wrap:wrap}
  .os.phone .leads .panel.phone .ch .acts.ph-acts > .ph-fold,
  .os.phone .leads .panel.phone .ch .acts.ph-acts > span > .ph-fold{display:none}
  .os.phone .leads .panel.phone .ch .acts.ph-acts > .btn.primary,
  .os.phone .leads .panel.phone .ch .acts.ph-acts > span > .btn{min-height:42px}
}

/* ---------- phone list screens (Families · Students) ---------- */
@media (max-width:760px){
  .os.phone .ph-listscreen{display:flex;flex-direction:column;min-height:0;overflow:hidden}
  .os.phone .ph-ls-h{flex:0 0 auto;display:flex;flex-direction:column;gap:10px;padding:12px 12px 10px;border-bottom:1px solid var(--m3-line)}
  .os.phone .ph-ls-top{display:flex;align-items:center;gap:8px}
  .os.phone .ph-ls-t{font-size:20px;font-weight:800;color:var(--m3-text-hi)}
  .os.phone .ph-ls-n{font-size:13px;font-weight:700;color:var(--m3-text-3)}
  .os.phone .ph-ls-add{margin-left:auto;min-height:40px;padding:0 14px;border-radius:10px;border:0;background:var(--m3-primary);
    color:var(--m3-on-primary);font-size:14px;font-weight:800;cursor:pointer}
  .os.phone .ph-ls-chips{display:flex;flex-wrap:wrap;gap:8px}
  .os.phone .ph-ls-b{flex:1 1 auto;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch}
}

/* ---------- family record on a phone ---------- */
@media (max-width:760px){
  .os.phone .ph-fr-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 12px}
  .os.phone .ph-notes{min-height:38px;padding:0 14px;border-radius:19px;border:1px solid var(--m3-amber-edge);background:var(--m3-amber-wash);
    color:var(--m3-amber-ink);font-size:13.5px;font-weight:800;cursor:pointer}
  .os.phone .famrec .actions .ph-fold{display:none}
  .os.phone .famrec .actions{flex-wrap:wrap}
}

/* ---------- Schedule on a phone: Day agenda ---------- */
@media (max-width:760px){
  .os.phone .schedule .sk-tabs{display:none}
  .os.phone .ph-sk-bar{flex:0 0 auto;display:flex;align-items:center;gap:6px;padding:10px 10px 6px}
  .os.phone .ph-sk-arrow{width:48px;height:48px;border-radius:12px;border:1px solid var(--m3-line);background:var(--m3-surface);
    color:var(--m3-text-hi);font-size:24px;line-height:1;cursor:pointer}
  .os.phone .ph-sk-day{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:1px;height:48px;justify-content:center;
    border:0;background:none;color:var(--m3-text-hi);cursor:pointer}
  .os.phone .ph-sk-dl{font-size:17px;font-weight:800}
  .os.phone .ph-sk-dd{font-size:12.5px;color:var(--m3-text-3)}
  .os.phone .ph-sk-acts{flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:0 10px 10px;border-bottom:1px solid var(--m3-line)}
  .os.phone .ph-sk-book{margin-left:auto;min-height:40px;padding:0 16px;border-radius:10px;border:0;background:var(--m3-primary);
    color:var(--m3-on-primary);font-size:14px;font-weight:800;cursor:pointer}
  .os.phone .ph-sk-body{padding:0}
  .os.phone .ph-agenda{display:flex;flex-direction:column;gap:6px;padding:10px}
  .os.phone .ph-ag-row{display:flex;align-items:center;gap:10px;width:100%;min-height:58px;padding:8px 10px;border:1px solid var(--m3-line);
    border-radius:12px;background:var(--m3-surface);color:var(--m3-text-hi);text-align:left;cursor:pointer}
  .os.phone .ph-ag-row.off{opacity:.55}
  .os.phone .ph-ag-row.off .ph-ag-t{text-decoration:line-through}
  .os.phone .ph-ag-row.fca{border-color:var(--m3-blue-edge-2);background:var(--m3-blue-wash)}
  .os.phone .ph-ag-time{flex:0 0 62px;display:flex;flex-direction:column;font-size:13.5px;font-weight:800;font-variant-numeric:tabular-nums}
  .os.phone .ph-ag-time small{font-size:11px;font-weight:600;color:var(--m3-text-3)}
  .os.phone .ph-ag-bar{flex:0 0 4px;align-self:stretch;border-radius:2px;background:var(--c)}
  .os.phone .ph-ag-row.k-avail .ph-ag-bar{background:repeating-linear-gradient(180deg,var(--c) 0 5px,transparent 5px 9px)}
  .os.phone .ph-ag-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
  .os.phone .ph-ag-t{font-size:15px;font-weight:700;line-height:1.25;overflow-wrap:anywhere}
  .os.phone .ph-ag-s{font-size:12.5px;color:var(--m3-text-3);overflow-wrap:anywhere}
  .os.phone .ph-ag-fca{margin-left:6px;padding:1px 6px;border-radius:4px;background:var(--m3-blue);color:var(--m3-on-blue);
    font-size:10px;font-weight:800;letter-spacing:.3px;text-transform:uppercase;vertical-align:2px}
  .os.phone .ph-ag-chev{flex:0 0 auto;color:var(--m3-text-3);font-size:18px}
  .os.phone .ph-ag-banner{display:flex;align-items:center;gap:8px;width:100%;min-height:38px;padding:6px 12px;border:1px solid var(--m3-line);
    border-radius:10px;background:var(--m3-surface-2);color:var(--m3-text-hi);font-size:13.5px;font-weight:700;text-align:left;cursor:pointer}
  .os.phone .ph-ag-banner.closure{border-color:var(--m3-red-edge);background:var(--m3-red-wash);color:var(--m3-red-ink)}
  .os.phone .ph-ag-bdot{width:8px;height:8px;border-radius:50%;background:var(--c);flex:0 0 auto}
  .os.phone .ph-ag-empty,.os.phone .ph-ag-note{padding:24px 12px;text-align:center;color:var(--m3-text-3);font-size:14px}
}
/* filter + book sheets */
.ph-field{display:flex;flex-direction:column;gap:6px}
.ph-field > span{font-size:11px;font-weight:800;letter-spacing:.5px;text-transform:uppercase;color:var(--m3-text-3)}
.ph-field select{min-height:44px;padding:0 10px;border-radius:10px;border:1px solid var(--m3-line);background:var(--m3-surface-2);color:var(--m3-text-hi);font-size:16px}
.ph-layerlist{display:flex;flex-direction:column}
.ph-layer{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 4px;border:0;border-bottom:1px solid var(--m3-line-2);background:none;
  color:var(--m3-text-2);font-size:15px;text-align:left;cursor:pointer}
.ph-layer.on{color:var(--m3-text-hi)}
.ph-layer-sw{width:12px;height:12px;border-radius:3px;flex:0 0 auto}
.ph-layer-ck{margin-left:auto;color:var(--m3-primary-ink);font-weight:800}
.ph-bigopt{display:flex;flex-direction:column;align-items:flex-start;gap:3px;width:100%;min-height:68px;padding:12px 16px;border-radius:14px;
  border:1px solid var(--m3-line);background:var(--m3-surface-2);color:var(--m3-text-hi);text-align:left;cursor:pointer}
.ph-bigopt b{font-size:17px}
.ph-bigopt small{font-size:13px;color:var(--m3-text-3)}

/* ---------- ONE Checkout on a phone (Retail ▸ POS) ---------- */
@media (max-width:760px){
  .os.phone .retail .rt-tabs{padding:0 8px;overflow-x:auto}
  .os.phone .retail .rt-hdr-actions{display:none}
  .os.phone .rt-pos.ph-pos{position:relative;flex-direction:column}
  .os.phone .rt-pos.ph-pos .rt-pos-left{flex:1 1 auto;border-right:0;padding-bottom:calc(64px + 8px)}
  .os.phone .rt-pos.ph-pos .rt-pos-right{display:none}
  .os.phone .rt-pos.ph-pos.ph-cart-open .rt-pos-left{display:none}
  .os.phone .rt-pos.ph-pos.ph-cart-open .rt-pos-right{display:flex;position:fixed;inset:0;z-index:420;background:var(--m3-bg);
    padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
  .os.phone .rt-pos.ph-pos .rt-grid{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px;gap:8px}
  .os.phone .rt-pos.ph-pos.ph-nofam .rt-cat-tabs,.os.phone .rt-pos.ph-pos.ph-nofam .rt-grid{display:none}
  .os.phone .rt-pos.ph-pos.ph-nofam .rt-pos-left{padding-bottom:0}
  .os.phone .rt-pos.ph-pos .rt-search-row{flex-wrap:wrap}
  .os.phone .ph-pos-first{margin:12px;padding:16px;border:1px dashed var(--m3-line-strong);border-radius:12px;display:flex;flex-direction:column;gap:6px}
  .os.phone .ph-pos-first-t{font-size:16px;font-weight:800;color:var(--m3-text-hi)}
  .os.phone .ph-pos-first-s{font-size:13.5px;color:var(--m3-text-2);line-height:1.4}
  .os.phone .ph-pos-first .ph-linkbtn{align-self:flex-start;padding:8px 0;font-size:14px}
  .os.phone .ph-pos-due{display:flex;align-items:center;gap:10px;margin:8px 10px 0;padding:10px 12px;border-radius:12px;
    border:1px solid var(--m3-red-edge);background:var(--m3-red-wash)}
  .os.phone .ph-pos-due-t{flex:1;font-size:15px;color:var(--m3-red-ink)}
  .os.phone .ph-pos-due-b{min-height:42px;padding:0 18px;border:0;border-radius:10px;background:var(--m3-red);color:var(--m3-on-red);
    font-size:15px;font-weight:800;cursor:pointer}
  .os.phone .ph-cartbar{position:fixed;z-index:405;left:10px;right:10px;bottom:calc(var(--phone-tabbar) + 8px);display:flex;align-items:center;gap:10px;
    min-height:56px;padding:0 16px;border:0;border-radius:14px;background:var(--m3-primary);color:var(--m3-on-primary);
    box-shadow:0 8px 24px var(--m3-shadow-2);cursor:pointer}
  .os.phone .ph-cartbar-n{font-size:14px;font-weight:700}
  .os.phone .ph-cartbar-t{font-size:17px;font-weight:800;font-variant-numeric:tabular-nums}
  .os.phone .ph-cartbar-go{margin-left:auto;font-size:15px;font-weight:800}
  .os.phone .ph-cart-h{flex:0 0 auto;display:flex;align-items:center;gap:10px;padding:8px 10px;border-bottom:1px solid var(--m3-line)}
  .os.phone .ph-cart-back{min-height:40px;padding:0 12px;border-radius:10px;border:1px solid var(--m3-line);background:var(--m3-surface);
    color:var(--m3-text-hi);font-size:14px;font-weight:700;cursor:pointer}
  .os.phone .ph-cart-ht{flex:1;min-width:0;font-size:15px;font-weight:800;color:var(--m3-text-hi);overflow-wrap:anywhere}
}
@media (max-width:760px){
  .os.phone .rt-pos.ph-pos .rt-search-lbl{display:none}
  .os.phone .rt-pos.ph-pos .rt-search-row .rt-sinput-wrap,.os.phone .rt-pos.ph-pos .rt-search-row .rt-family-chip{flex:1 1 100%;min-width:0}
}

/* ---------- DataGrid on a phone: cards, not a squeezed table ---------- */
@media (max-width:760px){
  .os.phone .dg-pcards{display:flex;flex-direction:column;gap:8px;padding:2px 0 12px}
  .os.phone .dg-pcard{padding:10px 12px;border:1px solid var(--m3-line);border-radius:12px;background:var(--m3-surface);cursor:pointer}
  .os.phone .dg-pc-lead{font-size:15px;font-weight:700;color:var(--m3-text-hi);overflow-wrap:anywhere}
  .os.phone .dg-pc-lead *{white-space:normal !important;overflow:visible !important;text-overflow:clip !important}
  .os.phone .dg-pc-kv{display:grid;grid-template-columns:auto minmax(0,1fr);gap:3px 10px;margin-top:6px;font-size:13px}
  .os.phone .dg-pc-k{color:var(--m3-text-3);font-size:11px;font-weight:800;letter-spacing:.3px;text-transform:uppercase;padding-top:2px}
  .os.phone .dg-pc-v{min-width:0;color:var(--m3-text-2);overflow-wrap:anywhere}
  .os.phone .dg-pc-v *{white-space:normal !important;max-width:100%}
}

/* ---------- Orders on a phone: the row wraps, Mark Fulfilled stays on screen ---------- */
@media (max-width:760px){
  .os.phone .rt-order-row{flex-wrap:wrap;gap:6px 10px;padding:10px 12px}
  .os.phone .rt-order-row .rt-o-student{flex:1 1 60%;min-width:0}
  .os.phone .rt-order-row .rt-o-items{order:9;flex:1 1 100%;white-space:normal}
  .os.phone .rt-order-row .rt-qa-wrap{order:10;flex:1 1 100%;display:flex;justify-content:flex-end}
  .os.phone .rt-order-row .rt-qa{min-height:40px;padding:0 14px}
}

/* ---------- button + label sweep (375 / 360) ---------- */
@media (max-width:760px){
  /* stat tiles: a label wraps rather than "UNIQUE STUDENT…" */
  .os.phone .stat .l{white-space:normal;overflow:visible;text-overflow:clip}
  /* family record tabs: four equal tabs that always fit, no sideways scroll */
  .os.phone .famrec .tabs{overflow:visible}
  .os.phone .famrec .tabs .tab{flex:1 1 0;min-width:0;padding-left:2px;padding-right:2px;font-size:12.5px;white-space:nowrap;text-align:center}
  .os.phone .famrec .tabs .tab .badge{margin-left:3px}
  /* retention rows: the membership drops under the name instead of an ellipsis */
  .os.phone .retq-row{flex-wrap:wrap;row-gap:2px}
  .os.phone .retq-row .retq-mem{order:3;flex:1 1 100%;white-space:normal;overflow:visible;text-overflow:clip}
}
@media (max-width:760px){
  /* student profile header: the facts sit as wrapped chips — no "·" stranded at a line end */
  .os.phone .pmeta{flex-wrap:wrap;gap:6px 8px}
  .os.phone .pmeta .sep{display:none}
  /* Checkout categories wrap instead of running off the right edge */
  .os.phone .rt-pos.ph-pos .rt-cat-tabs{flex-wrap:wrap;overflow:visible;row-gap:6px}
}
@media (max-width:760px){
  /* subtitles wrap to a second line instead of an ellipsis */
  .os.phone .cm-thsub,.os.phone .rt-meta,.os.phone .fc-sub{white-space:normal;overflow:visible;text-overflow:clip}
}

/* ---------- events on a phone: page bar, sub-tabs, Check-In mode ---------- */
@media (max-width:760px){
  .os.phone .ev-page-bar{flex-wrap:wrap;padding:10px 12px;row-gap:8px}
  .os.phone .ev-page-bar .pb-name{flex:1 1 auto;min-width:0;white-space:normal}
  .os.phone .ev-page-bar .pb-actions{flex:1 1 100%;margin-left:0;flex-wrap:wrap}
  .os.phone .ev-page-bar .ev-btn{height:38px}
  .os.phone .ev-page-subtabs{flex-wrap:wrap;overflow:visible;padding:0 8px}
  .os.phone .ev-subtab{padding:0 10px}
  /* Check-In: title + close on one row, search full width, stats under; each
     row = avatar + FULL name, the two big buttons side by side beneath */
  .os.phone .ev-ci-top{flex-wrap:wrap;gap:10px;padding:12px}
  .os.phone .ev-ci-top > div:nth-child(2){flex:1 1 0;min-width:0}
  .os.phone .ev-ci-top .cit{font-size:17px}
  .os.phone .ev-ci-searchwrap{flex:1 1 100%;max-width:none}
  .os.phone .ev-ci-search{max-width:none;font-size:16px}
  .os.phone .ev-ci-stat{margin-left:0}
  .os.phone .ev-ci-list{padding:10px 12px 24px}
  .os.phone .ev-ci-row{flex-wrap:wrap;gap:10px 12px;padding:12px}
  .os.phone .ev-ci-info{flex:1 1 calc(100% - 70px)}
  .os.phone .ev-ci-name{font-size:17px;overflow-wrap:anywhere}
  .os.phone .ev-ci-row .ev-ci-btn{flex:1 1 0;min-width:0 !important;height:48px;padding:0 10px}
}
@media (max-width:760px){
  /* student profile: a folded module's summary wraps instead of an ellipsis */
  .os.phone .profile .mod-s{white-space:normal;overflow:visible;text-overflow:clip}
}

/* ---------- call from the school number (calls.jsx, 2026-10-30) ---------- */
.m3call{display:flex;flex-direction:column;gap:12px}
.m3call-big{font-size:18px;font-weight:800;color:var(--m3-text-hi)}
.m3call-s{font-size:14px;line-height:1.45;color:var(--m3-text-2)}
.m3call-s b{color:var(--m3-text-hi)}
.m3call-s.dim{font-size:12.5px;color:var(--m3-text-3)}
.m3call-s.warn{color:var(--m3-amber-ink)}
.m3call-in{min-height:48px;padding:0 14px;border-radius:12px;border:1px solid var(--m3-line);background:var(--m3-surface-2);
  color:var(--m3-text-hi);font-size:16px}
.m3call-btn{min-height:52px;border:0;border-radius:12px;background:var(--m3-primary);color:var(--m3-on-primary);font-size:16px;font-weight:800;cursor:pointer}
.m3call-alt{align-self:center;font-size:12.5px;color:var(--m3-text-3);text-decoration:underline;padding:6px}

/* ---------- Text size Large / Extra large (app/text-size.js sets html[data-text-size]) ----------
   Only what the 2026-10-30 sweep (375 + 360px) found cramped. Normal is untouched. */
@media (max-width:760px){
  html[data-text-size="large"] .os.phone .leads .ph-back,
  html[data-text-size="xl"] .os.phone .leads .ph-back{white-space:nowrap;padding:8px 4px}
  html[data-text-size="large"] .os.phone .leads .ph-seg button,
  html[data-text-size="xl"] .os.phone .leads .ph-seg button{padding:0 8px}
  /* lead header: drop the avatar so the name + subtitle get the width */
  html[data-text-size="large"] .os.phone .leads .ch .top .pic,
  html[data-text-size="xl"] .os.phone .leads .ch .top .pic{display:none}
}

/* ---------- double-reply safeguards (reply-guard.jsx, 2026-10-30) — phone + desktop ---------- */
.m3rg{display:flex;flex-direction:column;gap:10px}
.m3rg-big{font-size:17px;font-weight:800;color:var(--m3-text-hi)}
.m3rg-s{font-size:14px;line-height:1.45;color:var(--m3-text-2)}
.m3rg-q{font-size:14px;line-height:1.45;color:var(--m3-text-hi);border-left:3px solid var(--m3-line-strong);padding:4px 10px;background:var(--m3-surface-2);border-radius:6px}
.m3rg-acts{display:flex;gap:10px;justify-content:flex-end;margin-top:4px}
.m3rg-btn{min-height:44px;padding:0 18px;border:0;border-radius:10px;background:var(--m3-primary);color:var(--m3-on-primary);font-size:15px;font-weight:800;cursor:pointer}
.m3rg-btn.ghost{background:var(--m3-surface-2);color:var(--m3-text);border:1px solid var(--m3-line)}
.m3rg-scrim{position:fixed;inset:0;background:var(--m3-scrim);z-index:1300;display:flex;align-items:center;justify-content:center;padding:16px}
.m3rg-modal{width:100%;max-width:440px;padding:18px 18px 16px;background:var(--m3-surface);border:1px solid var(--m3-line);border-radius:14px;
  box-shadow:0 18px 44px var(--m3-shadow-2)}
.m3rg-replying{display:flex;align-items:center;gap:8px;margin:6px 12px 0;padding:7px 12px;border-radius:9px;
  background:var(--m3-amber-wash);border:1px solid var(--m3-amber-edge-2);color:var(--m3-amber-ink);font-size:13px;font-weight:700}
.m3rg-dots{display:inline-flex;gap:3px}
.m3rg-dots i{width:5px;height:5px;border-radius:50%;background:var(--m3-amber-ink);opacity:.4;animation:m3rgdot 1.2s infinite}
.m3rg-dots i:nth-child(2){animation-delay:.2s}.m3rg-dots i:nth-child(3){animation-delay:.4s}
@keyframes m3rgdot{0%,100%{opacity:.25}50%{opacity:1}}
.m3rg-rowmark{color:var(--m3-amber-ink);font-weight:700}
.m3rg-chip{display:inline-flex;align-items:center;font-size:11px;font-weight:800;color:var(--m3-amber-ink);background:var(--m3-amber-wash);
  border:1px solid var(--m3-amber-edge-2);border-radius:10px;padding:1px 7px;white-space:nowrap}
