/* ══ THE PHONE APP ════════════════════════════════════════════════════════════
   23 Sep 2026. His law: "something familiar is easy to use and navigate". So every
   part here is one that WhatsApp, Grab, Tokopedia and the phone's own Contacts app
   already use, and nothing is invented:
     · a big title, a search bar under it, filter chips under that — and that whole
       head STAYS PUT while only the list moves; scrolled, the title shrinks to a bar
     · rows: a round picture, a bold line, a grey line, the time on the right
     · one pill near the thumb, the same in every app (Projects' own, 23 Nov 2026): the red + for the
       one thing you came to do, three words at most, and the fourth in a round button
     · the wall is a grid of his own drawn icons that pages sideways past eight

   ⚠ THE NEW LOOK, 9 Nov 2026 (his approved office phone, design-gallery/tries/office-phone).
     Same parts, same places, same behaviour; the LOOK is the CRM parts kit's: its font, its
     colours (the --sp-* tokens, which the kit puts on every element carrying class "kt"),
     rows held in one soft panel per section, the state as a ring and a plain sentence (no
     red "!"), soft pill filters.
     Every phone host carries "kt" (phone-app.js paFrame, paSheet, cphDetail), so the
     tokens are there wherever these rules draw.
   ⚠ EVERY RULE IS INSIDE THE PHONE QUERY. Above 760px this file does nothing, so the
     laptop cannot be touched by it.
   ⚠ EVERY CLASS IS PREFIXED pa-. The app already owns .chip, .row, .av, .prog, .act and
     .tabs; borrowing one of those names is how white text ended up on white before.
     (The kit's own classes — .tg, .k-btn, .ck-in — appear only where phone-app.js asks for them.)
   ⚠ COLOURS ARE THE KIT'S NAMED ONES (--sp-*), dark mode with them: the kit switches them under
     :root[data-theme="dark"], the CRM's own dark switch. Projects' bar (outside any host) keeps app.css names.
   ⚠ THE TECHNICIAN AND THE DRIVER NEVER SEE ANY OF THIS — their screens are not these
     views, and his words were "the only thing for you not to touch". */
/* the wall's host exists only on a phone. ⚠ Outside the query on purpose: turning a phone
   sideways past 760px must not leave it drawn over the laptop's own grid. */
#paWall{display:none}
@media (max-width:760px){

  /* ── the host: one per app, the whole screen, head on top, list under it ─── */
  :is(#paWall,#mphHost,#dphHost,#cphHost,#cphOne,#mtpHost,#paProj,#paVisits,#paFiles).pa{
    position:relative;display:flex;flex-direction:column;height:100vh;height:100dvh;
    padding:calc(4px + var(--sat,0px)) 0 0;background:var(--sp-page);color:var(--sp-ink);
    font-family:var(--sp-font);overflow:hidden;overflow:clip}
  /* ⚠ CLIP, NOT HIDDEN. A box with overflow:hidden can still be scrolled by the browser —
     focus a search box inside the list and it slides the whole frame up to show it, and
     the head that must never move goes off the top. clip cannot be scrolled at all. */
  #view-home{padding:0!important;overflow:hidden}
  /* ⚠ THE PAGE KEEPS 9px FREE FOR A SCROLLBAR (app.css, main{scrollbar-gutter:stable}). These
     screens never scroll the page — only their list moves — so that 9px sat on the right of
     every one and the wall's grid was 23px from the left edge and 32 from the right. "these
     are not centered". Same cure the Maintenance Dashboard already takes (board.css). */
  main:has(> :not(.hidden) > .pa){overflow:hidden;scrollbar-gutter:auto}
  #view-home > *:not(#paWall){display:none!important}

  /* ── THE HEAD — it does not scroll. This is the part that always broke. ────── */
  .pa-top{flex-shrink:0;background:var(--sp-page);position:relative;z-index:3;transition:box-shadow .2s}
  .pa.compact .pa-top{box-shadow:0 8px 16px -14px var(--sp-shadow)}
  /* scrolled: what passes under the head fades out instead of being cut in half at its edge ("this bugs too",
     12 Nov 2026: the head has no visible edge in the new look, so a sliced row read as broken). Over the list,
     never in it: nothing moves. */
  .pa-top::after{content:"";position:absolute;left:0;right:0;top:100%;height:18px;pointer-events:none;
    background:linear-gradient(var(--sp-page),color-mix(in srgb,var(--sp-page) 0%,transparent));opacity:0;transition:opacity .2s ease}
  .pa.compact .pa-top::after{opacity:1}
  :root[data-theme="dark"] .pa.compact .pa-top{box-shadow:0 1px 0 var(--sp-rule)}
  .pa-big{padding:8px calc(var(--capw,150px) + 20px) 0 16px;min-height:52px;display:flex;align-items:center}
  .pa-big .t{font-size:28px;font-weight:700;letter-spacing:-.01em;line-height:1.2;color:var(--sp-ink);
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:font-size .2s ease}
  .pa.compact .pa-big .t{font-size:18px}
  /* the line under the title: where you are, and Manage on the right of it */
  .pa-sub{display:flex;align-items:center;gap:8px 10px;padding:10px 16px 2px;max-height:64px;overflow:hidden;
    transition:max-height .2s ease,opacity .15s ease,padding .2s ease}
  .pa-sub .s{font-size:16px;color:var(--sp-grey);flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .pa.compact .pa-sub.fold{max-height:0;opacity:0;padding-top:0}
  /* the office picker: the kit's outlined pill */
  .pa-pill{flex-shrink:0;min-height:44px;padding:0 12px 0 16px;border:0;border-radius:999px;
    background:var(--sp-bg);color:var(--sp-ink);box-shadow:inset 0 0 0 1.5px var(--sp-line);font:600 16px var(--sp-font);cursor:pointer;
    display:inline-flex;align-items:center;gap:8px;transition:box-shadow .15s ease,transform .16s var(--sp-ease-out)}
  .pa-pill .c{font-size:12px;color:var(--sp-ink)}
  .pa-pill:active{transform:scale(.97)}
  /* Manage (a pill with no office in it): a plain word button, as the kit's ghost */
  .pa-sub .pa-pill:not(:has(.bl)){margin-left:auto;margin-right:-8px;padding:0 10px;box-shadow:none;background:none;font-size:15px}
  .pa-sub .pa-pill:not(:has(.bl)):active{background:var(--sp-soft)}
  .pa-pill,.pa-sec .go{position:relative}

  .pa-search{margin:14px 16px 0;height:48px;border-radius:999px;background:var(--sp-wash);display:flex;align-items:center;gap:10px;padding:0 4px 0 16px}
  .pa-search svg{width:18px;height:18px;stroke:var(--sp-grey);fill:none;stroke-width:2;stroke-linecap:round;flex-shrink:0}
  .pa-search input{flex:1;min-width:0;border:0;background:none;outline:none;color:var(--sp-ink);
    font:400 16px var(--sp-font)!important;padding:0;height:46px}
  .pa-search input::placeholder{color:var(--sp-grey)}
  .pa-search:focus-within{background:var(--sp-bg);box-shadow:inset 0 0 0 1.5px var(--sp-line)}
  .pa-search .x{border:0;background:none;color:var(--sp-grey);font-size:20px;width:44px;height:44px;border-radius:50%;cursor:pointer;display:none}
  .pa-search.has .x{display:block}

  /* the filters: the kit's soft pills (F) — words in grey, the chosen one ink on a soft pill */
  .pa-chips{display:flex;gap:2px;padding:10px 16px 6px;overflow-x:auto;scrollbar-width:none}
  .pa-chips::-webkit-scrollbar{display:none}
  .pa-chip{flex-shrink:0;height:44px;padding:0 14px;border-radius:999px;border:0;background:none;
    color:var(--sp-grey);font:500 16px var(--sp-font);cursor:pointer;display:flex;align-items:center;gap:8px;white-space:nowrap;transition:color .16s ease,background-color .16s ease}
  .pa-chip .n{font-size:14px;color:var(--sp-grey);font-variant-numeric:tabular-nums}
  .pa-chip.on{background:var(--sp-soft);color:var(--sp-ink)}
  .pa-gap{height:12px}

  /* ── the list — the only thing that moves ───────────────────────────────── */
  /* ⚠ THE PAGE NEVER MOVES (9 Nov 2026, his "the whole page comes down and shows white"): no pull past the top
     on the page itself, and the list stops dead at its top and bottom instead of dragging the frame with it */
  /* office logins only: the technician's and the driver's screens keep the browser's own pull exactly as today */
  html:has(> body:not(.role-tech):not(.role-driver)),body:not(.role-tech):not(.role-driver){overscroll-behavior:none}
  .pa-list{flex:1;min-height:0;overflow-y:auto;overscroll-behavior-y:none;-webkit-overflow-scrolling:touch;
    padding-bottom:calc(150px + var(--sab,0px));scrollbar-width:none}
  /* ⚠ THE 4px AT THE TOP IS A SPACER, NEVER padding-top (12 Nov 2026): a sticky heading sticks to the list's
     padding edge, so 4px of padding left a 4px window above every stuck heading ("A", "Today") where the rows
     scrolling past showed through. Same 4px at rest; stuck headings now meet the head. */
  .pa-list::before{content:"";display:block;height:4px}
  .pa-list::-webkit-scrollbar{display:none}
  .pa.notabs .pa-list{padding-bottom:calc(104px + var(--sab,0px))}
  /* a real heading, in sentence case (his rule: no small grey capitals) */
  .pa-sec{position:sticky;top:0;z-index:2;background:var(--sp-page);padding:22px 20px 10px;
    font-size:18px;font-weight:700;color:var(--sp-ink);letter-spacing:-.01em;line-height:1.25;
    display:flex;align-items:center;gap:8px}
  .pa-sec.red{color:var(--tg-red-t)}
  /* a heading under a heading (Late under Today): smaller and softer */
  .pa-sec.sub{position:static;padding:16px 20px 6px;font-size:16px;color:var(--sp-grey)}
  .pa-sec.sub.red{color:var(--tg-red-t)}
  .pa-sec .go{margin-left:auto;margin-right:-8px;text-transform:none;letter-spacing:0;font-size:15px;font-weight:600;color:var(--sp-ink);
    background:none;border:0;border-radius:999px;cursor:pointer;min-height:44px;padding:0 10px;font-family:var(--sp-font)}
  .pa-sec .go:active{background:var(--sp-soft)}
  .pa-empty{padding:32px 24px;text-align:center;color:var(--sp-grey);font-size:16px;line-height:1.5}

  /* the row everyone knows: a face, a bold name, a grey line, the state as a ring and a sentence */
  .pa-row{display:flex;gap:12px;align-items:center;width:calc(100% - 32px);min-height:68px;margin:0 16px;padding:10px 16px;border:0;
    background:var(--sp-wash);position:relative;text-align:left;cursor:pointer;font-family:var(--sp-font);color:var(--sp-ink);
    content-visibility:auto;contain-intrinsic-size:auto 76px;transition:background-color .15s ease}
  /* ⚠ ONE SOFT PANEL PER SECTION, drawn by the rows themselves: the first row of a run rounds the top,
     the last rounds the bottom. No markup wraps them, so every list keeps the rows it always drew. */
  .pa-row:not(.pa-row + .pa-row){border-top-left-radius:18px;border-top-right-radius:18px;padding-top:14px}
  .pa-row:not(:has(+ .pa-row)){border-bottom-left-radius:18px;border-bottom-right-radius:18px;padding-bottom:14px}
  /* rows are fractional pixels tall: the panel colour runs 1px under the next row so no hairline of page shows between */
  .pa-row:has(+ .pa-row){box-shadow:0 1px 0 var(--sp-wash)}
  .pa-row:active{background:var(--sp-soft)}
  .pa-row:focus-visible{outline:2px solid var(--sp-red);outline-offset:-2px}
  .pa-av{width:44px;height:44px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;
    color:#fff;font-size:15px;font-weight:600;position:relative;background-size:cover;background-position:center}
  .pa-av.sq{border-radius:14px;background:var(--sp-soft);color:var(--sp-ink)}
  .pa-av.sq svg{width:22px;height:22px;stroke:var(--sp-ink);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  /* nobody on it yet: an empty dashed circle */
  .pa-av.none{background:none;color:var(--sp-grey);border:1.6px dashed var(--sp-grey)}
  /* a second person on the job peeks out at the corner */
  .pa-av .pa-av2{position:absolute;right:-6px;bottom:-4px;width:24px;height:24px;margin:0;font-size:10px;box-shadow:0 0 0 2px var(--sp-wash)}
  .pa-av .dot{position:absolute;right:-1px;bottom:-1px;width:14px;height:14px;border-radius:50%;border:2.5px solid var(--sp-wash);background:var(--sp-line)}
  .pa-av .dot.go{background:var(--tg-green-m)} .pa-av .dot.wait{background:var(--tg-amber-m)} .pa-av .dot.now{background:var(--tg-red-m)} .pa-av .dot.done{background:var(--sp-ink)}
  .pa-row .m{flex:1;min-width:0;align-self:stretch;display:flex;flex-direction:column;justify-content:center;gap:2px;padding:0}
  .pa-row .t{font-size:16px;font-weight:700;line-height:1.3;overflow-wrap:anywhere;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .pa-row .s{font-size:14px;color:var(--sp-grey);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .pa-row .s b{font-weight:600;color:var(--sp-ink)}
  .pa-row .s .go{color:var(--tg-green-t)} .pa-row .s .wait{color:var(--tg-amber-t)} .pa-row .s .now,.pa-row .s.now{color:var(--tg-red-t)}
  /* the state: the kit's ring (its word only for a screen reader) and the sentence beside it */
  .pa-row .st{display:flex;align-items:flex-start;gap:6px;margin-top:4px;font-size:14px;line-height:1.35;color:var(--sp-ink)}
  .pa-row .st .tg{flex:none;height:auto;padding:0;gap:0;background:none;box-shadow:none;margin-top:1px}
  .pa-row .st .tg-w{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .pa-row .st .sw{min-width:0;overflow-wrap:anywhere}
  .pa-row .r{align-self:flex-start;display:flex;flex-direction:column;align-items:flex-end;gap:5px;flex-shrink:0;padding-top:2px}
  .pa-row .tm{font-size:14px;color:var(--sp-grey);font-variant-numeric:tabular-nums;white-space:nowrap}
  /* no arrow on a row: the whole row is the button */
  .pa-row .ch{display:none}

  /* the letters down the right edge, like Contacts */
  .pa-rail{position:absolute;right:0;top:50%;transform:translateY(-50%);z-index:4;display:flex;flex-direction:column;align-items:center;padding:4px 0}
  .pa-rail button{border:0;background:none;width:32px;height:20px;font:600 14px var(--sp-font);color:var(--tg-red-t);cursor:pointer;padding:0}

  /* ── the planner's day strip and its rows ─────────────────────────────────── */
  .pa-days{display:flex;gap:6px;padding:12px 16px 2px;overflow-x:auto;scrollbar-width:none}
  .pa-days::-webkit-scrollbar{display:none}
  .pa-day{flex:0 0 52px;height:68px;border:0;border-radius:16px;background:var(--sp-wash);display:flex;flex-direction:column;
    align-items:center;justify-content:center;gap:0;cursor:pointer;font-family:var(--sp-font);position:relative;color:var(--sp-ink);
    transition:background-color .18s ease,color .18s ease,transform .16s var(--sp-ease-out)}
  .pa-day:active{transform:scale(.95)}
  .pa-day .dn{font-size:14px;color:var(--sp-grey);font-weight:400}
  .pa-day .dd{font-size:18px;font-weight:700;color:var(--sp-ink);font-variant-numeric:tabular-nums}
  .pa-day.today .dd{color:var(--tg-red-t)}
  .pa-day .n{position:absolute;bottom:7px;width:5px;height:5px;border-radius:50%;background:transparent}
  .pa-day.has .n{background:var(--sp-grey)}
  .pa-day.past{opacity:.62}
  .pa-day.on{background:var(--sp-ink);opacity:1} .pa-day.on .dn,.pa-day.on .dd{color:var(--sp-bg)}
  .pa-day.on .n{background:var(--sp-bg)}
  .pa-psec{display:flex;align-items:center;gap:10px;padding:22px 20px 10px;font-size:18px;font-weight:700;color:var(--sp-ink)}
  .pa-psec .pav{width:32px;height:32px;border-radius:50%;color:#fff;font-size:14px;font-weight:600;display:flex;align-items:center;justify-content:center;flex-shrink:0}
  .pa-psec .pn{margin-left:auto;font-size:14px;font-weight:500;color:var(--sp-grey);font-variant-numeric:tabular-nums}
  .pa-psec.red{color:var(--tg-red-t)}
  .pa-bar{display:none}
  .pa-free{margin:0 16px;padding:12px 16px;border-radius:18px;background:var(--sp-wash);font-size:16px;color:var(--sp-grey);line-height:1.6}
  .pa-free b{color:var(--sp-ink);font-weight:600}

  /* ── THE BAR NEAR THE THUMB: Projects' pill (phone-projects.css .pd-pill), number for number ── */
  .pa .pa-nav{position:fixed;z-index:60;left:50%;bottom:calc(18px + var(--sab,0px));translate:-50% 0;display:flex;align-items:center;gap:4px;padding:4px;
    border-radius:999px;background:color-mix(in srgb,var(--sp-bg) 88%,transparent);-webkit-backdrop-filter:saturate(1.4) blur(10px);backdrop-filter:saturate(1.4) blur(10px);
    box-shadow:inset 0 0 0 1px var(--sp-rule),0 10px 28px -10px var(--sp-shadow);max-width:calc(100vw - 16px);
    font:400 16px/1.45 var(--sp-font);overflow-wrap:normal;transition:opacity .2s ease,transform .26s var(--sp-ease-out)}
  .pa .pa-tabs{position:relative;display:flex}
  .pa .pa-thumb{position:absolute;top:0;bottom:0;left:0;border-radius:999px;background:var(--sp-soft);transform:translateX(var(--tx,0px)) scaleX(var(--sq,1));
    width:var(--tw,80px);transition:transform 90ms linear,width 90ms linear,opacity .18s ease}
  .pa .pa-thumb.snap{transition:transform .38s cubic-bezier(.32,.72,0,1),width .38s cubic-bezier(.32,.72,0,1),opacity .18s ease}
  .pa .pa-thumb.off{opacity:0}
  .pa .pa-tabs button{position:relative;z-index:1;height:48px;min-width:44px;padding:0 var(--pad,15px);border:0;background:none;color:var(--sp-grey);font:600 16px var(--sp-font);
    white-space:nowrap;cursor:pointer;transition:color .18s ease}
  .pa .pa-tabs button[aria-selected="true"]{color:var(--sp-ink)}
  .pa .pa-nav :is(.pa-tabs button,.pa-rnd,.pa-fab):focus-visible{outline:2px solid var(--sp-red);outline-offset:-2px;border-radius:999px}
  .pa .pa-fab{width:48px;min-height:48px;height:48px;padding:0;border-radius:50%;font-size:16px;box-shadow:0 6px 16px -6px rgba(217,37,46,.6)}
  .pa .pa-fab svg{width:24px;height:24px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  .pa .pa-rnd{position:relative;display:grid;place-items:center;width:48px;height:48px;padding:0;border:0;border-radius:50%;background:var(--sp-ink);color:var(--sp-bg);
    cursor:pointer;transition:transform .14s var(--sp-ease-out),background-color .15s ease}
  .pa .pa-rnd:active,.pa .pa-fab:active{transform:scale(.92)}
  .pa .pa-rnd svg{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
  .pa .pa-rnd[aria-label="More"] svg{stroke-width:3}
  .pa .pa-rnd:is(.is-on,[aria-expanded="true"]){background:var(--sp-red-fill);color:var(--sp-on-red)}
  /* ⚠ EVERY PHONE BAR, Projects', Data Bank's and Files' too: A FINGER ON THE BAR MOVES NOTHING. A drag that starts
     here is not a scroll and not a selection; a tap still works. (js/phone-app.js phoneBar is the iPhone's half.) */
  :is(.pd-pill,.pk-pill,.pa-nav),:is(.pd-pill,.pk-pill,.pa-nav) *{touch-action:none!important;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
  :is(.pd-pill,.pk-pill,.pa-nav) > *{flex:none}
  /* ⚠ THE PAGE HAS NOTHING TO SCROLL under a framed screen (office logins: the hosts exist for nobody else).
     1. the shell was 100vh, and 100vh is the window WITHOUT the address bar: the page was an address bar taller than
        the screen. 2. two hidden date boxes of Imports lay under the shell until imports.css arrived (25px).
     Either one let a finger on the bar push the whole page, bar and list, up. */
  html:has(> body > .app > main > :not(.hidden) > .pa),body:has(> .app > main > :not(.hidden) > .pa){overflow:hidden}
  body > .app:has(> main > :not(.hidden) > :is(.pa,.pk,#pjDeck:not(.is-aside))){height:100vh;height:100dvh}
  body:not(.role-tech):not(.role-driver) > .inb-hidq{position:fixed;left:0;top:0;width:1px;height:1px;opacity:0;pointer-events:none;border:0;padding:0}
  /* 3. the laptop screen's own foot (84 to 96px) was still there under the frame: main was taller than the frame */
  body:not(.role-tech):not(.role-driver):not(.mph-desk) #view-maintenance:has(> #mphHost),body:not(.role-tech):not(.role-driver):not(.dph-desk) #view-shipment:has(> #dphHost){padding-bottom:0!important}
  /* a message sits above the bar, never on it */
  body:has(> .app > main > :not(.hidden) > :is(.pa.has-bar,.pk,#pjDeck)) .toastwrap{bottom:calc(84px + var(--sab,0px))}
  body:not(.role-tech):not(.role-driver):has(> .app > main > :not(.hidden) > .pa.has-bar) .k-tell .m-pile{bottom:calc(84px + var(--sab,0px))}
  /* the narrowest phones: the same bar, a little closer, so nothing is cut */
  @media (max-width:340px){
    :is(#pjDeck .pd-pill,.pk .pk-pill,.pa .pa-nav){gap:2px}
    :is(#pjDeck .pd-seg,.pk .pk-seg,.pa .pa-tabs) button{font-size:15px}
    :is(#pjDeck .pd-plus,#pjDeck .pd-inb,.pk .pk-plus,.pk .pk-inb,.pa .pa-fab,.pa .pa-rnd){width:44px;height:44px;min-height:44px}
  }
  @media (prefers-reduced-motion:reduce){
    .pa .pa-thumb,.pa .pa-thumb.snap,.pa .pa-tabs button,.pa .pa-rnd{transition:none}
  }

  /* ── THE WALL ────────────────────────────────────────────────────────────── */
  /* the date shares its line with the capsule; the greeting sits UNDER it and gets the whole
     width, as in the prototype — beside the capsule a longer name was cut to "caleb…" */
  .pa-hello{padding:0 16px;min-height:44px}
  .pa-hello .d{font-size:14px;color:var(--sp-grey);min-height:44px;max-height:44px;display:flex;align-items:center;
    padding-right:calc(var(--capw,150px) + 10px);overflow:hidden;transition:max-height .2s,min-height .2s,opacity .15s}
  .pa-hello .h{font-size:28px;font-weight:700;letter-spacing:-.01em;line-height:1.2;color:var(--sp-ink);transition:font-size .2s;text-wrap:balance;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .pa.compact .pa-hello .d{max-height:0;min-height:0;opacity:0}
  .pa.compact .pa-hello .h{font-size:18px;padding-top:14px;padding-right:calc(var(--capw,150px) + 10px);-webkit-line-clamp:1}
  .pa-tiledeck{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain}
  .pa-tiledeck::-webkit-scrollbar{display:none}
  .pa-grid{flex:0 0 100%;scroll-snap-align:start;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px 2px;padding:10px 6px 4px;align-content:start}
  .pa-tile{border:0;background:none;display:flex;flex-direction:column;align-items:center;gap:8px;cursor:pointer;padding:4px 0;font-family:var(--sp-font);min-width:0;color:var(--sp-ink)}
  .pa-tile .ti{width:64px;height:64px;border-radius:20px;background:var(--sp-wash);display:flex;align-items:center;justify-content:center;position:relative;
    transition:transform 160ms var(--sp-ease-out),background-color 150ms ease}
  /* his drawn icons are made for a light tile: in dark the tile stays light */
  :root[data-theme="dark"] .pa-tile .ti{background:#e9e9ec}
  .pa-tile .ti img{width:40px;height:40px;object-fit:contain;display:block}
  /* a folder (Office, More): four small pictures in the same square */
  .pa-tile .ti.fold{display:grid;grid-template-columns:repeat(2,21px);grid-template-rows:repeat(2,21px);gap:5px;place-content:center}
  .pa-tile .ti.fold img{width:21px;height:21px}
  .pa-tile .ti.fold .let{width:21px;height:21px;font-size:15px;line-height:21px;text-align:center}
  .pa-foldgrid{padding:10px 6px 26px}
  .pa-tile .ti .let{font-size:22px;font-weight:700;color:var(--sp-grey)}
  :root[data-theme="dark"] .pa-tile .ti .let{color:#5f5f66}
  /* ⚠ .tb IS ALSO THE KIT'S TABS ROOT (width:100%), which reaches this badge inside the kt host: width auto here */
  .pa-tile .tb{position:absolute;top:-6px;right:-8px;width:auto;min-width:24px;height:24px;padding:0 7px;border-radius:999px;background:var(--sp-red-fill);font-variant-numeric:tabular-nums;
    color:var(--sp-on-red);font-size:14px;font-weight:700;display:flex;align-items:center;justify-content:center;border:0;box-shadow:0 0 0 2.5px var(--sp-page)}
  /* the job list still on its way (phone-app.js paJobsWait): a quiet grey mark where the count will be */
  .pa-tile .tb.wait{background:var(--sp-wash);color:var(--sp-grey);letter-spacing:.5px;padding:0 6px}
  /* names at 14 (9 Nov 2026, the sales-phone prototype his pick): two lines at most, never broken inside a word */
  .pa-tile .tt{font-size:14px;font-weight:500;color:var(--sp-ink);text-align:center;line-height:1.25;max-width:100%;letter-spacing:-.01em;word-break:keep-all;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .pa-tile:active .ti{transform:scale(.94)}
  /* something waits (beside a wide main app): a dot, not a number */
  .pa-tile .dot{position:absolute;top:-2px;right:-2px;width:14px;height:14px;border-radius:7px;background:var(--sp-red-fill);box-shadow:0 0 0 2px var(--sp-page)}
  /* his main app spans two places and says what waits (option C) */
  .pa-tile.wide{grid-column:span 2;flex-direction:row;align-items:center;gap:10px;height:64px;padding:0 12px 0 0;border-radius:20px;
    background:var(--sp-wash);text-align:left;transition:transform 160ms var(--sp-ease-out)}
  .pa-tile.wide:active{transform:scale(.98)}
  .pa-tile.wide:active .ti{transform:none}
  .pa-tile.wide .ti{background:none;flex:none;width:46px;margin-left:6px}
  :root[data-theme="dark"] .pa-tile.wide .ti{background:none}
  .pa-tile.wide .ti img{width:34px;height:34px}
  .pa-tile.wide .wt{display:flex;flex-direction:column;min-width:0}
  .pa-tile.wide .tt{text-align:left;font-weight:700;font-size:15px;-webkit-line-clamp:1}
  .pa-tile.wide .wl{font-size:14px;letter-spacing:-.01em;color:var(--sp-grey);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .pa-tile.wide .wl b{color:var(--tg-red-t);font-weight:700}
  .pa-tile:focus-visible{outline:2px solid var(--sp-red);outline-offset:2px;border-radius:18px}
  .pa-dots{display:flex;justify-content:center;align-items:center;gap:6px;height:20px;padding:0;margin-top:10px}
  .pa-dots i{width:7px;height:7px;border-radius:4px;background:var(--sp-line);transition:background-color .2s,width .22s var(--sp-ease-out)}
  .pa-dots i.on{background:var(--sp-ink);width:20px}

  /* notices from the office: soft cards with the kind as the kit's tinted tag — "notice is ass without the design" */
  .pa-notes{display:flex;gap:10px;padding:0 16px 4px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;scroll-padding:0 16px}
  .pa-notes::-webkit-scrollbar{display:none}
  .pa-note{flex:0 0 86%;scroll-snap-align:start;border-radius:18px;padding:16px;background:var(--sp-wash);
    display:grid;grid-template-rows:auto auto 1fr auto;gap:6px;min-height:172px;text-align:left;font-family:var(--sp-font)}
  .pa-note .nh{display:flex;align-items:center;justify-content:space-between;gap:8px}
  .pa-note .nh .tg{height:28px}
  .pa-note .nd{margin-left:auto;font-size:14px;color:var(--sp-grey)}
  .pa-note .t{font-size:18px;font-weight:700;line-height:1.3;color:var(--sp-ink);overflow-wrap:anywhere}
  .pa-note .s{font-size:16px;color:var(--sp-grey);line-height:1.4;white-space:pre-line;overflow-wrap:anywhere}
  .pa-note .nf{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--sp-ink)}
  .pa-note .nf .fa{width:28px;height:28px;border-radius:50%;color:#fff;font-size:12px;font-weight:600;display:flex;align-items:center;justify-content:center}
  /* your day: the kind of thing above its name, in the one soft panel */
  .pa-row.pa-dayrow{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"k r" "m r";align-items:start;row-gap:2px}
  .pa-dayrow .k{grid-area:k;font-size:14px;color:var(--sp-grey)}
  .pa-dayrow .m{grid-area:m}
  .pa-dayrow .r{grid-area:r}

  /* ── a pushed screen: a back arrow, then the thing itself ─────────────────── */
  .pa-bar-top{display:flex;align-items:center;min-height:52px;padding:0 calc(var(--capw,150px) + 16px) 0 6px;flex-shrink:0}
  .pa-back{width:44px;height:44px;border:0;border-radius:50%;background:none;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;color:var(--sp-ink)}
  .pa-back:active{background:var(--sp-soft)}
  .pa-back svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
  .pa-bar-top .bt{font-size:16px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;color:var(--sp-grey)}
  .pa-hero{padding:4px 20px 0}
  .pa-hero .t{font-size:28px;font-weight:700;letter-spacing:-.01em;line-height:1.2;color:var(--sp-ink);overflow-wrap:anywhere;text-wrap:balance}
  .pa-hero .s{font-size:16px;color:var(--sp-grey);margin-top:6px;line-height:1.45}
  .pa-acts{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:8px;padding:18px 16px 4px}
  .pa-acts > *{min-width:0;min-height:68px;border:0;border-radius:16px;background:var(--sp-wash);display:flex;flex-direction:column;align-items:center;
    justify-content:center;gap:4px;padding:8px 4px;font:600 14px var(--sp-font);color:var(--sp-ink);cursor:pointer;text-decoration:none;transition:transform .16s var(--sp-ease-out)}
  .pa-acts > *:active{transform:scale(.96)}
  .pa-acts svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
  .pa-acts .pri{background:var(--sp-ink);color:var(--sp-bg)}   /* the main act, the kit's dark (approved office phone, 9 Nov 2026) */
  .pa-acts .off{opacity:.4;pointer-events:none}
  /* Profile · Machines · Orders: the kit's view switch */
  .pa-seg{display:flex;margin:22px 16px 4px;padding:3px;border-radius:12px;background:var(--sp-soft);position:sticky;top:0;z-index:3}
  .pa-seg button{flex:1;height:44px;border:0;border-radius:9px;background:none;font:500 16px var(--sp-font);color:var(--sp-grey);cursor:pointer}
  .pa-seg button.on{background:var(--sp-bg);color:var(--sp-ink);font-weight:600;box-shadow:0 1px 2px rgba(0,0,0,.1),0 2px 8px rgba(0,0,0,.06)}
  :root[data-theme="dark"] .pa-seg button.on{background:#3d3d46;box-shadow:none}
  /* seg-knob.js slides its own piece under the chosen word: the same colours as the kit's */
  .pa-seg .sk-knob{background:var(--sp-bg);border-radius:9px;box-shadow:0 1px 2px rgba(0,0,0,.1),0 2px 8px rgba(0,0,0,.06)}
  :root[data-theme="dark"] .pa-seg .sk-knob{background:#3d3d46;box-shadow:none}

  /* ── sheets made here use the app's own .mesheet (with its grab bar and drag) — this is only the look ── */
  .mesheet.kt .card{background:var(--sp-bg);color:var(--sp-ink);border-radius:24px 24px 0 0;font-family:var(--sp-font)}
  .mesheet.kt .card > .m3-grab{background:var(--sp-bg)}
  .mesheet.kt .veil{-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
  .pa-sh-h{font-size:24px;font-weight:700;text-align:left;padding:4px 20px 12px;color:var(--sp-ink);letter-spacing:-.01em}
  .pa-field{margin:16px 20px 0}
  .pa-field .ck-in,.pa-field .ck-area{font-size:16px}
  .pa-field .ck-area{min-height:88px}
  .pa-kinds{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:8px 20px 0}
  .pa-kinds .k-btn{justify-content:flex-start;padding:0 14px}
  .pa-kinds .k-btn.on{background:var(--sp-ink);color:var(--sp-bg);box-shadow:none}
  .pa-cta.k-btn{display:flex;width:calc(100% - 40px);margin:20px 20px 8px;min-height:52px;font-size:16px}
  .pa-cta:disabled{opacity:.5}
  .pa-ngrp{display:grid;gap:2px;margin:0 20px 4px;padding:4px;border-radius:18px;background:var(--sp-wash)}
  .pa-nrow{display:flex;align-items:center;gap:12px;padding:10px 4px 10px 12px}
  .pa-nrow .m{flex:1;min-width:0}
  .pa-nrow .t{font-size:16px;font-weight:700;color:var(--sp-ink);overflow-wrap:anywhere}
  .pa-nrow .s{font-size:14px;color:var(--sp-grey);margin-top:2px;overflow-wrap:anywhere}
  /* the office picker's rows */
  .mesheet.kt .r .t{font-size:16px;color:var(--sp-ink)}
  .mesheet.kt .r .n{color:var(--sp-red)}
  .mesheet.kt .r:active{background:var(--sp-soft)}

  /* the laptop's machine list, moved into the Machines tab: the same side margin as every
     other list here, and its own title goes — the head above already says Machines */
  .pa .pa-list > #maintListWrap{padding:0 16px}
  .pa #maintListToolbar .mhead-t{display:none!important}
  .pa #maintListToolbar{padding-top:4px!important}

  /* ── a customer: the app's own card, machines and orders, moved into the panes ── */
  .pa-cpane{padding:4px 16px 0}
  .pa-cpane[hidden]{display:none!important}
  .pa-cpane > .tabpane{display:block!important}
  .pa-cpane > #custSide{display:block!important;width:auto;position:static;margin-bottom:18px}
  .pa-cpane .tabbar{display:none}
  .pa-hero .th{display:flex;align-items:flex-start;gap:8px}
  .pa-hero .th .t{flex:1;min-width:0}
  .pa-star{flex-shrink:0;width:44px;height:44px;margin:-6px -10px 0 0;border:0;border-radius:50%;background:none;cursor:pointer;display:flex;align-items:center;justify-content:center}
  .pa-star svg{width:24px;height:24px;fill:none;stroke:var(--sp-grey);stroke-width:1.8;stroke-linejoin:round}
  .pa-star.on svg{fill:#c58a00;stroke:#c58a00}
  .pa-sub .pa-brp + .s{padding-left:2px}

  /* ── O4, 9 Nov 2026: the laptop's own blocks moved in, in the new look. ⚠ ONLY UNDER THE PHONE HOSTS
     (#mphHost, #cphOne, #mtpHost, #paVisits, #paFiles), never their own classes on their own: the laptop
     draws the same nodes when the width goes back, and nothing here can reach it. ── */
  /* their colours: the app's own colour names point at the kit's inside the phone hosts, so a moved block wears
     the same white, wash and greys as the rows around it, light and dark (the laptop keeps app.css's own) */
  .pa.kt{--surface:var(--sp-bg);--field:var(--sp-wash);--band-fill:var(--sp-soft);--ink:var(--sp-ink);--ink-soft:var(--sp-grey);
    --ink-faint:var(--sp-grey);--rule:var(--sp-rule);--rule-soft:var(--sp-rule);--rule-strong:var(--sp-line)}
  /* the Machines tab: each customer a heading, each machine a soft card */
  #mphHost .mcust-sum{font-family:var(--sp-font);font-size:18px;font-weight:700;color:var(--sp-ink);border-bottom:0;border-radius:14px;padding:14px 8px 10px 4px}
  #mphHost .mcust[open] > .mcust-sum{border-bottom:0;padding-bottom:10px;margin-bottom:4px}
  #mphHost .mcust-n{font-size:14px;color:var(--sp-grey)}
  #mphHost .mcust-chev{color:var(--sp-grey)}
  #mphHost .mcathead{font-family:var(--sp-font)}
  #mphHost .mmach{border:0;border-radius:18px;background:var(--sp-wash);padding:14px 16px 10px}
  #mphHost .mmname{font-family:var(--sp-font);font-size:16px;font-weight:700}
  #mphHost .mmedit{font-family:var(--sp-font);font-size:14px}
  #mphHost .mtrow{border-top-color:var(--sp-rule)}
  #mphHost #maintListToolbar .m3s,#paFiles .fl-tools .m3s{border-radius:999px}
  /* a customer: each block of facts a soft panel; the labels in sentence case (his rule: no small grey capitals); no icon on every fact */
  #cphOne .cc-blk{background:var(--sp-wash);border-radius:18px;padding:16px;margin:0 0 12px}
  #cphOne .cc-h{text-transform:none;letter-spacing:-.01em;font-family:var(--sp-font);font-size:18px;font-weight:700;color:var(--sp-ink)}
  #cphOne .cc-ic{display:none}
  #cphOne .cc-k{font-size:14px;font-weight:500;color:var(--sp-grey);text-transform:none;letter-spacing:0}
  #cphOne :is(.cc-v,.cc-add){font-size:16px}
  #cphOne .eyebrow{text-transform:none;letter-spacing:0;font-size:16px;font-weight:700;color:var(--sp-ink)}
  #cphOne .so-card{background:var(--sp-wash);border:0;border-radius:18px}
  #cphOne .empty{color:var(--sp-grey);font-size:16px}
  :is(#mphHost,#cphOne,#mtpHost,#paVisits,#paFiles) .btn-line{font-family:var(--sp-font);border-radius:999px}
  /* Meetings: each group under a real heading, its notes in a soft panel */
  #mtpHost .mtg-glabel{font-family:var(--sp-font);font-size:18px;font-weight:700;color:var(--sp-ink)}
  #mtpHost .mtg-gcount{font-size:14px;color:var(--sp-grey)}
  #mtpHost .mtg-gline{display:none}
  #mtpHost .mtg-panel{background:var(--sp-wash);border:0;border-radius:18px;padding:4px}
  #mtpHost .mtg-row{border:0;border-radius:14px;font-family:var(--sp-font)}
  #mtpHost .mtg-rcust{font-size:16px;font-weight:700;color:var(--sp-ink)}
  #mtpHost .mtg-rtitle{font-size:14px;color:var(--sp-grey)}
  #mtpHost .mtg-rdate{font-size:14px;color:var(--sp-grey)}
  /* Files: the tools sit on the page colour, each file a soft card */
  #paFiles .fl-pin,#paFiles .fl-tools{background:var(--sp-page)}
  #paFiles .fl-day{font-family:var(--sp-font);font-size:18px;font-weight:700;color:var(--sp-ink)}
  #paFiles .fl-cell{background:var(--sp-wash);border:0;border-radius:16px}
  #paFiles .fl-cap{font-family:var(--sp-font)}

  /* ── Meetings, Visits, Files: their own blocks inside the frame ── */
  #mtpHost .pa-list > #meetingsViewBody{padding:0 16px}
  body.pa-visits #view-visits > *:not(#paVisits),
  body.pa-files  #view-files  > *:not(#paFiles){display:none!important}
  body.pa-visits #view-visits,body.pa-files #view-files{padding:0!important;overflow:hidden}
  #paVisits .pa-list,#paFiles .pa-list{padding-left:16px;padding-right:16px}
  #paVisits .pa-top > #vsTabs{margin:8px 16px 0}
  #paFiles .pa-top > .fl-tools{padding:10px 16px 10px;margin:0}
  /* Visits' own floating "Add a visit" gives way to the round + that every app has */
  body.pa-visits #vsAdd{display:none!important}

  /* the letters down the right edge must not sit on top of the row arrows */
  .pa-list.has-rail{padding-right:30px}
  .pa-list.has-rail .pa-row{margin-right:2px;width:calc(100% - 18px)}

  /* the run sheet is dragged away by its bar like every other sheet — "no need the cancel
     now, theres a slider right?" */
  .dph-one .dph-x{display:none!important}

  /* the old phone heads and pills are not drawn under this app's hosts */
  .pa .mph-pill,.pa .mph-add{display:none!important}
}

/* ══ O6, 9 Nov 2026: the forms on an office phone, in the new look — LOOK ONLY ═════════════════
   They keep the shape they have today: a dialog stays the box in the middle (family.css "ON AN OFFICE
   PHONE IT STAYS A BOX"), the app's own sheets (.mesheet) still rise from the bottom with the grab bar
   and the drag. Only the kit's font, rounder corners, a bolder title and pill buttons change here; no
   colour, no size of a field, no behaviour. The technician and the driver are fenced out by the body class. */
@media (max-width:600px){
  body:not(.role-tech):not(.role-driver) .ov > .modal{font-family:"Schibsted Grotesk",system-ui,sans-serif;border-radius:20px}
  body:not(.role-tech):not(.role-driver) .ov > .modal :is(input,textarea,select,button,label,.field,h2,h3){font-family:inherit}
  body:not(.role-tech):not(.role-driver) .ov > .modal .dlg-t{font-size:24px!important;font-weight:700;letter-spacing:-.01em}
  body:not(.role-tech):not(.role-driver) .ov > .modal :is(input,textarea,select).inp{border-radius:12px}
  body:not(.role-tech):not(.role-driver) .ov > .modal :is(.dlg-ft,.m3-btnrow) :is(.btn-primary,.btn-line){border-radius:999px}
}
@media (max-width:760px){
  body:not(.role-tech):not(.role-driver) .mesheet .card{font-family:"Schibsted Grotesk",system-ui,sans-serif;border-radius:24px 24px 0 0}
  body:not(.role-tech):not(.role-driver) .mesheet .card :is(button,input,textarea,select,h2,h3){font-family:inherit}
}
/* the kit's message pills (Kit.tell: "Taken down · Undo" on the notices) sit near the foot of an office phone,
   just clear of the app's own toast (one line, 12px from the foot). Only the notices use it, and they live on
   Home, which has no + and no tabs: 160px (above where those would be) left the pill floating over the wall
   (9 Nov). A screen WITH a + and tabs that starts using Kit.tell needs its own rule, above them. */
@media (max-width:760px){
  body:not(.role-tech):not(.role-driver) .k-tell .m-pile{bottom:calc(72px + var(--sab,0px))}
}
/* the narrowest phones (360): a long one-word app name ("Maintenance") must not touch its neighbour */
@media (max-width:374px){
  .pa-tile .tt{font-size:13px;letter-spacing:-.02em}
}

/* ══ THE JOB ROW IN A MACHINE CARD, phone only (12 Nov 2026, "why so ugly") ══════════════════════════════════
   Same words, same order, same tap as the laptop row (recordRow in maintenance-jobs.js); only the look changes:
   no yellow box and no edge bars (one card level), the title on one line with a soft fade, the parts list as
   plain readable text under a small mark, the day as "13 Oct 2026". The laptop never matches: these hosts exist
   only under 760px. Was: app.css's phone rule put the text at padding 0 ON the 3px amber bar, so the job number
   (the one line with no mark in front) started on the bar and looked pushed past the box. */
@media (max-width:760px){
  :is(#mphHost,#cphOne) .mtrow,:is(#mphHost,#cphOne) .mtrow.needs{padding:12px 0 12px;background:none;box-shadow:none;border-left:0;border-radius:0}
  :is(#mphHost,#cphOne) .mt1{flex-wrap:nowrap;gap:10px;min-width:0}
  :is(#mphHost,#cphOne) .mt1 > *{flex-shrink:0}
  :is(#mphHost,#cphOne) .mtprob{flex:1 1 auto;flex-shrink:1;min-width:0;font-family:var(--sp-font);font-size:16px;font-weight:600;line-height:1.35;
    white-space:nowrap;overflow:hidden;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent)}
  /* the state as the kit's ring, like every other phone list (12 Nov 2026); the square stays for the laptop */
  :is(#mphHost,#cphOne) .mst > .msw{display:none}
  :is(#mphHost,#cphOne) .mst > .tg{display:inline-flex;align-items:center;height:auto;padding:0;gap:0;background:none;box-shadow:none}
  :is(#mphHost,#cphOne) .mst > .tg .tg-w{display:none}
  :is(#mphHost,#cphOne) .mst > .tg .tg-mark{display:block;width:16px;height:16px;flex:none}
  :is(#mphHost,#cphOne) .mst > .tg[data-c="grey"]{color:var(--tg-grey-m)} :is(#mphHost,#cphOne) .mst > .tg[data-c="blue"]{color:var(--tg-blue-m)}
  :is(#mphHost,#cphOne) .mst > .tg[data-c="green"]{color:var(--tg-green-m)} :is(#mphHost,#cphOne) .mst > .tg[data-c="red"]{color:var(--tg-red-m)}
  :is(#mphHost,#cphOne) .mt1 .mst,:is(#mphHost,#cphOne) .mcaps{font-family:var(--sp-font);font-size:14px;font-weight:500;color:var(--sp-grey)}
  :is(#mphHost,#cphOne) .mt-flag{margin-top:8px}
  :is(#mphHost,#cphOne) .mtflag{display:block;font-family:var(--sp-font);font-size:15px;font-weight:400;line-height:1.45;color:var(--sp-ink)}
  :is(#mphHost,#cphOne) .mtflag:not(.ok) > .msw{display:none}
  :is(#mphHost,#cphOne) .mtflag.ok{display:inline-flex;font-weight:600;color:var(--sp-ok)}
  :is(#mphHost,#cphOne) .mf-w{display:inline-flex;align-items:center;height:26px;padding:0 10px;border-radius:999px;background:var(--sp-warn-bg);color:var(--sp-warn);font-size:14px;font-weight:600}
  :is(#mphHost,#cphOne) .mf-d{display:none}
  :is(#mphHost,#cphOne) .mf-p{display:block;margin-top:6px;overflow-wrap:anywhere}
  :is(#mphHost,#cphOne) .mt2{font-family:var(--sp-font);font-size:14px;color:var(--sp-grey);margin-top:8px}
  :is(#mphHost,#cphOne) .mt2 .mt-iso{display:none}
  :is(#mphHost,#cphOne) .mt2 .mt-nice{display:inline}
}
