/* Client Hub on phones (November 9): the design pass for the phone app. Loaded only up to 760px wide
   (media attribute on the <link>), after app.css, so the desktop stays exactly as it is.
   Based on Apple's Human Interface Guidelines, Material Design 3, web.dev's PWA app design and Hoober's thumb-zone
   research: a slim header, a large title that shrinks on scroll, four tabs with "+" in the middle at the bottom,
   one column of compact cards, small chips for filters, bottom sheets for details and choices. 8-point spacing,
   16px side margins, text at least 4.5:1, every touch target at least 44x44. */
:root{
  --ph-g:16px;
  --ph-ground:#f2f4f7; --ph-card:#ffffff; --ph-sep:#e3e7ed; --ph-track:#e4e8ee;
  --ph-text:#1d2433; --ph-sec:#5c6779; --ph-press:rgba(22,34,61,.06);
  /* One color per status, everywhere in the hub: soft tint behind, darker text in front (4.5:1 or better). */
  --st-done-bg:#e3f3e8; --st-done-fg:#1d6b3c;    /* done, won, approved, published */
  --st-sched-bg:#e4ebfa; --st-sched-fg:#2b4c9b;  /* scheduled, quoted, in progress */
  --st-wait-bg:#fdf0d5; --st-wait-fg:#8a5300;    /* needs someone: waiting, enquiry, changes */
  --st-prog-bg:#eceef2; --st-prog-fg:#4f5869;    /* draft, lost, not doing */
  --st-bad-bg:#fbe6e3; --st-bad-fg:#a8321f;      /* overdue, urgent */
  --ph-badge:#d93a2b;
  --ph-bar:#16223d;
}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]){
  --ph-ground:#0f131a; --ph-card:#1a202c; --ph-sep:#2a3242; --ph-track:#262e3d;
  --ph-text:#e3e8f0; --ph-sec:#9aa5b8; --ph-press:rgba(255,255,255,.07);
  --st-done-bg:#183626; --st-done-fg:#8fdcaa; --st-sched-bg:#1f2b4a; --st-sched-fg:#a9bdf2;
  --st-wait-bg:#3a2e14; --st-wait-fg:#f2c56b; --st-prog-bg:#272e3b; --st-prog-fg:#b3bccb;
  --st-bad-bg:#3d1f1a; --st-bad-fg:#f5a08f; --ph-bar:#0b0f16; } }
:root[data-theme="dark"]{
  --ph-ground:#0f131a; --ph-card:#1a202c; --ph-sep:#2a3242; --ph-track:#262e3d;
  --ph-text:#e3e8f0; --ph-sec:#9aa5b8; --ph-press:rgba(255,255,255,.07);
  --st-done-bg:#183626; --st-done-fg:#8fdcaa; --st-sched-bg:#1f2b4a; --st-sched-fg:#a9bdf2;
  --st-wait-bg:#3a2e14; --st-wait-fg:#f2c56b; --st-prog-bg:#272e3b; --st-prog-fg:#b3bccb;
  --st-bad-bg:#3d1f1a; --st-bad-fg:#f5a08f; --ph-bar:#0b0f16; }

/* ---------- 6. Native feel ---------- */
html,body{overscroll-behavior-y:none;background:var(--ph-ground)}
:root{padding:0}
body{font-size:17px;line-height:1.45;color:var(--ph-text);-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%;
  padding-bottom:calc(64px + env(safe-area-inset-bottom,0px))!important}
body.has-fab{padding-bottom:calc(64px + env(safe-area-inset-bottom,0px))!important}
button,a,select,label,summary,[role="tab"],.dbe-post,.job-card{touch-action:manipulation}
button,.dbe-tabs,.dbe-pills,.dbe-seg,.sheet-item,.dbe-chip,summary,.ph-top,.dbe-week-head{-webkit-user-select:none;user-select:none}
button:active,.sheet-item:active,a.dbe-btn:active,.ph-card-tap:active,.job-main:active,.dbe-post:active{opacity:.6;transition:none}
button,.sheet-item,a.dbe-btn{transition:opacity .2s}
:focus:not(:focus-visible){outline:none}

/* ---------- 2. Less before the content: one slim header line ---------- */
.dbe-top{position:sticky;top:0;background:var(--ph-bar);padding-top:env(safe-area-inset-top,0px);border:0}
.dbe-top .dbe-wrap{min-height:48px;gap:8px;flex-wrap:nowrap;padding:0 max(var(--ph-g),env(safe-area-inset-right,0px)) 0 max(var(--ph-g),env(safe-area-inset-left,0px))}
.dbe-client{gap:8px;min-width:0;flex:1 1 auto}
.dbe-client-mark{width:4px;height:16px;border-radius:2px}
.dbe-client-name{font:600 15px/1.2 var(--dbe-body);letter-spacing:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dbe-client-sub,.dbe-top .upd-ago{display:none}
.dbe-top .dbe-client>div{min-width:0}
.acct-btn:not([hidden]){width:36px;height:36px;font-size:13px;border-width:1.5px;position:relative}
.acct-btn:not([hidden])::after{content:"";position:absolute;inset:-4px}
/* The small title in the header once the large one has scrolled away (centered, like iOS). */
.dbe-top .dbe-wrap{position:relative}
.ph-top-title{display:block;position:absolute;left:50%;transform:translateX(-50%);max-width:52%;color:#fff;font:600 16px/48px var(--dbe-body);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:0;transition:opacity .15s;pointer-events:none;bottom:0}
body.ph-scrolled .ph-top-title{opacity:1}
body.ph-scrolled .dbe-client-name{opacity:0}
.ph-back{display:none}
body.ph-standalone.ph-detail .ph-back{display:flex;align-items:center;gap:2px;background:none;border:0;color:#fff;font:500 16px var(--dbe-body);min-height:44px;min-width:44px;padding:0 6px 0 0;margin-left:-6px;cursor:pointer}
body.ph-standalone.ph-detail .ph-back svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.2}
body.ph-standalone.ph-detail .dbe-client{display:none}

/* Preview: one thin line. */
.dbe-preview-bar{position:sticky;top:0;padding:calc(env(safe-area-inset-top,0px)) var(--ph-g) 0;min-height:0;gap:8px;flex-wrap:nowrap;font-size:14px;line-height:32px}
.dbe-preview-bar > span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.dbe-preview-bar .ph-long{display:none}
.dbe-preview-bar .ph-short{display:inline}

.dbe-preview-bar button{background:none;color:inherit;padding:0 2px;min-height:32px;font-weight:600;text-decoration:underline;text-underline-offset:2px;white-space:nowrap}
body:has(.dbe-preview-bar) .dbe-top{padding-top:0;top:calc(32px + env(safe-area-inset-top,0px))}

/* Things that do not belong on the phone screen. */
.dbe-fab,#send-fab,.dbe-tabhead.only-client,#send-open,.dbe-subtitle,.upd-ago{display:none!important}
/* Pull to refresh: the hint shows only on phones, while pulling. */
body.pulling .pull-hint{display:block;opacity:1}
/* Each "+ Add ..." on the page: the "+" in the middle of the bottom bar does it. */
.jobs-top,.dbe-addpost[data-addpost=""],#media-add-toggle{display:none!important}

/* ---------- Large title, then the content ---------- */
main.dbe-wrap{padding:0 max(var(--ph-g),env(safe-area-inset-right,0px)) 24px max(var(--ph-g),env(safe-area-inset-left,0px))}
.dbe-panel > h1,.dbe-panel > .dbe-tabhead,.sk-h1{display:none}
.net-chip{top:auto;bottom:calc(132px + env(safe-area-inset-bottom,0px));white-space:nowrap} /* above the bottom bar and above a message, clear of the title */
.ph-titlebar{display:flex;align-items:flex-end;gap:8px;padding:16px 0 12px}
.ph-titlebar h1{font:600 32px/1.1 var(--dbe-head);letter-spacing:-.02em;margin:0;color:var(--dbe-ink);flex:1 1 auto;min-width:0}
.ph-titlebar .ph-sub{display:block;font:400 14px/1.3 var(--dbe-body);color:var(--ph-sec);letter-spacing:0;margin-top:4px}
.ph-info{flex:none;width:44px;height:44px;margin:0 -10px -6px 0;border:0;background:none;color:var(--ph-sec);display:flex;align-items:center;justify-content:center;cursor:pointer}
.ph-info svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8}
.ph-info[hidden]{display:none}
/* Long explanations move behind the (i) button. */
.dbe-panel > .dbe-lead,.dbe-sub > .dbe-lead,#cal-intro,.dbe-sub > p.dbe-lead{display:none}
h1{font-size:28px}
h2{font-size:22px;margin:24px 0 8px}
h3{font-size:17px;margin-bottom:8px;letter-spacing:0;font-family:var(--dbe-body);font-weight:600}
.dbe-card h2{font-size:20px!important;margin:0 0 8px!important}

/* ---------- 3. Main switches: segmented control (2 to 4), else one sideways row ---------- */
.dbe-pills{display:flex;flex-wrap:nowrap;gap:0;margin:0 0 16px;padding:0;overflow:visible}
.dbe-pills.ph-seg{background:var(--ph-track);border-radius:10px;padding:2px}
.dbe-pills.ph-seg .dbe-chip{flex:1 1 0;min-width:0;min-height:40px;border:0;border-radius:8px;background:none;color:var(--ph-text);font:500 15px var(--dbe-body);padding:0 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dbe-pills.ph-seg .dbe-chip[aria-pressed="true"]{background:var(--ph-card);color:var(--ph-text);font-weight:600;box-shadow:0 1px 3px rgba(0,0,0,.12),0 0 0 .5px rgba(0,0,0,.04)}
.dbe-pills.ph-row{overflow-x:auto;margin:0 calc(-1 * var(--ph-g)) 12px;padding:0 var(--ph-g);gap:8px;scrollbar-width:none;scroll-padding:0 var(--ph-g)}
.dbe-pills::-webkit-scrollbar,.dbe-seg::-webkit-scrollbar{display:none}

/* Filters: one sideways row of small chips with counts, no box, never two lines. The chip shows 34px; it takes 44px. */
.dbe-seg,.dbe-pills.ph-row{display:flex!important;flex-wrap:nowrap;border:0;border-radius:0;background:none;padding:0;gap:8px;overflow-x:auto;scrollbar-width:none;
  margin:0 calc(-1 * var(--ph-g)) 8px;padding:0 var(--ph-g);width:auto;max-width:none}
.dbe-seg button,.dbe-pills.ph-row .dbe-chip{position:relative;isolation:isolate;flex:none;min-height:44px;padding:0 14px;border:0;border-radius:0;background:none!important;
  color:var(--ph-text);font:500 14px var(--dbe-body);white-space:nowrap;box-shadow:none}
.dbe-seg button::before,.dbe-pills.ph-row .dbe-chip::before{content:"";position:absolute;inset:5px 0;border-radius:999px;background:var(--ph-card);border:1px solid var(--ph-sep);z-index:-1}
.dbe-seg button[aria-pressed="true"],.dbe-pills.ph-row .dbe-chip[aria-pressed="true"]{color:var(--ph-card)}
.dbe-seg button[aria-pressed="true"]::before,.dbe-pills.ph-row .dbe-chip[aria-pressed="true"]::before{background:var(--dbe-ink);border-color:var(--dbe-ink)}
.ph-count{color:var(--ph-sec);font-weight:400;margin-left:5px}
.ph-count::before,.ph-count::after{content:none}
[aria-pressed="true"] .ph-count{color:inherit;opacity:.75}
/* Filter selects become chips that open a sheet. */
.dbe-calbar{display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;scrollbar-width:none;margin:0 calc(-1 * var(--ph-g)) 8px;padding:0 var(--ph-g);align-items:center}
.dbe-calbar::-webkit-scrollbar{display:none}
.dbe-calbar .dbe-seg{margin:0;padding:0;flex:none;overflow:visible}
.dbe-calbar label.grp{flex:none!important;display:block;margin:0}
.dbe-calbar label.grp .lab{display:none}
.dbe-calbar select,#today-cat{appearance:none;-webkit-appearance:none;flex:none!important;width:auto!important;max-width:200px!important;height:44px;min-height:44px!important;
  border:5px solid transparent!important;border-left-width:0!important;border-right-width:0!important;border-radius:999px;background-clip:padding-box!important;box-shadow:inset 0 0 0 1px var(--ph-sep);
  padding:0 30px 0 14px!important;color:var(--ph-text);font:500 14px var(--dbe-body)!important;background-color:var(--ph-card)!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%235c6779' stroke-width='1.6'/%3E%3C/svg%3E")!important;
  background-repeat:no-repeat!important;background-size:12px 12px!important;background-position:right 12px center!important;margin:0}
.dbe-calbar label.grp.is-set select,#today-catwrap.is-set #today-cat{color:var(--ph-card);background-color:var(--dbe-ink)!important;box-shadow:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23ffffff' stroke-width='1.6'/%3E%3C/svg%3E")!important}
[data-calselect]{display:none!important}
#today-catwrap{flex:none}
.today-filters{display:flex;flex-wrap:nowrap;align-items:center;gap:0;overflow-x:auto;scrollbar-width:none;margin:0 calc(-1 * var(--ph-g)) 8px;padding:0 var(--ph-g)}
.today-filters .dbe-seg{margin:0;padding:0;overflow:visible;flex:none}
.dbe-card .today-filters{margin:0 -16px 8px;padding:0 16px}
/* Above the calendar: only "Show earlier weeks", as a small link. */
[data-wall]{display:none!important}
[data-past]{background:none!important;border:0!important;color:#3f4a8a!important;padding:0!important;font-size:14px!important;min-height:44px}

/* ---------- Summary of key numbers at the top ---------- */
.ph-sum{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 16px}
.ph-sum.n2{grid-template-columns:repeat(2,minmax(0,1fr))}
.ph-sum.n4{grid-template-columns:repeat(2,minmax(0,1fr))}
.ph-sum > div{background:var(--ph-card);border-radius:12px;padding:12px}
.ph-sum b{display:block;font:600 22px/1.15 var(--dbe-head);color:var(--dbe-ink);font-variant-numeric:tabular-nums;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ph-sum span{display:block;font-size:13px;line-height:1.3;color:var(--ph-sec);margin-top:2px}
.ph-sum .is-warn b{color:var(--st-bad-fg)}

/* ---------- One column of cards, 16px margins, 8-point spacing ---------- */
.dbe-grid,.dbe-g2,.dbe-g3,.job-res-grid,.dbe-hero,.dbe-proj{grid-template-columns:1fr!important;gap:8px}
.dbe-g4{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px}
.dbe-card{background:var(--ph-card);border:0;border-radius:14px;padding:16px}
.dbe-card + .dbe-card,.dbe-card[style*="margin-top"]{margin-top:8px!important}
.dbe-needs{border-left:0;margin-bottom:8px}
.dbe-needs h2{font-size:20px}
.dbe-kpi{padding:12px!important}
.dbe-kpi .dbe-label{min-height:0;font-size:13px;line-height:1.3}
.dbe-kpi .dbe-num,.dbe-g4 .dbe-kpi .dbe-num{font-size:26px!important;margin:4px 0;font-weight:600}
.dbe-kpi .dbe-chg,.dbe-kpi .dbe-up,.dbe-kpi .dbe-down{font-size:13px;font-weight:500}
.dbe-hero > .dbe-card:first-child{padding:16px}
.dbe-hero h1{font-size:28px!important}
.dbe-hero > .dbe-card:first-child .dbe-grid{margin-top:12px!important}
.dbe-hero .dbe-card:first-child:not(:has(.dbe-kpi)):not(:has(p)):not(:has(select)){display:none}
.dbe-empty{font-size:15px;color:var(--ph-sec)}
.dbe-small{font-size:14px;color:var(--ph-sec);line-height:1.4}

/* ---------- 5. Typography: bold only for titles and key numbers ---------- */
p b,.dbe-small b,li b,.dbe-lead b,.job-meta b,td b{font-weight:500}
.ph-card-title,.job-line b,.dbe-post h4,.dbe-week-head h3{font-weight:600}
.dbe-btn{font-weight:600}

/* Buttons: small and calm. The lime main action is the "+" only. */
.dbe-btn{min-height:44px;padding:0 16px;font-size:15px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;gap:6px}
.dbe-btn.sm{min-height:44px;padding:0 14px;font-size:14px}
.dbe-btn.ghost{border-color:var(--ph-sep)}

/* ---------- 4. Compact cards ---------- */
/* Status pills: soft tints, one color per status. */
.dbe-pill{border:0!important;font:500 12px/1 var(--dbe-body);padding:5px 8px;border-radius:999px;white-space:nowrap;flex:none}
.dbe-pill.st-done{background:var(--st-done-bg);color:var(--st-done-fg)}
.dbe-pill.st-sched{background:var(--st-sched-bg);color:var(--st-sched-fg)}
.dbe-pill.st-wait{background:var(--st-wait-bg);color:var(--st-wait-fg)}
.dbe-pill.st-prog{background:var(--st-prog-bg);color:var(--st-prog-fg)}
.dbe-pill.st-bad{background:var(--st-bad-bg);color:var(--st-bad-fg)}

/* A card: line 1 bold title and status on the right; lines 2 and 3 gray; amounts right-aligned. */
.ph-list{display:flex;flex-direction:column;gap:8px}
.ph-card{position:relative;background:var(--ph-card);border-radius:14px;display:flex;align-items:center;gap:8px;min-height:44px;padding:12px 16px;width:100%;text-align:left;border:0;font:inherit;color:inherit;cursor:pointer}
.ph-card-tap{flex:1 1 auto;min-width:0;background:none;border:0;padding:0;margin:0;text-align:left;font:inherit;color:inherit;cursor:pointer;display:block;min-height:44px}
.ph-card-tap > span{display:flex}
.ph-card.job-card{padding:12px 16px}
.ph-card .ph-act{position:absolute;right:8px;bottom:2px;padding:0 8px}
.ph-card:has(.ph-act) .ph-l3{padding-right:130px}
.ph-l1{display:flex;align-items:center;gap:8px;min-width:0}
.ph-card-title{font-size:17px;line-height:1.3;color:var(--dbe-ink);flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ph-l2{display:flex;gap:8px;align-items:baseline;justify-content:space-between;color:var(--ph-sec);font-size:15px;line-height:1.35;margin-top:2px;min-width:0}
.ph-l2 > span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ph-amt{font-weight:600;color:var(--dbe-ink);white-space:nowrap;font-variant-numeric:tabular-nums}
.ph-warn{color:var(--st-bad-fg)}
.ph-act{flex:none;align-self:center;min-height:44px;border:0;background:none;color:var(--dbe-blue);font:600 14px var(--dbe-body);padding:0 0 0 8px;margin-right:-4px;cursor:pointer;white-space:nowrap}
:root .ph-act{color:#3f4a8a}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .ph-act{color:#b8bdf0} }
.ph-chev{flex:none;width:8px;height:8px;border:solid var(--ph-sec);border-width:2px 2px 0 0;transform:rotate(45deg);opacity:.6;margin-left:2px}
.job-cards{display:flex!important;flex-direction:column;gap:8px}

/* The generic tidy-up for cards built elsewhere (to-dos, inbox, ideas, clients, outreach, media): one action shows,
   the others sit behind "..." in a sheet. */
html body .ph-hidden-act.ph-hidden-act.ph-hidden-act{display:none!important} /* wins over body.is-admin .dbe-plan.only-admin */
.ph-dots{flex:none;min-width:44px;min-height:44px;border:0;background:none;color:var(--ph-sec);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;padding:0}
.ph-dots svg{width:20px;height:20px;fill:currentColor}
.dbe-acts{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.dbe-acts .dbe-btn,.dbe-needs li .dbe-btn,.dbe-inbox-list .dbe-btn,.dbe-gone .dbe-btn,.dbe-idea .dbe-btn{background:none;border:0;color:#3f4a8a;padding:0 4px;min-height:44px;font-size:14px}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) :is(.dbe-acts,.dbe-needs li,.dbe-inbox-list,.dbe-gone,.dbe-idea) .dbe-btn{color:#b8bdf0} }

/* Lists in cards: rows with hairlines, not boxes in boxes. */
/* Approve and Ask for changes in "Needs you" are real buttons, also on the phone (November 13). */
.dbe-needs li .need-acts .dbe-btn{background:var(--dbe-btn);color:var(--dbe-btn-ink);border:0;border-radius:999px;padding:0 20px;min-height:44px;font-size:16px}
.dbe-needs li .need-acts .dbe-btn.ghost{background:transparent;color:var(--dbe-ink);border:1px solid var(--dbe-line)}
.dbe-needs li,.dbe-inbox-list li,.dbe-gone li,.dbe-log li{padding:12px 0;border-bottom:1px solid var(--ph-sep);font-size:16px;line-height:1.35}
.dbe-needs li b,.dbe-inbox-list li b,.dbe-gone li b{font-weight:600;color:var(--dbe-ink)}
.dbe-needs li .dbe-small,.dbe-inbox-list .dbe-small{font-size:14px}
.dbe-need-kind{font:500 12px/1 var(--dbe-body)!important;padding:4px 7px!important;border-radius:999px;background:var(--st-prog-bg)!important;color:var(--st-prog-fg)!important}
.dbe-needs li.is-urgent .dbe-need-kind{background:var(--st-bad-bg)!important;color:var(--st-bad-fg)!important}
.dbe-kind{font-weight:500}
.dbe-due-wrap,.dbe-needs .dbe-due{font-size:14px}
.dbe-needs select.dbe-due,.dbe-needs input.dbe-due{min-height:36px;height:36px;padding:0 8px;border-radius:8px;font-size:14px;max-width:150px}

/* Calendar posts: compact rows. Date on the left; title, then channel; status and at most one action on the right. */
.dbe-week{margin:8px 0 0;background:var(--ph-card);border-radius:14px;padding:0 16px}
.dbe-week-head{padding:12px 0!important;border-bottom:0!important;min-height:44px;align-items:center!important;gap:4px 8px!important}
.dbe-week-head h3{font-size:17px}
.dbe-week:not(.is-closed) .dbe-week-head{border-bottom:1px solid var(--ph-sep)!important}
.dbe-week.is-now .wk-title::after,.dbe-week.is-now .dbe-week-head h3::after{background:var(--st-sched-bg);color:var(--st-sched-fg);font-weight:500}
.dbe-week-head .sum{font-size:14px;width:100%;order:3;color:var(--ph-sec)}
.dbe-week-head .sum b{font-weight:400;color:inherit}
.dbe-week-head .chev{font-weight:500;color:var(--ph-sec)}
.dbe-week-head .dbe-small,.dbe-week-head > span:not(.chev):not(.sum){font-size:14px}
.dbe-post{grid-template-columns:52px 44px minmax(0,1fr) auto!important;gap:0 10px!important;padding:12px 0!important;align-items:start}
.dbe-post .dbe-date{font-size:15px;font-weight:600;line-height:1.25;color:var(--dbe-ink);white-space:nowrap}
.dbe-post .dbe-date small{display:block;font-size:13px;font-weight:400;color:var(--ph-sec)}
.dbe-post .dbe-date .dbe-time.is-unset{display:none}
.dbe-post > .dbe-post-main{display:flex;flex-direction:column;min-width:0}
.dbe-post h4{order:-1;font-size:16px;line-height:1.3;margin:0 0 2px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.dbe-post .dbe-ch{font-size:14px;font-weight:400;color:var(--ph-sec);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dbe-post .dbe-post-plan,.dbe-post .chev,.dbe-post .raw,.dbe-post .dbe-flagdot,.dbe-post h4 .dbe-kind{display:none}
.dbe-post .dbe-status{grid-column:4!important;grid-row:1;display:flex;flex-direction:column;align-items:flex-end;gap:0;padding-top:0;min-width:0}
.dbe-post .qa{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:0;margin:0;flex-wrap:nowrap}
.dbe-post .qa-btn{background:none;border:0;color:#3f4a8a;font:600 14px var(--dbe-body);min-height:44px;padding:0;white-space:nowrap;text-decoration:none}
.dbe-post .qa .ph-dots{margin-right:-12px}
.dbe-post .qa-move{display:flex;flex-direction:column;gap:8px;align-items:stretch;width:100%}
.dbe-post a,.dbe-gone a,.dbe-needs a,.dbe-inbox-list a,.dbe-log a{text-decoration:none}

/* An opened post: a sheet over the calendar, almost full height. */
.dbe-detail-row{position:fixed;inset:0;z-index:70;background:rgba(10,14,22,.45);display:flex;flex-direction:column;justify-content:flex-end;padding:calc(40px + env(safe-area-inset-top,0px)) 0 0!important;animation:ph-fade .2s ease;margin:0!important;border:0!important}
.ph-sheetwrap{display:flex;flex-direction:column;min-height:0;max-height:100%;background:var(--ph-card);border-radius:16px 16px 0 0;overflow:hidden;animation:ph-up .28s cubic-bezier(.2,.8,.2,1)}
.ph-sheetbar{display:block;flex:none;padding:0 var(--ph-g);border-bottom:1px solid var(--ph-sep)}
.ph-sheetbar .sheet-grab{margin:8px auto 2px}
.ph-sheetbar .sheet-head{margin:0;min-height:48px}
.ph-sheetbar .sheet-head b{font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.ph-sheetwrap > .pd{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:16px var(--ph-g) calc(24px + env(safe-area-inset-bottom,0px))!important;margin:0!important;border:0!important;background:var(--ph-card)}
body.ph-lock{overflow:hidden}
@keyframes ph-up{from{transform:translateY(40px);opacity:.4}to{transform:none;opacity:1}}
@keyframes ph-fade{from{opacity:0}to{opacity:1}}

/* Ideas, orders, media, clients and outreach: compact. */
.dbe-idea{border:0;border-radius:14px;padding:12px 16px;background:var(--ph-card)}
.dbe-idea-top{font-size:13px;margin-bottom:2px}
.dbe-idea-top b{font-weight:600;color:var(--dbe-ink);font-size:15px}
.dbe-idea p{font-size:16px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.dbe-idea .dbe-plan{margin-top:4px;gap:4px}
.dbe-ideas{gap:8px}
.dist-row{padding:4px 0}
.dbe-names li{padding:12px 0!important;font-size:16px}

/* Jobs: the week rows of Booked, Results. */
.booked-list{gap:8px}
.booked-row{border:0;border-radius:14px;padding:12px 16px}
.booked-row.is-gap{border:0;background:var(--ph-card);box-shadow:inset 3px 0 0 #e0a500}
.booked-head{margin-bottom:8px;gap:2px 8px}
.booked-head b{font-weight:600;font-size:16px}
.booked-head .dbe-small{font-size:14px}
.booked-pct{font-size:16px;font-weight:600}
.booked-gap{font-size:12px;font-weight:500;background:var(--st-wait-bg);color:var(--st-wait-fg)}
.booked-row > .dbe-small{display:block;margin-top:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dbe-bar-track{height:6px;border-radius:3px}
.dbe-bar-fill{border-radius:3px}
.job-row{font-size:15px;padding:12px 0;border-bottom-color:var(--ph-sep);flex-wrap:nowrap}
.job-row b{font-weight:500}
.job-row span{color:var(--ph-sec);text-align:right}
.job-res-grid{margin-top:8px!important}

/* Tables become cards (the earlier phone shell); softer here. */
table.cards-on-phone tr{border:0!important;border-radius:14px;background:var(--ph-card);padding:12px 16px!important;margin-bottom:8px}

/* ---------- Bottom bar: four places and "+" in the middle ---------- */
.dbe-tabs{position:fixed;left:0;right:0;bottom:0;z-index:40;display:flex;align-items:stretch;background:var(--ph-bar);border-top:0;
  padding:0 env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);box-shadow:0 -1px 0 rgba(255,255,255,.06)}
.dbe-tab{flex:1 1 0;order:var(--o,9);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:60px;padding:6px 0 4px;border:0!important;color:#b3bdcf;font:500 11px/1.1 var(--dbe-body);position:relative;min-width:0}
.dbe-tab.ph-hide{display:none}
.dbe-tab[aria-current="page"]{color:#fff}
.dbe-tab-icon{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;padding:4px 18px;border-radius:999px;box-sizing:content-box;transition:background .2s}
.dbe-tab[aria-current="page"] .dbe-tab-icon{background:rgba(255,255,255,.16)!important;padding:4px 18px!important;stroke-width:2}
.dbe-tab-label{font-size:11px!important;letter-spacing:0!important;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.many-tabs .dbe-tab-label{white-space:nowrap!important;font-size:11px!important}
.dbe-tab .dbe-badge{position:absolute;top:4px;left:calc(50% + 8px);background:var(--ph-badge);color:#fff;font:600 11px/1 var(--dbe-body);min-width:18px;height:18px;padding:3px 5px;border-radius:9px;box-sizing:border-box;text-align:center;box-shadow:0 0 0 2px var(--ph-bar)}
.ph-plus{order:5;flex:1 1 0;display:flex;align-items:center;justify-content:center;background:none;border:0;min-height:60px;padding:0;cursor:pointer}
.ph-plus span{display:flex;align-items:center;justify-content:center;width:52px;height:52px;border-radius:50%;background:var(--dbe-lime);color:var(--dbe-lime-ink);box-shadow:0 4px 12px rgba(0,0,0,.3);transform:translateY(-6px);transition:transform .15s}
.ph-plus:active span{transform:translateY(-6px) scale(.92)}
.ph-plus svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round}
.ph-plus[hidden]{display:none}

/* ---------- Bottom sheets ---------- */
.sheet{padding:0 var(--ph-g) calc(16px + env(safe-area-inset-bottom,0px));border-radius:16px 16px 0 0;max-height:calc(100dvh - 40px - env(safe-area-inset-top,0px));overscroll-behavior:contain;background:var(--ph-card)}
.sheet[open]{animation:ph-up .28s cubic-bezier(.2,.8,.2,1)}
.sheet::backdrop{animation:ph-fade .2s ease}
.sheet-head{position:sticky;top:0;background:var(--ph-card);z-index:1;padding-top:0;margin:0 0 8px}
.sheet-grab{margin:8px auto 4px}
.sheet-list{border:0;border-radius:12px;background:var(--ph-ground)}
.sheet-item{min-height:52px;font-size:17px;font-weight:400;border-top-color:var(--ph-sep)}
.sheet-item[aria-current="true"]{font-weight:600}
.sheet-item .dbe-badge{background:var(--ph-badge);color:#fff}
.sheet-item.is-off{opacity:.45}
.sheet-sum{margin:0 0 12px;color:var(--ph-sec);font-size:15px}
.sheet-rows{margin:0 0 12px;border-radius:12px;background:var(--ph-ground);padding:0 16px}
.sheet-rows > div{display:flex;justify-content:space-between;gap:12px;padding:12px 0;border-top:1px solid var(--ph-sep);font-size:16px}
.sheet-rows > div:first-child{border-top:0}
.sheet-rows > div > span:first-child{color:var(--ph-sec)}
.sheet-rows > div > span:last-child{text-align:right;min-width:0;overflow-wrap:anywhere}
.sheet-acts{display:flex;flex-direction:column;gap:8px;margin-top:8px}
.sheet-acts .dbe-btn{width:100%}
.sheet-acts .ph-danger{color:var(--st-bad-fg);background:none;border:0}
.sheet-info p{margin:0 0 12px;font-size:16px;color:var(--ph-text)}
.sheet-plus .sheet-item svg{width:24px;height:24px}

/* ---------- 7. Forms: full screen, Save at the bottom above the keyboard ---------- */
dialog:not(.sheet):not(#mail):not(.dbe-invite){position:fixed;inset:auto 0 auto 0;top:var(--ph-vt,0px);width:100%;max-width:none;height:var(--ph-vh,100dvh);max-height:none;margin:0;border-radius:0;box-shadow:none;
  display:none;flex-direction:column;background:var(--ph-card);padding:0}
dialog:not(.sheet):not(#mail):not(.dbe-invite)[open]{display:flex;animation:ph-up .28s cubic-bezier(.2,.8,.2,1)}
dialog:not(.sheet) > form{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}
dialog .dbe-mail-head{padding:calc(12px + env(safe-area-inset-top,0px)) var(--ph-g) 12px;font-size:14px;gap:2px;flex:none;border-bottom:1px solid var(--ph-sep)}
dialog .dbe-mail-head b{font:600 20px/1.2 var(--dbe-head)}
dialog .dbe-mail-body{flex:1 1 auto;max-height:none;overflow:auto;overscroll-behavior:contain;padding:16px var(--ph-g);background:var(--ph-card)}
dialog .dbe-mail-actions{flex:none;flex-wrap:nowrap;gap:8px;padding:8px var(--ph-g) calc(8px + env(safe-area-inset-bottom,0px));background:var(--ph-card);border-top:1px solid var(--ph-sep)}
dialog .dbe-mail-actions .dbe-btn{flex:1 1 0;min-height:50px;font-size:17px}
dialog .dbe-mail-actions .dbe-btn:not([type="submit"]):not(#postdlg-close):not(#mail-send){flex:0 0 auto;background:none;border:0;color:var(--ph-sec);padding:0 8px}
dialog .dbe-mail-actions [type="submit"]{order:2}
.ph-kb dialog .dbe-mail-actions{padding-bottom:8px}
.dbe-field{margin-bottom:16px}
.dbe-field label,.dbe-field > .l{font-size:14px;font-weight:500;color:var(--ph-sec);margin-bottom:6px;display:block}
input,select,textarea{font-size:17px!important}
input:not([type=checkbox]):not([type=radio]):not([type=file]),select{min-height:48px;border-radius:10px}
dialog .dbe-row2{grid-template-columns:1fr 1fr!important;gap:8px}
.dbe-row2,.dbe-row3{grid-template-columns:1fr!important;gap:0 8px}
/* Short choices: big buttons instead of a dropdown. */
.ph-choice{display:flex;flex-wrap:wrap;gap:8px}
.ph-choice button{min-height:44px;padding:0 14px;border-radius:10px;border:1px solid var(--ph-sep);background:var(--ph-card);color:var(--ph-text);font:500 15px var(--dbe-body);cursor:pointer}
.ph-choice button[aria-pressed="true"]{background:var(--dbe-ink);border-color:var(--dbe-ink);color:var(--ph-card)}
.ph-choice + select,.ph-has-choice{display:none!important}

/* ---------- Skeletons, toast with Undo ---------- */
.ph-skel{display:flex;flex-direction:column;gap:8px}
.ph-skel i{display:block;height:72px;border-radius:14px;background:linear-gradient(90deg,var(--ph-card) 0%,var(--ph-track) 50%,var(--ph-card) 100%);background-size:200% 100%;animation:ph-shine 1.2s linear infinite}
.ph-skel i:nth-child(2){height:56px}.ph-skel i:nth-child(3){height:88px}
@keyframes ph-shine{from{background-position:100% 0}to{background-position:-100% 0}}
.dbe-toast{bottom:calc(76px + env(safe-area-inset-bottom,0px))!important;left:var(--ph-g);right:var(--ph-g);transform:none;max-width:none;border-radius:12px;padding:0 8px 0 16px;min-height:48px;display:none;align-items:center;justify-content:space-between;gap:8px;text-align:left;font-size:15px}
.dbe-toast.show{display:flex}
.dbe-toast button{background:none;border:0;color:var(--dbe-lime);font:600 15px var(--dbe-body);min-height:44px;padding:0 8px;cursor:pointer}
.update-banner{left:var(--ph-g);right:var(--ph-g);transform:none}
#cal-bulkwrap{bottom:calc(72px + env(safe-area-inset-bottom,0px))!important}

/* Screen changes: a short cross-fade (View Transitions where the browser has them). */
::view-transition-old(root),::view-transition-new(root){animation-duration:.18s}
@media (prefers-reduced-motion:reduce){::view-transition-old(root),::view-transition-new(root){animation:none}
  .sheet[open],.dbe-detail-row,.dbe-detail-row .pd,dialog[open]{animation:none!important}}

footer{padding:16px 0 8px;font-size:13px}
footer .dbe-wrap{padding:0 var(--ph-g)}

/* Fixes after the first screenshots. */
.dbe-small,.dbe-error,.dbe-note,.pd .dbe-small{font-weight:400!important}
.dbe-error{border-radius:12px;font-size:15px;padding:12px 16px}
.dbe-grid > .dbe-card,.dbe-grid > .dbe-kpi{margin-top:0!important}
body.ph-lock .dbe-tabs{display:none}
.sheet-rows > div > span:first-child{white-space:nowrap}
/* Today: "Did these go out?" without the long text, the tick boxes or the big button. */
#today-gone-card > p.dbe-small,[data-gonepick]{display:none}
#today-gone-card .pd-res-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
#gone-all{background:none;color:#3f4a8a;padding:0;font-size:14px;min-height:44px}
.dbe-gone li{display:block}
/* Main switch with two to four choices: a segmented control. */
.today-scope:not([hidden]){display:flex!important;background:var(--ph-track);border-radius:10px;padding:2px!important;margin:0 0 16px!important;overflow:visible!important;gap:0!important}
.today-scope button{flex:1 1 0;min-height:40px;border-radius:8px!important;color:var(--ph-text)!important;font-weight:500}
.today-scope button::before{display:none}
.today-scope button[aria-pressed="true"]{background:var(--ph-card)!important;color:var(--ph-text)!important;font-weight:600;box-shadow:0 1px 3px rgba(0,0,0,.12)}
.pd p,.pd .pd-plan{font-weight:400}
.booked-head{flex-wrap:nowrap;align-items:center}
.booked-head .dbe-small{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.booked-pct{display:flex;align-items:center;gap:6px;white-space:nowrap}
/* Inline forms at the top of Ideas: "+" does them (Send an idea). The Share something card on Photos stays visible in both
   orientations (November 20): it was hidden in portrait on a phone until "+" added a class the "+" button never added. */
#idea-forms{display:none!important}
/* Every row of filter chips: one sideways row, never two lines. */
.dbe-dfilter,#media-filter{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;gap:8px;margin:0 calc(-1 * var(--ph-g)) 8px!important;padding:0 var(--ph-g)!important}
.dbe-dfilter::-webkit-scrollbar{display:none}
.dbe-dfilter .dbe-chip{position:relative;isolation:isolate;flex:none;min-height:44px;padding:0 14px;border:0;background:none!important;color:var(--ph-text);font:500 14px var(--dbe-body);white-space:nowrap}
.dbe-dfilter .dbe-chip::before{content:"";position:absolute;inset:5px 0;border-radius:999px;background:var(--ph-card);border:1px solid var(--ph-sep);z-index:-1}
.dbe-dfilter .dbe-chip[aria-pressed="true"]{color:var(--ph-card)}
.dbe-dfilter .dbe-chip[aria-pressed="true"]::before{background:var(--dbe-ink);border-color:var(--dbe-ink)}
/* Key numbers in a pipeline (outreach): the same compact tiles as the summaries. */
.dbe-pipe{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px;margin:0 0 8px}
.dbe-pipe .dbe-card{padding:12px!important;margin:0!important;display:flex;flex-direction:column-reverse;gap:2px}
.dbe-pipe .dbe-card b{font:600 22px/1.15 var(--dbe-head)!important;color:var(--dbe-ink)}
.dbe-pipe .dbe-card .dbe-small{font-size:13px}
:is(.dbe-g2,.dbe-g3,.dbe-g4,.dbe-grid,.dbe-pipe) > *{margin-top:0!important}
/* Tables as cards: label and value on one line. */
table.cards-on-phone td{display:flex!important;justify-content:space-between;align-items:center;gap:12px;padding:4px 0!important;font-size:15px;border:0!important;text-align:right}
table.cards-on-phone td::before{font-size:14px;color:var(--ph-sec);font-weight:400;text-align:left;flex:none}
table.cards-on-phone td:first-child{font-size:16px;font-weight:600;color:var(--dbe-ink);text-align:left}
table.cards-on-phone td:first-child::before{display:none}
table.cards-on-phone select{min-height:36px!important;height:36px;font-size:15px!important;max-width:60%;padding:0 8px}

/* ---------- November 9, second round ---------- */
/* Dropdown button: shows the current choice, opens a list sheet (5 or more choices). */
.ph-dd{display:inline-flex;align-items:center;gap:6px;flex:none;min-height:44px;max-width:100%;border:5px solid transparent;border-left:0;border-right:0;background-clip:padding-box;
  background-color:var(--ph-card);box-shadow:inset 0 0 0 1px var(--ph-sep);border-radius:999px;padding:0 14px;color:var(--ph-text);font:500 15px var(--dbe-body);cursor:pointer;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ph-dd[hidden]{display:none!important} /* a dropdown that is hidden (fleet types off for this client) has no button either (November 23) */
.ph-dd::after{content:"";flex:none;width:7px;height:7px;border:solid currentColor;border-width:0 1.6px 1.6px 0;transform:translateY(-2px) rotate(45deg);opacity:.6;margin-left:2px}
.ph-dd.is-set{background-color:var(--dbe-ink);color:var(--ph-card);box-shadow:none}
.ph-dd-big{min-height:48px;border-radius:12px;border:0;font-size:17px;font-weight:600;padding:0 16px;width:100%;justify-content:space-between;box-shadow:inset 0 0 0 1px var(--ph-sep)}
.dbe-pills:has(.ph-dd){background:none!important;padding:0!important;margin:0 0 16px!important;overflow:visible!important}
.dbe-pill-select,#system-pick{display:none!important}
#system-pills{display:flex!important}
form .ph-dd,dialog .ph-dd,.dbe-field .ph-dd{width:100%;justify-content:space-between;border-radius:10px;border:0;min-height:48px;font-size:17px;background-color:var(--ph-ground)}
select.ph-has-choice{display:none!important}
.sheet-tick{flex:none;width:14px;height:8px;border:solid var(--dbe-blue);border-width:0 0 2.4px 2.4px;transform:rotate(-45deg) translateY(-2px);margin-right:4px}
.sheet-menu .sheet-item{min-height:52px}
.sheet-logo{width:28px;height:28px;border-radius:50%;object-fit:cover;flex:none;box-shadow:0 0 0 1px var(--ph-sep)}
.sheet-powered{display:flex;align-items:center;gap:8px;justify-content:center;margin:16px 0 4px;font-size:13px;color:var(--ph-sec)}
.sheet-powered img{width:24px;height:24px;border-radius:50%}
/* Logos as round pictures. */
.acct-btn.has-logo{padding:0;overflow:hidden;background:#fff;border-color:rgba(255,255,255,.5)}
.acct-btn img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
.ph-hlogo:not([hidden]){display:block;width:26px;height:26px;border-radius:50%;object-fit:cover;flex:none;box-shadow:0 0 0 1.5px rgba(255,255,255,.35)}
.dbe-client:has(.ph-hlogo:not([hidden])) .dbe-client-mark{display:none}
/* The footer would sit behind the bottom bar: "Powered by" is in the account sheet instead. */
footer{display:none!important}
/* Calendar: Day by day / Month on one row, the channel and status on the next. */
.dbe-calbar{flex-wrap:wrap!important;overflow:visible!important;gap:0 8px!important}
.dbe-calbar > .dbe-seg{flex:1 1 100%!important;background:var(--ph-track);border-radius:10px;padding:2px!important;margin:0 0 4px!important;gap:0!important;overflow:visible!important}
.dbe-calbar > .dbe-seg button{flex:1 1 0;min-height:40px;border-radius:8px;color:var(--ph-text)!important}
.dbe-calbar > .dbe-seg button::before{display:none}
.dbe-calbar > .dbe-seg button[aria-pressed="true"]{background:var(--ph-card)!important;font-weight:600;box-shadow:0 1px 3px rgba(0,0,0,.12)}
.dbe-calbar label.grp{flex:1 1 0!important;min-width:0}
.dbe-calbar label.grp .ph-dd{width:100%;justify-content:space-between}
#today-catwrap .ph-dd{margin-left:8px}
/* Chips: the "More" chip has a small arrow. */
.ph-chipmore::after{content:"";display:inline-block;width:6px;height:6px;border:solid currentColor;border-width:0 1.6px 1.6px 0;transform:translateY(-3px) rotate(45deg);margin-left:8px;opacity:.6}
#dist-segs .ph-dd{margin-right:auto}
/* Add or edit a job (November 10): one field per row, full width, even spacing; native date pickers full width. */
#jobdlg .jb-body{display:flex;flex-direction:column;gap:16px}
#jobdlg .jb-body .dbe-field{margin:0}
#jobdlg .jb-pair{display:flex;flex-direction:column;gap:16px}
#jobdlg input[type=date]{width:100%;min-height:46px;box-sizing:border-box;-webkit-appearance:none;appearance:none;text-align:left}
#jobdlg input[type=date]::-webkit-date-and-time-value{text-align:left}
#jobdlg .jb-help{margin:-8px 0 0}
#jobdlg .jb-types{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#jobdlg .jb-type{display:flex!important;align-items:center;gap:10px;padding:10px 12px;margin:0!important;font-size:15px;font-weight:500;min-height:46px;box-sizing:border-box;color:var(--ph-ink, inherit)}
#jobdlg .jb-type span{flex:1;min-width:0}
#jobdlg .jb-type input[type=checkbox]{width:20px!important;height:20px!important;min-height:0!important;min-width:0!important;padding:0!important;margin:0!important;flex:none;accent-color:var(--ph-ink, #16223d)}
.ph-choice.ph-grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.ph-choice button{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.ph-choice .ph-other{display:inline-flex;align-items:center;gap:6px;color:var(--ph-sec)}
.ph-choice .ph-other::after{content:"";width:6px;height:6px;border:solid currentColor;border-width:0 1.6px 1.6px 0;transform:translateY(-2px) rotate(45deg)}
/* Nothing runs off the screen. */
main.dbe-wrap{overflow-x:clip}
.dbe-panel{min-width:0;max-width:100%}
img,video,svg,canvas,iframe,table{max-width:100%}
.dbe-topperf,.dbe-ready{white-space:normal;max-width:100%}
table.cards-on-phone td{flex-wrap:wrap}
table.cards-on-phone td > *{min-width:0;max-width:100%}
/* Wide data tables that are not cards: they scroll sideways on purpose, inside their card. */
.dbe-panel table:not(.cards-on-phone){display:block;overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}
.dbe-add,.call-held .dbe-add{flex-wrap:wrap;gap:8px}
dialog .dbe-row2 > *,.dbe-row2 > *{min-width:0}
input[type=date],input[type=time],input[type=datetime-local]{min-width:0;max-width:100%;width:100%;box-sizing:border-box}
dialog:focus,dialog:focus-visible{outline:none}
.ta-list a{text-decoration:none}
.ta-list a b{font-weight:600}
.ta-client{background:none!important;padding:0!important;font-size:13px;color:var(--ph-sec)}
label.sheet-item{cursor:pointer}
label.sheet-item input[type=checkbox]{width:22px;height:22px;min-height:0;accent-color:var(--dbe-ink);flex:none}
.per-wrap .cmp-bar{flex-direction:column;align-items:stretch;gap:8px}
.per-wrap .cmp-line{display:grid;grid-template-columns:1fr;gap:4px}
.per-wrap .cmp-line .ph-dd{width:100%;justify-content:space-between}
.per-vs{font-size:14px;margin-top:2px}
.per-wrap .cmp-view{width:100%;display:flex!important;background:var(--ph-track);border-radius:10px;padding:2px!important;margin:0!important}
.per-wrap .cmp-view button{flex:1 1 0;min-height:40px;border-radius:8px;color:var(--ph-text)!important}
.per-wrap .cmp-view button::before{display:none}
.per-wrap .cmp-view button[aria-pressed="true"]{background:var(--ph-card)!important;font-weight:600;box-shadow:0 1px 3px rgba(0,0,0,.12)}
.per-tables{grid-template-columns:1fr;gap:8px}
/* November 10: summary figures fit their tile (€21,502 on a 375px phone); a job's types wrap instead of being cut off. */
.ph-sum b{font-size:clamp(16px,4.9vw,22px)}
.ph-sum > div{padding:12px 10px}
.job-card .ph-card-title{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.job-card .ph-l3 > span{white-space:normal}
/* Jobs › Calendar on phones (November 10, refined): the bar sticks just below the top bar, never under it. */
#jobs .jc-top{position:sticky;top:var(--jc-stick,52px);z-index:5;margin:0 calc(-1 * var(--ph-g)) 10px;padding:8px var(--ph-g);background:var(--ph-bg,#f3f4f7)}
.jc-month.is-phone .jc-head{grid-template-columns:repeat(var(--jc-cols,5),minmax(0,1fr)) 58px;font-size:11px}
.jc-month.is-phone .jc-head span{padding:0;text-align:center}
.jc-month.is-phone .jc-week{grid-template-columns:minmax(0,1fr) 58px}
.jc-month.is-phone .jc-grid{min-height:54px}
.jc-month.is-phone .jc-cell{padding:6px 2px;text-align:center;border-right:0}
.jc-month.is-phone .jc-dots{justify-content:center}
.jc-month.is-phone .jc-load{font-size:10.5px;padding:2px 5px}
.jc-month.is-phone .jc-weekload{padding:8px 2px}
#jobs .jc-row1 .ph-dd{flex:1;min-width:0;font-weight:600;text-align:center}
#jobs .jc-row1{gap:6px}
#jobs .jc-top{max-width:none;box-sizing:border-box}
#jobs .jc-row1 .ph-dd{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#jobs .jc-today{flex:none}
.ai-grow{grid-template-columns:minmax(0,1fr) repeat(var(--ai-cols,5),40px);gap:3px}
.ai-ghead span:not(:first-child){font-size:9.5px;line-height:1.1}
.ai-c{min-width:0;padding:2px 4px;font-size:11px}
.gbp-split > div{grid-template-columns:118px minmax(0,1fr) 40px;font-size:12px}

/* Day by day thumbnails (November 10): the post's image or video still, small and rounded; a subtle placeholder for Ellie. */
.dbe-post .dbe-thumb.rt{display:block;position:relative;width:44px;height:44px;aspect-ratio:auto;padding:0;border:0;border-radius:8px;overflow:hidden;background:#eef1f6;visibility:visible}
.dbe-post .dbe-thumb.rt img{width:100%;height:100%;object-fit:cover;border-radius:0;display:block}
.dbe-post .rt-none{display:flex!important;align-items:center;justify-content:center;background:#f4f5f8!important;border:1px dashed #d5d9e2!important}
.dbe-post .rt-none svg{width:45%;height:45%;fill:none;stroke:#b3b9c6;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.dbe-post .rt-play{position:absolute;right:4px;bottom:4px;width:18px;height:18px;border-radius:50%;background:rgba(10,15,30,.6);display:flex;align-items:center;justify-content:center}
.dbe-post .rt-play svg{width:11px;height:11px;fill:#fff;margin-left:1px}
.dbe-post .rt-video .rt-play{right:auto;bottom:auto;left:50%;top:50%;transform:translate(-50%,-50%);width:24px;height:24px}
.dbe-post.no-thumb > .dbe-post-main{grid-column:2 / span 2}

/* Today clear-out (November 11) */
.dbe-needs select.dbe-snz{min-height:36px;height:36px;width:40px;border-radius:8px;font-size:14px;padding:0}
.today-group{font-size:14px;margin-top:18px}
.rb-snap table.cards-on-phone td:first-child{flex-direction:column;align-items:flex-start;gap:2px;text-align:left}
.rb-snap table.cards-on-phone td:first-child .dbe-small{font-weight:400;margin-top:2px}

/* Contrast in dark mode (November 13): the link-style buttons that kept the light-mode blue. */
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) [data-past]{color:#b8bdf0!important} :root:not([data-theme="light"]) #gone-all,:root:not([data-theme="light"]) .ph-act,:root:not([data-theme="light"]) .dbe-post .qa-btn{color:#b8bdf0} }
:root[data-theme="dark"] [data-past]{color:#b8bdf0!important}
:root[data-theme="dark"] #gone-all,:root[data-theme="dark"] .ph-act,:root[data-theme="dark"] .dbe-post .qa-btn{color:#b8bdf0}
