/* Studio Platform — shared styles.
   IMPORTANT: brand colours AND brand fonts (--ink/--primary/--accent/
   --font-display/--font-body) are for the CANVAS only — read directly off
   CFG.brand by the layout JS (registry.js's layoutContext), never by any
   CSS rule below. The app's own chrome uses fixed --ui- and --sw-font-
   tokens (same as /login and /app) so it looks like Social Web on every
   tenant, dark-brand or light, and doesn't flip fonts per business.
   (Never let an asterisk sit immediately before a forward slash anywhere
   in this comment, with nothing between them — that pair is what closes
   a CSS comment, even inside prose, even inside quotes. That exact
   accident broke this whole root block for who knows how long: found by
   comparing the parsed CSSOM against the raw file byte for byte and
   discovering the comment closed 300 characters before its written
   closer, swallowing the sw-font-serif and sw-font-sans lines into a
   garbage rule the parser then dropped entirely — every Studio page
   silently fell back to the browser's own default serif, not Lora/Inter.) */
:root{
  --ui-bg:#F8F0E5;
  --ui-panel:#FFFFFF;
  --ui-line:rgba(59,29,75,0.14);
  --ui-chip:rgba(59,29,75,0.06);
  --ui-text:#3B1D4B;
  --ui-muted:#6B5B75;
  --sw-accent:#F2A62B;
  --sw-shadow:rgba(46,20,60,0.14);
  --sw-font-serif:'Lora',Georgia,serif;
  --sw-font-sans:'Inter',system-ui,-apple-system,sans-serif;
}
*{box-sizing:border-box;min-width:0}
::selection{background:rgba(242,166,43,0.35)}
html,body{margin:0;height:100%;overflow:hidden}
body{
  font-family:var(--sw-font-sans);
  color:var(--ui-text);-webkit-font-smoothing:antialiased;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(242,166,43,0.05), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(59,29,75,0.04), transparent 55%),
    var(--ui-bg);
}
button{font:inherit;cursor:pointer;border:none;background:none;color:inherit}
input,textarea,select{font:inherit;color:var(--ui-text)}
select{background:var(--ui-panel)}

/* Consistent motion + keyboard-focus baseline for every interactive control.
   Buttons previously had hard, instant hover swaps and NO focus indicator at
   all — a real gap for anyone tabbing through the Studio with a keyboard,
   not just a polish nit. :focus-visible so a mouse click never shows the
   ring, only actual keyboard navigation does. */
button,.mini,.xbtn,.cat,.fmt,.tpl,.libimg,.file-btn,.qp-drop,input,textarea,select{
  transition:background-color .15s ease,border-color .15s ease,color .15s ease,
    transform .1s ease,box-shadow .15s ease}
button:active,.mini:active,.xbtn:active{transform:scale(0.97)}
button:focus-visible,.mini:focus-visible,.xbtn:focus-visible,.cat:focus-visible,
.fmt:focus-visible,.tpl:focus-visible,input:focus-visible,textarea:focus-visible,
select:focus-visible,.file-btn:focus-visible{
  outline:3px solid var(--sw-accent);outline-offset:2px;box-shadow:0 0 0 2px var(--ui-text)}
/* Focus is an amber ring with an ink ring inside it: amber alone is 2:1 on white and WCAG 1.4.11 needs 3:1.
   The search, caption fields and draft box used to drop the outline altogether (audit, 31 Oct 2026). */
/* Reduced motion also stops the panels sliding in and the mic pulsing (31 Oct 2026). */
@media(prefers-reduced-motion:reduce){ *{transition-duration:0.001ms!important;animation-duration:0.001ms!important;animation-iteration-count:1!important} }

/* ---------- gate (this one DOES use brand colour, it's a brand moment) ---------- */
.gate{position:fixed;inset:0;background:var(--ink);display:grid;place-items:center;z-index:1000;padding:24px}
.gate-card{width:100%;max-width:400px;background:#fff;border-radius:18px;padding:38px 30px 30px;text-align:center;
  box-shadow:0 24px 60px rgba(0,0,0,.3)}
.gate-card h1{font-family:var(--sw-font-serif);font-weight:800;font-size:25px;margin:0 0 6px;color:var(--ink)}
.gate-card p{color:var(--ui-muted);font-size:14px;margin:0 0 22px}
.gate-card input{width:100%;padding:13px 15px;border:1px solid var(--ui-line);border-radius:10px;font-size:16px;text-align:center;letter-spacing:.18em}
.gate-card input:focus{outline:none;border-color:var(--ui-text)}
.gate-card button{width:100%;margin-top:12px;background:var(--ui-text);color:var(--ui-bg);
  padding:13px;border-radius:10px;font-weight:700;font-size:14.5px}
.gate-err{color:#d33;font-size:13px;margin-top:10px;min-height:18px}

/* Labels a screen reader announces but sighted users don't need, because
   the field's own placeholder or position already says what it is. */
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ---------- layout ---------- */
#app{display:flex;flex-direction:column;height:100vh}
/* Sections left, business selector right — same structure as
   Metricool's brand bar, our own look. */
.top-bar{flex:0 0 auto;display:flex;align-items:stretch;justify-content:space-between;
  gap:12px;border-bottom:1px solid var(--ui-line);background:var(--ui-panel);padding-right:12px}
/* Social Web's own mark, fixed — same tokens as /login and /app, never the
   tenant's brand (that's what the canvas/templates are for). */
.sw-brand{display:flex;align-items:center;gap:7px;padding:0 14px;text-decoration:none;flex:0 0 auto}
.sw-brand svg{width:20px;height:20px;flex:0 0 auto}
.sw-brand span{font-family:var(--sw-font-serif);font-weight:700;font-size:16px;color:#3B1D4B;white-space:nowrap}
.sw-brand span b{color:#F2A62B;font-weight:700}
/* Seven sections don't fit a phone. Scroll the row rather than wrap or
   shrink — a wrapped nav pushes the whole canvas down, and shrinking
   is what caused the sub-tab overlap this restructure just fixed. */
.top-bar .mode-tabs{flex:1 1 auto;border-bottom:none;overflow-x:auto;scrollbar-width:none;position:relative}
.top-bar .mode-tabs::-webkit-scrollbar{display:none}
/* Hiding the scrollbar (above) left zero signal that Assistant, the 7th
   tab, exists past the fold on a laptop-width window — a real Cowork QA
   finding (2026-08-11): "no scroll arrow, no overflow menu, nothing to
   say there's a 7th tab." A static fade always showing would be wrong too
   (it'd suggest more content even once fully scrolled) — toggled by JS
   (studio.js) checking actual scroll position against scroll width. */
.top-bar .mode-tabs.can-scroll-more::after{
  content:'';position:absolute;top:0;right:0;bottom:0;width:28px;pointer-events:none;
  background:linear-gradient(to right, transparent, var(--ui-panel))}
.top-bar .mode-tab{flex:1 1 auto;white-space:nowrap;padding-left:18px;padding-right:18px}
.biz-switch{position:relative;display:flex;align-items:center;flex:0 0 auto}
/* A class rule with display:flex beats the `hidden` attribute's UA
   display:none, so the switcher rendered as an empty bordered box with a
   lone caret for every single-business tenant. Same trap for the menu. */
.biz-switch[hidden],.biz-menu[hidden],.biz-logo[hidden]{display:none}
.biz-btn{display:flex;align-items:center;gap:8px;padding:8px 14px;border-radius:999px;border:1px solid var(--ui-line);
  border-radius:10px;background:transparent;font:inherit;font-size:13px;font-weight:600;
  color:var(--ui-text);cursor:pointer;max-width:260px}
.biz-btn:hover{border-color:var(--ui-text)}
.biz-btn > span:not(.biz-caret){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.biz-logo{height:20px;width:auto;flex:0 0 auto;border-radius:4px}
.admin-back[hidden]{display:none}
.admin-back{display:flex;align-items:center;margin-left:10px;padding:8px 14px;border-radius:10px;
  border:1px solid var(--ui-line);background:transparent;font-size:13px;font-weight:600;
  color:var(--ui-text);text-decoration:none;white-space:nowrap}
.admin-back:hover{border-color:var(--ui-text);background:var(--ui-chip)}
.biz-caret{flex:0 0 auto;font-size:10px;color:var(--ui-muted)}
.biz-menu{position:absolute;top:calc(100% + 6px);right:0;z-index:60;min-width:250px;max-height:60vh;
  overflow-y:auto;background:var(--ui-panel);border:1px solid var(--ui-line);border-radius:12px;
  box-shadow:0 12px 32px rgba(0,0,0,.14);padding:6px}
.biz-item{display:flex;align-items:center;gap:10px;width:100%;padding:10px;border:0;border-radius:8px;
  background:transparent;font:inherit;font-size:13.5px;color:var(--ui-text);cursor:pointer;text-align:left}
.biz-item:hover{background:var(--ui-chip)}
.biz-item.on{font-weight:700}
.biz-item img{height:22px;width:22px;object-fit:contain;flex:0 0 auto;border-radius:4px}
.biz-item .dot{height:22px;width:22px;flex:0 0 auto;border-radius:6px;background:var(--ui-chip);
  display:grid;place-items:center;font-size:11px;font-weight:700;color:var(--ui-muted)}

.mode-tabs{flex:0 0 auto;display:flex;border-bottom:1px solid var(--ui-line);background:var(--ui-panel)}
.mode-tab{flex:1;position:relative;padding:15px 13px;font-size:14px;font-weight:500;
  color:var(--ui-muted);border-bottom:2px solid transparent}
.mode-tab::after{content:'';position:absolute;left:26%;right:26%;bottom:7px;height:2px;border-radius:2px;
  background:var(--sw-accent);transform:scaleX(0);transition:transform .22s ease}
.mode-tab:hover{color:var(--ui-text)}
.mode-tab:hover::after{transform:scaleX(0.55)}
.mode-tab.on{color:var(--ui-text);font-weight:700}
.mode-tab.on::after{transform:scaleX(1)}
/* The tab row scrolls sideways on a computer, which clips anything drawn
   outside a tab: the keyboard's focus ring sits inside it (21 Oct 2026). */
.mode-tab:focus-visible{outline:2px solid var(--sw-accent);outline-offset:-4px;border-radius:8px}
#mode-studio{flex:1;min-height:0;display:flex;flex-direction:column}
/* Every top-level section scrolls independently — only Assistant had
   this when the nav split into seven destinations, so New post, Accounts,
   Calendar, Inbox, Insights and Advertising all cut off at the viewport
   with no way to reach the rest (Peter, 2026-08-14: "this page wont
   scroll", twice). mode-studio manages its own three-panel layout and is
   deliberately excluded. */
#mode-thisweek,#mode-assist,#mode-newpost,#mode-calendar,#mode-inbox,#mode-insights,#mode-ads,#mode-accounts,#mode-settings{
  flex:1;min-height:0;overflow-y:auto;background:var(--ui-bg)}
.assist-page{max-width:620px;margin:0 auto;padding:36px 24px 60px}
.assist-page h1{font-family:var(--sw-font-serif);font-size:22px;margin:0 0 6px}
.assist-page > .hint{margin-bottom:22px}

/* ---- Inbox (reviews) + Insights ---- */
.rv-item{border:1px solid var(--ui-line);border-radius:12px;padding:16px;margin-bottom:12px;background:var(--ui-panel)}
.rv-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.rv-stars{color:var(--sw-accent);letter-spacing:1px}
.rv-meta{font-size:12px;color:var(--ui-muted)}
.rv-text{font-size:14px;margin:0 0 10px;white-space:pre-wrap}
.rv-text.rv-none{color:var(--ui-muted);font-style:italic}
.rv-replied{font-size:12.5px;color:var(--ui-muted)}
.rv-actions{display:flex;gap:8px;align-items:flex-start;flex-wrap:wrap}
.rv-reply{flex:1;min-width:200px;border:1px solid var(--ui-line);border-radius:9px;padding:8px 10px;font:inherit;font-size:13px;resize:vertical}
.rv-status{font-size:12px;color:var(--ui-muted);align-self:center}
/* The one inbox (inbox.js, 22 Oct 2026): a New marker, filters, the reply
   box with its draft and checks, and the saved replies. */
.ib-item.unread{border-color:var(--sw-accent)}
.ib-new{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--ui-bg);background:var(--sw-accent);border-radius:999px;padding:2px 8px}
.ib-bar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:0 0 14px}
.ib-bar .ib-quiet{margin-left:auto}
.ib-note,.ib-hint{font-size:12.5px;color:var(--ui-muted);margin:0 0 10px;line-height:1.45}
.ib-group{margin:0 0 22px}
.ib-group-h{display:flex;align-items:baseline;gap:10px;font-size:15px;font-weight:700;margin:0 0 10px;padding-bottom:6px;border-bottom:1px solid var(--ui-line)}
.ib-group-h span{font-size:12.5px;font-weight:600;color:var(--ui-muted)}
.ib-latest{font-weight:600;color:var(--ui-muted)}
.ib-post{font-size:12.5px;color:var(--ui-muted);margin:-4px 0 10px}
.ib-reply{display:flex;flex-direction:column;gap:8px}
.ib-reply .rv-reply{width:100%;box-sizing:border-box}
.ib-saved{align-self:flex-start;font:inherit;font-size:13px;padding:6px 8px;border-radius:8px;border:1px solid var(--ui-line);background:var(--ui-panel);color:inherit}
.ib-newtext{display:grid;gap:6px;max-width:460px;margin:0 0 16px;padding:12px;border:1px solid var(--ui-line);border-radius:10px}
.ib-newtext label{font-size:12.5px;font-weight:600}
.ib-newtext input,.ib-newtext textarea{font:inherit;padding:8px;border:1px solid var(--ui-line);border-radius:8px;background:var(--ui-bg);color:inherit}
.ib-msg{font-size:12.5px;border-radius:9px;padding:8px 10px;background:var(--ui-bg);border:1px solid var(--ui-line)}
.ib-msg p{margin:0 0 4px}
.ib-msg p:last-child{margin:0}
.ib-msg.bad{border-color:#c0392b}
.mini.ib-quiet{background:transparent;border-color:transparent;text-decoration:underline}
.ib-saved-box{border:1px solid var(--ui-line);border-radius:12px;padding:12px 16px;margin:0 0 16px;background:var(--ui-panel)}
.ib-saved-box summary{cursor:pointer;font-weight:700;font-size:13.5px}
.ib-saved-list{list-style:none;padding:0;margin:10px 0}
.ib-saved-list li{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap;padding:6px 0;border-bottom:1px solid var(--ui-line);font-size:13px}
.ib-saved-list li span{flex:1;min-width:160px;color:var(--ui-muted);white-space:pre-wrap}
.ib-saved-new{display:flex;flex-direction:column;gap:8px}
.ib-saved-new input,.ib-saved-new textarea{font:inherit;font-size:13px;padding:8px 10px;border-radius:9px;border:1px solid var(--ui-line);background:var(--ui-bg);color:inherit}
.ib-saved-new .mini{align-self:flex-start}
@media (max-width:1000px){ .ib-item .mini,.ib-saved-new .mini{min-height:44px} .ib-reply .rv-reply,.ib-saved-new input,.ib-saved-new textarea,.ib-saved{font-size:16px} }
/* One visual grammar for "a number that matters" — reused for review
   count/rating in Inbox and post totals in Insights, same component
   Metricool uses everywhere from follower counts to click totals rather
   than a bespoke treatment per metric. flex-wrap, not a fixed grid: the
   tile count varies by section and shouldn't force a rebuild to add
   one more. */
.stat-row{display:flex;gap:22px;flex-wrap:wrap;margin:0 0 22px}
.stat-tile{display:flex;flex-direction:column;gap:2px}
.stat-tile .n{font-size:28px;font-weight:800;line-height:1;color:var(--ui-text)}
.stat-tile .l{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--ui-muted)}

/* A spacious, deliberate empty state — not the generic .empty fallback
   — for the two lists most likely to genuinely have nothing in them
   yet. A cramped one-liner here reads as broken; Metricool's own empty
   inbox pane is mostly whitespace around one icon and one sentence. */
.section-empty{padding:56px 20px;text-align:center;color:var(--ui-muted)}
.section-empty .glyph{font-size:34px;opacity:.35;margin-bottom:14px;display:block}
.section-empty p{font-size:13.5px;max-width:340px;margin:0 auto;line-height:1.5}

.ins-h{font-family:var(--sw-font-serif);font-size:16px;margin:26px 0 10px}
.ins-h:first-child{margin-top:0}
.ins-post{border:1px solid var(--ui-line);border-radius:12px;padding:14px;margin-bottom:10px;background:var(--ui-panel)}
.ins-post-top{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:6px}
.ins-post-text{font-size:13.5px;margin:0 0 8px;color:var(--ui-muted)}
.ins-metrics{font-size:12.5px;font-weight:600}
/* Insights cards (21 Oct 2026): one column on a phone, side by side when there is room. */
/* Every post, by platform (20 Nov 2026): a table that scrolls inside its own box on a phone, post column kept readable. */
.pn-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.pn-table{min-width:520px}
.pn-table th[scope=row]{font-weight:400;min-width:190px;max-width:260px}
.pn-toggle{display:block;width:100%;min-height:44px;text-align:left;background:none;border:0;padding:4px 2px;font:inherit;color:var(--ui-text);cursor:pointer}
.pn-toggle:focus-visible{outline:2px solid var(--ui-text);outline-offset:2px}
.pn-date{font-weight:700;margin-right:4px}
.pn-kind{font-size:11px;color:var(--ui-muted);background:var(--ui-chip);border-radius:6px;padding:1px 6px;margin-left:4px}
.pn-none,.pn-na{color:var(--ui-muted);font-size:12px}
.pn-detail td{background:var(--ui-chip)}
.pn-plat{padding:8px 0;border-top:1px solid var(--ui-line)}
.pn-plat:first-child{border-top:0}
.pn-plat h4{font-size:13px;margin:0 0 4px}
.pn-stats,.pn-hist{list-style:none;margin:0 0 6px;padding:0;display:flex;flex-wrap:wrap;gap:4px 16px;font-size:12.5px}
.pn-stats span,.pn-hist span{color:var(--ui-muted)}
.ins-cards{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;margin:0 0 28px}
@media (min-width:1100px){.ins-cards{grid-template-columns:repeat(auto-fit,minmax(320px,1fr));align-items:start}}
.ins-card{border:1px solid var(--ui-line);border-radius:14px;padding:16px;background:var(--ui-panel)}
.ins-card .ins-h{margin:0 0 4px}
.ins-hint{font-size:13px;color:var(--ui-muted);margin:0 0 12px;line-height:1.45}
.ins-card .empty{text-align:left;padding:6px 0;line-height:1.5}
.ins-when,.ins-how,.ins-foot{font-size:12px;color:var(--ui-muted);margin:0 0 10px;line-height:1.45}
.ins-foot{margin:14px 0 0;display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.ins-note{font-size:13px;line-height:1.5;margin:0 0 12px;padding:10px 12px;border-radius:10px;background:var(--ui-chip)}
.ins-sub{font-size:14px;margin:16px 0 8px}
.ins-scores{list-style:none;margin:0;padding:0}
.ins-score{padding:10px 0;border-top:1px solid var(--ui-line)}
.ins-score:first-child{border-top:0;padding-top:0}
.ins-score-top{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap}
.ins-score-n{font-size:13px;font-weight:700}
.ins-meter{height:8px;border-radius:4px;background:var(--ui-chip);margin:6px 0;overflow:hidden}
.ins-meter i{display:block;height:100%;background:var(--ui-text);border-radius:4px}
.ins-reason{font-size:13.5px;line-height:1.5;margin:4px 0}
.ins-fixes{margin:0;padding-left:20px}
.ins-fixes li{font-size:13.5px;line-height:1.5;margin:0 0 8px}
.ins-fixes li span{display:block;color:var(--ui-muted)}
.ins-card .mini{min-height:44px}
.ins-list{list-style:none;margin:0;padding:0}
.ins-card .ins-post{margin-bottom:10px;padding:12px}
.ins-had-h{font-size:12px;font-weight:700;margin:10px 0 4px;color:var(--ui-muted)}
.ins-had{margin:0;padding-left:18px;font-size:13px;line-height:1.5}
.ins-link{display:inline-flex;align-items:center;min-height:44px;font-size:13px;font-weight:600;color:var(--ui-text)}
.ins-skipped{margin:6px 0 0;padding-left:18px;font-size:12.5px;color:var(--ui-muted);line-height:1.5}
.ins-skipped+.ins-how{margin-top:10px}
.ins-acc{margin-top:14px;border-top:1px solid var(--ui-line);padding-top:10px}
.ins-acc summary{cursor:pointer;font-size:13.5px;font-weight:600;padding:12px 0}
.ins-acc-form{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.ins-acc-form label{width:100%;font-size:13px;font-weight:600}
.ins-acc-form .ins-how{width:100%;margin:0}
.ins-acc-form input{flex:1 1 200px;min-height:44px;padding:8px 12px;border:1.5px solid var(--ui-line);border-radius:10px;background:var(--ui-panel)}
.ins-saved{font-size:12.5px;color:var(--ui-muted)}
.ins-never{border-left:3px solid var(--ui-text)}
.ins-draft-l{display:block;font-size:12.5px;font-weight:700;margin:8px 0 4px}
.ins-draft{width:100%;min-height:72px;padding:10px 12px;border:1.5px solid var(--ui-line);border-radius:10px;background:var(--ui-panel);font-size:14px;line-height:1.45;resize:vertical}
.ins-held{font-size:12.5px;line-height:1.45;margin:6px 0 0;color:var(--ui-text);font-weight:600}
.ins-sug-do{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:8px}
.ins-copied{font-size:12.5px;color:var(--ui-muted)}
.heat{margin-top:6px}
.heat-row{display:flex;align-items:center;gap:2px;margin-bottom:2px}
.heat-day{width:34px;font-size:11px;color:var(--ui-muted);flex:0 0 auto}
.heat-cell{flex:1;height:14px;border-radius:2px;background:var(--ui-text);display:block}
.heat-legend{display:flex;justify-content:space-between;margin-left:36px;margin-top:4px;font-size:11px;color:var(--ui-muted)}

/* The side panels scale with the window. As minmax(290px,400px) and
   minmax(330px,470px) they grew to full width before the preview got any,
   so from 1001px to about 1300px the post preview was squeezed (154px wide
   at 1024, with the title running into its buttons; found 24 Oct 2026).
   At 1440px and up the panels are the same widths as before. */
.app{display:grid;grid-template-columns:clamp(290px,28vw,400px) minmax(0,1fr) clamp(330px,32vw,470px);flex:1;min-height:0}
@keyframes sw-rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.app>.panel:first-child{animation:sw-rise .4s ease both}
.app>.stage{animation:sw-rise .4s .06s ease both}
.app>.panel.right{animation:sw-rise .4s .12s ease both}
.panel-body::-webkit-scrollbar,#tpl-list::-webkit-scrollbar,#photo-library::-webkit-scrollbar{width:8px}
.panel-body::-webkit-scrollbar-thumb,#photo-library::-webkit-scrollbar-thumb{
  background:var(--ui-line);border-radius:99px}
.panel-body::-webkit-scrollbar-track{background:transparent}
.panel{background:linear-gradient(180deg,rgba(248,240,229,0.55),rgba(248,240,229,0.2) 120px),var(--ui-panel);
  border-right:1px solid var(--ui-line);display:flex;flex-direction:column;overflow:hidden}
.panel.right{border-right:none;border-left:1px solid var(--ui-line)}
.panel-head{padding:18px 18px 14px;border-bottom:1px solid var(--ui-text);display:flex;align-items:center;justify-content:space-between;gap:10px;
  box-shadow:0 3px 0 -2px var(--ui-line)}
.panel-head h2{font-family:var(--sw-font-serif);font-size:17px;margin:0;font-weight:600;letter-spacing:.01em;color:var(--ui-text)}
.panel-head h2{position:relative;padding-bottom:7px}
.panel-head h2::after{content:'';position:absolute;left:0;bottom:0;width:26px;height:2px;
  border-radius:2px;background:var(--sw-accent)}
.panel-body{overflow-y:auto;padding:14px 16px;flex:1}

.topbar{display:flex;align-items:center;justify-content:space-between;padding:12px 18px;
  border-bottom:1px solid var(--ui-line);background:var(--ui-panel);gap:12px}
.topbar .name{font-family:var(--sw-font-serif);font-weight:700;font-size:19px;color:var(--ui-text)}
.topbar .name em,.topbar .name i{font-style:italic;color:#A16207}
.topbar .right{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
/* 4 Oct: at a laptop-width window the three buttons shrank instead of
   wrapping, so "Preview as post" broke onto two lines and "Reset" spilled
   out of its border. Buttons keep their size; the row wraps instead. */
.topbar .right .mini{white-space:nowrap;flex-shrink:0}
.topbar .name{min-width:0}
.mini{font-size:13px;padding:9px 16px;border-radius:10px;
  background:transparent;border:1.5px solid var(--ui-text);font-weight:600;color:var(--ui-text)}
.mini:hover{background:var(--ui-text);border-color:var(--ui-text);color:var(--ui-bg);
  transform:translateY(-1px);box-shadow:0 6px 14px var(--sw-shadow)}
.autosave{font-size:11.5px;color:var(--ui-muted);opacity:0;transition:opacity .3s}
.autosave.on{opacity:1}

/* ---------- stage ---------- */
.stage{display:flex;flex-direction:column;overflow:hidden;background:var(--ui-bg)}
.stage-inner{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:22px;overflow:auto;position:relative}
/* Instagram grid crop guide: shades what the 3:4 profile grid hides. Page
   element over the preview, never part of the exported image. */
#grid-guide{position:absolute;pointer-events:none;display:none}
#grid-guide i{position:absolute;top:0;bottom:0;background:rgba(12,26,50,.38)}
#grid-guide .gg-l{left:0;border-right:2px dashed rgba(255,255,255,.9)}
#grid-guide .gg-r{right:0;border-left:2px dashed rgba(255,255,255,.9)}
#grid-guide span{position:absolute;left:50%;bottom:-28px;transform:translateX(-50%);white-space:nowrap;
  font-size:11.5px;color:var(--ui-muted)}
#fmt-row .gg-toggle{margin-left:6px}
#fmt-row .gg-toggle.on{border-color:var(--ui-text)}
#post-canvas{max-width:100%;max-height:100%;border-radius:2px;background:#fff;
  border:10px solid #fff;
  box-shadow:0 0 0 1px var(--ui-line),0 24px 60px -12px var(--sw-shadow),0 6px 18px -6px var(--sw-shadow)}
.stage-foot{padding:9px 18px;border-top:1px solid var(--ui-line);font-family:var(--sw-font-serif);
  font-size:12.5px;color:var(--ui-muted);background:var(--ui-panel);text-align:center}

/* ---------- "preview as post" — a plausible platform card around the same
   canvas, not a pixel clone of any one platform's UI (that goes stale the
   moment they redesign). Close enough to answer "what will a customer
   actually see", which a bare canvas on white doesn't. ---------- */
.stage-inner.previewing #post-canvas{max-height:calc(100% - 130px)}
.post-frame-head,.post-frame-actions,.post-frame-caption{width:min(100%,420px)}
.post-frame-head{display:flex;align-items:center;gap:9px;margin-bottom:10px}
.post-frame-avatar{width:34px;height:34px;border-radius:50%;background:var(--ui-text);color:var(--ui-bg);
  display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;flex:none}
.post-frame-name{font-weight:700;font-size:14px;color:var(--ui-text)}
.post-frame-actions{display:flex;gap:18px;margin-top:10px;padding-top:10px;border-top:1px solid var(--ui-line);
  font-size:12.5px;color:var(--ui-muted)}
.post-frame-caption{margin-top:8px;font-size:13px;line-height:1.5;color:var(--ui-text);white-space:pre-wrap}
.preview-note{padding:6px 18px;font-size:11px;color:var(--ui-muted);text-align:center;background:var(--ui-panel)}
#btn-preview-toggle.on{background:var(--ui-text);color:var(--ui-bg)}

/* ---------- templates ---------- */
.rail-head{margin:2px 0 14px}
.rail-head :is(h1,h2){font-family:var(--sw-font-serif);font-size:17px;margin:0 0 3px;font-weight:600;color:var(--ui-text);
  position:relative;padding-bottom:7px}
.rail-head :is(h1,h2)::after{content:'';position:absolute;left:0;bottom:0;width:26px;height:2px;
  border-radius:2px;background:var(--sw-accent)}
.rail-head p{margin:6px 0 0;font-size:12.5px;color:var(--ui-muted);line-height:1.5}
.search{width:100%;padding:10px 14px;border:1px solid var(--ui-line);border-radius:999px;font-size:13.5px;margin-bottom:12px;background:var(--ui-panel);color:var(--ui-text)}
.search:focus{border-color:var(--ui-text)}
/* season / year filters */
.filters{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}
.filters label{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:600;color:var(--ui-muted);cursor:pointer}
.filters input{accent-color:var(--ui-text);margin:0}
#season-banner{background:rgba(242,166,43,0.12);border-left:3px solid var(--sw-accent);border-radius:0 9px 9px 0;
  padding:9px 11px;margin-bottom:10px;
  font-size:12px;color:var(--ui-text);display:flex;align-items:center;justify-content:space-between;gap:8px}
#season-banner strong{color:var(--ui-text)}
#season-banner button{font-size:11.5px;font-weight:700;color:var(--ui-text);white-space:nowrap}
.tag-live{display:inline-block;font-style:normal;font-size:9.5px;font-weight:800;background:#DCF5E4;color:#1B7A3D;
  padding:1px 5px;border-radius:4px;margin-left:5px;vertical-align:middle}
.tag-soon{display:inline-block;font-style:normal;font-size:9.5px;font-weight:800;background:#FFF0D4;color:#8A6100;
  padding:1px 5px;border-radius:4px;margin-left:5px;vertical-align:middle}
.tag-arch{display:inline-block;font-style:normal;font-size:9.5px;font-weight:800;background:#ECEEF2;color:#7A8494;
  padding:1px 5px;border-radius:4px;margin-left:5px;vertical-align:middle}
.tpl.arch{opacity:.55}

#cat-list{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px}
.cat{font-size:12.5px;font-weight:600;padding:6px 13px;border-radius:999px;
  background:var(--ui-panel);border:1px solid var(--ui-line);color:var(--ui-text);
  box-shadow:0 1px 3px var(--sw-shadow);text-transform:capitalize}
.cat:hover{border-color:var(--sw-accent);color:var(--ui-text);transform:translateY(-1px)}
.cat.on{background:var(--ui-text);border-color:var(--ui-text);color:var(--ui-bg)}
#tpl-list{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.tpl{border:1px solid var(--ui-line);border-radius:3px;overflow:hidden;background:#fff;text-align:left;padding:5px 5px 0;
  box-shadow:0 1px 3px var(--sw-shadow)}
.tpl img{width:100%;display:block;aspect-ratio:4/5;object-fit:cover;border-radius:1px}
/* a tile waiting for its thumbnail to be drawn (studio.js watchThumbs) */
.tpl img.thumb-wait{background:var(--ui-bg)}
.tpl span{display:block;padding:8px 5px 9px;font-family:var(--sw-font-serif);
  font-size:12px;font-weight:600;line-height:1.3;color:var(--ui-text)}
.tpl.on{border-color:var(--ui-text);box-shadow:0 0 0 1px var(--ui-text),0 6px 16px var(--sw-shadow)}
.tpl.on span::before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;
  background:var(--sw-accent);margin-right:6px;vertical-align:1px}
.tpl:hover{transform:translateY(-2px);box-shadow:0 10px 24px -6px var(--sw-shadow)}
.empty{font-size:13px;color:var(--ui-muted);text-align:center;padding:20px 0}

/* ---------- fields ---------- */
.field{margin-bottom:14px}
.field label{display:block;font-size:12.5px;font-weight:600;color:var(--ui-muted);margin-bottom:6px}
.field input[type=text],.field textarea{width:100%;padding:9px 11px;border:1px solid var(--ui-line);border-radius:9px;
  font-size:13.5px;resize:vertical;background:var(--ui-panel);color:var(--ui-text)}
.field input:focus,.field textarea:focus{border-color:var(--ui-text)}
.field textarea{min-height:74px;line-height:1.5}
.file-btn{display:block;padding:11px;border:1.5px dashed var(--ui-line);border-radius:10px;text-align:center;
  font-size:12.5px;font-weight:600;color:var(--ui-muted);cursor:pointer}
.file-btn:hover{border-color:var(--ui-text);color:var(--ui-text)}
.file-btn input{display:none}
.ba-row{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.ba-mode-row{display:flex;gap:8px;margin-bottom:9px}
/* `display:flex` above beat the hidden attribute, so the library's "Fill: Before /
   Fill: After" row showed on every template, for every business, even with an
   empty library and no before/after layout in use. The JS was right all along
   (renderPhotoLibrary sets hidden); this makes the attribute win (20 Oct 2026). */
.ba-mode-row[hidden]{display:none}
.ba-mode-chip{flex:1;padding:9px 6px;font-size:12px;font-weight:700;color:var(--ui-muted);
  background:var(--ui-chip);border:1.5px solid transparent;border-radius:10px;cursor:pointer}
.ba-mode-chip:hover{color:var(--ui-text)}
.ba-mode-chip.on{color:var(--ui-bg);background:var(--ui-text);border-color:var(--ui-text)}

#fmt-row{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px}
.fmt{font-size:12.5px;font-weight:600;padding:7px 13px;border-radius:10px;
  background:var(--ui-panel);border:1px solid var(--ui-line);color:var(--ui-text);
  box-shadow:0 1px 3px var(--sw-shadow)}
.fmt:hover{border-color:var(--sw-accent);color:var(--ui-text);transform:translateY(-1px)}
.fmt.on{background:var(--ui-text);border-color:var(--ui-text);color:var(--ui-bg)}

/* layout chooser — same chip style as #fmt-row, but deliberately NOT
   .field: fieldsForTemplate() hides any .field whose data-field isn't in
   the current template's field set, and this control has no data-field
   (it's not per-template content, it stays visible for every template). */
.field-static{margin-bottom:14px}
.field-static label{display:block;font-size:12.5px;font-weight:600;color:var(--ui-muted);margin-bottom:6px}
.field-help{font-size:11.5px;color:var(--ui-muted);margin-top:6px;line-height:1.5}
#layout-row{display:flex;flex-wrap:wrap;gap:6px}

/* Edit-panel tabs (Content/Photo/Caption) — from DSK's and EXIT CODE's
   originals, both independently built this instead of one long scroll.
   Same visual language as the top-level .mode-tab row, one level down. */
.ptabs{display:flex;border-bottom:1px solid var(--ui-line);margin:0 0 16px}
.ptab{flex:1;padding:10px 4px;font-family:var(--sw-font-serif);font-size:14.5px;font-weight:600;
  color:var(--ui-muted);border-bottom:2px solid transparent;text-align:center}
.ptab.on{color:var(--ui-text);border-bottom-color:var(--sw-accent)}
.ptab-pane[hidden]{display:none}

/* photo library */
#photo-library{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:8px;max-height:190px;overflow-y:auto}
.libimg{border-radius:8px;overflow:hidden;padding:0;border:2px solid transparent}
.libimg img{width:100%;aspect-ratio:1;object-fit:cover;display:block}
.libimg:hover{border-color:var(--ui-text)}

/* currently-loaded photo/video, with a way to deselect it — the library
   grid and file picker only ever ADD; this is the one place to remove. */
.photo-current{display:flex;align-items:center;gap:10px;padding:8px;border-radius:10px;background:var(--ui-chip);margin-bottom:8px}
.photo-current img,.photo-current video{width:52px;height:52px;object-fit:cover;border-radius:8px;flex-shrink:0;background:var(--ui-line)}
.photo-current .mini{margin-left:auto}

/* lint */
.lint{font-size:11.5px;margin-top:6px;line-height:1.8;min-height:16px}
.lint.ok{color:#2ee08f}
.lint-tag{display:inline-block;padding:2px 7px;border-radius:5px;font-weight:700;margin-right:4px}
.lint-tag.warn{background:#FFF4D6;color:#e8b84c}
.lint-tag.block{background:#FFE0E0;color:#f25f74}

/* per-platform caption character counts — one post, several platform limits,
   so this is a set of independent pass/fail chips, not a single counter */
.char-counts{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}
.char-count{font-size:10.5px;font-weight:700;padding:2px 7px;border-radius:5px;
  background:var(--ui-chip);color:var(--ui-muted);white-space:nowrap}
.char-count.over{background:#FFE0E0;color:#f25f74}

/* export */
.export-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:6px}
.xbtn{padding:11px 8px;border-radius:10px;background:var(--ui-chip);font-size:12.5px;font-weight:600;text-align:center;color:var(--ui-text)}
.xbtn:hover{background:var(--ui-line)}
.xbtn.primary{background:var(--ui-text);color:var(--ui-bg);grid-column:1/-1}
.xbtn.primary:hover{box-shadow:0 6px 18px var(--sw-shadow);transform:translateY(-1px)}
.xbtn.recording{background:#d33;color:#fff}
.xbtn.wide{grid-column:1/-1}

/* quick post */
.qp-drop{border:1.5px dashed var(--ui-line);border-radius:10px;min-height:90px;display:flex;
  align-items:center;justify-content:center;padding:10px;margin-bottom:6px;transition:border-color .15s}
.qp-drop.over{border-color:var(--ui-text);background:var(--ui-chip)}
.qp-drop-hint{font-size:12px;color:var(--ui-muted);text-align:center}
.qp-thumb{max-width:100%;max-height:160px;border-radius:8px;display:block}
.qp-drop-actions{display:flex;gap:8px;align-items:center}
.qp-drop-actions .file-btn{flex:1;padding:8px;font-size:12px}
.qp-actions{display:grid;gap:8px;margin-top:12px}
.qp-schedule-row{display:grid;grid-template-columns:1fr auto;gap:6px}
.qp-schedule-row input[type="date"]{border:1px solid var(--ui-line);border-radius:8px;padding:8px;font-size:12.5px}
/* A creator's New post (18 Oct 2026) */
.qp-gone{display:none!important}
.qp-schedule-row.with-time{grid-template-columns:1fr 1fr}
.qp-schedule-row.with-time .xbtn{grid-column:1/-1}
.qp-schedule-row input[type="time"]{border:1px solid var(--ui-line);border-radius:8px;padding:8px;font-size:12.5px}
.qp-add{display:flex!important;flex-direction:column;gap:4px;align-items:center;text-align:center;padding:28px 12px;border:1.5px dashed var(--ui-line);border-radius:14px;cursor:pointer;
  font-weight:700;font-size:15px;color:var(--ui-text);background:var(--ui-chip)}
.qp-add b{display:block;font-weight:700} .qp-add span{display:block;font-weight:400;font-size:12px;color:var(--ui-muted)}
.qp-add:hover,.qp-add:focus-within{border-color:var(--ui-text)}
.qp-types{display:flex;gap:6px;flex-wrap:wrap}
.qp-type{border:1px solid var(--ui-line);background:var(--ui-panel);color:var(--ui-text);border-radius:999px;padding:7px 16px;font-weight:600;font-size:13px;cursor:pointer}
.qp-type.on{background:var(--ui-text);color:var(--ui-bg);border-color:var(--ui-text)}
.qp-write{margin-top:6px}
#qp-overrides-wrap{margin:10px 0;font-size:12.5px}
#qp-overrides-wrap summary{cursor:pointer;color:var(--ui-muted)}
#qp-overrides .field{margin-top:8px}

/* toast */
#toast{position:fixed;left:50%;bottom:26px;transform:translateX(-50%) translateY(14px);opacity:0;pointer-events:none;
  background:#212734;color:#fff;padding:11px 20px;border-radius:10px;font-size:13.5px;font-weight:600;
  transition:opacity .2s,transform .2s;z-index:900}
#toast.show{opacity:1;transform:translateX(-50%)}
#toast.err{background:#c22}

.confirm-backdrop{position:fixed;inset:0;background:rgba(20,20,24,.4);display:flex;
  align-items:center;justify-content:center;z-index:950;padding:20px}
.confirm-box{background:var(--ui-panel);border:1px solid var(--ui-line);border-radius:14px;
  padding:22px;max-width:360px;box-shadow:0 12px 40px rgba(0,0,0,.18)}
.confirm-box p{margin:0 0 18px;font-size:14.5px;line-height:1.5;white-space:pre-line}
.confirm-actions{display:flex;justify-content:flex-end;gap:10px}
.confirm-actions .danger{background:#c22;border-color:#c22;color:#fff}

/* mobile */
.mtabs{display:none}
@media (max-width:1000px){
  .app{grid-template-columns:1fr;grid-template-rows:1fr}
  .mtabs{display:flex;border-bottom:1px solid var(--ui-line);background:var(--ui-panel)}
  .mtab{flex:1;padding:11px;font-size:12.5px;font-weight:700;color:var(--ui-muted)}
  .mtab.on{color:var(--ui-text);box-shadow:inset 0 -2px 0 var(--ui-text)}
  .panel{display:none;border:none}
  .stage{display:none}
  body[data-mobile="templates"] .panel.left{display:flex}
  body[data-mobile="edit"] .panel.right{display:flex}
  body[data-mobile="preview"] .stage{display:flex}
  body:not([data-mobile]) .panel.left{display:flex}
}

/* ---------- scheduler ---------- */
/* `flex:1` gave each tab an equal share of a ~290px panel — about 70px —
   while "Quick Post" needs ~72px at this weight, so with flex-basis:0
   the labels overflowed their own boxes and visually collided into
   "TemplatesQuick PostSchedule". Measured live: box 16px vs scrollWidth
   62-72px. Size to content instead and let the row scroll if a narrower
   panel ever can't fit them, which can never overlap. */
.stabs{display:flex;gap:4px;width:100%;overflow-x:auto;scrollbar-width:none}
.stabs::-webkit-scrollbar{display:none}
.stab{flex:0 0 auto;padding:10px 9px;font-size:12px;font-weight:700;color:var(--ui-muted);
  border-radius:8px 8px 0 0;white-space:nowrap}
.stab.on{color:var(--ui-text);background:var(--ui-chip)}
.stab .badge{font-style:normal;background:var(--ui-text);color:var(--ui-bg);font-size:10px;
  padding:1px 5px;border-radius:99px;margin-left:4px}
.xbtn.sched{background:var(--ui-text);color:#fff}
.xbtn.sched:hover{opacity:.9}

.due-banner{background:#FFF0D4;color:#8A6100;border-radius:9px;padding:9px 11px;font-size:12px;
  display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px;font-weight:600}
.due-banner button{font-size:11.5px;font-weight:800;color:#8A6100;text-decoration:underline}

.cal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.cal-head span{font-size:13px;font-weight:700;color:var(--ui-text)}
.cal-head button{font-size:18px;color:var(--ui-muted);padding:2px 9px;border-radius:6px}
.cal-head button:hover{background:var(--ui-chip)}
.cal-dow{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;margin-bottom:3px}
.cal-dow span{text-align:center;font-size:9.5px;font-weight:800;color:var(--ui-muted)}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;margin-bottom:16px}
.cal-cell{aspect-ratio:1;border-radius:6px;background:var(--ui-chip);display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:2px;position:relative;font-size:10.5px}
.cal-cell.empty{background:transparent}
/* Best-day wash, folded in from schedule.js's weekday intensity — same
   pattern Metricool uses (color the day itself, not a separate chart)
   but single-hue against our own accent rather than theirs, and only on
   cells with no scheduled post: a cell that already carries a post dot
   is answering a different question, and tinting it too would blur
   which signal you're looking at. */
.cal-cell.heated:not(.has){background:color-mix(in srgb, var(--ui-text) calc(var(--heat, 0) * 100%), var(--ui-chip))}
.cal-cell.today{background:rgba(242,166,43,0.22);outline:1px solid var(--sw-accent)}
.cal-cell.today .dnum{color:var(--ui-text);font-weight:800}
.cal-cell.has{cursor:pointer;background:var(--ui-panel);border:1px solid var(--ui-line)}
/* A day with posts is a <button> (21 Oct 2026): no button padding, and a
   focus ring that sits clear of the 2px grid gap. */
button.cal-cell{padding:0;width:100%;margin:0}
.cal-cell:focus-visible{outline:2px solid var(--sw-accent);outline-offset:1px;z-index:1}
.cal-cell.has:hover{border-color:var(--ui-text)}
.cal-cell .dnum{font-weight:600;color:var(--ui-text);line-height:1}
.cal-cell .dot{width:5px;height:5px;border-radius:50%;background:var(--ui-text);display:inline-block;margin:0 1px}
.cal-cell .dot.posted{background:#1B7A3D}
.cal-cell .more{font-size:8px;color:var(--ui-muted)}

.sched-list h4{font-size:11.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--ui-muted);margin:0 0 8px}
.sched-item{background:var(--ui-panel);color:var(--ui-text);border:1px solid var(--ui-line);border-radius:9px;padding:9px 10px;margin-bottom:7px;
  display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.sched-item.posted{opacity:.6}
.si-main{display:flex;flex-direction:column;gap:2px;min-width:0}
.si-main strong{font-size:12.5px;color:var(--ui-text)}
.si-meta{font-size:10.5px;color:var(--ui-muted)}
.si-note{font-size:10.5px;color:var(--ui-text);font-style:italic}
/* Posts automatically, or we'll remind you, and why (post-checks.js, 21 Oct 2026) */
.si-route{font-size:11px;color:var(--ui-muted)}
.si-route.auto{color:#2a7a4d}
.si-route.switched{color:#a33;font-weight:600}
.qp-route{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:4px;font-size:12px;color:var(--ui-muted);line-height:1.45}
.qp-route b{color:var(--ui-text);font-weight:700}
.qp-route .qp-route-auto b{color:#2a7a4d}
/* The format check (post-checks.js, 21 Oct 2026) */
.qp-format{border:1px solid #d9a99f;background:#fdf3f0;border-radius:10px;padding:10px 12px;margin-top:12px;font-size:12.5px;line-height:1.45;color:var(--ui-text)}
.qp-format-h{margin:0 0 6px;font-weight:700}
.qp-format-list{margin:0 0 8px;padding-left:18px;display:grid;gap:4px}
.qp-format-remind{display:flex;gap:8px;align-items:flex-start;font-weight:600;cursor:pointer}
.qp-format-remind input{margin-top:2px;accent-color:var(--ui-text);width:18px;height:18px;flex:none}
.qp-format .hint{margin:6px 0 0}
.xbtn.is-held{opacity:.55}
/* New post: what was scheduled and when, by the buttons, and the buttons off while it sends (quickpost.js, 22 Oct 2026) */
.qp-done{margin:0;padding:8px 10px;border-radius:9px;background:#DCF5E4;color:#1B7A3D;font-size:12.5px;line-height:1.45;font-weight:600}
.qp-done.err{background:#fdf3f0;color:#a33;border:1px solid #d9a99f}
.qp-done:focus{outline:2px solid currentColor;outline-offset:2px}
.qp-actions .xbtn[disabled]{opacity:.6;cursor:progress}

/* Schedule within thumb reach on a phone (21 Oct 2026). Below 1001px the
   Studio shows one panel at a time, and the primary action was at the
   bottom of a long panel: about 2,100px down the Edit panel, and below
   the platforms, overrides and format check in New post. There it now
   sits in a bar stuck to the bottom of the panel as it scrolls, above
   the phone's home bar (safe-area inset; bottom -14px is the panel's own
   bottom padding, which a stuck box otherwise keeps clear of), with the panel told to scroll
   a focused field clear of it (scroll-padding-bottom), so the bar never
   covers what is being typed. It is in the page's own order, after
   everything else, so the keyboard reaches it last, as before. Above
   1000px nothing changes. */
.m-actbar{display:none}
@media (max-width:1000px){
  .panel.right .panel-body{scroll-padding-bottom:calc(84px + env(safe-area-inset-bottom))}
  .m-actbar{display:block;position:sticky;bottom:-14px;z-index:5;margin:16px -16px -14px;padding:10px 16px calc(10px + env(safe-area-inset-bottom));
    background:var(--ui-panel);border-top:1px solid var(--ui-line);box-shadow:0 -6px 16px rgba(36,20,40,.08)}
  .m-actbar .xbtn{width:100%;min-height:48px;font-size:14px}
  .m-actbar .xbtn:focus-visible{outline:3px solid var(--sw-accent);outline-offset:2px}
  /* One Schedule on a phone: the bar's. */
  .export-grid #btn-schedule{display:none}
  /* New post: its own buttons, date and time are the bar. The panel it
     sits in scrolls with the page here, so it lets the bar stick to the
     page's scroll (#mode-newpost), not its own. */
  #mode-newpost .panel-body{overflow:visible}
  #mode-newpost{scroll-padding-bottom:calc(180px + env(safe-area-inset-bottom))}
  #mode-newpost .qp-actions{position:sticky;bottom:0;z-index:5;margin:16px -40px 0;padding:10px 16px calc(10px + env(safe-area-inset-bottom));gap:6px;
    background:var(--ui-bg);border-top:1px solid var(--ui-line);box-shadow:0 -6px 16px rgba(36,20,40,.08)}
  #mode-newpost .qp-actions .xbtn{min-height:44px;font-size:13.5px}
  #mode-newpost .qp-actions input{min-height:44px}
}
.si-actions{display:flex;align-items:center;gap:4px;flex:none}
.si-actions button{font-size:10.5px;font-weight:700;padding:4px 7px;border-radius:6px;background:var(--ui-chip);color:var(--ui-text)}
.si-actions button.ok{background:#DCF5E4;color:#1B7A3D}
.si-actions button.del{background:transparent;color:var(--ui-muted);font-size:15px;padding:2px 5px}
.si-done{font-size:10.5px;color:#1B7A3D;font-weight:700}
/* One calendar on every device (calendar.js, 21 Oct 2026): each post's
   picture, from this browser or the posting service's copy. */
.si-main{flex:1}
.si-thumb{flex:none;width:42px;aspect-ratio:3/4;border-radius:6px;overflow:hidden;background:var(--ui-chip);display:flex;align-items:center;justify-content:center}
.si-thumb img,.si-thumb video{width:100%;height:100%;object-fit:cover;display:block}
.si-thumb.none{aspect-ratio:auto;min-height:56px;font-size:8px;line-height:1.2;color:var(--ui-muted);text-align:center;padding:3px 2px}
.sched-item.stopped{border-color:#e3b4ab}
.cal-sync{font-size:11.5px;color:var(--ui-muted);margin:0 0 8px}

#sched-dialog{border:none;border-radius:16px;padding:0;box-shadow:0 30px 70px rgba(0,0,0,.28);max-width:380px;width:92%}
#sched-dialog::backdrop{background:rgba(20,24,32,.45)}
.sd{padding:24px 26px 20px}
.sd h3{font-family:var(--sw-font-serif);margin:0 0 16px;font-size:18px;color:var(--ui-text)}
.sd-l{display:block;font-size:11.5px;font-weight:700;color:var(--ui-muted);margin:12px 0 5px}
.sd input[type=date],.sd input[type=text]{width:100%;padding:9px 11px;border:1px solid var(--ui-line);
  border-radius:8px;font-size:13.5px}
/* The Schedule dialog's first comment (21 Oct 2026). */
.sd textarea{width:100%;padding:9px 11px;border:1px solid var(--ui-line);border-radius:8px;font:inherit;font-size:13.5px;resize:vertical}
.sd-plats{display:grid;grid-template-columns:1fr 1fr;gap:5px}
.sd-plats label{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--ui-text);cursor:pointer}
.sd-plats input{accent-color:var(--ui-text);margin:0}
.acct-picks{display:grid;gap:6px;margin-top:6px}
.acct-pick{border:1px solid var(--ui-line,#d8d8d8);border-radius:8px;padding:6px 10px 8px;margin:0;min-width:0}
.acct-pick[hidden]{display:none}
.acct-pick legend{font-size:12px;font-weight:600;padding:0 4px;color:var(--ui-text)}
.acct-opt{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--ui-text);cursor:pointer;padding:2px 0}
.acct-opt input{accent-color:var(--ui-text);margin:0}
.acct-opt em{font-size:10px;font-style:normal;opacity:.65;border:1px solid currentColor;border-radius:4px;padding:0 4px}
.qp-more-plats{grid-column:1/-1}
.qp-more-plats summary{cursor:pointer;font-size:12px;color:var(--ui-muted);padding:6px 0;min-height:32px}
.qp-more-plats .sd-plats{margin-top:4px}
.qp-plats-none{grid-column:1/-1;margin:0 0 4px}
.sd-check{display:flex;gap:8px;align-items:flex-start;font-size:12px;line-height:1.45;margin:12px 0 0;color:var(--ui-text)}
.sd-check input{margin-top:2px}
#sd-gbp select,#sd-gbp input,#sd-time{width:100%;font:inherit;padding:8px 10px;border:1px solid var(--ui-line);border-radius:8px;background:var(--ui-bg);color:var(--ui-text)}
#sd-gbp input{margin-top:8px}
.sd-hint{font-size:11px;color:var(--ui-muted);line-height:1.5;margin:14px 0 0}
.sd-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:18px}
.sd-ghost{padding:9px 16px;border-radius:8px;background:var(--ui-chip);font-weight:600;font-size:13px}
.sd-primary{padding:9px 18px;border-radius:8px;background:var(--ui-text);color:var(--ui-bg);font-weight:700;font-size:13px}

/* ---- custom templates (made in-page) ---- */
.tpl-tools { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--ui-line); }
/* Not drawn until the list above it has something in it (28 Oct 2026). The
   list is empty until the templates arrive from /api/studio-assets, so this
   block sat right under the search box, then was pushed down the whole length
   of the list when 78 tiles landed: 0.235 of the demo Studio's 0.268 layout
   shift on a slow connection (Lighthouse, 28 Oct 2026). */
#tpl-list:empty + .tpl-tools { display: none; }
.mini.wide { width: 100%; }
.tpl-tools .hint { margin: 6px 0 8px; font-size: 11px; line-height: 1.45; color: var(--ui-muted); }
.tpl-tools-row { display: flex; gap: 6px; }
.tpl-tools-row .mini { flex: 1; text-align: center; }
.mini.as-btn { display: inline-block; cursor: pointer; padding: 6px 10px;
  border: 1px solid var(--ui-line); border-radius: 6px; background: var(--ui-surface);
  font-size: 12px; color: var(--ui-text); }
.mini.as-btn:hover { background: var(--ui-hover); }
.tag-mine { margin-right: 4px; padding: 1px 5px; border-radius: 4px;
  background: var(--ui-hover); color: var(--ui-muted); font-style: normal; font-size: 10px; }
.tpl { position: relative; }
.tpl-del { position: absolute; top: 4px; right: 4px; width: 18px; height: 18px;
  display: none; align-items: center; justify-content: center; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff; font-style: normal; font-size: 13px; line-height: 1; }
.tpl:hover .tpl-del { display: flex; }
.tpl-del:hover { background: #c0392b; }

/* ---- layout / format on-off panel ---- */
.switches { margin-top: 12px; border-top: 1px solid var(--ui-line); padding-top: 10px; }
.switches summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--ui-text); }
.switches h4 { margin: 12px 0 6px; font-size: 11px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ui-muted); }
.sw { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12px; cursor: pointer; }
.sw input { margin: 0; }
.sw span { flex: 1; color: var(--ui-text); }
.sw em { font-style: normal; font-size: 10px; color: var(--ui-muted); }

/* ---- publish sync state on a scheduled post ---- */
.si-sync{display:inline-block;margin-top:3px;font-size:11px;color:var(--ui-muted)}
.si-sync.ok{color:#2a8a55}
.si-sync.err{color:#b3402f;cursor:help;text-decoration:underline dotted}
button.si-sync{background:none;border:0;padding:0;font:inherit;font-size:11px;text-align:left}
button.si-sync.err{cursor:pointer;text-decoration:underline;font-weight:600}

/* ---- drag and drop media ---- */
.stage-inner{position:relative}
.drop-hint{position:absolute;inset:10px;display:none;place-items:center;pointer-events:none;
  border:2px dashed var(--ui-line);border-radius:14px;background:rgba(0,0,0,.42);
  backdrop-filter:blur(2px);z-index:5}
.stage-inner.dropping .drop-hint{display:grid}
.drop-hint span{font-size:15px;font-weight:600;color:#fff;background:rgba(0,0,0,.55);
  padding:10px 20px;border-radius:999px}

/* ============================================================
   Connections panel

   Colour carries the meaning here, so it is used sparingly and
   consistently: green only for an account that can genuinely
   receive a post, amber only for waiting on someone else, red
   only for something broken that will cost posts if ignored.
   A platform's own brand colour appears only on its Connect
   button and its dot, so it never competes with status.
   ============================================================ */
.conn-summary{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--ui-muted);
  padding:2px 0 10px;border-bottom:1px solid var(--ui-line);margin-bottom:12px;flex-wrap:wrap}
.conn-summary strong{color:var(--ui-text)}
.conn-summary .mini{margin-left:auto}

.conn-alert{background:#FEF2F2;border:1px solid #FCA5A5;border-radius:10px;padding:10px 12px;
  margin-bottom:12px;display:grid;gap:4px}
.conn-alert strong{font-size:12.5px;color:#991B1B}
.conn-alert span{font-size:11.5px;line-height:1.45;color:#7F1D1D}

.conn-stale{background:var(--ui-chip);border-radius:8px;padding:8px 10px;margin-bottom:10px;
  font-size:11.5px;color:var(--ui-muted)}

.conn-banner{background:#EFF6FF;border:1px solid #BFDBFE;border-radius:10px;padding:10px 12px;
  margin-bottom:12px;font-size:11.5px;line-height:1.5;color:#1E3A8A}
.conn-banner strong{display:block;font-size:12.5px;margin-bottom:2px}

.conn-grid{display:grid;gap:10px}

.conn-tile{border:1px solid var(--ui-line);border-radius:12px;padding:10px 11px;background:var(--ui-panel)}
.conn-head{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.conn-dot{width:20px;height:20px;border-radius:6px;display:grid;place-items:center;
  color:#fff;font-size:10px;font-weight:700;line-height:1;flex:none}
.conn-label{font-size:13px;font-weight:650;color:var(--ui-text)}
.conn-badge.live{margin-left:auto;font-size:9.5px;font-weight:700;letter-spacing:.04em;
  text-transform:uppercase;color:#166534;background:#DCFCE7;border-radius:20px;padding:2px 7px}

/* Connect uses the platform's own colour, passed in as --pc. Reconnect keeps
   the shape but drops the brand colour for red: it is a fault, not an offer. */
.conn-btn{width:100%;border:0;border-radius:9px;padding:9px 12px;cursor:pointer;
  background:var(--pc,#444);color:#fff;font-size:12.5px;font-weight:650;text-align:left}
.conn-btn:hover{filter:brightness(1.1)}
.conn-btn:disabled{opacity:.6;cursor:default}
.conn-btn.reconnect{background:#DC2626;margin-top:6px}

.conn-add{width:100%;margin-top:6px;border:1px dashed var(--ui-line);background:none;
  border-radius:9px;padding:7px;font-size:11.5px;color:var(--ui-muted);cursor:pointer}
.conn-add:hover{border-color:var(--ui-muted);color:var(--ui-text)}

.conn-badge.off{margin-left:auto;white-space:nowrap;font-size:9.5px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;padding:2px 7px;border-radius:99px;background:var(--ui-line,#e5e7eb);color:var(--ui-muted)}
.conn-empty{font-size:11.5px;line-height:1.45;color:var(--ui-muted)}

.conn-acct{display:flex;align-items:center;gap:9px;padding:7px 0}
.conn-acct + .conn-acct{border-top:1px solid var(--ui-line)}
.conn-av{width:28px;height:28px;border-radius:50%;object-fit:cover;flex:none}
.conn-av.ph{display:grid;place-items:center;color:#fff;font-size:11px;font-weight:700}
.conn-who{min-width:0;flex:1}
.conn-who strong{display:block;font-size:12.5px;color:var(--ui-text);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.conn-status{font-size:11px;color:var(--ui-muted)}
.conn-status.ok{color:#166534}
.conn-status.wait{color:#92400E}
.conn-status.bad{color:#B91C1C;font-weight:650}
.conn-x{border:0;background:none;color:var(--ui-muted);font-size:17px;line-height:1;
  cursor:pointer;padding:2px 4px;flex:none}
.conn-x:hover{color:#DC2626}

.conn-warn{background:#FEF2F2;border-radius:8px;padding:8px 9px;margin-top:4px;
  font-size:11.5px;line-height:1.45;color:#7F1D1D}
.conn-gate{background:#FFFBEB;border-radius:8px;padding:8px 9px;margin-top:8px;
  font-size:11px;line-height:1.45;color:#78350F}
.conn-note{font-size:11px;color:var(--ui-muted);padding:2px 0 4px}

.conn-extra{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;font-size:12.5px;margin:0 0 12px;
  padding:10px 12px;border:1px solid var(--ui-line);border-radius:10px}
.conn-extra .mini{margin-left:auto}
.conn-more{margin-top:12px;border:1px solid var(--ui-line);border-radius:12px;padding:10px 12px}
.conn-more summary{cursor:pointer;font-size:12.5px;font-weight:600;color:var(--ui-text);min-height:32px;display:flex;align-items:center}
.conn-more .hint{margin:4px 0 10px}
/* Connect links (connections.js, 10 Nov 2026) */
.conn-link{margin-top:12px;border:1px solid var(--ui-line);border-radius:12px;padding:12px;background:var(--ui-panel)}
.conn-link h3{font-size:13.5px;font-weight:650;color:var(--ui-text);margin:0 0 4px}
.conn-link .hint{margin:0 0 10px;font-size:12px;line-height:1.5}
.conn-link-row{display:flex;gap:6px;align-items:stretch}
.conn-link-row input{flex:1;min-width:0;font:inherit;font-size:13px;padding:8px;border-radius:8px;border:1px solid var(--ui-line);background:var(--ui-panel);color:inherit}
.conn-link-msg{font-size:12px;font-weight:600;color:#1B7A3D;margin:8px 0 0;min-height:1em;line-height:1.45}
.conn-link-msg.bad{color:#B91C1C}
.conn-link-msg:focus{outline:none}
.conn-link-sub{font-size:11.5px;font-weight:700;color:var(--ui-muted);margin:12px 0 4px}
.conn-link-list{list-style:none;margin:0;padding:0}
.conn-link-item{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px;font-size:12px;padding:7px 0;border-top:1px solid var(--ui-line);color:var(--ui-text)}
.conn-link-st{font-weight:600}
.conn-link-st.open{color:#166534}
.conn-link-st.expired,.conn-link-st.off{color:var(--ui-muted);font-weight:500}
.conn-link-when{color:var(--ui-muted)}
.conn-link-btns{display:flex;gap:4px}
@media (max-width:1000px){ .conn-link .mini{min-height:44px} .conn-link-row input{font-size:16px} }
.conn-modal{max-width:400px}
.conn-modal h3{margin:0 0 10px;font-size:16px}
.conn-modal p,.conn-steps{font-size:13.5px;line-height:1.5;margin:0 0 12px;white-space:normal}
.conn-steps{padding-left:18px}
.conn-steps li{margin-bottom:6px}
.conn-field{display:block;font-size:12.5px;font-weight:600;margin-bottom:10px}
.conn-field input{display:block;width:100%;margin-top:4px;padding:9px 10px;border:1px solid var(--ui-line);border-radius:8px;font:inherit;font-weight:400;background:var(--ui-bg,#fff);color:var(--ui-text)}
.conn-code{display:inline-block;padding:2px 8px;border-radius:6px;background:var(--ui-line);font-size:14px;font-weight:700;user-select:all}
.conn-wait{color:var(--ui-muted)}
.conn-go{background:var(--ui-text);border-color:var(--ui-text);color:var(--ui-bg)}
.conn-foot{margin-top:12px;padding-top:10px;border-top:1px solid var(--ui-line)}
.stab .badge.bad{background:#DC2626;color:#fff}

/* Schedule dialog platform list, once it knows what each one will actually do. */
.sd-plats{grid-template-columns:1fr}
.sd-plat{display:flex;align-items:center;gap:6px}
.sd-plat em{font-style:normal;font-size:10.5px;color:var(--ui-muted);margin-left:auto}
.sd-plat.auto em{color:#166534;font-weight:650}

/* Three tabs in a narrow panel: keep each on one line so a notification count
   does not push its own tab taller than the two beside it. */
.stab{white-space:nowrap}
.stabs{gap:2px}

/* ---- ad copy ---- */
.ad-toggle{display:flex;gap:9px;align-items:flex-start;font-size:13.5px;color:var(--ui-text);
  cursor:pointer;padding:10px 0;border-top:1px solid var(--ui-line);margin-top:6px}
.ad-toggle input{margin-top:3px;accent-color:var(--ui-text)}
#ad-copy-block .hint{font-size:11px;color:var(--ui-muted);font-weight:400;display:block;margin-top:2px}
#ad-copy-block label .hint{display:inline}
#ad-primary-count,#ad-headline-count{font-size:11px;color:var(--ui-muted);text-align:right;margin-top:3px}
#ad-primary-count.warn,#ad-headline-count.warn{color:#B3261E;font-weight:600}

/* Photo-library category chips (Before / After / All). Derived from photo
   labels — see renderPhotoLibrary(). Sized down from .ba-mode-chip because
   there can be several and they sit above a dense image grid. */
.lib-cats{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0 6px}
.lib-cat{
  font:600 11px/1 var(--sw-font-sans);letter-spacing:.02em;
  padding:6px 10px;border-radius:999px;cursor:pointer;
  background:var(--ui-chip);color:var(--ui-muted);
  border:1px solid transparent;
}
.lib-cat:hover{color:var(--ui-text)}
.lib-cat.on{background:var(--ui-text);color:var(--ui-panel);border-color:var(--ui-text)}

/* ============ caption workflow (from the old DSK studio) ============ */
#draft-box{margin-bottom:18px;padding:12px;border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-chip)}
#draft-box textarea{width:100%;padding:9px 11px;border:1px solid var(--ui-line);border-radius:9px;min-height:64px;line-height:1.5;font:inherit;color:var(--ui-text);background:var(--ui-panel)}
#draft-box textarea:focus{border-color:var(--ui-text)}
.autodraft{display:block;width:100%;margin-top:10px;padding:11px 14px;border:none;border-radius:10px;
  background:var(--sw-accent);color:#2A1533;font-weight:700;font-size:14px;cursor:pointer;
  transition:transform .12s ease,box-shadow .12s ease}
.autodraft:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 6px 16px rgba(242,166,43,.35)}
.autodraft:disabled{opacity:.7;cursor:default}
.copy-caption{display:block;width:100%;margin-top:14px;padding:12px 14px;border:none;border-radius:10px;
  background:var(--ui-text);color:#fff;font-weight:700;font-size:14px;cursor:pointer;
  transition:transform .12s ease,box-shadow .12s ease}
.copy-caption:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(59,29,75,.3)}
.autosave{transition:opacity .3s ease}

/* ============ auto-plan + template usage ============ */
#usage-filter{margin-top:8px}
.tag-planned,.tag-posted{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:8px;font-size:10.5px;font-weight:700;font-style:normal}
.tag-planned{background:rgba(242,166,43,.18);color:#8a5a00}
.tag-posted{background:rgba(46,125,50,.14);color:#2E7D32}
/* Every pop-up screen the Studio makes in script (posts to check, Posting
   plan, Your photos, What works) carries this class. Until 11 Oct 2026 it
   had no rule, so they showed with the browser's own black border. */
.sw-dialog{border:none;border-radius:16px;padding:26px;width:92vw;max-height:calc(100vh - 32px);overflow:auto;box-shadow:0 30px 80px rgba(59,29,75,.35)}
.sw-dialog::backdrop{background:rgba(36,20,40,.45)}
@media (max-width:560px){.sw-dialog{padding:18px}}
#autoplan-dialog{border:none;border-radius:16px;padding:26px;max-width:480px;width:92vw;box-shadow:0 30px 80px rgba(59,29,75,.35)}
#autoplan-dialog::backdrop{background:rgba(59,29,75,.4)}
#autoplan-dialog h3{font-family:Lora,serif;margin:0 0 8px;color:var(--ui-text)}
#autoplan-dialog .ap-row{display:flex;gap:16px;margin:14px 0}
#autoplan-dialog .ap-row label{flex:1;display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--ui-muted)}
#autoplan-dialog select{padding:8px 10px;border:1px solid var(--ui-line);border-radius:9px;font:inherit;color:var(--ui-text);background:var(--ui-panel)}
#autoplan-dialog .ap-actions{display:flex;gap:10px;margin-top:16px;align-items:center;flex-wrap:wrap}
#autoplan-dialog .ap-actions .autodraft{flex:1;margin-top:0}
#autoplan-dialog #ap-summary{margin-top:10px;line-height:1.6}
#autoplan-dialog .sd-plats label em.ok{color:#2E7D32;font-style:normal;font-size:11px}

/* ============ filter dropdowns + per-post colours ============ */
.filter-row{display:flex;gap:12px;margin:10px 0 14px}
.filter-sel{flex:1;display:flex;flex-direction:column;gap:5px;font-size:12px;color:var(--ui-muted);font-weight:600}
.filter-sel select{width:100%;padding:8px 10px;border:1px solid var(--ui-line);border-radius:9px;font:inherit;font-weight:400;color:var(--ui-text);background:var(--ui-panel)}
.sel-wrap{display:flex;gap:6px;align-items:center}
.sel-wrap select{flex:1}
.cat-edit{border:1px solid var(--ui-line);background:var(--ui-panel);border-radius:8px;padding:6px 9px;cursor:pointer;color:var(--ui-muted)}
.cat-edit:hover{color:var(--ui-text);border-color:var(--sw-accent)}
.colour-row{display:flex;gap:12px;align-items:center}
.colour-pick{display:flex;align-items:center;gap:7px;font-size:12.5px;color:var(--ui-muted)}
.colour-pick input[type=color]{width:34px;height:26px;border:1px solid var(--ui-line);border-radius:7px;padding:1px;background:var(--ui-panel);cursor:pointer}

/* ============ dictation ============ */
.mic-btn{margin-top:6px;border:1px solid var(--ui-line);background:var(--ui-panel);border-radius:8px;
  padding:5px 10px;cursor:pointer;font-size:14px;line-height:1}
.mic-btn:hover{border-color:var(--sw-accent)}
.mic-btn.listening{background:var(--sw-accent);border-color:var(--sw-accent);animation:mic-pulse 1.2s ease infinite}
@keyframes mic-pulse{0%,100%{box-shadow:0 0 0 0 rgba(242,166,43,.5)}50%{box-shadow:0 0 0 7px rgba(242,166,43,0)}}

#tpl-cat-field select{width:100%;padding:8px 10px;border:1px solid var(--ui-line);border-radius:9px;font:inherit;color:var(--ui-text);background:var(--ui-panel)}


/* ============ settings tab ============ */
.settings-wrap{max-width:1100px;margin:0 auto;padding-bottom:40px}
.set-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr));gap:18px;padding:18px 22px}
.set-card{background:var(--ui-panel);border:1px solid var(--ui-line);border-radius:14px;padding:18px}
.set-card h3{font-family:var(--sw-font-serif,Lora),serif;margin:0 0 6px;font-size:16px;color:var(--ui-text)}
.set-card select{width:100%;padding:8px 10px;border:1px solid var(--ui-line);border-radius:9px;font:inherit;color:var(--ui-text);background:var(--ui-panel);margin:8px 0}
.set-cat-row{display:flex;justify-content:space-between;align-items:center;padding:7px 0;border-bottom:1px solid var(--ui-line);font-size:13.5px;color:var(--ui-text)}
.set-cat-row em{color:var(--ui-muted);font-style:normal;font-size:12px;margin-left:4px}
.set-cat-row .mini.del{color:#B3261E}
/* People and Your alerts (settings.js, 10 Nov 2026): 44px targets, nothing wider than a 375px phone. */
.set-role-note{margin:0;padding:18px 22px 0;font-size:14px;color:var(--ui-muted)}
.set-sub{margin:0 0 4px;font-size:14px;color:var(--ui-text)}
.set-people-list,.set-always{list-style:none;margin:8px 0 0;padding:0}
.set-person{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;padding:10px 0;border-bottom:1px solid var(--ui-line);font-size:14px;color:var(--ui-text)}
.set-person-who{flex:1 1 180px;min-width:0;overflow-wrap:anywhere}
.set-person-who em,.set-person-role{color:var(--ui-muted);font-style:normal}
.set-person-do{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.set-card .set-person select{width:auto;margin:0;min-height:44px;font-size:16px}
.set-person .mini,.set-people-add .mini{min-height:44px}
.set-person .mini.del{color:#B3261E}
.set-people-add{display:grid;gap:6px;margin-top:16px}
.set-people-add label{font-size:13px;font-weight:600;color:var(--ui-text)}
.set-people-add input{box-sizing:border-box;width:100%;min-height:44px;padding:8px 10px;border:1px solid var(--ui-line);border-radius:9px;font:inherit;font-size:16px;color:var(--ui-text);background:var(--ui-panel)}
.set-card .set-people-add select{min-height:44px;margin:0;font-size:16px}
.set-people-add .mini{justify-self:start}
.set-roles-help{list-style:none;margin:0 0 6px;padding:0;font-size:12.5px;line-height:1.5;color:var(--ui-muted)}
.set-roles-help b{color:var(--ui-text)}
.set-alert{border:0;margin:0 0 14px;padding:0;min-width:0}
.set-alert legend{padding:0;font-size:14px;font-weight:600;color:var(--ui-text)}
.set-seg{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.set-seg label{position:relative;display:inline-flex;cursor:pointer}
.set-seg input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
.set-seg span{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:64px;box-sizing:border-box;padding:0 16px;border:1px solid var(--ui-line);border-radius:999px;font-size:14px;color:var(--ui-text);background:var(--ui-panel)}
.set-seg input:checked + span{background:var(--ui-text);border-color:var(--ui-text);color:var(--ui-bg);font-weight:600}
.set-seg input:focus-visible + span{outline:3px solid var(--ui-text);outline-offset:2px}
.set-always li{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 10px;padding:8px 0;border-bottom:1px solid var(--ui-line);font-size:14px;color:var(--ui-text)}
.set-always em{font-style:normal;font-size:13px;color:var(--ui-muted)}

/* ============ mobile top-bar (390px pass, 2026-08-16) ============
   The nine mode tabs had flex:1 1 auto inside an overflow-x:auto strip —
   allowed to SHRINK below their text, so on a phone they piled onto each
   other ("TemplatesNew postCalendarInbox…") instead of scrolling. The
   scrolling strip that fixed that is replaced by the More menu below;
   white-space:nowrap still keeps every tab at least as wide as its text. */
@media (max-width:700px){
  .top-bar .sw-brand span{display:none}      /* logo mark only — frees width for the tabs */
  .biz-switch .biz-btn span#biz-name{max-width:70px;overflow:hidden;text-overflow:ellipsis}
}

/* ============ phone "More" menu (8 Oct 2026) ============
   The old scrolling strip still hid five of the nine tabs off the right
   edge behind a swipe nobody knew to make. Phones now show Templates,
   New post, Calendar and Inbox, plus "More" for the rest (studio.js
   initMoreTabs). No scrolling, so the row can't clip the open list.
   The bar wraps rather than overflows: if a business switcher or the
   admin link doesn't fit beside the tabs it drops to a second line, and
   on a very narrow screen the tabs take a full-width line of their own. */
.more-tabs{display:flex;position:relative}
.more-tabs-menu[hidden],.more-tabs[hidden],.bt-more[hidden]{display:none}
.more-tabs-btn{white-space:nowrap}
.more-tabs-btn .biz-caret{margin-left:2px}
.more-tabs-menu{position:absolute;top:calc(100% + 4px);right:0;z-index:60;min-width:190px;
  background:var(--ui-panel);border:1px solid var(--ui-line);border-radius:12px;
  box-shadow:0 12px 32px rgba(0,0,0,.14);padding:6px;display:flex;flex-direction:column}
.more-tabs-item{display:block;width:100%;padding:12px;border:0;border-radius:8px;background:transparent;
  font:inherit;font-size:14px;color:var(--ui-text);cursor:pointer;text-align:left}
.more-tabs-item:hover,.more-tabs-item:focus-visible{background:var(--ui-chip)}
.more-tabs-item.on{font-weight:700;box-shadow:inset 3px 0 0 var(--sw-accent)}
/* 1100px, not 700 (8 Oct 2026): the nine tabs need about 850px beside the
   logo, and about 1,020px once the business switcher shows, so between 701
   and ~1,000px every label overflowed its own tab. */
@media (max-width:1100px){
  .top-bar{flex-wrap:wrap;column-gap:4px;padding-right:8px}
  .top-bar .sw-brand{padding:0 10px}
  .top-bar .mode-tabs{flex:1 1 auto;overflow:visible;gap:0;padding-right:0}
  .top-bar .mode-tab{flex:1 1 auto;padding:13px 7px;font-size:13px}
  .top-bar .mode-tab.mode-tab-extra{display:none}
  .more-tabs{display:flex;flex:1 1 auto;position:relative}
  .more-tabs .more-tabs-btn{flex:1 1 auto}
  .biz-switch,.admin-back{margin-left:auto}
  .biz-switch:not([hidden]) + .admin-back{margin-left:10px}
  .biz-switch{padding:4px 0}
  .admin-back{margin-top:4px;margin-bottom:4px}
}
/* Smaller Androids (360px): a little less padding keeps the logo and the
   five tabs on one line instead of the tabs dropping under the logo. */
@media (max-width:380px){
  .top-bar .sw-brand{padding:0 6px 0 10px}
  .top-bar .mode-tab{padding-left:4px;padding-right:4px;font-size:12.5px}
}

/* ============ visual layout picker ============ */
#layout-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:8px}
.lay{display:flex;flex-direction:column;align-items:center;gap:5px;padding:5px;border:1.5px solid var(--ui-line);border-radius:10px;
  background:var(--ui-panel);cursor:pointer;transition:border-color .15s ease,transform .12s ease}
.lay:hover{border-color:var(--sw-accent);transform:translateY(-1px)}
.lay.on{border-color:var(--ui-text);box-shadow:0 0 0 2px rgba(59,29,75,.12)}
.lay-thumb{display:block;width:100%;aspect-ratio:1;border-radius:6px;overflow:hidden;background:#eee}
.lay-thumb canvas{width:100%;height:100%;display:block}
.lay-name{font-size:10.5px;font-weight:600;color:var(--ui-muted);line-height:1.15;text-align:center;max-width:100%}
.lay.on .lay-name{color:var(--ui-text)}

/* ---- before/after auto-pairing (2026-09-03) ---- */
.ba-pair{margin-top:14px;padding-top:12px;border-top:1px solid var(--ui-line,#e6e2dc)}
.ba-pair-hint{font-size:12px;color:var(--ui-muted,#777);margin:6px 0 0;line-height:1.4}
.ba-pair-status{font-size:13px;margin-top:8px;padding:8px 10px;border-radius:8px;background:var(--ui-panel,#f4f1ec)}
.ba-pair-status.err{background:#fde8e6;color:#8a2a22}
.ba-pair-results{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.ba-pair-card{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:6px;border:1px solid var(--ui-line,#e6e2dc);border-radius:10px;background:none;cursor:pointer;text-align:left;font:inherit;color:inherit;width:100%}
.ba-pair-card:hover{border-color:var(--ui-accent,#333)}
.ba-pair-card.on{border-color:var(--ui-accent,#333);box-shadow:0 0 0 2px var(--ui-accent,#333) inset}
.ba-pair-card img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:6px;display:block}
.ba-pair-card .ba-pair-meta{grid-column:1/-1;font-size:12px;color:var(--ui-muted,#777);display:flex;justify-content:space-between}
.ba-pair-card .ba-pair-meta b{color:inherit;font-weight:600}

/* ---------- line up before & after (ba-align.js) ---------- */
.confirm-box.ba-align{max-width:620px;width:100%}
.ba-align h3{margin:0 0 6px;font-size:16px}
.ba-align-hint,.ba-align-status{font-size:13px;line-height:1.45;color:var(--ui-muted);margin:0 0 10px}
.ba-align-status{min-height:1.4em;color:var(--ui-text)}
.ba-align-stage{display:flex;justify-content:center;background:#111;border-radius:8px;padding:6px;margin-bottom:10px}
.ba-align-stage canvas{max-width:100%;height:auto;cursor:grab;touch-action:none}
.ba-align-stage canvas:active{cursor:grabbing}
.ba-align-ctrls{display:flex;flex-wrap:wrap;gap:8px 16px;font-size:12.5px;margin-bottom:6px}
.ba-align-ctrls label{display:flex;align-items:center;gap:6px}
.ba-align-ctrls input[type=range]{width:120px}
.baa-use{background:var(--ui-text);border-color:var(--ui-text);color:var(--ui-bg)}

/* Text and logo size sliders (Settings, 5 Oct 2026) */
.size-row{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--ui-text);margin:8px 0}
.size-row input[type=range]{flex:1;accent-color:var(--sw-accent,#f2a62b)}
.size-row span{min-width:52px;text-align:right;font-variant-numeric:tabular-nums;color:var(--ui-muted)}

/* Grid of 9 planner (5 Oct 2026) */
#grid-dialog{max-width:480px;width:calc(100vw - 32px);max-height:calc(100vh - 32px);overflow:auto}
.gp-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:3px;margin:12px auto;background:var(--ui-line);max-width:min(330px,100%)}
.gp-cell{position:relative;aspect-ratio:3/4;background:var(--ui-panel);overflow:hidden;cursor:grab;display:flex;align-items:center;justify-content:center}
.gp-cell img{width:100%;height:100%;object-fit:cover;display:block}
.gp-cell.empty{cursor:default;border:1px dashed var(--ui-line)}
.gp-cell.empty span{font-size:11px;color:var(--ui-muted)}
.gp-cell.over{outline:3px solid var(--sw-accent,#f2a62b);outline-offset:-3px}
.gp-cell.picked{outline:3px solid var(--sw-accent,#f2a62b);outline-offset:-3px;opacity:.85}
.gp-x{position:absolute;top:4px;right:4px;width:24px;height:24px;border-radius:50%;border:0;background:rgba(0,0,0,.6);color:#fff;font-size:15px;line-height:24px;padding:0;cursor:pointer}
.gp-count{font-size:12px;color:var(--ui-muted);margin:0 0 8px}

/* Phones (18 Oct 2026): fields at 16px so iOS does not zoom in on every tap, and the main New post controls at least 44px tall. */
@media (max-width:700px){
  .field input[type=text],.field textarea,.qp-schedule-row input[type="date"],.qp-schedule-row input[type="time"]{font-size:16px}
  .qp-type,.qp-write,#qp-undo{min-height:44px;font-size:14px}
  .qp-schedule-row input[type="date"],.qp-schedule-row input[type="time"]{min-height:44px}
}

/* Your foundations, one line above the tabs (18 Oct 2026, studio.js
   foundationsStrip). Slim, one line on a phone (the next step is cut with
   an ellipsis), the whole line a link, and a 44px close. */
.fnd-strip{flex:0 0 auto;display:flex;align-items:center;gap:4px;background:#FBF3E4;border-bottom:1px solid var(--ui-line);padding:0 0 0 14px;font-size:13.5px;line-height:1.3}
.fnd-strip[hidden]{display:none}
.fnd-strip-go{flex:1 1 auto;display:flex;align-items:center;gap:6px;min-height:44px;color:var(--ui-text);text-decoration:none;overflow:hidden;white-space:nowrap}
.fnd-strip-go:hover .fnd-strip-next{text-decoration:underline}
.fnd-strip-n{flex:0 0 auto;font-weight:600}
.fnd-strip-n::before{content:"";display:inline-block;width:8px;height:8px;border-radius:4px;background:var(--sw-accent);margin-right:8px;vertical-align:1px}
.fnd-strip-next{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis}
.fnd-strip-x{flex:0 0 auto;width:44px;height:44px;font-size:20px;line-height:1;color:var(--ui-muted)}
.fnd-strip-x:hover{background:var(--ui-chip)}

/* Sound on TikTok (18 Oct 2026) */
.qp-tt-song{display:grid;gap:8px;margin-top:8px}
.qp-tt-tracks{list-style:none;margin:0;padding:0;display:grid;gap:6px;max-height:320px;overflow:auto}
.qp-tt-tracks li{display:flex;gap:8px;align-items:center;padding:6px;border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-panel)}
.qp-tt-tracks img{width:40px;height:40px;flex:none;border-radius:6px;object-fit:cover}
.qp-tt-tracks .mini{flex:none;width:auto}
.qp-tt-who{display:grid;flex:1;min-width:0} .qp-tt-who b,.qp-tt-who small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap} .qp-tt-who small{color:var(--ui-muted)}
.qp-tt-chosen{margin:0;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.qp-tt-vol{display:grid;gap:4px;font-size:13px;color:var(--ui-muted)} .qp-tt-vol input{width:100%}
@media (max-width:700px){.qp-tt-tracks .mini{min-height:44px;min-width:44px}}

/* How it looks, and a Reel's cover (20 Oct 2026, quickpost.js qpRenderPreview).
   The whole picture is shown with the post as the clear window on it: the
   part cut off is dimmed, not hidden. Beside it, the 3:4 tile on the grid. */
.qp-pv-h{display:block;font-size:12.5px;font-weight:600;color:var(--ui-muted);margin:0 0 6px}
.qp-pv{display:flex;gap:14px;align-items:flex-start}
.qp-pv figure{margin:0}
.qp-pv figcaption{font-size:12.5px;line-height:1.45;color:var(--ui-muted);margin-top:6px}
.qp-pv figcaption b{display:block;color:var(--ui-text);font-weight:600}
.qp-pv-main{flex:1 1 auto;min-width:0}
.qp-pv-stage{display:flex;justify-content:center;align-items:center;background:var(--ui-chip);border-radius:12px;padding:14px;overflow:hidden}
.qp-pv-shape{position:relative;width:min(100%,calc(380px * var(--qp-ar,1)));background:#141016;border-radius:6px;overflow:hidden}
.qp-pv-media{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.qp-pv-shape.bars .qp-pv-media{object-fit:contain}
.qp-pv-win{position:absolute;box-shadow:0 0 0 999px rgba(28,14,36,.66);outline:2px solid #fff;outline-offset:-1px;pointer-events:none}
.qp-pv-tag{position:absolute;left:6px;top:6px;font-style:normal;font-size:10.5px;font-weight:700;color:#fff;background:rgba(0,0,0,.5);padding:2px 7px;border-radius:999px}
.qp-pv-grid{flex:0 0 128px}
.qp-pv-tile{position:relative;aspect-ratio:3/4;width:100%;border-radius:4px;overflow:hidden;background:#141016;box-shadow:0 0 0 1px var(--ui-line)}
.qp-pv-tilemedia{position:absolute;max-width:none;object-fit:fill;display:block}
.qp-cover{display:grid;gap:4px;margin-top:12px}
.qp-cover input[type=range]{width:100%;accent-color:var(--ui-text);margin:0}
.field .qp-cover input[type=range]:focus-visible{outline:2px solid var(--sw-accent);outline-offset:2px}
.qp-cover output{font-weight:600;color:var(--ui-text)}
#qp-cover-box .hint{font-size:13px;line-height:1.45;color:var(--ui-muted);margin:4px 0 0}
/* A phone: the post first, full width; the grid tile under it, beside its words. */
@media (max-width:700px){
  .qp-pv{flex-direction:column;gap:10px}
  .qp-pv-main{width:100%}
  .qp-pv-grid{flex:none;display:flex;gap:12px;align-items:center}
  .qp-pv-grid .qp-pv-tile{flex:0 0 72px}
  .qp-pv-grid figcaption{margin-top:0}
  .qp-pv-shape{width:min(100%,calc(300px * var(--qp-ar,1)))}
  .qp-cover input[type=range]{min-height:44px}
}
/* Several in one post, and saved hashtag sets (20 Oct 2026, quickpost.js
   qpRenderItems, qpRenderTagSets). Her photos or videos are a list in
   posting order: a number, the picture, and buttons to move it or take it
   off (each 44px on a phone); dragged into place on a computer. */
.qp-items{list-style:none;margin:0 0 8px;padding:0;display:grid;gap:6px}
.qp-item{display:flex;align-items:center;gap:8px;padding:6px;border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-panel)}
.qp-item[draggable="true"]{cursor:grab}
.qp-item.dragging{opacity:.5}
.qp-item-n{flex:none;width:22px;height:22px;border-radius:50%;background:var(--ui-text);color:var(--ui-bg);font-size:11.5px;font-weight:700;display:grid;place-items:center}
.qp-item-thumb{flex:none;width:48px;height:48px;border-radius:6px;object-fit:cover;background:#141016;display:block}
.qp-item-name{flex:1;min-width:0;font-size:13px;font-weight:600;color:var(--ui-text)}
.qp-item-name small{display:block;font-weight:400;font-size:11.5px;color:var(--ui-muted)}
.qp-item-btn{flex:none;padding:6px 10px;min-width:36px;line-height:1}
.qp-item-btn:disabled{opacity:.35;cursor:default;transform:none;box-shadow:none;background:transparent;color:var(--ui-text)}
.qp-more{display:inline-block;margin:0 0 6px}
.field .qp-items + .qp-more, .field .qp-more{width:auto}
#qp-items-box .hint{font-size:12.5px;line-height:1.45;color:var(--ui-muted);margin:4px 0 0}
/* A carousel's stage keeps one height whichever one is shown, so the
   arrows under it stay where her thumb is. */
.qp-pv-stage.qp-pv-fixed{--qp-h:380px;height:calc(var(--qp-h) + 28px)}
.qp-pv-fixed .qp-pv-shape{width:min(100%,calc(var(--qp-h) * var(--qp-ar,1)))}
.qp-pv-step{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:8px;font-size:13px;font-weight:600;color:var(--ui-text)}
.qp-pv-step .mini{padding:6px 14px;font-size:16px;line-height:1}
.qp-pv-step .mini:disabled{opacity:.35;cursor:default;transform:none;box-shadow:none;background:transparent;color:var(--ui-text)}
#qp-preview .qp-pv-first{font-size:12.5px;line-height:1.45;color:var(--ui-muted);margin:8px 0 0}
.qp-sets{margin-top:10px}
.qp-sets-h{display:block;font-size:12.5px;font-weight:600;color:var(--ui-muted);margin-bottom:6px}
.qp-sets-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.qp-set{border:1px solid var(--ui-line);background:var(--ui-chip);color:var(--ui-text);border-radius:999px;padding:6px 12px;font-weight:600;font-size:12.5px;cursor:pointer}
.qp-set:hover,.qp-set:focus-visible{border-color:var(--ui-text)}
.qp-sets-edit{padding:6px 12px;font-size:12.5px}
.qp-sets-form{display:grid;gap:6px;margin-top:10px;padding:12px;border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-panel)}
.qp-sets-form label{margin:4px 0 0}
.qp-sets-form .qp-set-save{justify-self:start;margin-top:4px}
.qp-sets-form .hint{font-size:12px;color:var(--ui-muted);margin:0}
.qp-sets-list{list-style:none;margin:0 0 4px;padding:0;display:grid;gap:6px}
.qp-sets-list li{display:flex;gap:8px;align-items:center;justify-content:space-between}
.qp-sets-list li span{min-width:0}
.qp-sets-list b{display:block;font-size:13px;color:var(--ui-text)}
.qp-sets-list small{display:block;font-size:11.5px;color:var(--ui-muted);overflow-wrap:anywhere}
.qp-warn{margin:8px 0 0;padding:8px 10px;border-radius:9px;background:#FFE9D6;color:#7a3b00;font-size:12.5px;line-height:1.45;font-weight:600}
@media (max-width:700px){
  .qp-item-btn,.qp-pv-step .mini,.qp-set,.qp-sets-edit,.qp-sets-list .mini{min-height:44px;min-width:44px}
  .qp-item{gap:6px}
  .qp-pv-stage.qp-pv-fixed{--qp-h:300px}
  .qp-item-n{display:none}
  .qp-item-thumb{width:44px;height:44px}
  .qp-sets-form input[type=text]{font-size:16px}
}

/* First steps checklist (studio.js firstSteps, 21 Oct 2026). */
.first-steps{flex:0 0 auto;background:#FBF3E4;border-bottom:1px solid var(--ui-line);padding:10px 14px 12px;color:var(--ui-text);font-size:14px;line-height:1.35}
.first-steps[hidden]{display:none}
.first-steps .fs-more{margin:8px 0 0;font-size:13px;color:var(--ui-muted,var(--ui-text));overflow-wrap:anywhere}
.first-steps .fs-more a{color:inherit;font-weight:600}
.fs-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px}
.fs-sub{color:var(--ui-muted);font-size:13px}
.fs-bar{height:6px;border-radius:3px;background:var(--ui-chip);margin:8px 0 10px;overflow:hidden;max-width:520px}
.fs-bar span{display:block;height:100%;background:var(--sw-accent);border-radius:3px}
.fs-steps{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.fs-steps li{flex:1 1 200px;max-width:320px}
.fs-step{width:100%;min-height:44px;display:flex;align-items:center;gap:8px;text-align:left;background:var(--ui-panel);border:1px solid var(--ui-line);border-radius:10px;padding:8px 10px;font:inherit;color:inherit;cursor:pointer}
.fs-step:hover{border-color:var(--ui-text)}
.fs-step:focus-visible{outline:2px solid var(--ui-text);outline-offset:2px}
.fs-tick{flex:0 0 22px;height:22px;border-radius:11px;border:2px solid var(--ui-line);display:inline-flex;align-items:center;justify-content:center;font-size:13px;font-weight:700}
.fs-steps li.done .fs-tick{background:var(--ui-text);border-color:var(--ui-text);color:#fff}
.fs-steps li.done .fs-what{color:var(--ui-muted);text-decoration:line-through}
.fs-what{flex:1 1 auto}
.fs-min{flex:0 0 auto;color:var(--ui-muted);font-size:12.5px;white-space:nowrap}
.fs-hide{margin-top:2px}
@media (max-width:600px){.fs-steps{flex-direction:column}.fs-steps li{max-width:none;flex-basis:auto}}

/* Your voice card (settings.js, 21 Oct 2026). */
.voice-facts{margin:8px 0 4px;padding-left:18px;font-size:13.5px;line-height:1.6;color:var(--ui-text)}
.voice-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}

/* Dates coming up, in the Posting plan (agencyplan.js, 21 Oct 2026). */
.pp-dates{list-style:none;margin:6px 0;padding:0;display:flex;flex-direction:column;gap:8px}
.pp-date{border:1px solid var(--ui-line);border-radius:10px;padding:8px 10px;background:var(--ui-panel)}
.pp-date-row{display:flex;flex-wrap:wrap;gap:2px 10px;align-items:baseline;margin-bottom:6px}
.pp-date-when{font-weight:600;white-space:nowrap}
.pp-date-kind{font-style:normal;font-size:12px;color:var(--ui-muted);margin-left:4px}
.pp-idea{margin-top:8px}
.pp-idea[hidden]{display:none}
.pp-own summary{cursor:pointer;font-weight:600;min-height:44px;display:flex;align-items:center}
.pp-own-list{margin:4px 0 8px;padding-left:18px}
.pp-own-add{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end}
.pp-own-add label{flex:1 1 140px}
.pp-own-add input{width:100%}
/* ---------- Calendar: Month / Week / Grid, drag to move (calendar.js, 21 Oct 2026) ---------- */
.cal-views{display:flex;gap:4px;margin:0 0 10px;background:var(--ui-chip);padding:3px;border-radius:9px;width:max-content;max-width:100%}
.cal-views button{font-size:12px;font-weight:700;padding:6px 12px;border-radius:7px;color:var(--ui-muted);background:transparent}
.cal-views button.on{background:var(--ui-panel);color:var(--ui-text);box-shadow:0 1px 2px rgba(0,0,0,.08)}
.cal-views button:focus-visible{outline:2px solid var(--sw-accent);outline-offset:1px}
.cal-hint,.cal-best{font-size:11.5px;color:var(--ui-muted);margin:0 0 8px}
.cal-best{color:var(--ui-text)}
.wk-grid{display:grid;grid-template-columns:38px repeat(7,minmax(0,1fr));gap:2px;margin-bottom:16px;font-size:10.5px}
.wk-h{text-align:center;font-weight:800;color:var(--ui-muted);padding:4px 0;font-size:10px}
.wk-h.today{color:var(--ui-text)}
.wk-hr{font-size:9.5px;color:var(--ui-muted);text-align:right;padding:4px 4px 0 0;white-space:nowrap}
.wk-slot{min-height:38px;background:var(--ui-chip);border-radius:5px;padding:2px;display:flex;flex-direction:column;gap:2px;min-width:0}
.wk-slot.past{opacity:.5}
.wk-slot.gold{background:rgba(242,166,43,.28);box-shadow:inset 0 0 0 1px rgba(214,144,15,.55)}
.wk-slot.over{outline:2px solid var(--sw-accent);outline-offset:-2px;background:rgba(242,166,43,.18)}
.wk-post{display:grid;grid-template-columns:16px minmax(0,1fr);grid-template-rows:auto auto;column-gap:4px;align-items:center;width:100%;min-width:0;padding:2px 3px;border-radius:5px;background:var(--ui-panel);border:1px solid var(--ui-line);color:var(--ui-text);text-align:left;font-size:10px;line-height:1.2;cursor:pointer}
.wk-post.movable{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
.wk-post.posted{opacity:.6}
.wk-post.stopped{border-color:#e3b4ab}
.wk-post.dragging{cursor:grabbing;position:relative;z-index:5;box-shadow:0 8px 20px rgba(0,0,0,.25);opacity:.92}
.wk-post:focus-visible{outline:2px solid var(--sw-accent);outline-offset:1px}
.wk-thumb{grid-row:1/3;width:16px;aspect-ratio:3/4;border-radius:3px;overflow:hidden;background:var(--ui-chip);font-size:0}
.wk-thumb img,.wk-thumb video{width:100%;height:100%;object-fit:cover;display:block}
.wk-t{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.wk-n{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
@media (max-width:640px){
  .wk-grid{grid-template-columns:30px repeat(7,minmax(0,1fr));gap:1px}
  .wk-n{display:none}
  .wk-post{grid-template-columns:minmax(0,1fr);row-gap:1px;padding:1px}
  .wk-thumb{grid-row:auto;width:100%}
  .wk-t{font-size:8px;letter-spacing:-.2px;text-align:center;text-overflow:clip}
  .wk-h{font-size:8.5px}
}
#cal-move-dialog{border:none;border-radius:16px;padding:0;box-shadow:0 30px 70px rgba(0,0,0,.28);max-width:380px;width:92%}
#cal-move-dialog::backdrop{background:rgba(20,24,32,.45)}
.cm-err{color:#a33;font-size:12.5px;font-weight:600;min-height:1em;margin:8px 0 0}
/* Delete a post from its places (6 Nov 2026, calendar.js) */
#cal-delete-dialog{border:none;border-radius:16px;padding:0;box-shadow:0 30px 70px rgba(0,0,0,.28);max-width:440px;width:92%}
#cal-delete-dialog::backdrop{background:rgba(20,24,32,.45)}
.cd-places{display:flex;flex-wrap:wrap;gap:8px 16px;margin:6px 0 10px;font-size:13px}
.cd-hand{margin:6px 0 10px;padding-left:18px;font-size:12.5px;line-height:1.5}
.cd-hand a{font-weight:600}
/* Settings: posting times (calendar.js, 21 Oct 2026) */
.slot-days{display:flex;flex-wrap:wrap;gap:6px 12px;border:0;padding:0;margin:6px 0 10px}
.slot-days label{font-size:13px;display:inline-flex;align-items:center;gap:4px}
.slot-best{display:flex;gap:6px;align-items:flex-start;font-size:12.5px;margin-top:10px;color:var(--ui-text)}
#set-slot-time{font:inherit;padding:6px 8px;border-radius:8px;border:1px solid var(--ui-line);background:var(--ui-panel);color:inherit}
/* Calendar Grid view (calendar.js, 21 Oct 2026): the Grid of 9's 3:4 tiles */
.cal-ig{max-width:min(420px,100%)}
.cal-ig .gp-cell{padding:0;border:0;margin:0;font:inherit;color:inherit;text-decoration:none}
.cal-ig .cal-tile{width:100%;height:100%;aspect-ratio:auto;border-radius:0}
.cal-ig .cal-tile.none{font-size:10px;padding:6px}
.cal-ig .cal-up{cursor:pointer;outline:2px solid rgba(242,166,43,.7);outline-offset:-2px}
.cal-ig .cal-up.movable{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
.cal-ig .cal-up:focus-visible{outline:3px solid var(--sw-accent);outline-offset:-3px}
.cal-ig .cal-up.picked,.cal-ig .cal-up.over{outline:3px solid var(--sw-accent,#f2a62b);outline-offset:-3px}
.cal-ig .cal-up.picked{opacity:.85}
.cal-ig .cal-when{position:absolute;left:0;right:0;bottom:0;background:rgba(20,24,32,.72);color:#fff;font-size:10px;font-weight:700;padding:3px 4px;text-align:center}
.cal-ig .cal-was{cursor:default}
/* Approval links (calendar.js, 21 Oct 2026) */
.cal-appr{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px}
.si-note.appr{font-style:normal;font-weight:600}
.si-note.appr.approved{color:#1B7A3D}
/* A post that did not go out (failed-posts.js, 18 Nov 2026) */
.si-note.fp-note{font-style:normal;font-weight:600;color:#a33}
.si-note.appr.sentback{color:#a64b00}
.cal-dlg{border:none;border-radius:16px;padding:0;box-shadow:0 30px 70px rgba(0,0,0,.28);max-width:440px;width:calc(100vw - 32px)}
.cal-dlg::backdrop{background:rgba(20,24,32,.45)}
.cal-dlg input[type=text]{width:100%;font:inherit;font-size:13px;padding:8px;border-radius:8px;border:1px solid var(--ui-line);background:var(--ui-panel);color:inherit}
.ca-list{list-style:none;margin:8px 0;padding:0}
.ca-row{display:flex;flex-wrap:wrap;gap:6px;justify-content:space-between;align-items:center;font-size:12.5px;border-bottom:1px solid var(--ui-line);padding:8px 0}
.ca-btns{display:flex;gap:4px}
/* How long a link works, renewing it, and Waiting for review (calendar.js, 10 Nov 2026) */
.cal-dlg{max-height:calc(100vh - 32px);overflow:auto}
.ca-what{flex:1 1 220px;line-height:1.45}
.ca-state.closed{color:#a64b00;font-weight:600}
.ca-btns{flex-wrap:wrap}
.ca-said{font-size:12.5px;font-weight:600;color:#1B7A3D;min-height:1em;margin:8px 0 0}
.ca-said:focus{outline:none}
.cdays{border:0;margin:6px 0 0;padding:0;display:grid;gap:6px}
.cdays legend{padding:0}
.cdays-opt{display:flex;align-items:center;gap:10px;min-height:44px;padding:6px 12px;border:1px solid var(--ui-line);border-radius:10px;cursor:pointer;font-size:13.5px;color:var(--ui-text)}
.cdays-opt input{accent-color:var(--ui-text);width:18px;height:18px;margin:0;flex:none}
.cdays-opt em{font-style:normal;color:var(--ui-muted);font-size:12.5px}
.cdays-opt:has(input:checked){border-color:var(--ui-text);background:var(--ui-chip)}
.cr-list{list-style:none;margin:8px 0 0;padding:0}
.cr-item{border-bottom:1px solid var(--ui-line);padding:12px 0}
.cr-item:first-child{padding-top:4px}
.cr-top{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
.cr-chip{display:inline-block;font-size:11px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;padding:3px 9px;border-radius:999px;background:var(--ui-chip);color:var(--ui-text)}
.cr-chip.sentback{background:#fdeee0;color:#8a3f00}
.cr-when{font-size:12.5px;font-weight:600;color:var(--ui-text)}
.cr-line{font-size:13.5px;margin:6px 0 0;color:var(--ui-text);overflow-wrap:anywhere}
.cr-notes{list-style:none;margin:8px 0 0;padding:0}
.cr-notes li{font-size:12.5px;border-left:3px solid var(--ui-line);padding:2px 0 2px 10px;margin:6px 0;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--ui-text)}
.cr-notes b{display:block;font-size:11px;color:var(--ui-muted)}
.cr-acts{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.cr-empty{font-size:13px}
@media (max-width:1000px){ .cal-dlg .mini,.cal-dlg .sd-ghost,.cal-dlg .sd-primary{min-height:44px} .cal-dlg input[type=text]{font-size:16px} }
@media (max-width:480px){ .cal-dlg .sd{padding:20px 16px 16px} .cal-dlg .sd-actions{flex-wrap:wrap} .cal-dlg .sd-actions button{flex:1 1 auto} }
/* Week needs room for seven days: the Calendar page widens on a desktop while it shows. */
@media (min-width:900px){#mode-calendar .assist-page:has(.wk-grid){max-width:920px}}
/* A post in the list on a phone: its buttons (Get, Send for approval, Move...) on a row of their own, wrapping, under its words. */
@media (max-width:640px){.sched-item{flex-wrap:wrap}.si-actions{flex-wrap:wrap;width:100%;padding-left:50px;box-sizing:border-box}}
/* A first comment, and where hashtag sets go (21 Oct 2026). */
#qp-fc-where,#qp-ideas > .hint{font-size:12.5px;line-height:1.45;color:var(--ui-muted);margin:6px 0 0}
.qp-sets-to{display:flex;flex-wrap:wrap;gap:6px 8px;align-items:center;margin-top:8px;font-size:12.5px;color:var(--ui-muted)}
.qp-sets-to .qp-type{padding:5px 12px;font-size:12.5px}
@media (max-width:1000px){ .qp-sets-to .qp-type{min-height:44px} .sd textarea{font-size:16px} }

/* The post score, with one-tap fixes (21 Oct 2026). */
.qp-score{margin-top:12px;border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-panel);font-size:12.5px;line-height:1.45;color:var(--ui-text)}
.qp-score summary{display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline;padding:10px 12px;cursor:pointer}
.qp-score summary::before{content:'▸';font-size:11px;color:var(--ui-muted)}
.qp-score details[open] summary::before{content:'▾'}
.qp-score summary::-webkit-details-marker{display:none}
.qp-score summary:focus-visible{outline:2px solid #e8a33d;outline-offset:2px;border-radius:9px}
.qp-score-n{font-size:15px}
.qp-score-sum{color:var(--ui-muted)}
.qp-score-list{list-style:none;margin:0;padding:0 12px 4px;display:grid;gap:8px}
.qp-score-list li{display:grid;grid-template-columns:18px 1fr;gap:6px;align-items:start}
.qp-score-mark{font-weight:700;text-align:center}
.qp-score-list .ok .qp-score-mark{color:#2a7a4d}
.qp-score-list .tip .qp-score-mark{color:#8a5a00}
.qp-score-list .stop .qp-score-mark,.qp-score-list .stop b{color:#a3341f}
.qp-fix{margin:4px 6px 0 0;padding:4px 10px;font-size:12px}
.qp-score-note{margin:4px 12px 10px;font-size:11.5px;line-height:1.45;color:var(--ui-muted)}
@media (max-width:1000px){ .qp-fix{min-height:44px} .qp-score summary{min-height:44px;align-items:center} }

/* Opening lines and a Reel's script, under Write it for me (21 Oct 2026). */
#qp-ideas:empty{display:none}
.qp-hooks,.qp-script{margin-top:10px;padding:10px 12px;border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-panel)}
.qp-hooks:focus{outline:2px solid #e8a33d;outline-offset:2px}
.qp-ideas-h{margin:0 0 2px;font-size:12.5px;font-weight:700;color:var(--ui-text)}
.qp-hooks .hint,.qp-script .hint{margin:0 0 8px;font-size:12px;line-height:1.45;color:var(--ui-muted)}
.qp-hooks ul{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.qp-hook{width:100%;text-align:left;border:1px solid var(--ui-line);background:var(--ui-bg);color:var(--ui-text);border-radius:9px;padding:8px 10px;font:inherit;font-size:13px;line-height:1.4;cursor:pointer}
.qp-hook.on{border-color:var(--ui-text);box-shadow:inset 3px 0 0 var(--ui-text);font-weight:600}
.qp-hook:focus-visible{outline:2px solid #e8a33d;outline-offset:2px}
.qp-script ol{margin:0 0 8px;padding-left:20px;display:grid;gap:6px;font-size:12.5px;line-height:1.45}
.qp-script li span{display:block}
.qp-script-acts{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;margin-bottom:6px}
@media (max-width:1000px){ .qp-hook{min-height:44px} #qp-script-copy{min-height:44px} }

/* Comment a keyword, get a DM (keyword-dm.js, 21 Oct 2026). */
.kw-box .sd-check{margin-top:4px;font-size:13px;color:var(--ui-text);font-weight:400}
.field.kw-box label.sd-check{display:flex;color:var(--ui-text);font-weight:400;margin-bottom:0}
.kw-switch b{font-weight:600}
.kw-where{margin:6px 0;padding-left:18px;font-size:12.5px;line-height:1.45;color:var(--ui-muted)}
.kw-fields{display:grid;gap:2px;margin-top:4px}
.kw-fields .sd-l,.field.kw-box .kw-fields label{margin:10px 0 4px}
.kw-fields input[type=text],.kw-fields input[type=url],.kw-fields textarea,.kw-story input[type=text]{width:100%;box-sizing:border-box;font:inherit;font-size:13px;padding:8px;border-radius:8px;border:1px solid var(--ui-line);background:var(--ui-panel);color:inherit}
.kw-fields .hint{margin:2px 0 0;font-size:12px;line-height:1.45;color:var(--ui-muted)}
.kw-row{display:flex;flex-wrap:wrap;gap:0 10px}
.kw-row > span{flex:1 1 150px;min-width:0}
.kw-consent{font-size:12.5px;line-height:1.45;color:#8a5a00;margin:8px 0 0}
.kw-more{margin-top:6px}
.kw-more summary{cursor:pointer;font-size:12.5px;color:var(--ui-text)}
.kw-note{color:var(--ui-text)}
.kw-ins{margin:6px 0;padding-left:18px;font-size:13px;line-height:1.5}
.kw-story{display:grid;gap:2px;margin-bottom:12px}
@media (max-width:1000px){ .kw-fields input,.kw-fields textarea,.kw-story input{font-size:16px} .kw-box .sd-check,.kw-more summary{min-height:44px;align-items:center} }

/* A Google post: an update, an offer or an event (post-checks.js googlePostFields, 21 Oct 2026). */
.gbp-types{display:flex;flex-wrap:wrap;gap:6px;margin:2px 0 4px}
.gbp-types .qp-type{padding:5px 12px;font-size:12.5px}
.gbp-dates{display:flex;flex-wrap:wrap;gap:0 10px}
.gbp-dates > span{flex:1 1 140px;min-width:0}
#qp-gbp input[type=text],#qp-gbp input[type=url],#qp-gbp input[type=date],#qp-gbp input[type=time],#qp-gbp select,#sd-gpost input{width:100%;box-sizing:border-box;font:inherit;font-size:13px;padding:8px;border-radius:8px;border:1px solid var(--ui-line);background:var(--ui-panel);color:inherit}
#qp-gbp .sd-l,#sd-gpost .sd-l{margin:10px 0 4px}
#qp-gbp .hint,#sd-gpost .hint{margin:6px 0 0;font-size:12px;line-height:1.45;color:var(--ui-muted)}
@media (max-width:1000px){ .gbp-types .qp-type{min-height:44px} #qp-gbp input,#qp-gbp select,#sd-gpost input{font-size:16px} }

/* Where each place a post went to has got to (calendar.js calDeliveryHtml) */
.si-places{display:flex;flex-direction:column;gap:2px;font-size:12px;margin-top:2px}
.si-place b{font-weight:650}
.si-place.live{color:#166534}
.si-place.sending{color:var(--ui-muted)}
.si-place.failed{color:#a33;font-weight:600}
.si-place.unknown{color:#8a5a00}
.si-done.sending{color:var(--ui-muted);font-size:12px}

/* Add several posts at once (batchpost.js, 4 Nov 2026). One screen in New post's panel: a row per post, stacked,
   with its date and time, caption, and problems. Same chips, borders and 44px touch targets as the rest of New post. */
.qp-several{margin:0 0 10px;text-align:right}
.qp-several-btn{background:none;border:none;padding:6px 0;font-size:12.5px;font-weight:600;color:var(--ui-muted);text-decoration:underline;cursor:pointer}
.qp-several-btn:hover,.qp-several-btn:focus-visible{color:var(--ui-text)}
.bp-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.bp-head h3{margin:0;font-size:16px;color:var(--ui-text)}
.bp-file:focus-visible + .bp-add{outline:2px solid var(--sw-accent,#000);outline-offset:2px}
.bp-add{cursor:pointer}
.bp .hint{font-size:12.5px;line-height:1.45;color:var(--ui-muted)}
.bp-add span{font-weight:400;color:var(--ui-muted)}
.bp-space{border:1px solid var(--ui-line);border-radius:10px;padding:10px 12px;margin:0 0 14px;min-width:0}
.bp-space legend{font-size:12.5px;font-weight:600;color:var(--ui-muted);padding:0 4px}
.bp-when-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}
.bp-when-row label{display:block;font-size:12px;font-weight:600;color:var(--ui-muted);margin-bottom:4px}
.bp-when-row input,.bp-space select,.bp-space input[type=number]{padding:8px 9px;border:1px solid var(--ui-line);border-radius:9px;background:var(--ui-panel);color:var(--ui-text);font:inherit;font-size:13px;max-width:100%}
.bp-when-row input{width:100%;box-sizing:border-box}
.bp-space input[type=number]{width:64px}
.bp-modes{display:grid;gap:6px}
.bp-modes label{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:13px;font-weight:500;color:var(--ui-text);margin:0}
.bp-modes input[type=radio]{width:18px;height:18px;accent-color:var(--ui-text);flex:none}
.bp-list{list-style:none;margin:0 0 12px;padding:0;display:grid;gap:10px}
.bp-row{border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-panel);padding:10px}
.bp-row.has-block{border-color:#d9a99f}
.bp-row.bp-failed{border-color:#a33}
.bp-row.bp-sent{display:flex;align-items:center;gap:8px;background:transparent;padding:6px 10px}
.bp-top{display:flex;align-items:center;gap:8px;margin-bottom:8px;flex-wrap:wrap}
.bp-n{flex:none;width:22px;height:22px;border-radius:50%;background:var(--ui-text);color:var(--ui-bg);font-size:11.5px;font-weight:700;display:grid;place-items:center}
.bp-thumb{flex:none;width:48px;height:48px;border-radius:6px;object-fit:cover;background:#141016;display:block}
.bp-thumb-done{display:grid;place-items:center;color:#1B7A3D;font-weight:700;background:#DCF5E4}
.bp-when{flex:1;min-width:140px;display:grid;font-size:13px;color:var(--ui-text)}
.bp-date{font-size:12.5px;color:var(--ui-muted)}
.bp-when small{font-size:11.5px;color:#7a3b00;line-height:1.4}
.bp-btns{display:flex;gap:4px;margin-left:auto}
.bp-btn{padding:6px 10px;min-width:36px;line-height:1}
.bp-btn:disabled{opacity:.35;cursor:default;transform:none;box-shadow:none;background:transparent;color:var(--ui-text)}
.bp-row .field{margin-bottom:8px}
.bp-row textarea{width:100%;box-sizing:border-box;padding:9px 11px;border:1px solid var(--ui-line);border-radius:9px;font:inherit;font-size:13px;line-height:1.5;min-height:74px;background:var(--ui-panel);color:var(--ui-text)}
.bp-per-btn{margin:0 0 8px;padding:6px 12px;font-size:12.5px}
.bp-per{margin:0 0 6px}
.bp-ai{display:flex;gap:8px;align-items:flex-start;font-size:12.5px;margin:0 0 8px}
.bp-places{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 4px}
.bp-chip{border:1px solid var(--ui-line);background:var(--ui-chip);border-radius:999px;padding:3px 10px;font-size:12px;font-weight:600;color:var(--ui-text)}
.bp-chip.off{opacity:.6;font-weight:500}
.bp-chip em{font-style:normal;font-size:11px;color:var(--ui-muted);margin-left:2px}
.bp-statusline{margin:0 0 8px}
.bp-state{font-size:12.5px;font-weight:600;color:var(--ui-muted)}
.bp-state.ok{color:#1B7A3D}
.bp-state.bad{color:#a33}
.bp-blocks{list-style:disc;margin:6px 0 0;padding:8px 10px 8px 26px;border-radius:9px;background:#fdf3f0;color:#a33;font-size:12.5px;line-height:1.45;font-weight:600;display:grid;gap:3px}
.bp-notes{list-style:disc;margin:6px 0 0;padding:0 0 0 18px;font-size:12px;line-height:1.45;color:#7a3b00;display:grid;gap:3px}
.bp-actions{display:grid;gap:8px}
.bp-actions .qp-done{margin:0}
@media (max-width:1000px){
  .bp-btn{min-height:44px;min-width:44px}
  .bp-row textarea,.bp-when-row input,.bp-space select,.bp-space input[type=number]{font-size:16px}
  .bp-per-btn,.qp-several-btn{min-height:44px}
  .bp-modes input[type=radio]{width:22px;height:22px}
}
/* Redraw on the current design (6 Nov 2026, redraw.js) */
#rd-dialog{border:none;border-radius:16px;padding:0;box-shadow:0 30px 70px rgba(0,0,0,.28);max-width:720px;width:94%}
#rd-dialog::backdrop{background:rgba(20,24,32,.45)}
.rd-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:8px 0 10px}
.rd-fig{margin:0;font-size:12.5px}
.rd-fig img{width:100%;max-height:360px;object-fit:contain;background:rgba(0,0,0,.05);border-radius:8px;display:block;margin-top:4px}
.rd-none{padding:30px 8px;text-align:center;background:rgba(0,0,0,.05);border-radius:8px;margin-top:4px}
.rd-warn{color:#8a5a00}
.rd-list{list-style:none;margin:8px 0;padding:0;max-height:50vh;overflow:auto}
.rd-row{display:grid;grid-template-columns:1fr auto 1.4fr;gap:8px;align-items:center;padding:6px 0;border-bottom:1px solid rgba(0,0,0,.08);font-size:12.5px}
.rd-sm-pair{display:flex;gap:4px}
.rd-sm{height:48px;width:auto;border-radius:4px}

/* ============ Five-entry bar, This week, phone bar (7 Nov 2026) ============
   The bar is This week, New post, Calendar, Inbox and More (the other six
   are the .mode-tab-extra tabs, listed by studio.js wireMore). Templates is
   not in it: its tab stays, hidden, as the one way in for the code that opens
   it. Pills, as in the approved mock-up; the open one is filled. */
.mode-tab[hidden],.mode-tab-extra{display:none}
.top-bar .mode-tabs{flex:0 1 auto;overflow:visible;align-items:center;gap:4px;padding:8px 12px}
.top-bar .mode-tab{flex:0 0 auto;min-height:44px;padding:10px 16px;border-radius:999px;font-size:14px;font-weight:600;color:var(--ui-muted)}
.top-bar .mode-tab::after{display:none}
.top-bar .mode-tab:hover{background:var(--ui-chip);color:var(--ui-text)}
.top-bar .mode-tab.on,.top-bar .mode-tab.parent-on{background:var(--ui-text);color:#fff}
.top-bar .mode-tab:focus-visible{outline:3px solid var(--sw-accent);outline-offset:2px}
.top-bar .more-tabs{flex:0 0 auto}
.top-bar .more-tabs .more-tabs-btn{flex:0 0 auto}
.more-tabs-item{min-height:44px}
.np-tpl{margin:0 0 16px}

.tw-page{max-width:1200px;padding-top:40px}
.tw-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap;margin-bottom:8px}
.tw-page h1{font-family:var(--sw-font-serif);font-size:34px;line-height:1.1;font-weight:600;margin:0 0 6px;color:var(--ui-text)}
.tw-range{margin:0;color:var(--ui-muted);font-size:16px}
.tw-page h2{font-family:var(--sw-font-serif);font-size:22px;font-weight:600;margin:36px 0 14px;color:var(--ui-text)}
.tw-primary,.tw-secondary,.tw-link{font:inherit;cursor:pointer}
.tw-primary{background:var(--sw-accent);color:var(--ui-text);border:0;border-radius:999px;padding:14px 28px;min-height:48px;font-weight:700;font-size:15px}
.tw-primary:hover{filter:brightness(.95)}
.tw-secondary{background:var(--ui-panel);color:var(--ui-text);border:1.5px solid var(--ui-text);border-radius:999px;padding:10px 20px;min-height:44px;font-weight:600;font-size:14px;white-space:nowrap}
.tw-secondary:hover{background:var(--ui-chip)}
.tw-link{display:inline-block;background:none;border:0;padding:12px 0;color:var(--ui-text);text-decoration:underline;font-size:inherit}
.tw-primary:focus-visible,.tw-secondary:focus-visible,.tw-link:focus-visible{outline:3px solid var(--ui-text);outline-offset:2px}
.tw-needs{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.tw-need{display:flex;align-items:center;justify-content:space-between;gap:16px;background:var(--ui-panel);border:1px solid var(--ui-line);border-radius:16px;padding:16px 20px}
.tw-need-text{font-size:16px;line-height:1.4;color:var(--ui-text)}
.tw-quiet{color:var(--ui-muted);font-size:16px;margin:0}
.tw-month{margin:10px 0 0}
.tw-week{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.tw-day{background:var(--ui-panel);border:1px solid var(--ui-line);border-radius:16px;padding:14px 16px}
.tw-day h3{margin:0 0 10px;font-family:var(--sw-font-sans);font-size:15px;font-weight:700;color:var(--ui-text)}
.tw-day-desk,.tw-today{display:none}
.tw-today{font-size:12px;font-weight:600;color:#5C3A00}
.tw-none{margin:0;color:var(--ui-muted);font-size:14px}
.tw-none .tw-link{color:var(--ui-muted)}
.tw-day.past.empty{display:none}
.tw-cards{list-style:none;margin:0;padding:0;display:grid;gap:14px}
.tw-card{display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:12px;align-items:start}
.tw-thumb{width:56px;height:56px;border-radius:10px;background:var(--ui-chip);overflow:hidden;display:block;font-size:0}
.tw-thumb img,.tw-thumb video{width:100%;height:100%;object-fit:cover;display:block}
.tw-card-main{display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.tw-time{font-weight:700;font-size:14px;color:var(--ui-text)}
.tw-line{font-weight:600;font-size:15px;line-height:1.3;color:var(--ui-text);overflow-wrap:anywhere}
.tw-chips{display:flex;flex-wrap:wrap;gap:6px}
.tw-chip{background:#F6E7CF;color:var(--ui-text);border:1px solid var(--ui-line);border-radius:999px;padding:3px 10px;font-size:12.5px}
.tw-status{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:4px 10px;font-size:12.5px;font-weight:600}
.tw-status svg{width:14px;height:14px;flex:0 0 auto}
.tw-status.sched{background:#EEE9F2;color:var(--ui-text)}
.tw-status.held{background:#F8E1B5;color:#5C3A00}
.tw-foot{margin:40px 0 0;padding-top:20px;border-top:1px solid var(--ui-line);color:var(--ui-muted);font-size:14px}
.tw-foot .tw-link{color:var(--ui-text)}
/* A computer: the week as a strip, Monday to Sunday. Narrower, it is a list from Today on. */
@media (min-width:1000px){
  .tw-week{grid-template-columns:repeat(7,minmax(0,1fr));align-items:start}
  .tw-day{padding:12px}
  .tw-day h3{display:flex;justify-content:space-between;align-items:baseline}
  .tw-day-desk{display:inline}
  .tw-day-phone{display:none}
  .tw-today{display:inline}
  .tw-day.past.empty{display:block}
  .tw-card{grid-template-columns:minmax(0,1fr)}
  .tw-thumb{width:72px;height:72px}
  .tw-change{width:100%}
}
/* A phone: the bar moves to the bottom, at thumb height, under the home bar's own space. */
.bottom-tabs{display:none;flex:0 0 auto;background:var(--ui-panel);border-top:1px solid var(--ui-line);padding:0 4px env(safe-area-inset-bottom)}
.bottom-tabs .bt{flex:1 1 0;min-width:44px;min-height:56px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:6px 2px;border:0;border-radius:12px;background:transparent;color:var(--ui-muted);font:inherit;font-size:12px;font-weight:600;cursor:pointer}
.bottom-tabs .bt.on{color:var(--ui-text);background:var(--ui-chip)}
.bottom-tabs .bt:focus-visible{outline:3px solid var(--ui-text);outline-offset:-3px}
.bt-more{position:relative;flex:1 1 0;display:flex}
.bt-more .bt{flex:1 1 auto}
.bt-more .more-tabs-menu{top:auto;bottom:calc(100% + 8px);right:0;min-width:210px}
@media (max-width:767px){
  #app{height:100vh;height:100dvh}
  .top-bar .mode-tabs{display:none}
  .bottom-tabs{display:flex}
  #toast{bottom:calc(84px + env(safe-area-inset-bottom))}
  .tw-page{padding-top:24px}
  .tw-page h1{font-size:28px}
  .tw-need{flex-direction:column;align-items:stretch}
  .tw-card{grid-template-columns:56px minmax(0,1fr)}
  .tw-change{grid-column:1 / -1}
  .tw-head .tw-primary{width:100%}
}

/* big video upload progress (7 Nov 2026): sits above the toast */
#upload-progress{position:fixed;left:50%;bottom:78px;transform:translateX(-50%) translateY(14px);opacity:0;pointer-events:none;
  display:flex;flex-direction:column;gap:6px;min-width:260px;max-width:92vw;
  background:#212734;color:#fff;padding:11px 20px;border-radius:10px;font-size:13.5px;font-weight:600;
  transition:opacity .2s,transform .2s;z-index:901}
#upload-progress.show{opacity:1;transform:translateX(-50%)}
#upload-progress progress{width:100%;height:8px;accent-color:#7aa7ff}
@media (max-width:760px){#upload-progress{bottom:calc(138px + env(safe-area-inset-bottom))}}

/* "Polish this video" in New post (videoedit.js, 7 Nov 2026; on unless the Studio has videoEdit: false). */
.ve-box{margin:0 0 14px;padding:12px 14px;border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-panel);display:grid;gap:8px}
.ve-h{margin:0;font-size:14px;color:var(--ui-text);display:flex;align-items:center;gap:8px}
.ve-steps{list-style:none;margin:0;padding:0;display:grid;gap:4px;font-size:13px;color:var(--ui-muted)}
.ve-steps li.now{color:var(--ui-text);font-weight:700}
.ve-steps li.done{color:var(--ui-text)}
#ve-bar{width:100%;height:10px}
.ve-row{border:0;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center}
.ve-row legend{font-size:12.5px;font-weight:600;color:var(--ui-muted);padding:0;margin-right:6px;float:left}
.ve-opt{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--ui-text);min-height:32px}
.ve-card{display:grid;gap:4px}
.ve-card label{font-size:12.5px;font-weight:600;color:var(--ui-muted)}
.ve-card input{width:100%;box-sizing:border-box}
.ve-actions{display:flex;flex-wrap:wrap;gap:8px}
.ve-video{width:100%;max-width:260px;aspect-ratio:9/16;background:#000;border-radius:10px;justify-self:center}
/* Calendar filters, campaigns, Drafts board and key dates (calfilters.js, 10 Nov 2026). Colours are the Studio's own tokens, so both themes work. */
.cf{margin:0 0 10px}
.cf-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;min-height:34px}
.cf-toggle{font-size:12.5px;font-weight:700;padding:7px 12px;border-radius:9px;background:var(--ui-chip);color:var(--ui-text);border:1px solid transparent;display:inline-flex;align-items:center;gap:6px}
.cf-toggle.active,.cf-toggle[aria-expanded="true"]{border-color:var(--ui-text)}
.cf-badge{background:var(--ui-text);color:var(--ui-bg);border-radius:9px;font-size:10.5px;min-width:18px;padding:1px 5px;text-align:center}
.cf-count{font-size:12px;color:var(--ui-muted);flex:1 1 120px}
.mini.cf-clear,.mini.cf-kd{font-size:12px;padding:6px 10px}
.mini.cf-clear:disabled{visibility:hidden}
.mini.cf-kd[aria-pressed="true"]{background:var(--ui-chip)}
.cf-panel{margin-top:8px;padding:10px;border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-panel);color:var(--ui-text)}
.cf-panel[hidden]{display:none}
.cf-group{border:0;margin:0 0 8px;padding:0;min-width:0}
.cf-group:last-child{margin-bottom:0}
.cf-group legend{font-size:11px;font-weight:800;color:var(--ui-muted);padding:0;margin-bottom:4px}
.cf-chips{display:flex;flex-wrap:wrap;gap:6px}
.cf-chip{font-size:12px;font-weight:600;padding:7px 10px;min-height:32px;border-radius:16px;border:1px solid var(--ui-line);background:transparent;color:var(--ui-text)}
.cf-chip.on{background:var(--ui-text);color:var(--ui-bg);border-color:var(--ui-text)}
.cf-n{font-size:10.5px;font-weight:700;opacity:.75}
.cf-toggle:focus-visible,.cf-chip:focus-visible,.cf-clear:focus-visible,.cf-kd:focus-visible,.bd-card:focus-visible,.kd-make:focus-visible{outline:2px solid var(--sw-accent);outline-offset:2px}
/* Key dates: faint, and placed so a late arrival moves nothing */
.cal-cell .kd{position:absolute;left:2px;right:2px;bottom:1px;font-size:7.5px;line-height:1.1;color:var(--ui-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;font-weight:600;pointer-events:none}
.cal-cell.kdh:not(.has){cursor:pointer}
.wk-kd{min-height:22px;display:flex;flex-direction:column;gap:2px;min-width:0}
.wk-kdi{display:flex;align-items:center;gap:2px;min-width:0}
.wk-kdi .kd{flex:1 1 auto;min-width:0;font-size:9px;line-height:1.2;color:var(--ui-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}
.kd-make{flex:0 0 auto;width:20px;height:20px;border-radius:50%;border:1px solid var(--ui-line);background:var(--ui-panel);color:var(--ui-text);font-size:13px;line-height:1;padding:0}
.kd-list{margin:8px 0}
.kd-row{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center;justify-content:space-between;padding:8px 10px;border:1px dashed var(--ui-line);border-radius:9px;margin-bottom:6px;font-size:13px;color:var(--ui-text)}
.kd-kind{color:var(--ui-muted);font-size:11.5px}
.si-note.camp{font-style:normal;font-weight:600}
.qp-more-opts{margin:10px 0}
.qp-more-opts>summary{cursor:pointer;font-size:13px;font-weight:600;color:var(--ui-muted)}
#cal-campaign-dialog{border:none;border-radius:16px;padding:0;box-shadow:0 30px 70px rgba(0,0,0,.28);max-width:380px;width:92%}
#cal-campaign-dialog::backdrop{background:rgba(20,24,32,.45)}
#cc-name{width:100%;box-sizing:border-box}
/* Drafts board */
.bd{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:16px;align-items:start}
.bd-col{background:var(--ui-chip);border-radius:10px;padding:8px;min-width:0}
.bd-col h4{margin:0 0 2px;font-size:12.5px;color:var(--ui-text)}
.bd-hint{margin:0 0 8px;font-size:11px;color:var(--ui-muted)}
.bd-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.bd-card{display:flex;gap:8px;align-items:flex-start;width:100%;text-align:left;padding:6px;border-radius:8px;background:var(--ui-panel);border:1px solid var(--ui-line);color:var(--ui-text);cursor:pointer}
.bd-card.stopped{border-color:#e3b4ab}
.bd-thumb{flex:0 0 42px;width:42px;aspect-ratio:3/4;border-radius:5px;overflow:hidden;background:var(--ui-chip);font-size:0}
.bd-thumb img,.bd-thumb video{width:100%;height:100%;object-fit:cover;display:block}
.bd-body{display:flex;flex-direction:column;gap:1px;min-width:0;font-size:11.5px}
.bd-t{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bd-m{color:var(--ui-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bd-camp{align-self:flex-start;margin-top:2px;font-size:10.5px;font-weight:700;padding:1px 6px;border-radius:8px;background:var(--ui-chip);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:900px){.bd{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.bd{grid-template-columns:minmax(0,1fr)}.cf-chip{min-height:36px}.wk-kdi .kd{display:none}}

/* ---- Reports (10 Nov 2026, reports.js) ---- */
.rp-page{max-width:760px}
.rp-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 16px;border-bottom:1px solid var(--ui-line);padding-bottom:8px}
.rp-tab{background:transparent;border:1px solid transparent;border-radius:999px;padding:8px 14px;font-weight:600;color:var(--ui-muted);min-height:40px}
.rp-tab[aria-selected="true"]{background:var(--ui-chip);color:var(--ui-text);border-color:var(--ui-line)}
.rp-tab:focus-visible,#rp-pane:focus-visible{outline:3px solid var(--sw-accent);outline-offset:2px}
.rp-posts{list-style:none;margin:0 0 14px;padding:0}
.rp-post{border:1px solid var(--ui-line);border-radius:12px;padding:14px;margin-bottom:10px;background:var(--ui-panel)}
.rp-row{display:flex;gap:14px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.rp-metrics{display:flex;gap:6px 14px;flex-wrap:wrap;font-size:13px;color:var(--ui-muted)}
.rp-metrics b{color:var(--ui-text)}
.rp-curve{color:var(--ui-text);flex:0 0 auto}
.rp-spark-none{font-size:12px;color:var(--ui-muted)}
.rp-vs{font-size:13px;margin:8px 0 0}
.rp-vs em{font-style:normal;font-weight:700;padding:1px 8px;border-radius:999px;margin-right:4px;background:var(--ui-chip)}
.rp-up{color:#1d6b3a}.rp-down{color:#a3331f}.rp-same{color:var(--ui-muted)}
.rp-times{display:grid;gap:12px}
.rp-best{display:flex;gap:28px;flex-wrap:wrap;margin:6px 0 10px}
.rp-best dt{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--ui-muted)}
.rp-best dd{margin:0;font-size:18px;font-weight:700}
.rp-slots{margin:0 0 10px;padding-left:1.2em}
.rp-table{width:100%;border-collapse:collapse;font-size:13.5px}
.rp-table th,.rp-table td{padding:7px 6px;border-bottom:1px solid var(--ui-line);text-align:left}
.rp-table th[scope=col]{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--ui-muted)}
.rp-table .r{text-align:right;font-variant-numeric:tabular-nums}
.rp-table .rp-hi{background:var(--ui-chip)}
.rp-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.rp-scroll{overflow-x:auto}
.rp-month-bar{display:flex;gap:10px;align-items:center;margin:0 0 14px}
.rp-short{font-size:16px;margin:0 0 6px}
.rp-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:6px 0 8px}
.rp-link{width:min(100%,420px);font:inherit;font-size:13px;padding:8px;border:1px solid var(--ui-line);border-radius:8px;background:var(--ui-panel);color:var(--ui-text)}
.rp-frame{width:100%;height:640px;border:1px solid var(--ui-line);border-radius:12px;background:#fff;margin:6px 0 14px}
@media (max-width:1000px){.rp-tab,.rp-actions .mini,.rp-actions select,.rp-month-bar select{min-height:44px}.rp-link,.rp-month-bar select,.rp-actions select{font-size:16px}.rp-frame{height:520px}}


/* ---- New post: picture descriptions, polls and LinkedIn mentions (post-extras.js, 10 Nov 2026) ---- */
.pe-alt{margin-top:10px;display:grid;gap:8px}
.pe-alt-h{margin:0;font-size:13px;font-weight:600;color:var(--ui-text)}
.pe-alt-h .hint{font-weight:400;font-size:12px;color:var(--ui-muted)}
.pe-alt-row{display:flex;gap:10px;align-items:flex-start}
.pe-alt-thumb{flex:none;width:48px;height:48px;border-radius:6px;object-fit:cover;background:#141016;display:block;margin-top:20px}
.pe-alt-field{flex:1;min-width:0}
.pe-alt-field label{display:block;font-size:12.5px;font-weight:600;color:var(--ui-muted);margin:0 0 4px}
.field .pe-alt-field textarea{min-height:56px}
.pe-alt-foot{display:flex;gap:8px;align-items:flex-start;justify-content:space-between;margin-top:4px}
.pe-alt-foot .hint{margin:0;font-size:12px;line-height:1.45;color:var(--ui-muted)}
.pe-alt-again{flex:none;padding:6px 12px;font-size:12.5px}
.qp-item-name small.pe-converted{color:var(--ui-muted)}
.pe-poll{border:1px solid var(--ui-line);border-radius:12px;padding:10px 12px 12px;margin:0;display:grid;gap:4px;background:var(--ui-panel);min-width:0}
.pe-poll legend{font-size:13px;font-weight:600;color:var(--ui-text);padding:0 4px}
.pe-poll label{font-size:12.5px;font-weight:600;color:var(--ui-muted);margin:6px 0 0}
.pe-poll .hint{font-size:12px;color:var(--ui-muted);margin:2px 0 0}
.pe-poll select,.pe-mention-row input{width:100%;box-sizing:border-box;padding:9px 11px;border:1px solid var(--ui-line);border-radius:9px;background:var(--ui-panel);color:var(--ui-text);font:inherit;font-size:14px}
.pe-poll select:focus,.pe-mention-row input:focus{outline:none;border-color:var(--ui-text)}
.pe-poll #pe-poll-off{justify-self:start;margin-top:8px}
.pe-mention-form{margin-top:8px;display:grid;gap:4px}
.pe-mention-form label{font-size:12.5px;font-weight:600;color:var(--ui-muted)}
.pe-mention-row{display:flex;gap:6px}
.pe-mention-row input{flex:1;min-width:0}
.pe-mention-form .hint{font-size:12px;color:var(--ui-muted);margin:0}
#qp-poll > .hint{font-size:12.5px;line-height:1.45;color:var(--ui-muted);margin:4px 0 0}
.pe-li-h{margin:10px 0 4px;font-size:12.5px;font-weight:600;color:var(--ui-muted)}
.pe-li-preview{margin:0;padding:10px 12px;border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-panel);font-size:13.5px;line-height:1.55;color:var(--ui-text);white-space:pre-wrap;overflow-wrap:anywhere}
.pe-chip{display:inline-flex;align-items:center;gap:2px;padding:1px 4px 1px 8px;border-radius:999px;background:#E8F0FA;color:#0A4A8F;font-weight:600;white-space:nowrap}
.pe-chip-x{border:0;background:transparent;color:inherit;font-size:11px;line-height:1;padding:4px 6px;border-radius:999px;cursor:pointer}
.pe-chip-x:hover,.pe-chip-x:focus-visible{background:rgba(10,74,143,0.14)}
@media (max-width:700px){
  .pe-alt-again,#pe-poll-add,#pe-poll-off,#pe-mention-open,#pe-mention-add{min-height:44px}
  .pe-chip-x{min-width:32px;min-height:32px}
  .pe-poll select,.pe-mention-row input,.pe-poll input[type=text],.pe-alt-field textarea{font-size:16px}
  .pe-alt-thumb{width:40px;height:40px}
  .field .pe-alt-field textarea{min-height:84px}
  .pe-alt-foot{flex-direction:column;align-items:flex-start}
}
/* ---- Repeat this post, and Copy to another Studio (repeat.js, 10 Nov 2026) ---- */
.rs-box{border:1px solid var(--ui-line);border-radius:10px;padding:10px 12px}
.rs-box[hidden]{display:none}
.rs-on{margin:0}
.rs-fields[hidden],.rs-dlg [hidden]{display:none}
.rs-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.rs-grid select,.rs-grid input,.rs-end input[type=number],.rs-end input[type=date]{width:100%;font:inherit;font-size:13.5px;padding:8px 10px;border:1px solid var(--ui-line);border-radius:8px;background:var(--ui-bg);color:var(--ui-text);box-sizing:border-box}
.rs-end{border:none;padding:0;margin:8px 0 0}
.rs-end .sd-check{align-items:center;flex-wrap:wrap}
.rs-end input[type=number]{width:4.5em}
.rs-end input[type=date]{width:auto}
.rs-note{font-style:normal}
.rs-badge{display:inline-block;font-size:9.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;border:1px solid currentColor;border-radius:4px;padding:0 4px;margin-right:2px}
.cal-cell .dot.repeat{background:transparent;box-shadow:inset 0 0 0 1.5px var(--ui-text)}
.rs-dlg{max-width:480px}
.rs-occs{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:6px;max-height:50vh;overflow:auto}
.rs-occ{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;border:1px solid var(--ui-line);border-radius:8px;padding:8px 10px}
.rs-occ div{display:flex;flex-direction:column;gap:2px;min-width:0}
.rs-occ.skipped,.rs-occ.missed,.rs-occ.stopped{opacity:.6}
.rs-occ-acts{flex-direction:row!important;gap:6px!important;flex-shrink:0}
.rs-targets{border:none;padding:0;margin:0}
.rs-results{list-style:none;margin:10px 0 0;padding:0;font-size:12.5px;display:grid;gap:4px}
.rs-results .bad{color:#a33}
.rs-stop{margin-right:auto}
@media (max-width:600px){
  .rs-grid{grid-template-columns:1fr}
  .rs-occ-acts .mini,.rs-dlg .sd-primary,.rs-dlg .sd-ghost,.rs-box .sd-check{min-height:44px}
  .rs-grid select,.rs-grid input,.rs-end input{font-size:16px}
  .rs-dlg .sd-actions{flex-wrap:wrap}
}
/* Automations (automations.js, 10 Nov 2026). */
.am-page{max-width:880px}
.am-card{margin:0 0 16px}
.am-card .mini{margin:10px 8px 0 0;min-height:44px}
.am-card select{width:100%}
.am-rule{border:1px solid var(--ui-line);border-radius:12px;padding:4px 14px 12px;margin:12px 0}
.am-rule legend{font-size:12px;font-weight:700;color:var(--ui-muted);padding:0 4px}
.am-rule input[type=text],.am-rule input[type=url],.am-rule textarea,.am-card .kw-fields input,.am-card .kw-fields textarea{width:100%;box-sizing:border-box;font:inherit;font-size:13px;padding:8px;border-radius:8px;border:1px solid var(--ui-line);background:var(--ui-panel);color:inherit}
.am-plats{display:flex;gap:18px;flex-wrap:wrap}
.am-meter{height:10px;border-radius:6px;background:var(--ui-chip);overflow:hidden;margin:6px 0 8px}
.am-meter span{display:block;height:100%;background:var(--ui-text)}
.am-warn .am-meter span{background:#b26a00}
.am-over .am-meter span{background:#b3261e}
.am-warn .field-help{color:#8a5a00}
.am-over .field-help{color:#b3261e;font-weight:600}
.am-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:8px 0}
.am-table{width:100%;border-collapse:collapse;font-size:13px;min-width:560px}
.am-table th,.am-table td{padding:8px 6px;border-bottom:1px solid var(--ui-line);text-align:right;vertical-align:top}
.am-table th[scope=row],.am-table thead th:first-child{text-align:left;font-weight:600}
.am-table thead th{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--ui-muted)}
.am-table tfoot th,.am-table tfoot td{font-weight:800;border-bottom:0}
.am-where{display:block;font-weight:400;font-size:12px;color:var(--ui-muted);margin-top:2px}
.am-none{color:var(--ui-muted);font-size:12px}
.am-where-table{min-width:420px}
.am-where-table td{text-align:center}
@media (max-width:1000px){ .am-rule input,.am-rule textarea,.am-card .kw-fields input,.am-card .kw-fields textarea,.am-card select{font-size:16px} }

/* ===== Studio live-check fixes, 10 Nov 2026 (marked block) ===== */
/* Automations "Where each one works": on a phone each row of the table becomes a small card, a line a platform, so nothing is clipped or scrolled sideways. */
@media (max-width:600px){
  .am-where-table{min-width:0;display:block}
  .am-where-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .am-where-table tbody,.am-where-table tr,.am-where-table th[scope=row],.am-where-table td{display:block}
  .am-where-table tr{border:1px solid var(--ui-line);border-radius:12px;padding:6px 12px;margin:0 0 10px}
  .am-where-table th[scope=row]{border-bottom:0;padding:6px 0}
  .am-where-table td{display:flex;justify-content:space-between;gap:12px;text-align:right;border-bottom:1px solid var(--ui-line);padding:6px 0}
  .am-where-table td:last-child{border-bottom:0}
  .am-where-table td::before{content:attr(data-label);font-weight:600;color:var(--ui-muted);text-align:left}
}
/* Settings > People: the reason beside a person's disabled controls. */
.set-person-why{flex:1 1 100%;margin:0;font-size:12px;color:var(--ui-muted)}
.set-person .mini[disabled],.set-person select[disabled]{opacity:.5;cursor:not-allowed}
/* ===== end of live-check fixes block ===== */
/* ===== BEGIN top bar: every section as a tab across the bar (10 Nov 2026) =====
   From 768px the bar shows every visible section (studio.js initTopBarFit, tabfit.js)
   and More holds only the overflow. JS puts .in-bar on a tab that shows in the bar
   (an extra one included) and .tf-off on one that sits under More; .tf-measure
   shows them all, unseen, for the width reading. One row, no scrolling, no wrapping.
   Under 768px the phone bar is used and none of this applies. */
@media (min-width:768px){
  .top-bar{flex-wrap:nowrap}
  .top-bar .mode-tabs{flex:1 1 0;min-width:0;justify-content:flex-start}
  .top-bar .mode-tabs.can-scroll-more::after{display:none}
  .top-bar .mode-tab[data-mode].mode-tab-extra.in-bar{display:block}
  .top-bar .mode-tab[data-mode].tf-off{display:none}
  .top-bar .mode-tabs.tf-measure .mode-tab[data-mode]:not([hidden]){display:block;visibility:hidden}
  .top-bar .mode-tabs.tf-measure .more-tabs{visibility:hidden}
  .top-bar .biz-switch,.top-bar .admin-back{flex:0 0 auto}
}
/* ===== END top bar tabs ===== */

/* Ask for reviews card (18 Nov 2026), at the top of the Inbox. */
.ra-card{border:1px solid var(--ui-line,#e3e3e3);border-radius:12px;padding:16px;margin:0 0 20px;background:var(--ui-card,transparent)}
.ra-title{font-size:18px;margin:0 0 6px}
.ra-sub{font-size:14px;margin:14px 0 6px}
.ra-qr{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin:8px 0}
.ra-text{width:100%;box-sizing:border-box;font:inherit;font-size:14px;padding:8px;border:1px solid var(--ui-line,#e3e3e3);border-radius:8px;margin:0 0 6px;resize:vertical}
.ra-paste label{display:block;font-size:13px;margin:8px 0 4px}
