/* Queue — Apple Light / Apple Dark.
   Token values mirror the Figma "Queue" file modes "Apple Light" and "Apple Dark". */

:root {
  --bg-app: #F5F5F7; --bg-sidebar: #FBFBFD; --logo-tile: #C6F432; --logo-play: #1D1D1F; --logo-word: #1D1D1F;
  --surface-1: #FFFFFF; --surface-2: #F5F5F7; --surface-3: #E8E8ED; --surface-hover: #EDEDF0;
  --border-subtle: #E5E5EA; --border-default: #D2D2D7; --border-strong: #AEAEB2;
  --text-primary: #1D1D1F; --text-secondary: #6E6E73; --text-tertiary: #86868B; --text-on-brand: #FFFFFF;
  --brand: #1D1D1F; --brand-hover: #333336; --brand-subtle: #EDEDF0; --brand-text: #1D1D1F;
  --success: #1F7A36; --success-subtle: #E6F6EA;
  --warning: #B25000; --warning-subtle: #FFF2E2;
  --danger: #D70015; --danger-subtle: #FFEBEC;
  --info: #0066CC; --info-subtle: #E8F1FC;
  --shadow-card: 0 1px 2px rgba(0,0,0,.04);
  --shadow-modal: 0 24px 64px rgba(0,0,0,.18);
  --radius-sm: 8px; --radius-md: 10px; --radius-lg: 14px; --radius-xl: 20px;
  --font: "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  --mono: "Geist Mono", "SF Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-app: #000000; --bg-sidebar: #0E0E0F; --logo-tile: #C6F432; --logo-play: #1D1D1F; --logo-word: #FFFFFF;
    --surface-1: #1C1C1E; --surface-2: #2C2C2E; --surface-3: #3A3A3C; --surface-hover: #48484A;
    --border-subtle: #2C2C2E; --border-default: #38383A; --border-strong: #545458;
    --text-primary: #F5F5F7; --text-secondary: #A1A1A6; --text-tertiary: #6E6E73; --text-on-brand: #000000; --warning: #FF9F0A;
    --brand: #F5F5F7; --brand-hover: #FFFFFF; --brand-subtle: #2C2C2E; --brand-text: #FFFFFF;
    --success: #30D158; --success-subtle: #0F2A17; --warning: #FF9F0A; --warning-subtle: #2E2208;
    --danger: #FF453A; --danger-subtle: #301311; --info: #0A84FF; --info-subtle: #0B2240;
    --shadow-card: none; --shadow-modal: 0 24px 64px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg-app: #000000; --bg-sidebar: #0E0E0F; --logo-tile: #C6F432; --logo-play: #1D1D1F; --logo-word: #FFFFFF;
  --surface-1: #1C1C1E; --surface-2: #2C2C2E; --surface-3: #3A3A3C; --surface-hover: #48484A;
  --border-subtle: #2C2C2E; --border-default: #38383A; --border-strong: #545458;
  --text-primary: #F5F5F7; --text-secondary: #A1A1A6; --text-tertiary: #6E6E73; --text-on-brand: #000000; --warning: #FF9F0A;
  --brand: #F5F5F7; --brand-hover: #FFFFFF; --brand-subtle: #2C2C2E; --brand-text: #FFFFFF;
  --success: #30D158; --success-subtle: #0F2A17; --warning: #FF9F0A; --warning-subtle: #2E2208;
  --danger: #FF453A; --danger-subtle: #301311; --info: #0A84FF; --info-subtle: #0B2240;
  --shadow-card: none; --shadow-modal: 0 24px 64px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/21px var(--font); letter-spacing: -0.05px; color: var(--text-primary); background: var(--bg-app); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.mono { font-family: var(--mono); }
.muted { color: var(--text-secondary); } .faint { color: var(--text-tertiary); }
.hidden { display: none !important; }
.ico { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ico svg { width: 100%; height: 100%; }

/* ---------- Typography ---------- */
.h1 { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.5px; margin: 0; }
.h2 { font-size: 18px; line-height: 26px; font-weight: 600; letter-spacing: -0.3px; margin: 0; }
.h3 { font-size: 15px; line-height: 22px; font-weight: 600; letter-spacing: -0.15px; margin: 0; }
.small { font-size: 12.5px; line-height: 18px; }
.label { font: 500 11px/14px var(--mono); letter-spacing: .5px; text-transform: uppercase; color: var(--text-tertiary); }
.data { font: 500 28px/34px var(--mono); letter-spacing: -1px; }
.display { font-size: 34px; line-height: 40px; font-weight: 600; letter-spacing: -0.9px; }

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; height: 100vh; }
.sidebar { display: flex; flex-direction: column; gap: 14px; padding: 20px 16px; background: var(--bg-sidebar); border-right: 1px solid var(--border-subtle); overflow-y: auto; }
.logo { display: flex; align-items: center; gap: 9px; padding: 4px 6px; }
.brand-row { display: flex; align-items: center; gap: 6px; }
.brand-row .logo { flex: 1; min-width: 0; }
.theme-btn { width: 32px; height: 32px; flex: none; border-radius: 9px; border: 1px solid var(--border-subtle); background: var(--surface-1); color: var(--text-secondary); display: grid; place-items: center; cursor: pointer; padding: 0; }
.theme-btn:hover { color: var(--text-primary); background: var(--surface-hover); }
.theme-btn svg { width: 16px; height: 16px; }
.logo-mark { width: 26px; height: 26px; display: block; flex: none; } /* primary logo: the lime Q; lettering ink on light, white on dark (brand/README.md) */
.logo-mark svg { display: block; width: 26px; height: 26px; }
.logo-mark .tile { fill: var(--logo-tile); } .logo-mark .play { fill: var(--logo-play); stroke: var(--logo-play); }
.logo .logo-word { color: var(--logo-word); }
.logo-word { font-size: 18px; font-weight: 600; letter-spacing: -0.6px; }
.account { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-1); border: 1px solid var(--border-subtle); }
.avatar { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 600 12px var(--font); color: var(--text-on-brand); background: var(--brand); }
.account .who { min-width: 0; flex: 1; }
.account .who b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: var(--text-tertiary); flex: none; }
.dot.ok { background: var(--success); } .dot.warn { background: var(--warning); } .dot.bad { background: var(--danger); }
.nav-label { padding: 6px 10px 0; } .nav-label { font: 500 11px/14px var(--mono); letter-spacing: .5px; text-transform: uppercase; color: var(--text-tertiary); }
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: -8px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--text-secondary); }
.nav a:hover { background: var(--surface-hover); color: var(--text-primary); }
.nav a.active { background: var(--surface-1); color: var(--text-primary); font-weight: 500; box-shadow: 0 0 0 1px var(--border-subtle) inset; }
.nav a .count { margin-left: auto; font: 500 11.5px var(--mono); padding: 0 7px; border-radius: 999px; background: var(--brand); color: var(--text-on-brand); }
.spacer { flex: 1; }
.heartbeat { padding: 14px; border-radius: 12px; background: var(--surface-1); border: 1px solid var(--border-subtle); display: flex; flex-direction: column; gap: 8px; }
.heartbeat #nextCheck { font-size: 11px; white-space: nowrap; }
.heartbeat .row { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.bar { height: 4px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 18px 28px; border-bottom: 1px solid var(--border-subtle); background: color-mix(in srgb, var(--bg-app) 85%, transparent); backdrop-filter: saturate(180%) blur(20px); }
.topbar .title { flex: 1; min-width: 0; }
.content { flex: 1; overflow-y: auto; padding: 24px 28px 40px; outline: none; }

/* ---------- Controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 15px; border-radius: 999px; border: 1px solid transparent; background: transparent; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .15s, transform .05s; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--brand); color: var(--text-on-brand); }
.btn.primary:hover { background: var(--brand-hover); }
.btn.secondary { background: var(--surface-1); border-color: var(--border-default); }
.btn.secondary:hover { background: var(--surface-hover); }
.btn.ghost { color: var(--text-secondary); padding: 6px 10px; }
.btn.ghost:hover { color: var(--text-primary); background: var(--surface-hover); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 5px 11px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface-3); }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 8px; color: var(--text-secondary); cursor: pointer; }
.seg button.on { background: var(--surface-1); color: var(--text-primary); font-weight: 500; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--text-secondary); }
.input, select.input, textarea.input { width: 100%; padding: 9px 12px; border-radius: var(--radius-md); border: 1px solid var(--border-default); background: var(--surface-1); outline: none; }
.input:focus { border-color: var(--text-secondary); box-shadow: 0 0 0 3px var(--surface-3); }
textarea.input { min-height: 112px; resize: vertical; line-height: 21px; }
.toggle { width: 38px; height: 22px; border-radius: 999px; background: var(--surface-3); position: relative; flex: none; border: 0; cursor: pointer; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.toggle.on { background: var(--brand); } .toggle.on::after { left: 18px; background: var(--text-on-brand); }
.toggle:disabled { opacity: .5; cursor: default; }

/* ---------- Surfaces ---------- */
.card { background: var(--surface-1); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-card); }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head .h3 { flex: 1; }
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.inset { background: var(--surface-2); border-radius: var(--radius-md); padding: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.divider { border-top: 1px solid var(--border-subtle); }

/* ---------- Pills & badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 500; white-space: nowrap; background: var(--surface-3); color: var(--text-secondary); }
.pill.ready { background: var(--brand-subtle); color: var(--brand-text); }
.pill.sending { background: var(--info-subtle); color: var(--info); }
.pill.posted { background: var(--success-subtle); color: var(--success); }
.pill.missed, .pill.retrying { background: var(--warning-subtle); color: var(--warning); }
.pill.retrying { box-shadow: 0 0 0 1px var(--warning) inset; }
.pill.failed { background: var(--danger-subtle); color: var(--danger); }
.pill.soon { background: var(--surface-2); color: var(--text-tertiary); box-shadow: 0 0 0 1px var(--border-default) inset; }
.chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--border-default); white-space: nowrap; }
.pbadge { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--surface-3); border: 1px solid var(--border-subtle); color: var(--text-primary); flex: none; }
.pbadge svg { width: 55%; height: 55%; }
.pbadge.sm { width: 20px; height: 20px; }
.pstack { display: inline-flex; } .pstack .pbadge + .pbadge { margin-left: -5px; }

/* ---------- Tables / lists ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font: 500 11px/14px var(--mono); letter-spacing: .5px; text-transform: uppercase; color: var(--text-tertiary); padding: 11px 14px; background: var(--surface-2); }
.table td { padding: 11px 14px; border-top: 1px solid var(--border-subtle); vertical-align: middle; }
.table tr.attention td { background: color-mix(in srgb, var(--warning-subtle) 45%, transparent); }
.thumb { width: 30px; height: 53px; border-radius: 6px; object-fit: cover; background: var(--surface-3); flex: none; display: block; }
.post-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.post-cell .cap { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 360px; }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 16px; }
.tabs button { border: 0; background: none; padding: 0 0 10px; color: var(--text-secondary); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--text-primary); font-weight: 500; border-color: var(--text-primary); }
.tabs .n { font: 500 11.5px var(--mono); padding: 0 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-secondary); }
.tabs .n.hot { background: var(--brand); color: var(--text-on-brand); }
.empty { text-align: center; padding: 48px 20px; color: var(--text-secondary); }
.empty .h3 { color: var(--text-primary); margin-bottom: 4px; }

/* ---------- Dashboard ---------- */
.kpi .label { margin-bottom: 4px; }
.kpi .data.warn { color: var(--warning); }
.dash-main { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.upnext-day { padding: 8px 18px; background: var(--surface-2); }
.upnext-row { display: flex; align-items: center; gap: 14px; padding: 11px 18px; border-top: 1px solid var(--border-subtle); }
.upnext-row .time { width: 76px; font-weight: 500; }
.upnext-row .cap { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attn { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--radius-md); background: var(--surface-2); }
.kv { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.kv .k { flex: 1; color: var(--text-secondary); }

/* ---------- Composer ---------- */
.dropzone { border: 1.5px dashed var(--border-strong); border-radius: var(--radius-xl); background: var(--surface-1); padding: 72px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; cursor: pointer; transition: background .15s, border-color .15s; }
.dropzone.over { background: var(--surface-hover); border-color: var(--text-primary); }
.dropzone .bubble { width: 60px; height: 60px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; color: var(--text-secondary); }
.composer { display: grid; grid-template-columns: 290px minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.dest-row { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--border-subtle); }
.dest-row.off { opacity: .5; }
.dest-row .who { flex: 1; min-width: 0; }
.dest-row .who b { font-weight: 500; display: block; }
.counter.over { color: var(--danger); font-weight: 500; }
.spec { display: grid; grid-template-columns: 16px 1fr auto; gap: 4px 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--border-subtle); font-size: 12.5px; }
.spec .g.ok { color: var(--success); } .spec .g.no { color: var(--warning); font-weight: 700; }
.spec .val { font-family: var(--mono); font-size: 12px; text-align: right; }
.verdict { padding: 12px; border-radius: var(--radius-md); background: var(--brand-subtle); }
.verdict.good { background: var(--success-subtle); color: var(--success); }
.issue { font-size: 12.5px; padding: 8px 10px; border-radius: 8px; background: var(--warning-subtle); color: var(--warning); }
.issue.error { background: var(--danger-subtle); color: var(--danger); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.quick button { border: 1px solid var(--border-default); background: var(--surface-1); border-radius: 999px; padding: 2px 10px; font-size: 12.5px; cursor: pointer; }
.quick button:hover { background: var(--surface-hover); }

/* ---------- Platform preview (phone) ---------- */
.ptabs { display: flex; gap: 6px; }
.ptabs button { width: 36px; height: 34px; border-radius: 9px; border: 1px solid var(--border-subtle); background: var(--surface-1); color: var(--text-primary); display: grid; place-items: center; cursor: pointer; }
.ptabs button svg { width: 16px; height: 16px; }
.ptabs button.on { background: var(--surface-hover); border-color: var(--border-strong); }
.phone { position: relative; width: 256px; height: 455px; border-radius: 28px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--border-strong), 0 18px 40px rgba(0,0,0,.18); font-family: "Inter", -apple-system, sans-serif; color: #fff; }
.phone video, .phone .vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #111; }
.phone .shade-b { position: absolute; left: 0; right: 0; bottom: 0; height: 230px; background: linear-gradient(to bottom, transparent, rgba(0,0,0,.65)); pointer-events: none; }
.phone .shade-t { position: absolute; left: 0; right: 0; top: 0; height: 90px; background: linear-gradient(to bottom, rgba(0,0,0,.4), transparent); pointer-events: none; }
.phone .ui { position: absolute; inset: 0; pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.phone .ui .abs { position: absolute; }
.phone .ui svg { width: 24px; height: 24px; display: block; }
.phone .rail { position: absolute; right: 10px; display: flex; flex-direction: column; align-items: center; gap: 13px; font-size: 10.5px; font-weight: 600; }
.phone .rail > div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.phone .capblock { position: absolute; left: 12px; width: 190px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; line-height: 1.3; }
.phone .urow { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; }
.phone .av { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #8e8e93, #3a3a3c); color: #fff; display: grid; place-items: center; font-size: 10px; font-weight: 600; flex: none; }
.phone .follow { border: 1px solid #fff; border-radius: 7px; padding: 1px 8px; font-size: 11px; }
.phone .sub { background: #fff; color: #0f0f0f; border-radius: 999px; padding: 2px 9px; font-size: 10.5px; text-shadow: none; }
.phone .music { display: flex; align-items: center; gap: 5px; font-size: 11.5px; }
.phone .music svg { width: 12px; height: 12px; }
.phone .pnav { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 16px; background: #000; text-shadow: none; }
.phone .pnav > div { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 8.5px; font-weight: 500; }
.phone .pnav svg { width: 20px; height: 20px; }
.phone.light { background: #F4F2EE; color: #191919; }
.phone.light .ui { text-shadow: none; }
.preview-toggle { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 500; color: var(--text-secondary); cursor: pointer; width: fit-content; }
.phone.clean { background: #000; }
.safe { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.safe i { position: absolute; background: rgba(255, 59, 48, .28); }
.safe-box { position: absolute; border: 1.5px dashed rgba(255,255,255,.85); border-radius: 4px; }
.safe-box span { position: absolute; top: 4px; left: 6px; font: 600 9.5px/14px var(--font); letter-spacing: .3px; text-transform: uppercase; color: #fff; background: rgba(0,0,0,.45); padding: 0 5px; border-radius: 3px; }
.preview-note { font-size: 12px; line-height: 17px; color: var(--text-tertiary); }

/* ---------- Calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-1); }
.cal .dow { padding: 8px 10px; background: var(--surface-2); font: 500 11px/14px var(--mono); text-transform: uppercase; letter-spacing: .5px; color: var(--text-tertiary); }
.cal .day { min-height: 124px; padding: 8px; border-top: 1px solid var(--border-subtle); border-left: 1px solid var(--border-subtle); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal .day:nth-child(7n+1) { border-left: 0; }
.cal .day.out { background: var(--surface-2); }
.cal .num { font-size: 12.5px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal .out .num { color: var(--text-tertiary); }
.cal .today .num { background: var(--brand); color: var(--text-on-brand); font-weight: 600; }
.cal .ev { display: flex; gap: 6px; align-items: center; padding: 3px 6px; border-radius: 6px; font-size: 12px; cursor: pointer; background: var(--surface-3); min-width: 0; border: 0; text-align: left; }
.cal .ev b { font-weight: 600; flex: none; }
.cal .ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); }
.cal .ev.ready { background: var(--brand-subtle); } .cal .ev.posted { background: var(--success-subtle); } .cal .ev.posted b { color: var(--success); }
.cal .ev.missed, .cal .ev.retrying { background: var(--warning-subtle); } .cal .ev.missed b { color: var(--warning); }
.cal .ev.failed { background: var(--danger-subtle); } .cal .ev.failed b { color: var(--danger); }
.cal .ev.sending { background: var(--info-subtle); } .cal .ev.sending b { color: var(--info); }

/* ---------- Library ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px; }
.media-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.media-card .frame { position: relative; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: var(--surface-3); }
.media-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-card .frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-card .dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.65); color: #fff; border-radius: 4px; padding: 0 5px; font: 500 11px/18px var(--mono); }
.media-card b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.split-bar { display: flex; gap: 3px; height: 8px; }
.split-bar > span { border-radius: 3px; }

/* ---------- Accounts ---------- */
.platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.platform { display: flex; flex-direction: column; gap: 10px; }
.platform .chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Settings ---------- */
.set-row { display: flex; align-items: center; gap: 24px; padding: 13px 0; border-top: 1px solid var(--border-subtle); }
.set-row:first-of-type { border-top: 0; }
.set-row .txt { flex: 1; }
.set-row .txt b { display: block; font-weight: 500; }
.set-row .val { font-family: var(--mono); font-size: 12.5px; color: var(--text-secondary); }
code.cmd { font: 12px var(--mono); background: var(--surface-2); border: 1px solid var(--border-subtle); padding: 2px 6px; border-radius: 6px; }

/* ---------- Shared: search, menus, links ---------- */
.search { position: relative; display: inline-flex; align-items: center; }
.search .ico { position: absolute; left: 11px; width: 15px; height: 15px; color: var(--text-tertiary); pointer-events: none; }
.search .input { width: 220px; padding: 7px 12px 7px 32px; border-radius: 999px; }
select.input.select-sm { width: auto; padding: 7px 30px 7px 14px; border-radius: 999px; appearance: none; background: var(--surface-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2386868B' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; cursor: pointer; font-weight: 500; }
.link { color: var(--text-secondary); font-weight: 500; }
.link:hover { color: var(--text-primary); }
.clickable { cursor: pointer; }
.upnext-row.clickable:hover { background: var(--surface-hover); }
.btn.icon-only { width: 30px; height: 30px; padding: 0; }
.btn.icon-only svg { width: 18px; height: 18px; }
.menu { position: fixed; z-index: 70; min-width: 190px; padding: 5px; border-radius: 12px; background: var(--surface-1); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-modal); display: flex; flex-direction: column; animation: pop .12s ease-out; }
.menu button { border: 0; background: none; text-align: left; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.menu button:hover { background: var(--surface-hover); }
.menu button.danger { color: var(--danger); }

/* ---------- Queue table ---------- */
.check { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; margin: 0; display: block; }
.check:disabled { opacity: .3; cursor: default; }
.table th.cb, .table td.cb { width: 44px; padding-right: 0; }
.table tr.selected td { background: var(--surface-2); }
.bulkbar { display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 14px; margin-bottom: 12px; border-radius: var(--radius-md); background: var(--surface-1); border: 1px solid var(--border-strong); }
.bulkbar b { font-weight: 500; margin-right: 8px; }

/* ---------- Calendar extras ---------- */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.cal .day.past .num { color: var(--text-tertiary); }
.cal .day.drop, .cal .wcol.drop { background: var(--surface-hover); box-shadow: 0 0 0 2px var(--text-primary) inset; }
.cal .ev[draggable="true"] { cursor: grab; }
.more-link { border: 0; background: none; padding: 0 4px; text-align: left; color: var(--text-secondary); cursor: pointer; }
.more-link:hover { color: var(--text-primary); }
.cal.week { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.wcol { min-height: 520px; padding: 10px 8px; border-left: 1px solid var(--border-subtle); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wcol:first-child { border-left: 0; }
.wcol.past { background: var(--surface-2); }
.whead { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 6px; }
.whead .num { font-size: 13px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-weight: 500; }
.wcol.today .whead .num { background: var(--brand); color: var(--text-on-brand); }
.wcard { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 10px; border: 1px solid var(--border-subtle); background: var(--surface-1); text-align: left; cursor: pointer; min-width: 0; box-shadow: var(--shadow-card); }
.wcard:hover { border-color: var(--border-strong); }
.wcard b { font-size: 12.5px; font-weight: 600; }
.wthumb { width: 100%; aspect-ratio: 9 / 16; max-height: 150px; border-radius: 6px; object-fit: cover; background: var(--surface-3); display: block; }
.wcap { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--text-secondary); }
.wempty { text-align: center; padding-top: 24px; }
.sdot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-tertiary); flex: none; }
.sdot.ready { background: var(--text-primary); } .sdot.sending { background: var(--info); } .sdot.posted { background: var(--success); }
.sdot.missed, .sdot.retrying { background: var(--warning); } .sdot.failed { background: var(--danger); }
.draft { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: var(--surface-2); cursor: grab; }
.draft:hover { background: var(--surface-hover); }
.draft:active { cursor: grabbing; }
.draft .thumb { width: 26px; height: 46px; }
.draft b { display: block; font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft .grip { width: 14px; height: 14px; color: var(--text-tertiary); flex: none; display: inline-flex; }

/* ---------- Library extras ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 16px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border-default); background: var(--surface-1); cursor: pointer; font-size: 13px; }
.fchip span { color: var(--text-tertiary); font: 500 11.5px var(--mono); }
.fchip:hover { background: var(--surface-hover); }
.fchip.on { background: var(--brand); border-color: var(--brand); color: var(--text-on-brand); font-weight: 500; }
.fchip.on span { color: inherit; opacity: .7; }
.media-card.clickable { cursor: pointer; }
.media-card.clickable:hover .frame { box-shadow: 0 0 0 2px var(--text-primary); }
.media-card .hover-cta { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.92); color: #1D1D1F; font-weight: 500; font-size: 13px; opacity: 0; transition: opacity .15s; }
.media-card.clickable:hover .hover-cta, .media-card.clickable:focus-visible .hover-cta { opacity: 1; }
.pick-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 14px; }
.pick { border: 0; background: none; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 4px; cursor: pointer; min-width: 0; }
.pick video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; background: var(--surface-3); }
.pick:hover video { box-shadow: 0 0 0 2px var(--text-primary); }
.pick .small:first-of-type { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Accounts extras ---------- */
.platform-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border-subtle); }
.check-row:first-child { border-top: 0; }
.check-row .g { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-3); color: var(--text-tertiary); flex: none; }
.check-row .g.ok { background: var(--success-subtle); color: var(--success); }
.check-row .g.no { background: var(--warning-subtle); color: var(--warning); }

/* ---------- Settings extras ---------- */
.settings-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: start; max-width: 980px; }
.subnav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; }
.subnav a { padding: 7px 12px; border-radius: 9px; color: var(--text-secondary); }
.subnav a:hover { background: var(--surface-hover); color: var(--text-primary); }
.subnav a.on { background: var(--surface-3); color: var(--text-primary); font-weight: 500; }
.chip.strong { background: var(--brand); color: var(--text-on-brand); border-color: var(--brand); }

/* ---------- Demo + onboarding shell ---------- */
.demo-tag { margin-left: auto; font: 500 10.5px/16px var(--mono); letter-spacing: .4px; text-transform: uppercase; padding: 1px 7px; border-radius: 999px; background: var(--info-subtle); color: var(--info); }
img.avatar { object-fit: cover; background: var(--surface-3); }
.account.clickable { cursor: pointer; } .account.clickable:hover { border-color: var(--border-strong); }
.app.bare { grid-template-columns: 1fr; }
.app.bare .sidebar, .app.bare .topbar:empty { display: none; }
.app.bare .content { padding: 0; }

/* ---------- Dashboard quality chart ---------- */
.qbars { position: relative; display: flex; align-items: flex-end; gap: 10px; height: 120px; padding-top: 8px; }
.qbar { flex: 1; max-width: 46px; border: 0; border-radius: 6px 6px 3px 3px; background: var(--surface-3); cursor: pointer; position: relative; padding: 0; transition: background .15s; }
.qbar:hover { background: var(--border-strong); }
.qbar.last { background: var(--brand); }
.qbar span { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font: 500 10.5px var(--mono); color: var(--text-tertiary); opacity: 0; transition: opacity .15s; }
.qbar:hover span, .qbar.last span { opacity: 1; }
.qbase { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--warning); pointer-events: none; }

/* ---------- Post detail ---------- */
.detail { display: grid; grid-template-columns: 250px minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
/* Post detail: the post plays full screen in the same iPhone frame as the composer preview */
.detail-device { display: flex; justify-content: center; }
.detail-device .detail-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-device .carousel { position: absolute; inset: 0; }
.detail-device .phone.clean .carousel .cnt { display: inline-flex; top: 34px; }
.detail-device .phone.clean .carousel .dots { display: flex; bottom: 20px; }
.timeline { display: flex; flex-direction: column; }
.tl { display: flex; gap: 14px; padding-bottom: 16px; position: relative; }
.tl:not(:last-child)::after { content: ""; position: absolute; left: 4px; top: 16px; bottom: 0; width: 1px; background: var(--border-default); }
.tl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); margin-top: 6px; flex: none; }
.tl-dot.warn { background: var(--warning); }
.scale { display: flex; flex-direction: column; gap: 6px; }
.scale .bar { height: 6px; }
.scale-ticks { display: flex; justify-content: space-between; font-size: 11px; line-height: 14px; color: var(--text-tertiary); }
.scale-ticks span.on { color: var(--text-primary); font-weight: 500; }
.attn-card { background: var(--warning-subtle); border-color: transparent; }
.attn-card.bad { background: var(--danger-subtle); }
.carousel { position: relative; width: 100%; height: 100%; cursor: pointer; }
.carousel > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel > img.contain { object-fit: contain; position: relative; }
.carousel .cnt { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; justify-content: center; height: 20px; padding: 0 8px; background: rgba(18,18,18,.7); color: #fff; border-radius: 999px; font: 600 11px/1 var(--font); font-variant-numeric: tabular-nums; }
.carousel .dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 4px; }
.carousel .dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.5); }
.carousel .dots i.on { background: #fff; }

/* ---------- Quality Lab ---------- */
.lab { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.lab-pick { display: flex; align-items: flex-end; gap: 12px; }
.lab-pick .field { flex: 1; }
.lab-stage.side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; justify-items: center; }
.lab-col { display: flex; flex-direction: column; gap: 8px; align-items: center; width: 100%; max-width: 230px; }
.lab-col.wide { max-width: 300px; margin: 0 auto; align-items: stretch; }
.lab-cap { text-align: center; }
.lab-frame { position: relative; width: 100%; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #000; }
.lab-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lab-stage.slider .stack-frame video:last-of-type { clip-path: inset(0 0 0 var(--cut, 50%)); }
.lab-split { position: absolute; top: 0; bottom: 0; left: var(--cut, 50%); width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.3); pointer-events: none; }
.lab-stage.diff .stack-frame video:last-of-type { mix-blend-mode: difference; }
.lab-stage.diff .stack-frame { filter: brightness(7) contrast(1.6) saturate(0); }
.lab-range { width: 100%; accent-color: var(--brand); }
.lab-chart { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 46px; cursor: pointer; }
.lab-chart i { flex: 1; background: var(--surface-3); border-radius: 2px 2px 0 0; min-width: 1px; }
.lab-chart i.worst { background: var(--warning); }
.lab-chart:hover i { background: var(--border-default); } .lab-chart:hover i.worst { background: var(--warning); }
.lab-play { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text-primary); left: 0; pointer-events: none; }
.past-cmp { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 0 -10px; border: 0; background: none; border-radius: 8px; text-align: left; cursor: pointer; }
.past-cmp:hover { background: var(--surface-hover); } .past-cmp.on { background: var(--surface-2); font-weight: 500; }
.bar.soft > span { background: var(--border-strong); }

/* ---------- Welcome + setup ---------- */
.welcome { display: grid; grid-template-columns: 57% 43%; min-height: 100vh; }
.wel-left { display: flex; flex-direction: column; justify-content: center; gap: 24px; padding: 64px 9%; max-width: 820px; }
.wel-h { font-size: 34px; line-height: 40px; font-weight: 600; letter-spacing: -1px; margin: 0; }
.wel-step { display: flex; gap: 14px; align-items: flex-start; }
.wel-step b { font-weight: 500; }
.wel-step .n { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-default); display: grid; place-items: center; font-size: 13px; flex: none; }
.wel-step.on .n { background: var(--brand); color: var(--text-on-brand); border-color: var(--brand); }
.wel-right { background: var(--surface-3); display: flex; flex-direction: column; justify-content: center; gap: 24px; padding: 48px; }
.wel-compare { display: flex; justify-content: center; gap: 24px; }
.wel-frame { width: 180px; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #222; }
.wel-frame img, .wel-frame .poster-fallback { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-fallback { background: linear-gradient(160deg, #6e6e73, #1d1d1f); }
.wel-frame.soft img, .wel-frame.soft .poster-fallback { filter: blur(1.6px) saturate(.85) contrast(.92); transform: scale(1.03); }
.wel-score { font-size: 18px; font-weight: 600; } .wel-score.bad { color: var(--danger); }
.setup { max-width: 760px; margin: 0 auto; padding: 48px 24px; display: flex; flex-direction: column; gap: 28px; }
.stepper { display: flex; justify-content: center; align-items: center; gap: 14px; }
.stepper .st { display: flex; align-items: center; gap: 10px; color: var(--text-tertiary); }
.stepper .st + .st::before { content: ""; width: 44px; height: 1px; background: var(--border-default); margin-right: 4px; }
.stepper .n { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border-default); display: grid; place-items: center; font-size: 13px; }
.stepper .st.on, .stepper .st.done { color: var(--text-primary); font-weight: 500; }
.stepper .st.on .n, .stepper .st.done .n { background: var(--brand); border-color: var(--brand); color: var(--text-on-brand); }
.check-row.big { padding: 16px 20px; gap: 16px; }
.g2 { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; border: 1.5px solid var(--border-default); color: var(--text-tertiary); }
.g2.ok { background: var(--brand); border-color: var(--brand); color: var(--text-on-brand); }
.g2.no { border-color: var(--danger); color: var(--danger); } .g2.warn { border-color: var(--warning); color: var(--warning); }
.steps-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }

/* ---------- Composer extras ---------- */
.modal.wide { width: min(820px, calc(100vw - 40px)); }
.small-seg button { padding: 3px 9px; font-size: 12.5px; }
.quick button.on { background: var(--brand); color: var(--text-on-brand); border-color: var(--brand); }
.tv-row { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border-subtle); }
.boxed { border: 1.5px solid var(--text-primary); border-radius: var(--radius-md); padding: 10px 12px; }
.qdetails summary { cursor: pointer; color: var(--text-secondary); padding: 4px 0; }
.qdetails[open] summary { margin-bottom: 10px; }
.qdetails .card { padding: 0; border: 0; box-shadow: none; }
.chip.warn { color: var(--warning); border-color: var(--warning); }
.strip { display: flex; gap: 10px; flex-wrap: wrap; }
.tile { position: relative; width: 64px; height: 84px; border-radius: 8px; overflow: hidden; background: var(--surface-3); cursor: grab; flex: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .num { position: absolute; top: 4px; left: 4px; background: rgba(0,0,0,.6); color: #fff; border-radius: 4px; padding: 0 5px; font: 500 10px/16px var(--mono); }
.tile .x { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s; }
.tile:hover .x { opacity: 1; }
.tile.add { border: 1.5px dashed var(--border-strong); background: transparent; font-size: 22px; color: var(--text-tertiary); cursor: pointer; display: grid; place-items: center; }
.tile.add:hover { color: var(--text-primary); border-color: var(--text-primary); }
.photo-drop.over { box-shadow: 0 0 0 2px var(--text-primary); }
.tile.busy { display: grid; place-items: center; font: 500 10px var(--mono); color: var(--text-tertiary); cursor: default; }
.photo-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; max-height: 60vh; overflow: auto; }
.photo-pick .ph { position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; border: 0; padding: 0; cursor: pointer; background: var(--surface-3); }
.photo-pick .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-pick .ph.on { box-shadow: 0 0 0 3px var(--text-primary); }
.photo-pick .num { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: var(--text-on-brand); display: grid; place-items: center; font: 600 11px var(--font); }
.ph-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #aaa; font-size: 13px; }
.ph-feed { position: absolute; inset: 0; padding-top: 22px; background: inherit; }
.phone.light .ph-feed { background: #fff; }
.ph-feed .av, .story-head .av { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.blurfill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(18px) brightness(.7); transform: scale(1.2); }
.story-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-bars { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 3px; }
.story-bars i { flex: 1; height: 2.5px; border-radius: 2px; background: rgba(255,255,255,.4); }
.story-bars i.on { background: #fff; }
.story-head { position: absolute; top: 22px; left: 12px; display: flex; align-items: center; gap: 8px; color: #fff; font-size: 13px; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.faint-w { color: rgba(255,255,255,.7); font-size: 12px; }
.phone { cursor: default; }

/* ---------- Benchmark ---------- */
.bench-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.claim.ready { box-shadow: 0 0 0 1.5px var(--success) inset; }
.claim-text { font-size: 17px; line-height: 25px; font-weight: 500; letter-spacing: -0.2px; }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 44px; gap: 12px; align-items: center; }
.hbar-label { font-size: 13px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-label.strong { color: var(--text-primary); font-weight: 600; }
.hbar-track { position: relative; height: 14px; background: linear-gradient(to right, transparent calc(70% - 1px), var(--border-subtle) calc(70% - 1px), var(--border-subtle) 70%, transparent 70%, transparent calc(85% - 1px), var(--border-subtle) calc(85% - 1px), var(--border-subtle) 85%, transparent 85%); }
.hbar { height: 100%; border-radius: 0 4px 4px 0; background: var(--border-strong); transition: filter .15s; }
.hbar.us { background: var(--brand); }
.hbar-row:hover .hbar { filter: brightness(.9); }
.hbar-val { font-size: 12.5px; text-align: right; color: var(--text-primary); }
.hbar-row.axis { margin-top: -2px; }
.hbar-ticks { position: relative; height: 16px; }
.hbar-ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.hbar-ticks span:first-child { transform: none; } .hbar-ticks span:last-child { transform: translateX(-100%); }
.table.bench th { vertical-align: bottom; }
.table.bench td { white-space: nowrap; }
.table.bench tr.us td { background: var(--surface-2); }
.bench-clip { display: flex; flex-direction: column; gap: 4px; width: 92px; text-transform: none; letter-spacing: 0; font-family: var(--font); }
.bench-clip video { width: 40px; height: 64px; border-radius: 6px; object-fit: cover; background: var(--surface-3); }
.bench-clip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--text-secondary); }
.table td.strong, .strong { font-weight: 600; }
.cell { position: relative; }
.cell.best .mono { font-weight: 700; }
.cell:hover { background: var(--surface-hover); }
.cell-x { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 18px; height: 18px; border-radius: 50%; border: 0; background: var(--surface-3); color: var(--text-secondary); cursor: pointer; opacity: 0; font-size: 12px; line-height: 1; }
.cell:hover .cell-x { opacity: 1; }
.cell-add { border: 1px dashed var(--border-strong); background: none; border-radius: 999px; padding: 2px 10px; font-size: 12px; color: var(--text-tertiary); cursor: pointer; }
.cell-add:hover { color: var(--text-primary); border-color: var(--text-primary); }
pre.method { margin: 0; white-space: pre-wrap; font: 12px/18px var(--mono); color: var(--text-secondary); background: var(--surface-2); border-radius: var(--radius-md); padding: 12px; max-height: 420px; overflow: auto; }
.ig-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; max-height: 320px; overflow: auto; }
.ig-item { border: 0; background: none; padding: 4px; border-radius: 10px; display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer; min-width: 0; }
.ig-item img, .ig-ph { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; background: var(--surface-3); }
.ig-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-item.on { box-shadow: 0 0 0 2px var(--text-primary); }

.time-chip { padding: 0; overflow: hidden; }
.time-chip button { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.time-chip .tc-main { padding: 2px 4px 2px 10px; }
.time-chip .tc-main:only-child { padding-right: 10px; }
.time-chip .tc-x { padding: 2px 8px 2px 4px; opacity: .55; }
.time-chip .tc-x:hover { opacity: 1; }
.add-chip { cursor: pointer; border-style: dashed; color: var(--text-secondary); }

.table-scroll { overflow-x: auto; }
.queue-table td:nth-child(5), .queue-table td:last-child { white-space: nowrap; }
@media (max-width: 1240px) { .queue-table .post-cell .cap { max-width: 220px; } .queue-table td, .queue-table th { padding-left: 9px; padding-right: 9px; } }

.connect-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; max-width: 1080px; }
.cstep { display: flex; gap: 14px; align-items: flex-start; }
.cstep b { font-weight: 500; }
.cstep .n { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: var(--text-on-brand); display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; }
@media (max-width: 1180px) { .connect-grid { grid-template-columns: 1fr; } }

/* ---------- Keyboard & motion ---------- */
:where(button, a, [role="button"], [tabindex], select, summary):focus-visible { outline: 2px solid var(--info); outline-offset: 2px; border-radius: 8px; }
.input:focus-visible { outline: none; }
.modal:focus { outline: none; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 80; padding: 8px 14px; border-radius: 999px; background: var(--brand); color: var(--text-on-brand); font-weight: 500; }
.skip:focus { left: 12px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ---------- Modals & toasts ---------- */
.modal-root:empty { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: grid; place-items: center; z-index: 50; animation: fade .15s ease-out; }
.modal { width: min(560px, calc(100vw - 40px)); max-height: calc(100vh - 80px); overflow: auto; background: var(--surface-1); border-radius: var(--radius-xl); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-modal); padding: 24px; display: flex; flex-direction: column; gap: 16px; animation: pop .18s ease-out; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; align-items: center; }
.option { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; border: 1px solid var(--border-default); cursor: pointer; }
.option.on { border-color: var(--text-primary); box-shadow: 0 0 0 1px var(--text-primary) inset; }
.radio { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-strong); flex: none; margin-top: 2px; }
.option.on .radio { border: 5px solid var(--text-primary); }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step .mark { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border-default); display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 700; }
.step.done .mark { background: var(--brand); border-color: var(--brand); color: var(--text-on-brand); }
.step.active .mark { border: 2px solid var(--brand); border-right-color: transparent; animation: spin .8s linear infinite; }
.step.next { color: var(--text-tertiary); }
.log { display: flex; flex-direction: column; }
.log .ent { display: grid; grid-template-columns: 10px 1fr; gap: 12px; padding-bottom: 14px; position: relative; }
.log .ent::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); margin-top: 6px; }
.log .ent:not(:last-child)::after { content: ""; position: absolute; left: 4px; top: 18px; bottom: 0; width: 1px; background: var(--border-default); }
.toast-root { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--brand); color: var(--text-on-brand); padding: 10px 16px; border-radius: 999px; box-shadow: var(--shadow-modal); font-weight: 500; animation: pop .18s ease-out; }
.toast.bad { background: var(--danger); color: #fff; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1180px) {
  .bench-grid { grid-template-columns: 1fr; }
  .detail { grid-template-columns: 220px minmax(0, 1fr); }
  .detail > :last-child { grid-column: 1 / -1; }
  .lab { grid-template-columns: 1fr; }
  .welcome { grid-template-columns: 1fr; }
  .cal-layout { grid-template-columns: 1fr; }
  .search .input { width: 170px; }
  .composer { grid-template-columns: 290px minmax(0, 1fr); }
  .composer > :last-child { grid-column: 1 / -1; }
  .dash-main { grid-template-columns: 1fr; }
  .platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.phone.clean .carousel .cnt, .phone.clean .carousel .dots { display: none; }

/* ---------------------------------------------------------------- team (demo + hosted) */
/* A hairline ring so every picture keeps a visible edge on white and on black (3:1+ in both themes). */
:root { --avatar-ring: rgba(0, 0, 0, 0.45); }
:root[data-theme="dark"] { --avatar-ring: rgba(255, 255, 255, 0.4); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --avatar-ring: rgba(255, 255, 255, 0.4); } }
.av { border-radius: 50%; flex: none; object-fit: cover; background: var(--surface-3); box-shadow: 0 0 0 1px var(--avatar-ring); }
.av-init { display: inline-grid; place-items: center; font-weight: 600; color: var(--text-primary); background: var(--surface-3); }
.av-xs { width: 18px; height: 18px; font-size: 8.5px; }
.av-sm { width: 24px; height: 24px; font-size: 10px; }
.av-md { width: 34px; height: 34px; font-size: 12.5px; }
.av-stack { display: inline-flex; }
.av-stack .av { box-shadow: 0 0 0 1px var(--avatar-ring), 0 0 0 3px var(--surface-1); }
.av-stack .av + .av { margin-left: -6px; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px 6px 2px; }
.me .who { flex: 1; min-width: 0; }
.me .who .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who b { display: block; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .ico { color: var(--text-tertiary); }
.me .ico:hover { color: var(--text-primary); }
.demo-note { margin-bottom: 10px; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.4; background: var(--surface-1); border: 1px dashed var(--border-strong, var(--border-subtle)); color: var(--text-secondary); }
.demo-note b { display: block; color: var(--text-primary); font-weight: 600; margin-bottom: 2px; }
.act-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.act-row.clickable:hover b { text-decoration: underline; }
.team-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border-subtle); }
.team-row .txt { flex: 1; min-width: 0; }
.team-row .txt b { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.you-tag { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-primary); }
.role-tag { font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border-subtle); color: var(--text-secondary); white-space: nowrap; }
.warn-text { color: var(--warning); font-weight: 500; }
.roles { border-top: 1px solid var(--border-subtle); padding-top: 10px; }
.roles summary { cursor: pointer; margin-bottom: 6px; }
.roles .kv .role-tag { width: 92px; text-align: center; }
.brand-chip { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.account .avatar.av { width: 30px; height: 30px; }

/* ---------------------------------------------------------------- official platform logos (public/brand)
   Full colour, uniform scale, in a soft grey circle, like the marketing site. TikTok, X and Threads
   swap to the brand's own dark-background file in dark mode. */
.plogo { width: 100%; height: 100%; object-fit: contain; display: block; }
.on-dark { display: none !important; }
:root[data-theme="dark"] .on-light { display: none !important; }
:root[data-theme="dark"] .on-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .on-light { display: none !important; }
  :root:not([data-theme="light"]) .on-dark { display: block !important; }
}
.pbadge { background: var(--surface-2); border: 0; }
.pbadge .plogo { width: 56%; height: 56%; }
.pstack .pbadge { box-shadow: 0 0 0 2px var(--surface-1); }
.ptabs button .plogo { width: 18px; height: 18px; }
.phone .pnav .plogo { width: 20px; height: 20px; }
.dest-row.off .pbadge .plogo { filter: grayscale(1); opacity: .55; } /* a platform you can't use yet, like the marketing mock */

/* ---------------------------------------------------------------- colour from the marketing site */
.link { color: var(--info); }
.link:hover { color: var(--info); text-decoration: underline; text-underline-offset: 2px; }
/* Delivery pills: a coloured dot says who presses publish (blue: Queue · green: the platform · orange: your drafts) */
.dpill { gap: 6px; }
.dpill .ddot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: currentColor; }
.dpill.queue { background: var(--surface-2); color: var(--text-primary); }
.dpill.queue .ddot { background: var(--info); }
/* The lime highlight: dark ink on lime, the full letter height (marketing's "ORIGINAL FILE") */
:root { --highlight: #C6F432; --highlight-ink: #1D1D1F; }
.hl-label { display: inline-block; font: 600 11px/18px var(--mono); letter-spacing: .5px; text-transform: uppercase; padding: 1px 8px; border-radius: 999px; background: var(--highlight); color: var(--highlight-ink); margin-bottom: 6px; }

/* ---------------------------------------------------------------- phone screen (Queue is a desktop app for now) */
.phone-gate { display: none; }
.pg-inner { max-width: 520px; margin: 0 auto; padding: 28px 20px 44px; display: flex; flex-direction: column; gap: 18px; }
.pg-logo { display: flex; align-items: center; gap: 9px; }
.pg-logo .demo-tag { margin-left: 4px; }
button.demo-tag { border: 0; cursor: pointer; }
button.demo-tag:hover { background: var(--info); color: var(--surface-1); }
button.demo-tag:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }

/* Demo tour: spotlight + step card (the scrim is the spotlight's shadow) */
.tour { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.tour.waiting .tour-card, .tour.waiting .tour-spot { visibility: hidden; }
.tour-block { position: absolute; inset: 0; pointer-events: auto; }
.tour-spot { position: fixed; border-radius: var(--radius-lg); box-shadow: 0 0 0 9999px rgba(0,0,0,.55), 0 0 0 2px var(--highlight); transition: top .2s ease, left .2s ease, width .2s ease, height .2s ease; }
.tour-card { position: fixed; width: 340px; pointer-events: auto; display: flex; flex-direction: column; gap: 8px; padding: 20px 20px 16px; background: var(--surface-1); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); box-shadow: var(--shadow-modal); color: var(--text-primary); transition: top .2s ease, left .2s ease; }
.tour-card .h3 { margin: 0; }
.tour-count { color: var(--text-secondary); }
.tour-body { margin: 0; color: var(--text-secondary); line-height: 1.5; }
.tour-dots { display: flex; gap: 4px; margin-top: 4px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 999px; background: var(--surface-3); }
.tour-dots i.done { background: var(--border-strong); }
.tour-dots i.on { width: 18px; background: var(--brand); }
.tour-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.tour-end { margin-right: auto; padding: 0; border: 0; background: none; color: var(--text-secondary); cursor: pointer; font: inherit; font-size: 13px; }
.tour-end:hover { color: var(--text-primary); text-decoration: underline; }
.tour-end:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 760px) { .tour-card { top: auto !important; left: 12px !important; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; } }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-card { transition: none; } }
.pg-title { font: 700 30px/1.15 var(--font); letter-spacing: -0.6px; margin: 4px 0 0; }
.pg-lede { font-size: 16px; line-height: 1.5; margin: 0; color: var(--text-primary); }
.pg-shots { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 2px 20px 8px; scrollbar-width: none; }
.pg-shots::-webkit-scrollbar { display: none; }
.pg-shots figure { flex: 0 0 86%; scroll-snap-align: center; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.pg-shots img { width: 100%; height: auto; aspect-ratio: 1200 / 781; object-fit: cover; object-position: top left; display: block; border-radius: 12px; border: 1px solid var(--border-default); box-shadow: 0 8px 24px rgba(0, 0, 0, .10); }
.pg-actions { display: flex; flex-direction: column; gap: 10px; }
.pg-actions .btn { width: 100%; min-height: 46px; font-size: 15px; }
.pg-actions .btn.secondary { border-color: var(--border-strong); } /* a visible edge on the page colour */
.pg-foot { margin: 6px 0 0; text-align: center; }

/* ---------------------------------------------------------------- the demo's welcome card */
.modal.welcome-card { width: min(540px, calc(100vw - 40px)); gap: 12px; }
.modal.welcome-card .h2 { margin: 0; }
.modal.welcome-card .hl-label { align-self: flex-start; margin-bottom: 0; }
.welcome-lede { font-size: 15px; line-height: 1.5; margin: 0; }
.tour-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tour-item { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--border-default); background: var(--surface-1); color: inherit; font: inherit; cursor: pointer; }
.tour-item:hover { background: var(--surface-hover); }
.tour-n { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 600 12px var(--mono); background: var(--highlight); color: var(--highlight-ink); }
.tour-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tour-txt b { font-weight: 600; }
.note-link { display: inline-block; margin-top: 6px; padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.welcome-credit { margin: -4px 0 0; padding-top: 12px; border-top: 1px solid var(--border-subtle); text-align: center; }

/* ---------------------------------------------------------------- phone layout (≤760px). Desktop is unchanged:
   the phone bar and tab bar are hidden, and the action wrapper is invisible to layout. */
.tb-actions { display: contents; }
.cal-nav { display: flex; align-items: center; gap: 10px; } /* ‹ month › stay together */
.mbar, .tabbar { display: none; }
@media (max-width: 760px) {
  body { overscroll-behavior: none; }
  .app { display: block; height: 100dvh; }
  .sidebar { display: none; }
  .main { height: 100dvh; }
  .mbar { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 4px; background: var(--bg-app); }
  .mbar .spacer { flex: 1; }
  .m-acct { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 8px 4px 4px; margin-left: -4px; border: 0; background: none; border-radius: 999px; color: var(--text-primary); font: inherit; font-weight: 500; cursor: pointer; min-width: 0; }
  .m-acct-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
  .m-acct .ico svg { width: 16px; height: 16px; }
  .mbar .theme-btn { width: 40px; height: 40px; }
  .mbar .demo-tag { margin-left: 0; padding: 4px 10px; font-size: 11px; }
  .topbar { flex-wrap: wrap; gap: 10px; padding: 2px 16px 12px; background: var(--bg-app); backdrop-filter: none; }
  .topbar .title { flex: 1 0 100%; }
  .topbar .h1 { font-size: 26px; line-height: 32px; letter-spacing: -0.6px; }
  .topbar .title .muted { font-size: 13.5px; line-height: 19px; }
  .tb-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 0 100%; padding: 2px 0; align-items: center; } /* wraps, so no button is cut off at the edge */
  .tb-actions::-webkit-scrollbar { display: none; }
  .tb-actions > * { flex: none; }
  .tb-actions .search { flex: 1 1 auto; min-width: 0; }
  .cal-nav { flex: 1 0 100%; order: 5; justify-content: space-between; } /* its own row: ‹ on the left, month centred, › on the right */
  .cal-nav b { min-width: 0 !important; }
  .tb-actions .search .input { width: 100%; }
  .content { padding: 16px 16px calc(100px + env(safe-area-inset-bottom)); font-size: 14px; }
  .btn { min-height: 40px; }
  .btn.small { min-height: 34px; }
  /* tab bar */
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg-sidebar) 90%, transparent); backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--border-subtle); }
  .tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; border: 0; background: none; color: var(--text-secondary); font: 500 11px/14px var(--font); cursor: pointer; padding: 0; }
  .tab .ico svg { width: 23px; height: 23px; }
  .tab.active { color: var(--text-primary); }
  .tab.active .ico svg { stroke-width: 2.2; }
  .tab .count { position: absolute; top: 3px; left: calc(50% + 7px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: var(--text-on-brand); font: 600 11px/18px var(--mono); }
  .tab-plus { width: 46px; height: 46px; border-radius: 50%; background: var(--brand); color: var(--text-on-brand); display: grid; place-items: center; }
  .tab-plus svg { width: 22px; height: 22px; stroke-width: 2.2; }
  /* sheets */
  .scrim { place-items: end center; }
  .modal { width: 100%; max-width: none; border-radius: 22px 22px 0 0; max-height: 88dvh; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); border-left: 0; border-right: 0; border-bottom: 0; }
  .modal.welcome-card { width: 100%; }
  .modal .foot { flex-wrap: wrap; }
  .modal .foot .btn { flex: 1 1 auto; }
  .modal .foot > a, .modal .foot > .link { flex: 1 0 100% !important; order: -1; }
  .app.bare .mbar, .app.bare ~ .tabbar { display: none; }
  .app.bare .content { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .sheet-list { display: flex; flex-direction: column; border: 1px solid var(--border-subtle); border-radius: 14px; overflow: hidden; }
  .sheet-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border: 0; border-top: 1px solid var(--border-subtle); background: var(--surface-1); color: var(--text-primary); text-align: left; font: inherit; cursor: pointer; }
  .sheet-row:first-child { border-top: 0; }
  .sheet-txt { flex: 1; display: flex; flex-direction: column; }
  .sheet-txt b { font-weight: 500; }
  .menu { max-width: calc(100vw - 24px); }
  /* layouts: one column */
  .grid { gap: 12px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 14px; }
  .kpi .data { font-size: 22px; line-height: 28px; }
  .dash-main, .cal-layout, .lab, .composer, .detail, .settings-layout, .platforms, .bench-grid, .connect-grid, .welcome { grid-template-columns: minmax(0, 1fr) !important; }
  .composer > :last-child, .detail > :last-child { grid-column: auto; }
  .detail > :first-child { width: 100%; max-width: 280px; margin: 0 auto; }
  .card { padding: 16px; }
  .card.flush { padding: 0; }
  .upnext-day { padding: 8px 14px; }
  .upnext-row { display: grid; grid-template-columns: 66px 30px minmax(0, 1fr) auto; grid-template-areas: "time thumb cap cap" "time thumb plats pill"; gap: 6px 10px; padding: 12px 14px; align-items: center; }
  .upnext-row .time { grid-area: time; width: auto; font-size: 13px; white-space: nowrap; align-self: start; padding-top: 1px; }
  .upnext-row > .thumb { grid-area: thumb; align-self: start; }
  .upnext-row .cap { grid-area: cap; white-space: normal; overflow: visible; }
  .upnext-row > :nth-child(4) { grid-area: plats; }
  .upnext-row > .pill { grid-area: pill; justify-self: end; }
  .upnext-row > .btn { display: none; }
  /* queue: the table becomes cards */
  .table-scroll { overflow: visible; }
  .queue-table, .queue-table tbody { display: block; }
  .queue-table thead { display: none; }
  .queue-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "post act" "when status"; gap: 8px 10px; padding: 12px 14px; border-top: 1px solid var(--border-subtle); }
  .queue-table tr:first-child { border-top: 0; }
  .queue-table td { display: block; padding: 0 !important; border: 0; background: none !important; }
  .queue-table td.cb, .queue-table td:nth-child(5) { display: none; }
  .queue-table td:nth-child(2) { grid-area: post; min-width: 0; }
  .queue-table td:nth-child(3) { grid-area: when; padding-left: 42px !important; }
  .queue-table td:nth-child(4) { grid-area: status; justify-self: end; align-self: start; margin-top: -2px !important; } /* the status pill lines up with the time, not the middle of time + person */
  .queue-table td:nth-child(6) { grid-area: act; }
  .queue-table tr.attention { background: color-mix(in srgb, var(--warning-subtle) 45%, transparent); }
  .queue-table .post-cell .cap { max-width: none; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .queue-table .post-cell { align-items: flex-start; } /* thumbnail top-aligned with the title, like the dashboard's Up next */
  .queue-table .post-cell > .thumb, .queue-table .post-cell > video, .queue-table .post-cell > img { margin-top: 2px; }
  .tabs { overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; gap: 18px; }
  .tabs button { flex: none; min-height: 40px; }
  .bulkbar { flex-wrap: wrap; }
  /* calendar */
  .cal-layout > :first-child { overflow-x: auto; }
  .cal .dow { padding: 6px 4px; font-size: 10px; text-align: center; }
  .cal .day { min-height: 70px; padding: 4px; gap: 3px; }
  .cal .num { width: 22px; height: 22px; font-size: 12px; }
  .cal:not(.week) .ev { height: 6px; padding: 0; border-radius: 3px; font-size: 0; }
  .cal:not(.week) .ev b, .cal:not(.week) .ev span { display: none; }
  .cal.week { min-width: 720px; }
  /* library, accounts, settings */
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .settings-layout > :first-child { position: static; }
  .table.bench { min-width: 640px; }
  [data-tour="lab"] > .row:first-child { flex-wrap: wrap; }
  .card:has(> .table.bench), .card:has(> .table-scroll > .table.bench) { overflow-x: auto; }
}

/* ---------------------------------------------------------------- platform previews: a real iPhone 16 Pro
   Screen 402 × 874 scaled to 206 × 448 (0.512). Bezel (≈1.1% of height) and titanium edge are box-shadows,
   so every preview's own layout stays inside the screen. Status bar 54 pt → 28 px, home area 34 pt → 17 px. */
.phone.device { width: 206px; height: 448px; border-radius: 28px; margin: 7px; box-shadow: 0 0 0 5px #000, 0 0 0 6.5px #3A3A3C, 0 18px 40px rgba(0,0,0,.22); }
.phone .ph-status { position: absolute; top: 0; left: 0; right: 0; height: 28px; z-index: 6; color: #fff; pointer-events: none; }
.phone .ph-status.ph-light { color: #000; }
.phone .ph-time { position: absolute; top: 9px; left: 0; width: 71px; text-align: center; font: 600 9px/10px -apple-system, "SF Pro Text", Inter, sans-serif; letter-spacing: -.1px; text-shadow: none; }
.phone .ph-island { position: absolute; top: 5.6px; left: 50%; width: 64.5px; height: 19px; margin-left: -32.25px; border-radius: 10px; background: #000; }
.phone .ph-icons { position: absolute; top: 11px; right: 13.3px; width: 38px; height: 6.66px; } /* spec at the preview scale (206 / 402): 74.2 × 13 group, 26 pt from the edge */
.phone .ph-icons svg { display: block; width: 100%; height: 100%; }
.phone .ph-home { position: absolute; bottom: 4px; left: 50%; width: 71px; height: 2.6px; margin-left: -35.5px; border-radius: 2px; background: #fff; z-index: 6; pointer-events: none; }
.phone .ph-home.ph-light { background: #000; }
/* Platform UI starts under the status bar; tab bars run down behind the home indicator, like iOS. */
/* The platform overlays were laid out for a 256 px-wide phone. Inside the true-proportion screen they keep that
   layout and are scaled to fit (206 / 256), so buttons, captions and tab bars keep their spacing. */
.phone.device .ui, .phone.device .ph-scale, .phone.device .ph-feed { top: 28px; left: 0; right: auto; bottom: auto; width: 256px; height: 499px; padding-top: 0; transform: scale(.8047); transform-origin: 0 0; }
.phone.device .pnav { bottom: -21px; box-sizing: content-box; padding-bottom: 21px; }
.phone.device .ph-status.ph-light { background: #fff; }
.phone.device .story-bars { top: 32px; }
.phone.device .story-head { top: 40px; right: 10px; gap: 5px; font-size: 8px; }
.phone.device .story-head .av { width: 16px; height: 16px; }
.phone.device .story-head .faint-w { font-size: 7.5px; }
.phone.device .story-img { top: 28px; height: calc(100% - 68px); border-radius: 6px; }
.story-head .story-x { margin-left: auto; display: flex; gap: 6px; }
.story-head .ig-i { width: 14px; height: 14px; }
.story-reply { position: absolute; left: 8px; right: 8px; bottom: 18px; display: flex; align-items: center; gap: 10px; color: #fff; z-index: 2; }
.story-reply .story-input { flex: 1; height: 22px; display: flex; align-items: center; padding: 0 10px; border: 1px solid rgba(255,255,255,.6); border-radius: 999px; font-size: 9px; }
.story-reply .ig-i { width: 13px; height: 13px; }
/* Instagram feed post, light mode */
.ig-i { display: block; width: 13px; height: 13px; flex: none; }
.ig-i svg { display: block; width: 100%; height: 100%; }
.phone .ig { position: absolute; inset: 28px 0 0 0; display: flex; flex-direction: column; background: #fff; color: #000; font: 400 7.5px/1.3 -apple-system, "SF Pro Text", Inter, sans-serif; text-shadow: none; }
.ig-nav { height: 22px; display: flex; align-items: center; justify-content: space-between; padding: 0 7px; }
.ig-title { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.ig-title small { font-size: 6px; font-weight: 600; color: #737373; letter-spacing: .2px; }
.ig-title b { font-size: 8.5px; font-weight: 700; }
.ig-head { height: 24px; display: flex; align-items: center; gap: 6px; padding: 0 7px; font-size: 7.5px; }
.ig-head b { flex: 1; font-weight: 600; }
.ig-ring { padding: 1.2px; border-radius: 50%; background: linear-gradient(45deg, #FFD600, #FF7A00 30%, #FF0069 60%, #D300C5 85%); }
.ig-ring .av { display: block; width: 16px; height: 16px; border-radius: 50%; border: 1px solid #fff; object-fit: cover; }
.ig-media { aspect-ratio: 4 / 5; position: relative; overflow: hidden; background: #efefef; flex: none; }
.ig-actions { height: 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 7px; }
.ig-actions .ig-l { display: flex; gap: 9px; }
.ig-actions > .ig-i:last-child { justify-self: end; }
.ig-actions .dots { position: static; display: flex; gap: 2.5px; }
.ig-actions .dots i { width: 3.5px; height: 3.5px; border-radius: 50%; background: #C7C7C7; }
.ig-actions .dots i.on { background: #0095F6; }
.ig-text { display: flex; flex-direction: column; gap: 2px; padding: 0 7px; }
.ig-text b { font-weight: 600; }
.ig-muted { color: #737373; }
.ig-tabs { position: absolute; left: 0; right: 0; bottom: 0; height: 25px; padding-bottom: 17px; display: flex; align-items: center; justify-content: space-around; background: #fff; border-top: .5px solid #DBDBDB; }
.ig-tabs .ig-i { width: 12px; height: 12px; }
.phone .ig-tab-av .av { display: block; width: 13px; height: 13px; border-radius: 50%; object-fit: cover; }
.phone.ig-light { background: #fff; }

/* ---------------------------------------------------------------- tidy pass (Tommy, Oct 17): pills centred, labels never squeezed
   1. Every pill, badge, count and outlined label: content centred both ways, kept on one line, never squashed by its row. */
.pill, .chip, .fchip, .role-tag, .you-tag, .demo-tag, .hl-label, .quick button, .cell-add, .toast, .media-card .hover-cta, .phone .sub, .tabs .n, .nav a .count {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; flex-shrink: 0; font-variant-numeric: tabular-nums;
}
/* counts: a fixed height and line-height 1, so the number sits in the middle of its pill, not on the label's baseline */
.tabs .n, .nav a .count { height: 18px; min-width: 18px; padding: 0 6px; line-height: 1; box-sizing: border-box; }
.fchip span { line-height: 1; font-variant-numeric: tabular-nums; }
/* 2. Labels next to things that can't shrink: the label keeps its words on one line, the row wraps instead */
.row > .h3 { min-width: max-content; }
.account .who .small, .team-row .txt .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dest-row { flex-wrap: wrap; row-gap: 6px; }
.dest-row .who { flex: 1 1 160px; }
.row.small.muted { flex-wrap: wrap; row-gap: 4px; }
.row.small.muted > span { white-space: nowrap; }
@media (max-width: 760px) {
  .row:has(> .h3) { flex-wrap: wrap; row-gap: 6px; }
  .check-row.big { flex-wrap: wrap; }
  .check-row.big > div:nth-child(2) { flex: 1 1 200px; min-width: 0; }
  .check-row.big code.cmd { flex: 0 0 calc(100% - 42px); margin-left: 42px; box-sizing: border-box; overflow-wrap: anywhere; }
  .team-row { flex-wrap: wrap; row-gap: 2px; }
  .team-row .txt { flex: 1 1 0; }
  .team-row > span.small:last-child { order: 5; flex: 1 0 100%; width: auto !important; text-align: left !important; padding-left: 48px; }
  .set-row { flex-wrap: wrap; row-gap: 10px; }
  .set-row .txt { flex: 1 1 100%; }
  .card.row { flex-wrap: wrap; }
  .how-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .stepper { gap: 8px; font-size: 13px; }
  .stepper .st { white-space: nowrap; gap: 6px; }
  .stepper .st + .st::before { width: 14px; margin-right: 2px; }
  .stepper .n { width: 24px; height: 24px; font-size: 12px; }
}

/* preview column: room to breathe (Tommy, Oct 17: "spacing feels crowded") */
.preview-col { gap: 16px; }
.preview-col > .label { margin-bottom: -6px; } /* the label stays close to the buttons it names */
.preview-col .ptabs { gap: 8px; }
.preview-col .phone.device { margin: 14px 7px 16px; } /* clear space beyond the device ring, above and below */
.preview-col .preview-note { max-width: 300px; }

/* consistency pass (Tommy, Oct 17: "consistent on every single screen")
   one height per control family: regular buttons 39 (ghost and icon buttons too, so a Cancel next to a Save lines up),
   small buttons 30, pill toolbar controls 37, form fields 43, tags 24 */
.btn:not(.small) { min-height: 39px; }
select.input:not(.select-sm) { min-height: 43px; }
.role-tag { height: 24px; line-height: 1; box-sizing: border-box; }

/* Oct 17: platform logos never overlap. The stack used -5px, which is 25% of a 20px badge and more than the logo's 22% clear space, so each circle cut the logo before it (rule: never crop a third-party logo). Side by side with a small gap instead. */
.pstack { gap: 3px; }
.pstack .pbadge + .pbadge { margin-left: 0; }
.pstack .pbadge { box-shadow: none; }

/* Oct 17: the avatar ring is drawn inside the circle. As an outside box-shadow it was clipped on the left wherever the avatar sits at the edge of an overflow:hidden box (the Up next and queue caption lines), so logos looked cut off. */
.av { box-shadow: none; outline: 1px solid var(--avatar-ring); outline-offset: -1px; }
.av-stack .av { box-shadow: 0 0 0 2px var(--surface-1); }

/* Oct 17: Up next pages through everything scheduled */
.upnext-more { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--border-subtle); }
.upnext-more[hidden] { display: none; }

/* Oct 17: every dropdown uses Queue's chevron with even spacing. The browser's own arrow sat ~8px from the right edge, tighter than the text's padding, and didn't match the pill dropdowns. */
select.input:not(.select-sm) { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2386868B' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 12px 12px; }

/* Oct 17 (Tommy): previews are bigger. The overlays were laid out for a 256 px phone and shrunk to 206; now the phone is 256 wide (×1.2427),
   so every preview shows its platform UI at its intended size, and the composer's left column ends level with the Caption card.
   transform keeps every inner layout untouched; the margins give the scaled phone its real space in the column. */
.preview-col .phone.device { transform: scale(1.2427); transform-origin: 0 0; margin: 17px 9px 130px 9px; }
/* Instagram feed tab bar: the 17 px home strip sits below the 25 px bar, not inside it (border-box squeezed the icons over the divider) */
.ig-tabs { box-sizing: content-box; }
/* composer: Expected quality card */
.qbig { font: 650 30px/1 var(--font); letter-spacing: -.8px; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.qbars.qbars-sm { height: 106px; gap: 8px; }
.qbars-sm .qbar { max-width: none; }
.qkey { display: inline-block; width: 14px; border-top: 1.5px dashed var(--warning); vertical-align: middle; margin-right: 6px; }
