/* ═══ PHONE PAGES, COLLECTR STYLE (Ian 2026-09-28, second pass) ═══════════════════════════
   phone-dock.css builds the shell; this file fits the pages to it. Phone only, same 760px query.
     Settings     #hqPanel keeps the whole screen; the round button floats over its corner
     Select mode  the bulk footer takes the bottom, so the round button and sync dot step aside
     Cart         one side at a time behind the side tabs and trade meter 01-pdCartSides.js draws;
                  Balance and Finish deal sit under the meter, and all of it scrolls away
                  (Ian's calls 2026-09-28: tabbed sides, no cash-to-even, each side one box) */
/* The short phone name is drawn on every sale row; only the phone shows it. */
#soldHistory .s-short{display:none}
.st-ds{display:none}
.lot-row .l-more{display:none}
.lot-row .l-sep{font-style:normal}
@media (max-width:760px){
  /* ---- pages ---- */
  body.ianui.iu-page #hqPanel{padding-top:var(--pd-top);padding-bottom:var(--pd-safe)}
  /* The round button floats over Settings too, so its last row scrolls clear of it (2026-09-30) */
  body.ianui.iu-page #hqPanel :is(.panel-nav,.panel-body){padding-bottom:96px!important}
  #hqSidebar{padding-bottom:var(--pd-safe)}
  body.pd-v-inventory:not(.iu-page):has(#_selFooter:not([style*="none"])) :is(#pdNavBtn,#syncPill,nav.tabs){display:none!important}
  /* Select mode belongs to Inventory: on any other page its footer steps aside. */
  body:not(.pd-v-inventory) #_selFooter,body.iu-page #_selFooter{display:none!important}
  .bulk-select-footer{padding-bottom:calc(10px + var(--pd-safe))!important;background:rgba(14,17,24,.5)!important;
    backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
  .bulk-select-footer .btn,.bulk-select-footer select{min-height:44px}

  /* ---- Cart: the head ---- */
  #posHowTo{display:none}
  #view-pos .toolbar{gap:8px;margin-bottom:6px}
  #view-pos #saleTabs{flex:1 1 100%;flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
  #view-pos #saleTabs::-webkit-scrollbar{display:none}
  #view-pos #saleTabs>*{flex:none;min-height:44px;background:rgba(255,255,255,.06)!important}
  #view-pos #btnClearDeal{margin-left:0!important}
  #view-pos .toolbar :is(.btn,input,select){min-height:44px;font-size:12.5px}
  #view-pos #fundBar .muted{display:none}

  /* ---- Cart: side tabs and the trade meter (01-pdCartSides.js) ---- */
  /* Stays at the top of the page and scrolls away with it (Ian 2026-09-28): nothing follows you down. */
  #pdSides{position:static;margin:0;padding:6px 0 10px;background:none;border-bottom:0}
  #pdSides .pd-stabs{display:flex;gap:6px}
  #pdSides .pd-stab{flex:1;min-width:0;height:62px;display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:8px;row-gap:2px;
    align-content:center;align-items:center;padding:0 12px;border-radius:18px;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.05);color:var(--muted);text-align:left}
  #pdSides .pd-stab i{grid-column:1;grid-row:1;width:10px;height:10px;border-radius:50%;background:var(--green)}
  #pdSides .pd-stab.theirs i{background:var(--accent2)}
  #pdSides .pd-stab span{grid-column:2;grid-row:1;font-weight:800;font-size:13.5px;color:var(--txt);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #pdSides .pd-stab small{font-size:11px;font-weight:600;color:var(--muted)}
  #pdSides .pd-stab b{grid-column:2;grid-row:2;font-size:18px;font-weight:800;color:var(--txt);font-variant-numeric:tabular-nums;white-space:nowrap}
  #pdSides .pd-stab.on{background:rgba(52,211,153,.1);border-color:rgba(52,211,153,.55)}
  #pdSides .pd-stab.theirs.on{background:rgba(47,143,255,.1);border-color:rgba(47,143,255,.55)}
  #pdSides .pd-meter{position:relative;height:6px;margin:12px 2px 0;border-radius:3px;background:linear-gradient(90deg,var(--green),rgba(255,255,255,.15) 50%,var(--accent2))}
  #pdSides .pd-meter .mid{position:absolute;left:50%;top:-3px;width:2px;height:12px;background:var(--txt);opacity:.45}
  #pdSides .pd-meter .mark{position:absolute;top:-4px;width:14px;height:14px;margin-left:-7px;border-radius:50%;background:#fff;box-shadow:0 0 0 2px rgba(0,0,0,.6),0 0 10px rgba(255,255,255,.5);transition:left .2s ease}
  #pdSides .pd-gap{display:none}   /* the Balance bar right under it says the same thing */
  #pdSides .pd-gap b{color:var(--orange)}

  /* ---- Cart: one side at a time, each one see-through box with its buttons inside ---- */
  body.pd-v-pos .pos-grid{display:flex;flex-direction:column;gap:10px;margin-top:10px}
  body.pd-v-pos:not(.pd-side-their) .pos-side.theirs,body.pd-v-pos.pd-side-their .pos-side.mine{display:none!important}
  body.pd-v-pos .pos-side{min-height:0;padding:12px 10px;background:rgba(255,255,255,.03)!important;border:1px solid rgba(255,255,255,.08)!important;border-radius:20px}
  body.pd-v-pos .pos-side h4{order:-2;font-size:14px;margin-bottom:6px}
  body.pd-v-pos .pos-side .li-add{flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none}
  body.pd-v-pos .pos-side .li-add::-webkit-scrollbar{display:none}
  body.pd-v-pos .pos-side .li-add button{flex:none;min-height:44px;border-radius:22px}
  body.pd-v-pos :is(#mySideItems,#theirSideItems){min-height:220px;border:1px dashed rgba(255,255,255,.14);border-radius:14px;padding:6px;margin:4px 0 8px;
    background:rgba(0,0,0,.18);overflow:visible!important}
  body.pd-v-pos .side-empty{border:0;min-height:206px;margin:0}
  body.pd-v-pos .cc-row{background:rgba(255,255,255,.05)!important;border-color:rgba(255,255,255,.08)!important}

  /* ---- Cart: Balance and Finish deal sit at the top with the rest of the info and scroll away
     with it (Ian 2026-09-28). The bar is the last child of .pos-grid; order:-1 lifts it above the
     side box without moving it in the page, so #btnComplete and the tours keep their anchor. ---- */
  body.pd-v-pos .balance-bar{order:-1;position:static;height:56px;
    padding:0 5px 0 16px!important;margin:0;display:flex;align-items:center;gap:10px;flex-wrap:nowrap;border-radius:28px;
    background:rgba(14,17,24,.5)!important;border:1px solid rgba(255,255,255,.12)!important;box-shadow:none}
  body.pd-v-pos .balance-bar .bal{font-size:0;color:var(--muted);font-weight:700;line-height:1.2;white-space:nowrap;overflow:hidden;min-width:0}
  body.pd-v-pos .balance-bar .bal .diff{display:block;font-size:14px;font-weight:800;overflow:hidden;text-overflow:ellipsis}
  body.pd-v-pos .balance-bar #dealSummary{display:none}
  body.pd-v-pos .balance-bar #btnComplete{margin-left:auto;flex:none;height:46px;padding:0 16px!important;font-size:13.5px!important;border-radius:23px}

  /* ---- card profile: fits the phone (Ian 2026-09-28) ----
     The head wrapped to three rows, with ✕ alone on the last one, and the six tabs wrapped Notes
     onto a second line. Now: name and ✕ on one row, the three actions as one even row under it,
     the tabs in one row that scrolls sideways, and only the body scrolls inside a tall sheet. */
  .overlay .modal.cardprofile{height:92svh;display:flex;flex-direction:column;overflow:hidden}
  .overlay .modal.cardprofile .modal-head{flex:none;display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 8px;padding:12px 12px 10px}
  .overlay .modal.cardprofile .modal-head .cp-nameField{grid-column:1;grid-row:1;min-width:0;order:0;flex:none}
  .overlay .modal.cardprofile .modal-head .cp-nameField input{font-size:17px;padding:4px 6px}
  .overlay .modal.cardprofile .modal-head #modalX{grid-column:2;grid-row:1;width:40px;height:40px;min-width:40px;min-height:40px;border-radius:20px}
  .overlay .modal.cardprofile .modal-head .cp-headfoot{grid-column:1/-1;grid-row:2;display:flex;flex-wrap:nowrap;gap:6px;margin:0}
  .overlay .modal.cardprofile .modal-head .cp-headfoot button{flex:1 1 0;min-width:0;min-height:42px;padding:0 8px;font-size:13px;border-radius:21px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .overlay .modal.cardprofile .modal-body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:12px}
  .overlay .modal.cardprofile .cp-rail{grid-template-columns:118px minmax(0,1fr)}
  .overlay .modal.cardprofile .cp-tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:0 -12px 12px;padding:0 12px}
  .overlay .modal.cardprofile .cp-tabs::-webkit-scrollbar{display:none}
  .overlay .modal.cardprofile .cp-tab{flex:none;display:flex;align-items:center}
  .overlay .modal.cardprofile .cp-stat{background:rgba(255,255,255,.05);border-color:rgba(255,255,255,.08)}

  /* ---- Sales history: one slim line per sale (Ian 2026-09-28) ----
     Date and cart number, the short name with its rarity (05-histShortName.js), the profit, ⋮.
     Paid, sold, set, labels and the Delete and Add label buttons leave the row; the ⋮ menu
     carries Edit sale, Add label and Delete, and a tap on the row still opens the sale. */
  /* Catalog rail (2026-09-30, search/catalog/05): tabs in place of the My inventory dropdown.
     It shares the head row with the stock count and slides sideways when the tabs outrun it. */
  #view-inventory #searchScope{flex:1 1 auto;min-width:0}
  #searchScope:has(#catRail) :is(#btnCatalog,#exitCat){display:none!important}
  #catRail{display:flex;gap:6px;min-width:0;overflow-x:auto;scrollbar-width:none;padding:2px 0;
    -webkit-mask-image:linear-gradient(to right,#000 calc(100% - 18px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 18px),transparent)}
  #catRail::-webkit-scrollbar{display:none}
  #catRail button{flex:none;height:36px;padding:0 13px;border-radius:18px;background:var(--pd-glass);border:1px solid var(--pd-edge);
    color:var(--muted);font-weight:700;font-size:13px;white-space:nowrap}
  #catRail button.on{color:var(--accent);border-color:rgba(255,203,5,.55);background:rgba(255,203,5,.1)}
  #catRail .cat-add{width:36px;padding:0;font-size:17px;margin-right:14px}
  /* Sales history head: the mode and the business filter sit together on the left, clear of the
     round button, and the hint that repeats the dropdown goes (2026-09-30) */
  #histModeNote{display:none!important}
  #histFundBtn{margin-left:0!important}
  #soldHistory .strip:has([data-soldmenu]){flex-wrap:nowrap!important;gap:8px!important;min-height:54px;padding:6px 4px 6px 10px!important;
    background:rgba(255,255,255,.04)!important;border-color:rgba(255,255,255,.08)!important;border-radius:14px}
  #soldHistory .strip:has([data-soldmenu]) :is(.s-name,.s-cost,[data-quickdel],[data-alabel]){display:none!important}
  #soldHistory .strip:has([data-soldmenu]) .s-stamp{flex:none;display:flex;flex-direction:column;align-items:flex-start;gap:1px;min-width:0;width:66px;
    padding:0!important;background:none!important;border:0!important}
  #soldHistory .strip:has([data-soldmenu]) .s-stamp .st-d{display:none}
  #soldHistory .strip:has([data-soldmenu]) .s-stamp .st-ds{display:inline;font-size:11.5px;white-space:nowrap}
  #soldHistory .strip:has([data-soldmenu]) .s-stamp .st-y{display:none}
  #soldHistory .strip:has([data-soldmenu]) .s-stamp .st-n{font-size:11px}
  #soldHistory .s-short{display:flex;align-items:center;gap:5px;flex:1 1 auto;min-width:0;font-weight:700;font-size:13.5px;white-space:nowrap}
  #soldHistory .s-short .h-nm{min-width:0;overflow:hidden;text-overflow:ellipsis}
  #soldHistory .s-short .h-rar{flex:none;padding:1px 6px;border-radius:6px;font-size:10px;font-weight:800;
    background:rgba(255,203,5,.14);color:var(--accent)}
  #soldHistory .strip:has([data-soldmenu]) .s-val{flex:none;min-width:0;font-size:15px}
  #soldHistory .strip:has([data-soldmenu]) .dots{flex:none;width:40px;height:40px;background:transparent!important;border:0}

  /* ════ THE OTHER PAGES (Ian 2026-09-28): the same rules as Inventory and Cart ════
     About 50% glass with a light frost, nothing frozen, one slim line per row with its buttons
     behind ⋮, round buttons, and no big full-width blocks for things that are one tap. */

  /* ---- glass panels: every box on every page ---- */
  main :is(.kpi,.chart-card,.ov-q,.lot-row,.exp-row,.ov-week,.hint,.empty,.ct-boxes .ov-q){background:rgba(255,255,255,.04)!important;
    border-top-color:rgba(255,255,255,.08)!important;border-right-color:rgba(255,255,255,.08)!important;border-bottom-color:rgba(255,255,255,.08)!important;
    border-radius:16px!important;box-shadow:none!important}
  main :is(.kpi,.ov-q):before{opacity:.35}
  main .kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin-bottom:12px}
  main .kpi{padding:11px 12px!important}
  main .kpi .label{font-size:11px;margin-bottom:5px}
  main .kpi .value{font-size:17px}
  main .kpi .delta{font-size:11px}
  #fundCards .kpis{grid-template-columns:1fr!important}
  main .ct-boxes{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  main .ct-boxes .ov-q .a{font-size:16px}
  #fundCards .kpi .value{font-size:22px}
  main .charts{gap:8px}
  main .chart-card{padding:12px!important}
  #hqSidebar{background:rgba(14,17,24,.5)!important;backdrop-filter:var(--pd-blur);-webkit-backdrop-filter:var(--pd-blur);border-right:1px solid rgba(255,255,255,.1)!important}
  #hqSidebar .sb-box,#hqSidebar .sb-foot .btn,#hqPanel .stgnav{background:rgba(255,255,255,.05)!important;border-color:rgba(255,255,255,.1)!important}
  #sbScrim{background:rgba(0,0,0,.6)!important;backdrop-filter:none!important}

  /* ---- Stats head: title and actions on one row, the page tabs as one sliding pill row ---- */
  #view-metrics .toolbar{flex-wrap:wrap;gap:8px}
  #view-metrics .toolbar .section-title{order:1}
  #view-metrics .stats-actions{order:2}
  #view-metrics .stats-actions .btn{min-height:40px;padding:0 12px;font-size:12px;border-radius:20px}
  #metricViewSeg{order:3;flex:1 1 100%;flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;background:none!important;border:0!important;padding:0!important;gap:6px!important}
  #metricViewSeg::-webkit-scrollbar{display:none}
  #metricViewSeg button{flex:none;min-height:40px;padding:0 14px!important;border-radius:20px!important;background:rgba(255,255,255,.05)!important;
    border:1px solid rgba(255,255,255,.1)!important;justify-content:center}
  #metricViewSeg button.active{background:rgba(255,255,255,.16)!important;border-color:transparent!important}
  #statsFilters{gap:6px;padding-bottom:10px}
  #statsFilters :is(select,input[type=date]){min-height:40px;border-radius:20px!important}
  #starHint{display:none}
  .ov-hero .n{font-size:34px}
  .ov-qs{gap:8px!important}
  .ov-q{padding:12px!important}
  .ov-q .t{font-size:13px}
  .ov-q .a{font-size:17px;margin:6px 0 3px}
  .ov-q .s{font-size:11.5px}

  /* ---- Stats label rows: one line, the profit bar under it, ⋮ for the report and delete ---- */
  .lot-row{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:4px 8px!important;padding:10px 4px 10px 12px!important}
  .lot-row .label-dot{grid-column:1;grid-row:1}
  .lot-row .l-name{grid-column:2;grid-row:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .lot-row .l-prof{grid-column:3;grid-row:1;min-width:0!important;font-size:15px}
  .lot-row .l-more{grid-column:4;grid-row:1;display:grid;place-items:center;position:static!important;width:40px;height:40px;background:transparent!important;border:0}
  .lot-row .roi-bar{grid-column:2/4;grid-row:2;height:14px;min-width:0}
  .lot-row :is(.l-stat,[data-lotopen],[data-lotdel]){display:none!important}

  /* ---- Expenses and Businesses: round add buttons, no default hint, slim expense rows ---- */
  :is(#view-expenses,#view-funds) .toolbar{gap:8px}
  :is(#view-expenses,#view-funds) .toolbar .btn.primary{flex:0 0 auto!important;margin-left:auto!important;min-height:40px;padding:0 14px;border-radius:20px;
    font-size:13px;background:rgba(47,143,255,.55)!important;border-color:rgba(47,143,255,.7)!important;box-shadow:none!important}
  :is(#view-expenses,#view-funds) .toolbar select{min-height:40px;border-radius:20px}
  #view-funds>.hint,#view-expenses>.hint{display:none}
  .exp-row{flex-wrap:nowrap!important;gap:8px!important;padding:8px 4px 8px 12px!important;min-height:54px}
  .exp-row .e-date{flex:none;min-width:0!important;font-size:11px}
  .exp-row .e-cat{flex:none;font-size:10.5px;padding:2px 7px}
  .exp-row .e-note{flex:1 1 auto;min-width:0;font-size:12.5px}
  /* the business chip stays (partner books never mix) but gives the note room */
  .exp-row .e-note>span[style]{display:inline-block;max-width:74px;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}
  .exp-row .e-amt{flex:none;min-width:0!important;font-size:14px}
  .exp-row [data-edit-exp]{flex:none;width:40px!important;height:40px!important;background:transparent!important;border:0!important}
  #fundCards .kpi .btn{border-radius:20px;min-height:40px}

  /* ---- Cart head: the standing split reminder lives in Settings, not on the cart ---- */
  #view-pos #fundBar{display:none}

  /* ---- sheets: the head and foot stay readable over what scrolls under them; buttons never squash ---- */
  .overlay .modal :is(.modal-head,.modal-foot){background:rgba(14,17,24,.55)!important;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
  .overlay .modal .modal-foot{flex-wrap:wrap;gap:8px}
  .overlay .modal .modal-foot .btn{flex:1 1 auto;justify-content:center;text-align:center;white-space:nowrap;border-radius:23px}

  /* ════ CLEANLINESS LOOP, ROUND 1 (three reviewers, 2026-09-28) ════ */
  /* Tile band: the three stat captions (COST, AGE, PROFIT) go; the values read as one line,
     "C$936 · 566d · +60%", so the band is a line shorter. Staff cost hiding still applies. */
  .grid .pcard.lg-card .lg-cap .lg-stats .lg-stat{font-size:0!important;gap:0!important;flex-direction:row!important;align-items:baseline!important;
    overflow:visible!important;white-space:nowrap;min-width:0;padding:0!important;border:0!important}
  .grid .pcard.lg-card .lg-cap .lg-stats .lg-stat>span{display:none}
  .grid .pcard.lg-card .lg-cap .lg-stats .lg-stat b{font-size:11px!important}
  .grid .pcard.lg-card .lg-cap .lg-stats{gap:0!important}
  .grid .pcard.lg-card .lg-cap .lg-stats .lg-stat+.lg-stat::before{content:'·';font-size:11px;color:rgba(255,255,255,.5);margin:0 6px}
  /* 4 across: the name gets two lines, the set line goes */
  .grid.cols4 .pcard.lg-card .lg-set{display:none!important}
  .grid.cols4 .pcard.lg-card .lg-nm{white-space:normal!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.2}
  /* The grade chip takes a line of its own, and at 2 lines Safari hung a stray "…" after it */
  .grid.cols4 .pcard.lg-card .lg-nm:has(.grade-chip){-webkit-line-clamp:3}
  /* A tap on a dot names it (ui/phone/07-pdDotTip.js): give the small dots a fingertip of room */
  .pcard.lg-card .lg-dot::after,.strip .label-dot[title]::after{content:'';position:absolute;inset:-8px}
  .strip .label-dot[title]{position:relative}
  /* Select mode: the tile's ⋮ and 🛒 step aside so a corner tap can only select */
  body:has(#_selFooter:not([style*="none"])) .pcard :is(.lg-dots,.lg-cartadd){visibility:hidden}
  /* Card ⋮ menu: every row gets an icon */
  /* The row is a flex with a 9px gap, so these icons take the gap like the others, no margin of their own */
  .context-menu button[data-a="label"]::before{content:'🏷'}
  .context-menu button[data-a="sell"]::before{content:'✓';width:1.2em;text-align:center;color:var(--green);font-weight:900}
  /* Primary buttons are glass too (rule 2): the red and the blue at about 55% */
  /* Round 3: red is for deleting only. Forward buttons (Save, Next, Set funding, Sign in) are the
     cart's blue, at the same glass strength. */
  :is(.overlay .modal,#hqPanel,#hqSidebar,.bulk-select-footer,#_sortBar,main) .btn.primary{background:rgba(47,143,255,.55)!important;background-image:none!important;
    border-color:rgba(90,160,255,.6)!important;box-shadow:none!important}
  :is(#view-pos,#modalRoot.rd-pos,#modalRoot.rd-dock,#pickerHold) .btn.primary{background:rgba(47,143,255,.55)!important;background-image:none!important;
    border-color:rgba(90,160,255,.6)!important;box-shadow:none!important}
  /* Card profile: Fix photo is a quiet text button, Cancel an outline, Save the one filled choice */
  .overlay .modal.cardprofile .modal-head .cp-headfoot button:first-child:not(.primary){background:transparent!important;border-color:transparent!important;color:var(--muted)}
  /* Shop menu: the last row clears the home bar */
  #hqSidebar .sb-foot{padding-bottom:calc(12px + var(--pd-safe))!important;background:transparent!important}

  /* ════ CLEANLINESS LOOP, ROUND 2 ════ */
  /* Cart: the four add buttons as a 2 by 2 grid, none cut off at the edge */
  body.pd-v-pos .pos-side .li-add{display:grid!important;grid-template-columns:1fr 1fr;gap:6px;overflow:visible}
  body.pd-v-pos .pos-side .li-add button{width:100%;justify-content:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  /* ＋ Add catalog is the 5th box (Ian 2026-09-30). CSS order puts it last; with an odd count it takes the whole row */
  body.pd-v-pos .pos-side .li-add:has(> :last-child:nth-child(odd)) #addMyCatalog{grid-column:1/-1}
  /* Cart: the side total repeats the tab above it */
  body.pd-v-pos .pos-side .side-total{display:none}
  /* Cart card search sits at the top of the side box, above the list and the add buttons, so
     nothing it opens covers them (Ian 2026-10-05, pos/phone/02) */
  .pd-pick-host{order:-1;scroll-margin-top:8px}
  .pd-pick-host:empty{display:none}
  .pd-pick-host #modalRoot .overlay{position:static;inset:auto;display:block;z-index:auto;padding:0!important;background:none!important;
    backdrop-filter:none;-webkit-backdrop-filter:none;animation:none}
  .pd-pick-host #modalRoot .overlay .modal{max-height:none!important;margin:8px 0 4px;border-radius:16px!important;border:1px solid var(--pd-edge)!important;
    padding-bottom:0;animation:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;background:rgba(255,255,255,.04)!important}
  .pd-pick-host #modalRoot .modal-body{padding:10px}
  .pd-pick-host #modalRoot .overlay .modal .modal-foot{padding-bottom:10px}
  .pd-pick-host #modalRoot :is(#ip_list,#cp_list){max-height:40vh!important}
  /* Stats: the page tabs fade at the right edge, so it reads as a row that slides */
  #metricViewSeg{-webkit-mask-image:linear-gradient(90deg,#000 82%,transparent);mask-image:linear-gradient(90deg,#000 82%,transparent);padding-right:30px!important}
  /* Stats overview: the four question titles take two lines each, so the numbers line up */
  .ov-q .t{min-height:2.5em;align-items:flex-start}
  /* Stats labels: the sold and in-stock line gets its own line instead of an ellipsis */
  .lot-row .l-name{white-space:normal!important;line-height:1.25}
  .lot-row .l-name span{display:block;font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .lot-row .l-name .l-sep{display:none}   /* the joining dot only makes sense on one line */
  /* Expenses: the business is a coloured dot (its colour, its name on hover), the note gets the room */
  .exp-row .e-note>span[style]{display:inline-block;font-size:0!important;width:10px;height:10px;max-width:none;padding:0!important;
    border-radius:50%!important;background:currentColor!important;vertical-align:middle;margin-right:4px}
  #expSummary .kpi-total{display:none}
  /* Add card: the second helper line repeats what the Next button says */
  .overlay .modal:has(#m_kind) .modal-body>.hint:last-child{display:none}
  /* Bins: the Add bin tile sits on the same template as a real bin */
  .grid .bin-card.bin-new .bin-body{top:6%!important;height:40%!important}   /* the same band a real bin draws its art in */

  /* ════ CLEANLINESS LOOP, ROUND 3 ════ */
  /* Top bar holds exactly the three controls (rule 1): the filter funnel steps out; the Filters
     button on the row below opens the same menu, and set filters still show as chips in the bar */
  #invChipFunnel{display:none!important}
  #view-inventory .toolbar .search-wrap{padding-right:14px!important}
  /* Shop menu: the top bar's + and lock hide while it is open, so nothing bright floats over it */
  body:has(#hqSidebar.open) :is(#btnManual,header #btnViewer){visibility:hidden}
  /* Cart rows: the name gets room (the set/number block and the amount give some back) */
  body.pd-v-pos .cc-row{gap:8px}
  body.pd-v-pos .cc-id{width:82px}
  body.pd-v-pos .cc-row input.li-price{width:74px;min-width:66px;font-size:16px}
  body.pd-v-pos .cc-row .cc-ph{width:30px;height:42px}
  /* Card profile: the hero already shows the market price, so its tile goes; the other three share a row */
  .overlay .modal.cardprofile .cp-statrow.cp-static:not(#cpCostSum)>:first-child{display:none}
  .overlay .modal.cardprofile .cp-statrow.cp-static:not(#cpCostSum){grid-template-columns:repeat(3,minmax(0,1fr))}
  /* Settings list: the header is just Settings; the sub-page name and Saved show once you are in one */
  body.stg-ios.iu-page:not(.stg-drill) #hqPanel :is(#stgCrumb,#stgSaved){display:none}
  body.stg-ios.iu-page:not(.stg-drill) #hqPanel #pnlX{margin-left:auto!important}
  /* Toggles that were painted as primary read as a second Save. On is a yellow outline instead. */
  .overlay .modal #ei_mvManual.primary{background:rgba(255,203,5,.12)!important;border-color:rgba(255,203,5,.75)!important;color:var(--accent)!important}
  /* Business chips: a picked business is a lit glass pill with a yellow edge; its own colour dot stays */
  #fundChips .fc-chip,#fpChips .fc-chip{border-radius:20px!important;min-height:40px;background:rgba(255,255,255,.05)!important;background-image:none!important;border-color:rgba(255,255,255,.12)!important}
  #fundChips .fc-chip.primary,#fpChips .fc-chip.primary{background:rgba(255,255,255,.16)!important;border-color:rgba(255,203,5,.8)!important;color:var(--txt)!important;box-shadow:none!important}

  /* ════ CLEANLINESS LOOP, ROUND 4 ════ */
  /* Cart rows: the card name wraps to two lines instead of clipping to six letters */
  body.pd-v-pos .cc-nm .cc-t{white-space:normal!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.2;font-size:12.5px}
  /* Stats tabs: tighter pills and a longer fade, so the last visible one fades out instead of looking cut */
  #metricViewSeg button{padding:0 11px!important;font-size:12px!important}
  #metricViewSeg{-webkit-mask-image:linear-gradient(90deg,#000 68%,transparent);mask-image:linear-gradient(90deg,#000 68%,transparent)}
  /* Icon-only buttons are circles everywhere (business edit, sheet and settings close, back) */
  main .iconbtn,#hqPanel .iconbtn,#hqSidebar .iconbtn,.overlay .modal .modal-head .iconbtn,#fundCards [data-edit-fund]{border-radius:50%!important;width:40px!important;height:40px!important;min-width:40px;min-height:40px}

  /* ════ CLEANLINESS LOOP, ROUND 5 ════ */
  /* Cart: Clear deal rides the sale-tabs row (which slides), so the options row is one line */
  #view-pos .toolbar #saleTabs{flex:1 1 0!important;min-width:0}
  #view-pos .toolbar #btnClearDeal{order:-1;flex:none;margin:0!important}
  #view-pos .toolbar #saleTabs{order:-2}
  #view-pos .toolbar #btnClearDeal{order:-1}
  #view-pos .toolbar::before{content:'';flex-basis:100%;height:0;order:0}   /* line break: the deal options start their own row */
  #view-pos .toolbar :is(#customerBar,#lotBar,#fundBar,#channelBar){order:1}
  /* Card profile: the picked tab is a lit pill, the tabs get breathing room */
  .overlay .modal.cardprofile .cp-tabs{gap:6px;border-bottom:0!important}
  .overlay .modal.cardprofile .cp-tab{border-radius:18px;padding:0 14px;border-bottom:0!important}
  /* Item block uses the whole width (Ian 2026-09-30, "space everything out") */
  .overlay .modal.cardprofile .cp-tabs{gap:2px}
  .overlay .modal.cardprofile .cp-tab{flex:1 0 auto;white-space:nowrap;justify-content:center;padding:0 5px;font-size:12px}
  .overlay .modal.cardprofile .cp-rail{grid-template-columns:42% minmax(0,1fr)}
  .overlay .modal.cardprofile :is(#ei_mv,#es_mv){flex:1 1 auto;width:100%!important;max-width:none!important}
  .overlay .modal.cardprofile .cp-acqrow>.field:nth-child(3){grid-column:1/-1}
  .overlay .modal.cardprofile :is(#ei_addBuy,#es_addBuy,#es_addSell){width:100%;justify-content:center}
  .overlay .modal.cardprofile .cp-conds>*{flex:1 1 auto;justify-content:center}
  .overlay .modal.cardprofile .fc-chip{flex:1 1 auto;justify-content:center}
  .overlay .modal.cardprofile .cp-tab.on{background:rgba(255,255,255,.14);color:var(--txt)}
  /* Shop menu: Settings and Contact us sit right under the boxes instead of the far bottom */
  #hqSidebar .sb-body{flex:0 0 auto!important}
  #hqSidebar .sb-foot{border-top:0!important}
  /* Settings list: no selected marker, and no empty indent where it sat (2026-09-29) */
  body.stg-ios.iu-page:not(.stg-drill) #hqPanel .stgnav .nv-name::before{display:none!important}
  /* Stats filters: both names whole on one row, the as-of date on the next. Sharing one row
     (2026-09-30) still cut them to "All bu" and "All label" in the iPhone's font (2026-10-05). */
  #statsFilters{flex-wrap:wrap}
  #statsFilters select{flex:1 1 0;min-width:0;max-width:none;padding-left:9px;padding-right:2px;font-size:12px;text-overflow:ellipsis}
  #statsFilters .stats-asof{flex:1 1 100%;gap:4px}
  #statsFilters .stats-asof .k{font-size:0}
  #statsFilters .stats-asof .k::before{content:'As of';font-size:10px}
  #statsFilters input[type=date]{max-width:104px;padding-left:7px;padding-right:4px;font-size:12px}
  #metricViewSampleNote{display:none}

  /* ════ IAN'S ANSWERS, 2026-09-29 ════ */
  /* Select mode keeps its bar at the bottom (it only shows while selecting, and up top it would have
     to freeze with the search bar). One slim row: the count, then the actions sliding sideways. */
  .bulk-select-footer{flex-direction:row!important;align-items:center!important;gap:8px!important;padding:8px 10px calc(8px + var(--pd-safe))!important;
    border-top:1px solid rgba(255,203,5,.6)!important}
  .bulk-select-footer .bf-count{flex:none;text-align:left!important;font-size:12.5px!important;max-width:78px;white-space:normal!important;line-height:1.2}
  .bulk-select-footer .bf-actions{flex:1 1 auto;min-width:0;overflow-x:auto;scrollbar-width:none;-webkit-mask-image:linear-gradient(90deg,#000 85%,transparent);mask-image:linear-gradient(90deg,#000 85%,transparent)}
  .bulk-select-footer .bf-actions::-webkit-scrollbar{display:none}
  .bulk-select-footer .bf-actions .btn,.bulk-select-footer .bf-actions select{border-radius:20px!important;min-height:40px}

  /* ════ BREAK TEST, 2026-10-05 ════ */
  /* Every field is 16px: under that the iPhone zooms the page on focus (the sort select, the
     profile's set and number, the cart's percent and history fields, the Stats filters) */
  :is(main,#hqPanel,.overlay .modal,.bulk-select-footer) :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]){font-size:16px!important}
}
