/* pn-mobile-20260928.css — fixes from the full mobile sweep (CEO 2026-09-28: "run tests on all
   mobile screens"). Loads LAST in play.html. Every rule names the sweep finding it closes.
   Two ids in the prefix so these win over the tear-sheet / legibility sheets' single-id rules. */

/* ── B1 · PILOT SEASON WELCOME TRAPPED PHONE PLAYERS ─────────────────────────────────────────
   The tear-sheet pass set overflow:hidden on the card, killing its own overflow-y:auto, so on a
   667px screen "Start playing" sat below the fold with no way to scroll; and its "lift content
   above the grain" rule painted the hero OVER the ✕, so the close was untappable. */
html:not(#pn-mob-a):not(#pn-mob-b) body #pnps-welcome .pnps-welcome-card.pnps-welcome-card{
  overflow-x:hidden !important; overflow-y:auto !important; -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain; max-height:100dvh !important;
}
html:not(#pn-mob-a):not(#pn-mob-b) body #pnps-welcome .pnps-welcome-card > .pnps-welcome-x{
  position:absolute !important; z-index:10 !important; top:12px !important; right:12px !important;
  min-width:44px !important; min-height:44px !important; border-radius:999px !important;
  background:rgba(11,28,48,.72) !important; color:#f8f9ff !important; -webkit-text-fill-color:#f8f9ff !important;
}
@media (max-width:600px){
  html:not(#pn-mob-a):not(#pn-mob-b) body #pnps-welcome .pnps-welcome-card.pnps-welcome-card{
    height:100dvh !important; max-height:100dvh !important;
    padding-bottom:calc(24px + env(safe-area-inset-bottom,0px)) !important;
  }
}

/* ── M1 · THE FEEDBACK TAB SAT ON THE DOCK ────────────────────────────────────────────────────
   On phones it covered "The Duff" and the right end of full-width buttons. It now rides above
   the dock, shorter, still a 44px-wide target. */
@media (max-width:720px){
  html:not(#pn-mob-a):not(#pn-mob-b) #pnfb-tab{
    bottom:calc(104px + env(safe-area-inset-bottom,0px)) !important;
    min-height:88px !important; min-width:30px !important; padding:10px 6px !important;
  }
  html:not(#pn-mob-a):not(#pn-mob-b):has(body.u3-holding) #pnfb-tab{ bottom:calc(24px + env(safe-area-inset-bottom,0px)) !important; }
}

/* ── M3 · FINANCIALS "In · £0" WAS INVISIBLE (1.2:1, near-black on navy) ─────────────────────── */
html:not(#pn-mob-a):not(#pn-mob-b):not(#pn-mob-c):not(#pn-mob-d) body .s1-cfo-bar.is-in b,
html:not(#pn-mob-a):not(#pn-mob-b):not(#pn-mob-c):not(#pn-mob-d) body .s1-cfo-bar.is-in b *{
  color:#f8f9ff !important; -webkit-text-fill-color:#f8f9ff !important;
  text-shadow:0 1px 2px rgba(0,0,0,.55);
}

/* ── M4 · TOP-BAR TAP TARGETS WERE 36px ──────────────────────────────────────────────────────── */
@media (max-width:720px){
  html:not(#pn-mob-a):not(#pn-mob-b) body :is(#pnBurger, #pn-urg, a.store, #pnfcRankChip){
    min-height:44px !important;
  }
  html:not(#pn-mob-a):not(#pn-mob-b) body #pnBurger{ min-width:44px !important; border-radius:999px !important; }
  html:not(#pn-mob-a):not(#pn-mob-b) body span.help-chip{
    position:relative; }
  html:not(#pn-mob-a):not(#pn-mob-b) body span.help-chip::after{
    content:""; position:absolute; inset:-15px; }
}

/* ── M5 · WEEK SUMMARY: ORANGE TEXT + A MONO-CAPS RECTANGLE ──────────────────────────────────── */
html:not(#pn-mob-a):not(#pn-mob-b) body .pnos-run .pnos-run-day.on .pnos-run-dl,
html:not(#pn-mob-a):not(#pn-mob-b) body .pnos-run .pnos-run-dl,
html:not(#pn-mob-a):not(#pn-mob-b) body .pnos-run .pnos-run-eye{
  color:#f8f9ff !important; -webkit-text-fill-color:#f8f9ff !important;
}
html:not(#pn-mob-a):not(#pn-mob-b) body .pnos-run.lg-light .pnos-run-dl,
html:not(#pn-mob-a):not(#pn-mob-b) body .pnos-run.lg-light .pnos-run-eye{
  color:#140a04 !important; -webkit-text-fill-color:#140a04 !important;
}
html:not(#pn-mob-a):not(#pn-mob-b) body .pnos-run .pnos-run-done.pnos-run-done{
  border-radius:999px !important; text-transform:none !important; letter-spacing:0 !important;
  font-size:16px !important; color:#140a04 !important; -webkit-text-fill-color:#140a04 !important;
  box-shadow:0 8px 22px rgba(249,115,22,.3) !important;
}

/* ── DECISION POP-UPS: BLUE, AND THEY SCROLL (CEO 2026-09-28: "AWFUL YELLOW — USE THE BLUE DESIGN —
   AND I CAN'T READ CONTENT OR SCROLL TO BOTTOM", on the CFO's "What is this money for?").
   Every pnConfirm decision (the only bigmodal that prints .pn-cf-yes) was painted gold; they now use
   the cobalt bucket with white ink. The card was overflow:hidden, so a tall decision could not be
   scrolled to its buttons — the card is capped to the screen and its BODY scrolls, foot always shown. */
html:not(#pn-mob-a):not(#pn-mob-b) body #toast.bigmodal.bigmodal .bigmodal-card:has(.pn-cf-yes){
  --tsb-bg: var(--tsb-cobalt); --tsb-fill: var(--tsb-cobalt-fill); --tsb-ink: var(--tsb-cobalt-ink); --tsb-dim: var(--tsb-cobalt-dim);
}
html:not(#pn-mob-a):not(#pn-mob-b) body #toast.bigmodal.bigmodal .bigmodal-card{
  max-height:calc(100dvh - 24px) !important; display:flex !important; flex-direction:column !important;
}
html:not(#pn-mob-a):not(#pn-mob-b) body #toast.bigmodal.bigmodal .bigmodal-card > .bigmodal-card-body{
  flex:1 1 auto !important; min-height:0 !important; overflow-y:auto !important; -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
}
html:not(#pn-mob-a):not(#pn-mob-b) body #toast.bigmodal.bigmodal .bigmodal-card > .bigmodal-foot{ flex:none !important; }
/* on blue, every text node in a decision takes the white ink — no leftover dark-on-gold colours */
html:not(#pn-mob-a):not(#pn-mob-b) body #toast.bigmodal.bigmodal .bigmodal-card:has(.pn-cf-yes) .bigmodal-card-body :is(p,span,label,b,strong,div,small,li,em){
  color:var(--tsb-ink) !important; -webkit-text-fill-color:var(--tsb-ink) !important;
}
html:not(#pn-mob-a):not(#pn-mob-b) body #toast.bigmodal.bigmodal .bigmodal-card:has(.pn-cf-yes) .bigmodal-card-body :is(.muted,.small,.tsb-delta-k){
  color:var(--tsb-dim) !important; -webkit-text-fill-color:var(--tsb-dim) !important;
}

/* ══ POP-UP LEGIBILITY SCAN (CEO 2026-09-28: "all pop ups need legibility scan") ══════════════ */
html:not(#pn-mob-a):not(#pn-mob-b):not(#pn-mob-c):not(#pn-mob-d) body .cfoX-acts :is(.cfoX-hold,.cfoX-exec){
  border-radius:999px !important; min-height:44px !important; padding:0 22px !important;
  font:800 14px/1 Inter,system-ui,sans-serif !important; letter-spacing:0 !important; text-transform:none !important;
}
/* CFO crisis mail: both replies printed near-white on paper (1.01:1) — the player could not see
   how to answer. Authorise = the orange primary (dark ink); Hold = a dark outline pill. */
html:not(#pn-mob-a):not(#pn-mob-b):not(#pn-mob-c):not(#pn-mob-d) body .cfoX-acts .cfoX-exec{ background:#f97316 !important; background-image:none !important; border:0 !important;
  color:#140a04 !important; -webkit-text-fill-color:#140a04 !important; }
html:not(#pn-mob-a):not(#pn-mob-b):not(#pn-mob-c):not(#pn-mob-d) body .cfoX-acts .cfoX-exec:disabled{ opacity:.45 !important; }
html:not(#pn-mob-a):not(#pn-mob-b):not(#pn-mob-c):not(#pn-mob-d) body .cfoX-acts .cfoX-hold{ background:transparent !important; background-image:none !important; border:1.5px solid #3d3226 !important;
  color:#140a04 !important; -webkit-text-fill-color:#140a04 !important; }
html:not(#pn-mob-a):not(#pn-mob-b):not(#pn-mob-c):not(#pn-mob-d) body .cfoX-save{ color:#8f1d16 !important; -webkit-text-fill-color:#8f1d16 !important; }
html:not(#pn-mob-a):not(#pn-mob-b):not(#pn-mob-c):not(#pn-mob-d) body .cfoX-row input:checked ~ .cfoX-save{ background:#8f1d16 !important; color:#fff !important; -webkit-text-fill-color:#fff !important; border-radius:999px !important; }
html:not(#pn-mob-a):not(#pn-mob-b):not(#pn-mob-c):not(#pn-mob-d) body .cfoX-hrow i{ color:#5a5044 !important; -webkit-text-fill-color:#5a5044 !important; }
/* COO "What the street knows": white text on a paper panel (1.04:1) → dark ink */
html:not(#pn-mob-a):not(#pn-mob-b):not(#pn-mob-c):not(#pn-mob-d) body .s1-read, html:not(#pn-mob-a):not(#pn-mob-b):not(#pn-mob-c):not(#pn-mob-d) body .s1-read :is(p,b,span,li,em,strong,small){ color:#140a04 !important; -webkit-text-fill-color:#140a04 !important; }
html:not(#pn-mob-a):not(#pn-mob-b):not(#pn-mob-c):not(#pn-mob-d) body .s1-read .s1-eye{ color:#3d3226 !important; -webkit-text-fill-color:#3d3226 !important; }
/* help-chip Finder window: orange type labels on paper (2.3:1) → dark ink; the glyph keeps the type */
html:not(#pn-mob-a):not(#pn-mob-b):not(#pn-mob-c):not(#pn-mob-d) body #__helpPopup b{ color:#140a04 !important; -webkit-text-fill-color:#140a04 !important; }
/* The Desk: the week band was the one remaining yellow block. Only a Fire week is a warning (gold,
   dark ink); every other week reads as information — cobalt, white ink. */
html:not(#pn-mob-a):not(#pn-mob-b):not(#pn-mob-c):not(#pn-mob-d) body .pnfc-weekband:not(.pnfc-wt-fire){
  background:linear-gradient(160deg,#2a4fc4 0%,#12245e 100%) !important; border-color:#0b1c30 !important;
}
html:not(#pn-mob-a):not(#pn-mob-b):not(#pn-mob-c):not(#pn-mob-d) body .pnfc-weekband:not(.pnfc-wt-fire), html:not(#pn-mob-a):not(#pn-mob-b):not(#pn-mob-c):not(#pn-mob-d) body .pnfc-weekband:not(.pnfc-wt-fire) *{
  color:#f8f9ff !important; -webkit-text-fill-color:#f8f9ff !important;
}
/* Desk "End the week": dark ink on the dark foot (1.18:1) → light outline pill */
html:not(#pn-mob-a):not(#pn-mob-b):not(#pn-mob-c):not(#pn-mob-d) body .pnfc-end-btn{ color:#140a04 !important; -webkit-text-fill-color:#140a04 !important; border:1.5px solid rgba(20,14,8,.45) !important;
  border-radius:999px !important; min-height:44px !important; background:transparent !important; }
/* Guide "Do it well" (1.07:1 at desktop). Not `inherit`: the colour it inherited is the one the
   Guide window computes from the THEME's --gd-ink (#f2f4f9 on the default dark theme), but the
   reading pane under it is always pale paper (.pnGd-read, pn-tearsheet-popups) — 1.03:1, white on
   white. var(--gd-ink) resolves at the heading itself, so it picks up the pane's own ink: 14:1 on
   the paper in both themes, and still the theme's ink if the paper skin is ever absent. */
html:not(#pn-mob-a):not(#pn-mob-b):not(#pn-mob-c):not(#pn-mob-d) body #pnGd-root .pnGd-tipsHead{ color:var(--gd-ink) !important; -webkit-text-fill-color:var(--gd-ink) !important; }

/* B2a: late sign-in over a running offline game — a pinned pill, because the account slot is
   hidden on phones and the game re-renders it. */
#pn-late-signin{ position:fixed; z-index:2147483000; left:50%; transform:translateX(-50%);
  top:calc(10px + env(safe-area-inset-top,0px)); display:flex; gap:8px; align-items:center;
  padding:6px 6px 6px 16px; border-radius:999px; background:#12245e; color:#f8f9ff;
  box-shadow:0 10px 30px rgba(0,0,0,.45); font:600 13px/1.2 Inter,system-ui,sans-serif; max-width:calc(100vw - 32px); }
#pn-late-signin button{ min-height:44px; border-radius:999px; border:0; padding:0 16px; cursor:pointer;
  font:800 13px/1 Inter,system-ui,sans-serif; background:#f97316; color:#140a04; }
#pn-late-signin button.x{ background:transparent; color:#f8f9ff; min-width:44px; padding:0; font-size:18px; }
