
:root {
  color-scheme: light dark;
  --background: #FCFBF8;
  --foreground: #14121A;
  --card: #FFFFFF;
  --card-foreground: #14121A;
  --popover: #FFFFFF;
  --muted: hsl(220 14% 96%);
  --muted-foreground: #5B5870;
  --primary: hsl(270 88% 48%);
  --primary-foreground: #FFFFFF;
  --primary-text: hsl(270 88% 48%);
  --accent: hsl(270 100% 97%);
  --accent-foreground: hsl(270 80% 24%);
  --ring: hsl(270 88% 48%);
  --border: #E8E4EF;
  --input: #E8E4EF;
  --border-subtle: #EFECF4;
  --border-strong: hsl(220 13% 82%);
  --border-focus: hsl(270 88% 48%);
  --brand-soft: hsl(270 100% 97%);
  --surface-muted: hsl(270 100% 99%);
  --surface-hover: hsl(270 100% 97%);
  --surface-active: hsl(270 92% 94%);
  --interactive-primary: hsl(270 88% 48%);
  --interactive-primary-hover: hsl(270 88% 42%);
  --success: hsl(151 55% 42%);
  --warning: hsl(38 92% 50%);
  --danger: hsl(0 84% 60%);
  --success-background: hsl(151 60% 96%);
  --success-foreground: hsl(151 65% 22%);
  --success-border: hsl(151 45% 80%);
  --warning-background: hsl(38 100% 96%);
  --warning-foreground: hsl(32 95% 25%);
  --warning-border: hsl(38 92% 78%);
  --danger-background: hsl(0 100% 97%);
  --danger-foreground: hsl(0 72% 38%);
  --danger-border: hsl(0 84% 82%);
  --overlay: hsl(222 47% 11% / 0.48);
  --progress-track: hsl(270 100% 94%);
  --progress-indicator: hsl(270 88% 48%);
  --toast-bg: #14121A;
  --toast-fg: #FCFBF8;
  --logo-ink: #000000;
  --logo-brand: #7A0FE6;
  --shadow-menu: 0 18px 50px rgba(15, 23, 42, 0.14);
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 0.5rem;
  --bar-h: 64px;
  --bottom-h: 0px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0E0D12;
    --foreground: #F4F2F8;
    --card: #17151D;
    --card-foreground: #F4F2F8;
    --popover: #1B1922;
    --muted: #23202B;
    --muted-foreground: #A9A5B8;
    --primary: hsl(270 95% 65%);
    --primary-foreground: #0E0D12;
    --primary-text: #C4A3FF;
    --accent: hsl(270 45% 14%);
    --accent-foreground: hsl(270 100% 92%);
    --ring: #C4A3FF;
    --border: #2A2733;
    --input: #2F2B39;
    --border-subtle: #221F29;
    --border-strong: #3B3647;
    --border-focus: #C4A3FF;
    --brand-soft: hsl(270 50% 16%);
    --surface-muted: #15131B;
    --surface-hover: hsl(270 45% 14%);
    --surface-active: hsl(270 55% 20%);
    --interactive-primary: hsl(270 95% 65%);
    --interactive-primary-hover: hsl(270 95% 72%);
    --success: hsl(151 55% 50%);
    --warning: hsl(43 96% 56%);
    --danger: hsl(0 84% 65%);
    --success-background: hsl(151 45% 13%);
    --success-foreground: hsl(151 55% 78%);
    --success-border: hsl(151 45% 28%);
    --warning-background: hsl(38 60% 15%);
    --warning-foreground: hsl(43 96% 80%);
    --warning-border: hsl(38 60% 32%);
    --danger-background: hsl(0 48% 16%);
    --danger-foreground: hsl(0 84% 82%);
    --danger-border: hsl(0 55% 34%);
    --overlay: hsl(250 30% 3% / 0.72);
    --progress-track: hsl(270 45% 18%);
    --progress-indicator: hsl(270 95% 65%);
    --toast-bg: #F4F2F8;
    --toast-fg: #14121A;
    --logo-ink: #F4F2F8;
    --logo-brand: #C4A3FF;
    --shadow-menu: 0 18px 50px rgba(0, 0, 0, 0.5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  font-family: var(--font-sans); font-size: 16px; line-height: 1.5; color: var(--foreground); background: var(--background);
  -webkit-font-smoothing: antialiased; overflow-x: hidden; overflow-x: clip;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 14px; border-radius: 8px; background: var(--primary); color: var(--primary-foreground); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.muted { color: var(--muted-foreground); }
.clamp1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.plain { appearance: none; background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-align: inherit; }
.lnk { color: var(--primary-text); text-decoration: none; font-weight: 500; }
.lnk:hover { text-decoration: underline; }
.press:active { transform: translateY(1px); }
.hov:hover { background: var(--accent); color: var(--foreground); }
.row-hover:hover { background: var(--surface-hover); }
.mono { font-family: var(--font-mono); }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--border); background: var(--background); padding-top: env(safe-area-inset-top); }
.bar-in { position: relative; display: flex; align-items: center; gap: 12px; height: 64px; max-width: 1120px; margin: 0 auto; padding: 0 32px; padding-left: max(32px, env(safe-area-inset-left)); padding-right: max(32px, env(safe-area-inset-right)); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--foreground); border-radius: 6px; flex: none; }
.brand-logo { height: 22px; width: auto; }
.brand-logo .ink { fill: var(--logo-ink); }
.brand-logo .accent { fill: var(--logo-brand); }
.brand-sep { width: 1px; height: 18px; background: var(--border); }
.brand-name { font-size: 15px; font-weight: 600; }
.tabs-main { display: flex; align-items: center; gap: 4px; margin-left: 16px; }
.tab-main { position: relative; display: inline-flex; align-items: center; height: 40px; padding: 0 12px; border-radius: 8px; font-size: 15px; font-weight: 500; color: var(--foreground); text-decoration: none; }
.tab-main:hover { background: var(--accent); }
.tab-main[aria-current="page"] { color: var(--primary-text); }
.tab-main[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -12px; height: 2px; border-radius: 999px; background: var(--primary); }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar-btn { width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); display: inline-flex; align-items: center; justify-content: center; color: var(--primary-text); font-weight: 700; font-size: 14px; cursor: pointer; padding: 0; }
.avatar-btn:hover { border-color: var(--border-strong); }
.menu { position: absolute; right: max(32px, calc((100% - 1120px) / 2 + 32px)); top: calc(60px + env(safe-area-inset-top)); z-index: 70; width: 280px; padding: 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--popover); box-shadow: var(--shadow-menu); }
.menu-who { display: flex; flex-direction: column; gap: 2px; padding: 6px 6px 10px; min-width: 0; }
.menu-name { font-size: 15px; font-weight: 600; }
.menu-email { font-size: 13px; color: var(--muted-foreground); overflow-wrap: anywhere; }
.menu-sep { height: 1px; background: var(--border); margin: 0 0 6px; }
.menu-item { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; padding: 0 10px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--foreground); text-decoration: none; background: none; border: 0; cursor: pointer; text-align: left; }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-hover); }
/* Social bar modes (body class from the router): signed out = Log in + Get started; auth = logo only; app = tabs, New post, account menu. */
body:not(.bar-app) .when-app { display: none !important; }
body:not(.bar-signed-out) .when-signed-out { display: none !important; }
.bar-login, .bar-start { min-height: 44px; text-decoration: none; }
.bar-start { padding: 0 20px; }

/* ---------- page ---------- */
.main { flex: 1; display: block; }
.main:focus { outline: none; }
.container { max-width: 1120px; margin: 0 auto; padding: 32px 32px 64px; padding-left: max(32px, env(safe-area-inset-left)); padding-right: max(32px, env(safe-area-inset-right)); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack-16 { display: flex; flex-direction: column; gap: 16px; }
.stack-12 { display: flex; flex-direction: column; gap: 12px; }
.stack-8 { display: flex; flex-direction: column; gap: 8px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.h1 { font-size: 32px; line-height: 40px; font-weight: 700; letter-spacing: -0.01em; }
.h1:focus { outline: none; }
.h2 { font-size: 20px; line-height: 28px; font-weight: 600; }
.h2 .count { font-weight: 500; color: var(--muted-foreground); }
.loading { display: flex; align-items: center; gap: 12px; padding: 24px 0; font-size: 15px; color: var(--muted-foreground); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; border-radius: 6px; font-size: 14px; line-height: 20px; font-weight: 500; height: 36px; padding: 0 16px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background-color 120ms, border-color 120ms, color 120ms; }
.btn svg { width: 16px; height: 16px; flex: none; pointer-events: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.btn-primary { background: var(--interactive-primary); color: var(--primary-foreground); box-shadow: 0 1px 2px hsl(270 88% 48% / 0.15); }
.btn-primary:hover { background: var(--interactive-primary-hover); }
.btn-outline { border-color: var(--input); background: var(--background); color: var(--foreground); box-shadow: 0 1px 2px hsl(222 47% 11% / 0.05); }
.btn-outline:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.btn-ghost { background: transparent; color: var(--foreground); }
.btn-ghost:hover { background: var(--surface-hover); }
.btn-danger { background: var(--danger); color: #FFFFFF; }
.btn-danger:hover { background: hsl(0 72% 50%); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; line-height: 16px; }
.btn-lg { min-height: 44px; padding: 0 20px; }
.btn-xl { min-height: 48px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn { width: 36px; height: 36px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; cursor: pointer; color: var(--foreground); padding: 0; flex: none; }
.icon-btn:hover { background: var(--accent); }
.icon-btn.small { width: 32px; height: 32px; border-radius: 6px; }

/* ---------- badges, progress ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; border: 1px solid transparent; padding: 2px 10px; font-size: 12px; line-height: 16px; font-weight: 600; white-space: nowrap; }
.badge-default { background: var(--interactive-primary); color: var(--primary-foreground); }
.badge-outline { border-color: var(--border); color: var(--foreground); }
.badge-success { border-color: var(--success-border); background: var(--success-background); color: var(--success-foreground); }
.badge-warning { border-color: var(--warning-border); background: var(--warning-background); color: var(--warning-foreground); }
.badge-danger { border-color: var(--danger-border); background: var(--danger-background); color: var(--danger-foreground); }
.badge-muted { border-color: var(--border); background: var(--muted); color: var(--muted-foreground); }
.badge .spin { width: 12px; height: 12px; }
.progress { position: relative; height: 8px; width: 100%; overflow: hidden; border-radius: 999px; background: var(--progress-track); }
.progress-bar { height: 100%; width: 100%; background: var(--progress-indicator); transform-origin: left center; transition: transform 200ms; }

/* ---------- tooltip: hover, keyboard focus, or tap (.tip-open) ---------- */
.tip { position: relative; }
.tip:hover::after, .tip:focus-visible::after, .tip.tip-open::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  background: var(--primary); color: var(--primary-foreground); font-size: 12px; line-height: 16px; font-weight: 500; font-family: var(--font-sans);
  padding: 6px 10px; border-radius: 6px; white-space: normal; width: max-content; max-width: min(260px, calc(100vw - 32px)); z-index: 80; pointer-events: none;
  box-shadow: 0 4px 12px hsl(222 47% 11% / 0.15); text-align: left;
}
.tip-below:hover::after, .tip-below:focus-visible::after, .tip-below.tip-open::after { bottom: auto; top: calc(100% + 8px); }
.tip-end:hover::after, .tip-end:focus-visible::after, .tip-end.tip-open::after { left: auto; right: 0; transform: none; }
.tip-start:hover::after, .tip-start:focus-visible::after, .tip-start.tip-open::after { left: 0; transform: none; }
@media (hover: none) { .tip:hover:not(.tip-open)::after { display: none; } }

/* ---------- tabs, segmented, chips, select ---------- */
.tabs { display: inline-flex; height: 36px; align-items: center; justify-content: center; border-radius: 8px; background: var(--muted); padding: 4px; color: var(--muted-foreground); }
.tab { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; border-radius: 6px; padding: 4px 12px; font-size: 14px; line-height: 20px; font-weight: 500; border: 0; background: none; color: inherit; cursor: pointer; height: 28px; }
.tab:hover { color: var(--foreground); }
.tab[aria-selected="true"] { background: var(--surface-active); color: var(--foreground); box-shadow: 0 1px 2px hsl(222 47% 11% / 0.08); }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--muted); }
.seg-btn { height: 28px; padding: 0 12px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--muted-foreground); border: 0; background: none; cursor: pointer; }
.seg-btn[aria-pressed="true"] { font-weight: 600; color: var(--foreground); background: var(--card); box-shadow: 0 1px 2px hsl(222 47% 11% / 0.08); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid var(--border); background: var(--card); color: var(--foreground); cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--primary); background: var(--brand-soft); color: var(--primary-text); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.filter { display: flex; align-items: center; gap: 8px; }
.filter label { font-size: 13px; font-weight: 600; color: var(--muted-foreground); }
.select { height: 36px; min-width: 170px; border: 1px solid var(--input); border-radius: 6px; padding: 0 10px; font-size: 14px; background: var(--card); color: var(--foreground); }

/* ---------- banner ---------- */
.banner { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--warning-border); background: var(--warning-background); color: var(--warning-foreground); }
.banner.danger { border-color: var(--danger-border); background: var(--danger-background); color: var(--danger-foreground); }
.banner.success { border-color: var(--success-border); background: var(--success-background); color: var(--success-foreground); }
.banner-icon { display: inline-flex; margin-top: 1px; flex: none; }
.banner-icon svg { width: 20px; height: 20px; }
.banner-body { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.banner-title { font-size: 15px; line-height: 22px; font-weight: 600; }
.banner-text { font-size: 14px; line-height: 21px; }
.banner-actions { display: flex; align-items: center; gap: 8px; }
.banner .icon-btn { color: inherit; }

/* ---------- empty states ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 64px 24px; border: 1px dashed var(--border-strong); border-radius: 16px; background: var(--card); }
.empty.small { gap: 12px; padding: 56px 16px; }
.empty.bare { padding: 40px 16px; background: transparent; gap: 12px; }
.empty-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-soft); color: var(--primary-text); display: inline-flex; align-items: center; justify-content: center; }
.empty-icon svg { width: 28px; height: 28px; }
.empty-title { font-size: 22px; line-height: 30px; font-weight: 600; }
.empty.small .empty-title { font-size: 20px; line-height: 28px; }
.empty.bare .empty-title { font-size: 16px; line-height: 24px; }
.empty-text { max-width: 460px; font-size: 16px; line-height: 26px; color: var(--muted-foreground); }
.empty-cal { color: var(--primary-text); }
.empty-cal svg { width: 28px; height: 28px; }

/* ---------- accounts ---------- */
.list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.list > li + li { border-top: 1px solid var(--border); }
.acct-row { display: flex; align-items: center; gap: 24px; padding: 16px 20px; flex-wrap: wrap; }
.acct-who { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 240px; }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; background: var(--muted); color: var(--muted-foreground); }
.avatar.on { background: var(--brand-soft); color: var(--primary-text); }
.avatar.pic { position: relative; overflow: hidden; color: #FFFFFF; background-size: cover; background-position: center; }
.avatar.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.dim.pic { opacity: 0.55; }
.acct-open { color: var(--foreground); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; border-radius: 4px; }
.acct-open:hover { text-decoration-color: currentColor; }
.acct-names { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.acct-user { font-size: 15px; line-height: 22px; font-weight: 600; }
.acct-meta, .small-muted { font-size: 13px; line-height: 18px; color: var(--muted-foreground); }
.acct-status { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; flex: 0 1 240px; min-width: 0; }
.acct-limit { flex: 0 0 210px; }
.acct-limit-in { display: flex; flex-direction: column; gap: 6px; }
.limit-line { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; color: var(--muted-foreground); }
.limit-line strong { color: var(--foreground); font-weight: 600; }
.info-btn { display: inline-flex; color: var(--muted-foreground); background: none; border: 0; padding: 0; cursor: pointer; border-radius: 999px; }
.info-btn svg { width: 14px; height: 14px; }
.acct-actions { display: flex; gap: 8px; justify-content: flex-end; flex: 0 0 auto; margin-left: auto; }

/* ---------- posts list ---------- */
.day-group { display: flex; flex-direction: column; gap: 8px; }
.day-label { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--muted-foreground); }
.post-row { display: flex; align-items: center; gap: 8px; padding: 4px 16px 4px 4px; }
.post-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; min-height: 56px; text-decoration: none; color: inherit; }
.post-main:hover { background: var(--surface-hover); }
.post-time { flex: none; width: 72px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.thumb { position: relative; flex: none; width: 44px; height: 44px; border-radius: 8px; background: var(--muted); color: var(--muted-foreground); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb { background-size: cover; background-position: center; }
.thumb svg { width: 18px; height: 18px; }
.thumb-kind { position: absolute; right: 3px; top: 3px; width: 16px; height: 16px; border-radius: 4px; background: rgba(0, 0, 0, 0.45); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.thumb-kind svg { width: 11px; height: 11px; }
.post-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.post-caption { font-size: 15px; line-height: 22px; font-weight: 500; }
.post-meta { font-size: 13px; line-height: 18px; color: var(--muted-foreground); }
.post-reason { font-size: 13px; line-height: 18px; }
.post-reason.failed { color: var(--danger-foreground); }
.post-reason.waiting { color: var(--warning-foreground); }
.post-side { display: flex; align-items: center; gap: 10px; flex: none; }
.ext-link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; min-height: 32px; }
.ext-link svg { width: 14px; height: 14px; }

/* ---------- calendar ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 4px; }
.cal-nav svg { width: 18px; height: 18px; }
.cal-title { margin: 0 0 0 6px; font-size: 17px; line-height: 24px; font-weight: 600; }
.cal-tools { display: flex; align-items: center; gap: 8px; }
.scroll-x { overflow-x: auto; overscroll-behavior-x: contain; }
.week-card { border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); min-width: 840px; }
.week-col { display: flex; flex-direction: column; gap: 6px; padding: 8px; min-height: 360px; min-width: 0; }
.week-col + .week-col { border-left: 1px solid var(--border); }
.week-col.today { background: var(--surface-muted); }
.week-day { display: flex; align-items: baseline; gap: 6px; padding: 4px 2px 8px; font-size: 12px; color: var(--muted-foreground); }
.week-day strong { font-size: 16px; }
.week-col.today .week-day { color: var(--primary-text); }
.cal-chip { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-muted); text-align: left; min-height: 44px; cursor: pointer; color: var(--foreground); text-decoration: none; }
.cal-chip:hover { border-color: var(--border-strong); }
.cal-chip.failed { background: var(--danger-background); }
.cal-chip.waiting { background: var(--warning-background); }
.cal-chip-top { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.cal-chip-text { font-size: 12px; line-height: 16px; }
.cal-chip-status { font-size: 11px; color: var(--muted-foreground); }
.cal-chip.wide .cal-chip-top { font-size: 13px; }
.cal-chip.wide .cal-chip-text { font-size: 14px; line-height: 20px; }
.dot { width: 8px; height: 8px; flex: none; border-radius: 999px; background: var(--muted-foreground); }
.dot.publishing { background: var(--primary); }
.dot.waiting { background: var(--warning); }
.dot.failed { background: var(--danger); }
.dot.posted { background: var(--success); }
.dot.posted-ig { background: var(--border-strong); }
.agenda { display: flex; flex-direction: column; gap: 4px; }
.agenda-day { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.agenda-date { flex: none; width: 44px; display: flex; flex-direction: column; align-items: center; color: var(--foreground); }
.agenda-date span { font-size: 12px; }
.agenda-date strong { font-size: 18px; }
.agenda-day.today .agenda-date { color: var(--primary-text); }
.agenda-list { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.agenda-none { font-size: 14px; color: var(--muted-foreground); padding-top: 8px; }
.month { border: 1px solid var(--border); border-radius: 12px; background: var(--card); overflow: hidden; }
.month-dows { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
.month-dows div { padding: 8px; font-size: 12px; font-weight: 600; color: var(--muted-foreground); text-align: center; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-cell { display: flex; flex-direction: column; gap: 3px; align-items: stretch; min-height: 108px; min-width: 0; padding: 6px; border: 0; border-left: 1px solid var(--border); border-top: 1px solid var(--border); background: transparent; text-align: left; cursor: pointer; color: var(--foreground); }
.month-cell.col0 { border-left: 0; }
.month-cell.row0 { border-top: 0; }
.month-cell.out { opacity: 0.45; }
.month-cell:hover { background: var(--surface-hover); }
.month-cell.picked { background: var(--brand-soft); }
.month-num { font-size: 13px; font-weight: 500; }
.month-cell.today .month-num { font-weight: 700; color: var(--primary-foreground); background: var(--primary); border-radius: 999px; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; }
.month-chip { display: block; font-size: 11px; line-height: 16px; padding: 1px 6px; border-radius: 4px; background: var(--brand-soft); text-align: left; }
.month-chip.failed { background: var(--danger-background); }
.month-chip.waiting { background: var(--warning-background); }
.month-more { font-size: 11px; color: var(--muted-foreground); }
.month-dots { display: flex; gap: 3px; justify-content: center; }
.day-list { display: flex; flex-direction: column; gap: 6px; }
.day-list h4 { font-size: 14px; font-weight: 600; }

/* ---------- dialog, toast ---------- */
.overlay { position: fixed; inset: 0; z-index: 90; background: var(--overlay); }
.dialog { position: fixed; left: 50%; top: 50%; z-index: 91; transform: translate(-50%, -50%); display: grid; gap: 16px; width: calc(100% - 32px); max-width: 512px; border: 1px solid var(--border); background: var(--popover); color: var(--foreground); padding: 24px; border-radius: 8px; box-shadow: 0 10px 15px -3px hsl(270 88% 48% / 0.1); animation: pop 160ms ease-out; }
.dialog-head { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.dialog-title { font-size: 18px; line-height: 28px; font-weight: 600; }
.dialog-text { font-size: 14px; line-height: 20px; color: var(--muted-foreground); }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; right: 24px; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 95; max-width: 420px; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: var(--toast-bg); color: var(--toast-fg); font-size: 14px; line-height: 20px; box-shadow: 0 12px 32px hsl(222 47% 11% / 0.25); animation: up 200ms ease-out; }
.toast svg { width: 18px; height: 18px; flex: none; color: hsl(151 60% 70%); }
.toast.warning svg { color: hsl(38 92% 60%); }
.toast.danger svg { color: hsl(0 84% 70%); }
@media (prefers-color-scheme: dark) {
  .toast svg { color: hsl(151 65% 32%); }
  .toast.warning svg { color: hsl(32 95% 38%); }
  .toast.danger svg { color: hsl(0 72% 45%); }
}
.toast span { flex: 1; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -48%) scale(0.97); } to { opacity: 1; transform: translate(-50%, -50%); } }
/* ---------- loading skeletons (live data) ---------- */
.skel { display: block; border-radius: 6px; background: linear-gradient(90deg, var(--muted) 25%, var(--surface-hover) 50%, var(--muted) 75%); background-size: 200% 100%; animation: skel 1.4s ease-in-out infinite; }
.skel-line { height: 12px; width: 60%; }
.skel-line.short { width: 35%; }
.skel-line.wide { width: 85%; }
.skel-circle { width: 40px; height: 40px; border-radius: 999px; flex: none; }
.skel-thumb { width: 44px; height: 44px; border-radius: 8px; flex: none; }
.skel-row { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.skel-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.skel-limit { width: 180px; height: 12px; }
@keyframes skel { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .spin, .toast, .dialog, .skel { animation: none; } .progress-bar { transition: none; } }

/* ---------- phone bottom bar ---------- */
.bottom { display: none; }

/* ---------- phone (< 768 px) ---------- */
@media (max-width: 767.98px) {
  :root { --bar-h: 56px; }
  .bar-in { height: 56px; padding: 0 16px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .brand-logo { height: 18px; }
  .brand { min-height: 44px; }
  .tabs-main, .bar-new { display: none !important; }
  .avatar-btn { width: 44px; height: 44px; }
  .menu { right: 12px; left: 12px; top: calc(52px + env(safe-area-inset-top)); width: auto; }
  .container { padding: 20px 16px 32px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  body.has-bottom .container { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .h1 { font-size: 30px; line-height: 38px; }
  .stack-16.phone-14 { gap: 14px; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 44px; height: auto; font-size: 14px; padding: 0 14px; }
  .icon-btn, .icon-btn.small { width: 44px; height: 44px; }
  .info-btn { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
  .tabs { display: flex; width: 100%; height: auto; }
  .tab { flex: 1; min-height: 36px; height: auto; }
  .toolbar > .tabs { flex: 1 1 100%; }
  .filter { flex: 1 1 100%; }
  .select { flex: 1; min-width: 0; height: 44px; font-size: 16px; }
  .chip, .seg-btn { min-height: 40px; }
  .seg-btn { height: auto; }
  .empty { padding: 40px 16px; }
  .acct-row { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; flex-wrap: nowrap; }
  .acct-who { flex: none; }
  .acct-status { flex: none; }
  .acct-limit { flex: none; }
  .acct-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-left: 0; }
  .acct-actions .btn { width: 100%; }
  .post-row { flex-direction: column; align-items: stretch; padding: 4px 4px 12px; }
  .post-time { width: 64px; }
  .post-side { flex-wrap: wrap; gap: 8px; padding-left: 88px; }
  .month-cell { min-height: 52px; }
  .month-cell .month-num { align-self: center; }
  .cal-chip { min-height: 44px; }
  .bar-start { display: none !important; }
  .bar-login { border-color: var(--input); background: var(--background); padding: 0 16px; }
  .acct-open { display: inline-flex; align-items: center; min-height: 44px; }
  .dialog { border-radius: 16px; }
  .dialog-foot { flex-direction: column-reverse; }
  .dialog-foot .btn { width: 100%; }
  .toast { left: 12px; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom)); max-width: none; }
  body.has-bottom .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  body.has-bottom .bottom {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 6px 8px max(8px, env(safe-area-inset-bottom)); padding-left: max(8px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right));
    border-top: 1px solid var(--border); background: var(--background);
  }
  .bottom-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border-radius: 10px; font-size: 12px; font-weight: 500; color: var(--muted-foreground); text-decoration: none; background: none; border: 0; cursor: pointer; }
  .bottom-btn svg { width: 22px; height: 22px; }
  .bottom-btn[aria-current="page"] { font-weight: 600; color: var(--primary-text); }
  .bottom-new { width: 36px; height: 28px; border-radius: 10px; background: var(--primary); color: var(--primary-foreground); display: inline-flex; align-items: center; justify-content: center; }
  .bottom-new svg { width: 18px; height: 18px; }
}


/* Landing (signed out) */
.au-landing { display: flex; align-items: center; gap: 56px; flex-wrap: wrap; padding: 48px 0 64px; }
.au-landing *, .au-auth * { box-sizing: border-box; }
.au-copy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.au-h1 { margin: 0; font-size: 52px; line-height: 58px; font-weight: 700; letter-spacing: -0.03em; max-width: 620px; }
.au-h1:focus, .au-title:focus { outline: none; }
.au-lead { margin: 0; font-size: 19px; line-height: 30px; color: var(--muted-foreground); max-width: 540px; }
.au-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 8px; }
.au-cta-btn { height: auto; min-height: 48px; padding: 0 24px; font-size: 16px; line-height: 24px; }
.au-login-line { margin: 0; font-size: 14px; line-height: 20px; color: var(--muted-foreground); }
.au-inline-link { display: inline-flex; align-items: center; min-height: 44px; }
.au-art { flex: 0 1 380px; min-width: 0; border: 1px solid var(--border); border-radius: 18px; background: var(--card); overflow: hidden; box-shadow: 0 24px 60px -24px hsl(270 60% 30% / 0.25); }
.au-art-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.au-art-avatar { flex: none; width: 32px; height: 32px; border-radius: 999px; background: linear-gradient(135deg, #F58529, #DD2A7B 55%, #8134AF); }
.au-art-names { display: flex; flex-direction: column; min-width: 0; }
.au-art-user { font-size: 14px; line-height: 20px; font-weight: 600; }
.au-art-meta { font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.au-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 2px; }
.au-tile { display: block; aspect-ratio: 1 / 1; }
.au-t1 { background: linear-gradient(135deg, #E9D5FF, #7A0FE6); outline: 2px solid var(--primary); outline-offset: -2px; }
.au-t2 { background: linear-gradient(135deg, #FDE68A, #F97316); }
.au-t3 { background: linear-gradient(135deg, #BAE6FD, #0EA5E9); }
.au-t4 { background: linear-gradient(135deg, #FBCFE8, #DB2777); }
.au-t5 { background: linear-gradient(135deg, #BBF7D0, #16A34A); }
.au-t6 { background: linear-gradient(135deg, #FECACA, #DC2626); }
.au-t7 { background: linear-gradient(135deg, #DDD6FE, #4F46E5); }
.au-t8 { background: linear-gradient(135deg, #FEF3C7, #D97706); }
.au-t9 { background: linear-gradient(135deg, #CFFAFE, #0891B2); }

/* Log in / Get started (email → code → Almost done) */
.au-auth { display: flex; justify-content: center; padding: 56px 0 64px; }
.au-col { width: 100%; max-width: 420px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.au-head { display: flex; flex-direction: column; gap: 8px; }
.au-title { margin: 0; font-size: 36px; line-height: 42px; font-weight: 700; letter-spacing: -0.03em; }
.au-desc { margin: 0; font-size: 16px; line-height: 26px; color: var(--muted-foreground); overflow-wrap: anywhere; }
.au-alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--danger-border); background: var(--danger-background); color: var(--danger-foreground); font-size: 14px; line-height: 21px; }
.au-alert svg { flex: none; margin-top: 3px; }
.au-alert-text { font-weight: 600; }
.au-form { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.au-field { display: flex; flex-direction: column; gap: 8px; }
.au-label { font-size: 14px; line-height: 20px; font-weight: 500; }
.au-input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--input); border-radius: 10px; background: var(--card); color: var(--foreground); font: inherit; font-size: 16px; }
.au-input::placeholder { color: var(--muted-foreground); }
.au-input:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.au-input[aria-invalid="true"] { border-color: var(--danger); }
.au-error { font-size: 13px; line-height: 18px; color: var(--danger-foreground); }
.au-submit { height: auto; min-height: 48px; font-size: 16px; line-height: 24px; }
.au-otp { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.au-box { height: 60px; min-width: 0; border-radius: 12px; border: 1px solid var(--input); background: var(--card); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.au-box.is-filled { border-color: var(--border-strong); }
.au-otp.is-bad .au-box { border-color: var(--danger); }
.au-box.is-active { border: 2px solid var(--primary); box-shadow: 0 0 0 3px hsl(270 88% 48% / 0.15); }
.au-otp-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; border: 0; padding: 0; margin: 0; cursor: text; background: transparent; color: transparent; caret-color: transparent; }
.au-note { margin: 0; font-size: 14px; line-height: 20px; color: var(--muted-foreground); }
.au-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.au-resend { height: auto; min-height: 44px; font-variant-numeric: tabular-nums; }
.au-link-btn { min-height: 44px; font-size: 14px; line-height: 20px; }
.au-sample { margin: 0; font-size: 13px; line-height: 18px; color: var(--muted-foreground); }
.au-check-wrap { display: flex; flex-direction: column; gap: 6px; }
.au-check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; font-size: 15px; line-height: 22px; cursor: pointer; }
.au-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary); }

@media (max-width: 767.98px) {
  .au-landing { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 28px; padding: 8px 0 24px; }
  .au-copy { flex: none; gap: 16px; }
  .au-h1 { font-size: 32px; line-height: 38px; letter-spacing: -0.02em; }
  .au-lead { font-size: 17px; line-height: 27px; }
  .au-cta { align-items: stretch; gap: 8px; margin-top: 4px; }
  .au-cta-btn { width: 100%; }
  .au-art { flex: none; width: 100%; border-radius: 16px; box-shadow: none; }
  .au-auth { padding: 8px 0 32px; }
  .au-title { font-size: 30px; line-height: 36px; letter-spacing: -0.02em; }
  .au-otp { gap: 8px; }
  .au-box { height: 52px; font-size: 24px; }
}


.ob, .ob-acct, .ob-sheet { font-family: var(--font-sans); color: var(--foreground); }
.ob *, .ob *::before, .ob *::after, .ob-acct *, .ob-acct *::before, .ob-acct *::after, .ob-sheet-wrap * { box-sizing: border-box; }
.ob-plain { appearance: none; background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-align: inherit; }
.ob-lnk { color: var(--primary-text, var(--primary)); font-weight: 500; text-decoration: none; }
.ob-lnk:hover { text-decoration: underline; }
.ob-clamp1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob-spin { animation: ob-spin 1s linear infinite; }
@keyframes ob-spin { to { transform: rotate(360deg); } }
.ob-skel { display: block; aspect-ratio: 1 / 1; border-radius: 8px; background-color: var(--skeleton, var(--muted)); background-image: linear-gradient(90deg, var(--skeleton, var(--muted)) 0%, var(--surface-subtle, var(--surface-muted)) 50%, var(--skeleton, var(--muted)) 100%); background-size: 200% 100%; animation: ob-shimmer 1.2s linear infinite; }
@keyframes ob-shimmer { to { background-position: -200% 0; } }
.ob-info { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: none; color: var(--muted-foreground); background: none; border: 0; padding: 0; cursor: pointer; border-radius: 999px; }
.ob-info svg { width: 16px; height: 16px; }
.ob-badge-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; line-height: 22px; color: var(--muted-foreground); min-width: 0; }
.ob-handle { overflow-wrap: anywhere; }

/* Setup: steps */
.ob { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 8px 0 32px; }
.ob-steps { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.ob-step { display: flex; align-items: center; gap: 8px; }
.ob-dot { width: 28px; height: 28px; flex: none; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: var(--muted); color: var(--muted-foreground); }
.ob-dot svg { width: 14px; height: 14px; }
.ob-step.is-done .ob-dot { background: var(--success); color: #FFFFFF; }
.ob-step.is-current .ob-dot { background: var(--primary); color: var(--primary-foreground); }
.ob-step-label { font-size: 14px; line-height: 18px; font-weight: 500; color: var(--muted-foreground); }
.ob-step.is-current .ob-step-label { font-weight: 600; color: var(--foreground); }
.ob-step + .ob-step::before { content: ""; width: 1px; height: 18px; background: var(--border); margin-right: 4px; }

/* Setup: card */
.ob-card { width: 100%; max-width: 560px; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: 32px; border: 1px solid var(--border); border-radius: 20px; background: var(--card); }
.ob-igtile { width: 56px; height: 56px; flex: none; border-radius: 16px; background-image: linear-gradient(135deg, #F9CE34, #EE2A7B 55%, #6228D7); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; }
.ob-igtile svg { width: 28px; height: 28px; }
.ob-h1 { margin: 0; font-size: 28px; line-height: 36px; font-weight: 700; letter-spacing: -0.01em; }
.ob-h1:focus { outline: none; }
.ob-lede { margin: 0; font-size: 16px; line-height: 26px; color: var(--muted-foreground); }
.ob-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; width: 100%; }
.ob-checks li { display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 22px; }
.ob-checks svg { width: 18px; height: 18px; flex: none; color: var(--success); }
.ob-req { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-muted); }
.ob-req-text { font-size: 14px; line-height: 20px; font-weight: 600; }
.ob-req .ob-lnk { margin-left: auto; min-height: 44px; font-size: 14px; }
.ob-ctas { display: flex; gap: 8px; flex-wrap: wrap; }
.ob-ctas .btn { min-height: 44px; }
.ob-ctas .btn-primary { padding: 0 20px; }

/* Banners */
.ob-banner { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--warning-border); background: var(--warning-background); color: var(--warning-foreground); }
.ob-banner.danger { border-color: var(--danger-border); background: var(--danger-background); color: var(--danger-foreground); }
.ob-banner-body { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ob-banner-title { margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; overflow-wrap: anywhere; }
.ob-banner-text { margin: 0; font-size: 14px; line-height: 21px; }
.ob-banner .icon-btn { color: inherit; width: 32px; height: 32px; }
.ob-banner .btn { min-height: 44px; }
.ob-banner-wrap { flex-wrap: wrap; align-items: center; }

/* Setup step 2: sample of Instagram's own screen */
.ob-consent { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 32px; border-radius: 16px; background: #F2F1F5; }
.ob-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; max-width: 640px; padding: 10px 14px; border: 1px dashed #A77BEA; border-radius: 10px; background: #F6F0FF; color: #4B1A8C; font-size: 13px; line-height: 18px; }
.ob-note strong { font-weight: 700; }
.ob-igframe { width: 440px; max-width: 100%; border: 1px solid #DBDBDB; border-radius: 16px; overflow: hidden; background: #FFFFFF; color: #262626; box-shadow: 0 18px 44px -10px hsl(222 47% 11% / 0.18); font-family: -apple-system, system-ui, sans-serif; }
.ob-igurl { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-bottom: 1px solid #DBDBDB; background: #FAFAFA; color: #737373; font-size: 13px; }
.ob-igurl svg { width: 14px; height: 14px; }
.ob-igbody { display: flex; flex-direction: column; gap: 18px; padding: 24px 20px; }
.ob-ighead { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.ob-iglogos { display: flex; align-items: center; gap: 10px; color: #A8A8A8; }
.ob-iglogos > svg { width: 18px; height: 18px; }
.ob-iglogo { width: 44px; height: 44px; border-radius: 12px; border: 1px solid #DBDBDB; display: inline-flex; align-items: center; justify-content: center; background: #FFFFFF; color: #262626; font-weight: 700; }
.ob-iglogo svg { width: 24px; height: 24px; }
.ob-iglogo .sd-icon { width: 30px; height: 30px; }
.ob-igtitle { margin: 0; font-size: 17px; line-height: 24px; font-weight: 600; color: #262626; }
.ob-igtitle:focus { outline: none; }
.ob-igwho { margin: 0; font-size: 14px; line-height: 20px; color: #737373; overflow-wrap: anywhere; }
.ob-igwho strong { color: #262626; }
.ob-igwho u { text-decoration: underline; }
.ob-perms { list-style: none; margin: 0; padding: 0; border: 1px solid #DBDBDB; border-radius: 12px; overflow: hidden; }
.ob-perms li { display: flex; gap: 12px; padding: 14px 16px; }
.ob-perms li + li { border-top: 1px solid #EFEFEF; }
.ob-perms svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: #262626; }
.ob-perm-title { margin: 0; font-size: 14px; line-height: 20px; font-weight: 600; color: #262626; }
.ob-perm-text { margin: 2px 0 0; font-size: 13px; line-height: 18px; color: #737373; }
.ob-perm-scope { margin: 4px 0 0; font-family: var(--font-mono); font-size: 11px; color: #8E8E8E; overflow-wrap: anywhere; }
.ob-igbtns { display: flex; flex-direction: column; gap: 8px; }
.ob-allow, .ob-cancel { height: 44px; border-radius: 10px; font-size: 15px; font-weight: 600; text-align: center; border: 0; cursor: pointer; }
.ob-allow { background: #262626; color: #FFFFFF; }
.ob-cancel { background: #EFEFEF; color: #262626; }
.ob-allow:active, .ob-cancel:active { transform: translateY(1px); }

/* "Sample only" pickers */
.ob-sample { width: 100%; margin: 0; padding: 12px 14px; border: 1px dashed #A77BEA; border-radius: 12px; background: #F6F0FF; color: #4B1A8C; display: flex; flex-direction: column; gap: 10px; }
.ob-consent .ob-sample { width: 440px; max-width: 100%; }
.ob-sample legend { border: 1px dashed #A77BEA; background: #F6F0FF; color: #4B1A8C; border-radius: 999px; font-size: 12px; font-weight: 600; padding: 4px 10px; }
.ob-sample-row { display: flex; flex-direction: column; gap: 6px; }
.ob-sample-inline { flex-direction: row; flex-wrap: wrap; align-items: center; }
.ob-sample-label { font-size: 13px; font-weight: 600; }
.ob-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ob-chip { height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid #D9C6F5; background: #FFFFFF; color: #4B1A8C; cursor: pointer; }
.ob-chip[aria-pressed="true"] { border-color: #7A0FE6; background: #7A0FE6; color: #FFFFFF; }

/* Setup step 3 */
.ob-pill { margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--success-background); color: var(--success-foreground); font-size: 14px; line-height: 20px; font-weight: 600; }
.ob-pill svg { width: 16px; height: 16px; }
.ob-pill:focus { outline: none; }
.ob-prof { display: flex; align-items: center; gap: 16px; width: 100%; min-width: 0; }
.ob-prof-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ob-name { font-size: 20px; line-height: 28px; font-weight: 700; }
.ob-avatar { position: relative; width: 72px; height: 72px; flex: none; border-radius: 999px; overflow: hidden; background-color: var(--brand-soft); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; box-shadow: 0 0 0 3px var(--card), 0 0 0 5px #EE2A7B; }
.avatar.ob-avatar { width: 72px; height: 72px; font-size: 28px; font-weight: 700; color: #FFFFFF; background-color: var(--primary); background-size: cover; background-position: center; }
.avatar.ob-avatar.ob-avatar-xl { width: 88px; height: 88px; font-size: 34px; }
.avatar.dim.ob-avatar { opacity: 1; background-color: var(--muted-foreground); }
.ob-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ob-gimg img, .ob-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ob-avatar.is-off { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--border-strong); }
.ob-avatar-xl { width: 88px; height: 88px; font-size: 34px; }
.ob-fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ob-stats { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
.ob-stat { display: flex; flex-direction: column-reverse; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); text-align: center; min-width: 0; }
.ob-stat dt { font-size: 13px; color: var(--muted-foreground); }
.ob-stat dd { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ob-latest { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.ob-h2s { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; }
.ob-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.ob-tiles .ob-skel { border-radius: 6px; }
.ob-tile { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 6px; overflow: hidden; background-color: var(--muted); }
.ob-kind { position: absolute; top: 6px; right: 6px; z-index: 1; color: #FFFFFF; display: inline-flex; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35)); }
.ob-kind svg { width: 16px; height: 16px; }
.ob-softerr { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-muted); font-size: 14px; }
.ob-softerr .btn { min-height: 44px; }
.ob-none { margin: 0; font-size: 14px; color: var(--muted-foreground); }

/* Account details */
.ob-acct { display: flex; flex-direction: column; gap: 20px; }
.ob-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; }
.ob-back svg { width: 16px; height: 16px; }
.ob-head { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.ob-who { display: flex; align-items: center; gap: 16px; min-width: 0; flex: 1 1 320px; }
.ob-who-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ob-acct-h1 { margin: 0; font-size: 26px; line-height: 34px; font-weight: 700; }
.ob-acct-h1:focus { outline: none; }
.ob-dstats { margin: 6px 0 0; display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; line-height: 22px; }
.ob-dstat { display: flex; flex-direction: row-reverse; gap: 4px; }
.ob-dstat dt { color: var(--muted-foreground); }
.ob-dstat dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.ob-head-actions { display: flex; gap: 8px; margin-left: auto; }
.ob-head-actions .btn { min-height: 44px; }
.ob-limit { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.ob-limit-line { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted-foreground); }
.ob-limit-line strong { color: var(--foreground); font-weight: 600; }
.ob-progress { position: relative; flex: 1 1 160px; max-width: 240px; height: 8px; overflow: hidden; border-radius: 999px; background: var(--progress-track); }
.ob-progress-bar { display: block; height: 100%; width: 100%; background: var(--progress-indicator, var(--primary)); transform-origin: left center; transform: scaleX(0); }
.ob-stack-grid { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ob-grid-sec { display: flex; flex-direction: column; gap: 12px; }
.ob-grid-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ob-h2 { margin: 0; font-size: 18px; line-height: 26px; font-weight: 600; }
.ob-sync { display: flex; align-items: center; gap: 4px; }
.ob-synced { font-size: 13px; color: var(--muted-foreground); }
.ob-refresh { width: 44px; height: 44px; }
.ob-refresh[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.ob-refresh svg { width: 18px; height: 18px; }
.ob-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 16px; }
.ob-grid-skel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ob-grid li { min-width: 0; }
.ob-gtile { display: flex; flex-direction: column; gap: 6px; color: var(--foreground); text-decoration: none; border-radius: 8px; min-width: 0; }
.ob-gimg { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background-color: var(--muted); }
.ob-gtile:hover .ob-gimg { filter: brightness(0.92); }
.ob-gimg .ob-kind { top: 8px; right: 8px; }
.ob-gimg .ob-kind svg { width: 18px; height: 18px; }
.ob-via { position: absolute; left: 8px; top: 8px; z-index: 1; padding: 2px 8px; border-radius: 999px; background: hsl(222 47% 11% / 0.7); color: #FFFFFF; font-size: 11px; line-height: 16px; font-weight: 600; white-space: nowrap; }
.ob-counts { display: flex; align-items: center; gap: 12px; font-size: 13px; line-height: 18px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; min-width: 0; overflow: hidden; }
.ob-count { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ob-count svg { width: 14px; height: 14px; flex: none; }
.ob-ago { margin-left: auto; white-space: nowrap; }
.ob-err { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 16px; text-align: center; border: 1px dashed var(--border-strong); border-radius: 16px; }
.ob-err-title { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; }
.ob-err .btn { min-height: 44px; padding: 0 20px; }

/* "How to switch": dialog on desktop, bottom sheet on phone */
.ob-sheet-wrap { position: fixed; inset: 0; z-index: 90; }
.ob-scrim { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; margin: 0; background: var(--overlay); cursor: default; }
.ob-sheet { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 480px; max-width: calc(100% - 32px); max-height: calc(100% - 32px); overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); box-shadow: 0 24px 60px hsl(222 47% 11% / 0.25); }
.ob-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ob-sheet-title { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; }
.ob-sheet-text { margin: 0; font-size: 15px; line-height: 24px; color: var(--muted-foreground); }
.ob-sheet-note { margin: 0; font-size: 14px; line-height: 22px; color: var(--muted-foreground); }
.ob-sheet-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 24px; }
.ob-sheet .icon-btn { width: 40px; height: 40px; }
.ob-sheet .btn { min-height: 44px; width: 100%; }
body.ob-noscroll { overflow: hidden; }

@media (prefers-reduced-motion: reduce) { .ob-skel, .ob-spin { animation: none; } }

@media (max-width: 767.98px) {
  .ob { align-items: stretch; gap: 20px; padding: 0; }
  .ob-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .ob-step { flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
  .ob-step + .ob-step::before { display: none; }
  .ob-step-label { font-size: 12px; }
  .ob-card { max-width: none; padding: 0; border: 0; border-radius: 0; background: transparent; gap: 16px; }
  .ob-h1 { font-size: 26px; line-height: 32px; }
  .ob-ctas { flex-direction: column; width: 100%; }
  .ob-ctas .btn { width: 100%; }
  .ob-ctas .btn-primary { min-height: 48px; font-size: 16px; }
  .ob-info { width: 44px; height: 44px; margin: -8px; }
  .ob-banner .icon-btn { width: 44px; height: 44px; margin: -10px -10px -10px 0; }
  .ob-consent { padding: 0; gap: 14px; border-radius: 0; background: transparent; align-items: stretch; }
  .ob-note, .ob-igframe, .ob-consent .ob-sample { width: 100%; }
  .ob-igframe { border-radius: 14px; box-shadow: none; }
  .ob-chip { min-height: 44px; height: auto; padding: 6px 14px; }
  .ob-stat { padding: 10px 6px; }
  .ob-stat dd { font-size: 18px; line-height: 26px; }
  .ob-acct { gap: 16px; }
  .ob-head { flex-direction: column; align-items: stretch; gap: 16px; padding: 0; border: 0; border-radius: 0; background: transparent; }
  .ob-who { flex: none; }
  .ob-avatar-xl, .avatar.ob-avatar.ob-avatar-xl { width: 72px; height: 72px; font-size: 28px; }
  .ob-acct-h1 { font-size: 22px; line-height: 30px; }
  .ob-dstats { gap: 12px; font-size: 14px; }
  .ob-head-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-left: 0; }
  .ob-head-actions .btn { width: 100%; }
  .ob-progress { max-width: none; }
  .ob-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 4px; }
  .ob-grid-skel { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .ob-counts { gap: 6px; font-size: 11px; line-height: 16px; }
  .ob-count { gap: 2px; }
  .ob-count svg { width: 12px; height: 12px; }
  .ob-via { left: 4px; top: 4px; padding: 1px 6px; font-size: 10px; }
  .ob-gimg .ob-kind { top: 6px; right: 6px; }
  .ob-gimg .ob-kind svg { width: 16px; height: 16px; }
  .ob-sheet { top: auto; left: 0; right: 0; bottom: 0; transform: none; width: auto; max-width: none; max-height: 85%; border-radius: 16px 16px 0 0; border-bottom: 0; padding: 20px 16px max(16px, env(safe-area-inset-bottom)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .ob-sheet .icon-btn { width: 44px; height: 44px; }
}


.ed, .pd-overlay { font-family: var(--font-sans); color: var(--foreground); }
.ed *, .ed *::before, .ed *::after, .pd-overlay *, .pd-overlay *::before, .pd-overlay *::after { box-sizing: border-box; }
.ed :focus-visible, .pd-overlay :focus-visible { outline: 2px solid var(--border-focus, var(--ring)); outline-offset: 2px; }
.ed-plain { appearance: none; background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-align: inherit; }
.ed-plain:disabled { cursor: not-allowed; opacity: 0.4; }
.ed-lnk { color: var(--primary); text-decoration: none; font-weight: 500; }
.ed-lnk:hover { text-decoration: underline; }
.ed-press:active { transform: translateY(1px); }
.ed-hov:hover:not(:disabled) { background: var(--accent); color: var(--foreground); }
.ed-clamp1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ed-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Tooltip: purple fill, white text (components/ui/tooltip). */
.ed-tip { position: relative; }
.ed-tip:hover::after, .ed-tip:focus-visible::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  background: var(--primary); color: var(--primary-foreground); font-size: 12px; line-height: 16px; font-weight: 500;
  padding: 6px 10px; border-radius: 6px; white-space: normal; width: max-content; max-width: 260px; z-index: 80; pointer-events: none;
  box-shadow: 0 4px 12px hsl(222 47% 11% / 0.15); text-align: left;
}
.ed-tip-below:hover::after, .ed-tip-below:focus-visible::after { bottom: auto; top: calc(100% + 8px); }
.ed-tip-end:hover::after, .ed-tip-end:focus-visible::after { left: auto; right: 0; transform: none; }
.ed-tip-start:hover::after, .ed-tip-start:focus-visible::after { left: 0; transform: none; }
.ed-info { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; color: var(--muted-foreground); }

/* Buttons (design-system Button: default, outline, ghost). */
.ed-btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--radius, 0.5rem); border: 1px solid transparent; font: inherit; font-size: 14px; font-weight: 500; line-height: 20px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.ed-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ed-btn-primary { background: var(--primary); color: var(--primary-foreground); }
.ed-btn-primary:hover:not(:disabled) { background: var(--interactive-primary-hover, var(--primary)); }
.ed-btn-outline { background: var(--background); color: var(--foreground); border-color: var(--input); }
.ed-btn-outline:hover:not(:disabled), .ed-btn-ghost:hover:not(:disabled) { background: var(--accent); color: var(--accent-foreground); }
.ed-btn-ghost { background: transparent; color: var(--foreground); }
.ed-btn-wide { padding: 0 24px; }
.ed-btn-mid { padding: 0 20px; }

/* Fields */
.ed-input, .ed-textarea, .ed-select { width: 100%; border: 1px solid var(--input); border-radius: 6px; background: var(--card); color: var(--foreground); font: inherit; font-size: 14px; line-height: 20px; }
.ed-input, .ed-select { height: 40px; padding: 0 12px; }
.ed-textarea { padding: 8px 12px; resize: vertical; min-height: 80px; }
.ed-input::placeholder, .ed-textarea::placeholder { color: var(--muted-foreground); }
.ed-input:focus-visible, .ed-textarea:focus-visible, .ed-select:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.ed-input[aria-invalid="true"], .ed-textarea[aria-invalid="true"] { border-color: var(--danger-border); }
.ed-select { font-size: 15px; padding: 0 10px; }

/* Switch */
.ed-switch { appearance: none; position: relative; flex: none; width: 44px; height: 24px; border-radius: 999px; border: 2px solid transparent; background: var(--input); cursor: pointer; padding: 0; }
.ed-switch::after { content: ""; position: absolute; top: 0; left: 0; width: 20px; height: 20px; border-radius: 999px; background: var(--background); box-shadow: 0 1px 3px hsl(222 47% 11% / 0.2); transition: transform 150ms ease; }
.ed-switch[aria-checked="true"] { background: var(--primary); }
.ed-switch[aria-checked="true"]::after { transform: translateX(20px); }

/* Composer */
.ed { display: flex; flex-direction: column; gap: 20px; }
.ed-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ed-head-text { display: flex; flex-direction: column; gap: 4px; }
.ed-back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; min-height: 32px; align-self: flex-start; }
.ed-title { margin: 0; font-size: 28px; line-height: 36px; font-weight: 700; }
.ed-tabs { display: none; gap: 4px; padding: 4px; border-radius: 10px; background: var(--muted); width: 100%; }
.ed-tab { flex: 1; height: 36px; border-radius: 7px; font-size: 14px; font-weight: 500; text-align: center; color: var(--muted-foreground); }
.ed-tab[aria-pressed="true"] { font-weight: 600; color: var(--foreground); background: var(--card); box-shadow: 0 1px 2px hsl(222 47% 11% / 0.08); }
.ed-alert { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--danger-border); background: var(--danger-background); color: var(--danger-foreground); font-size: 14px; line-height: 21px; }
.ed-alert[hidden] { display: none; }
.ed-alert:focus { outline: none; }
.ed-cols { display: flex; gap: 32px; align-items: flex-start; flex-wrap: wrap; }
.ed-form { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.ed-sec { display: flex; flex-direction: column; gap: 8px; }
.ed-sec-10 { gap: 10px; }
.ed-label { font-size: 14px; font-weight: 600; }
.ed-label-sm { font-size: 13px; font-weight: 600; }
.ed-labelrow { display: inline-flex; align-items: center; gap: 6px; }
.ed-row-between { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ed-muted { font-size: 13px; line-height: 18px; color: var(--muted-foreground); }
.ed-note { margin: 0; font-size: 13px; line-height: 18px; color: var(--muted-foreground); }
.ed-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ed-chip { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 8px; border-radius: 999px; font-size: 14px; font-weight: 600; border: 1px solid var(--border); background: var(--card); }
.ed-chip[aria-pressed="true"] { border: 2px solid var(--primary); background: var(--brand-soft); padding: 0 13px 0 7px; }
.ed-chip:disabled { opacity: 0.6; cursor: not-allowed; }
.ed-chip-note { font-size: 12px; font-weight: 500; color: var(--warning-foreground); }
.ed-avatar { width: 24px; height: 24px; flex: none; border-radius: 999px; background: var(--brand-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.ed-avatar-lg { width: 32px; height: 32px; font-size: 13px; }
.ed-avatar { position: relative; overflow: hidden; }
.ed-avatar.has-pic { color: #fff; }
.ed-avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ed-type { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; min-height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); }
.ed-type[aria-checked="true"] { border: 2px solid var(--primary); background: var(--brand-soft); padding: 11px 13px; }
.ed-type[aria-disabled="true"] { cursor: not-allowed; }
.ed-type[aria-disabled="true"]:not([aria-checked="true"]) { opacity: 0.5; }
.ed-type-name { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.ed-type-rule { font-size: 13px; line-height: 18px; color: var(--muted-foreground); }
.ed-drop { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 16px; border: 1.5px dashed var(--border-strong); border-radius: 12px; background: var(--surface-muted); text-align: center; }
.ed-drop.is-drag { border-color: var(--primary); background: var(--brand-soft); }
.ed-drop-icon { color: var(--primary); display: inline-flex; }
.ed-drop-text { font-size: 15px; }
.ed-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ed-item { display: flex; flex-direction: column; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); }
.ed-item.is-error { border-color: var(--danger-border); background: var(--danger-background); }
.ed-item-row { display: flex; gap: 12px; align-items: center; }
.ed-thumb { position: relative; width: 72px; height: 72px; flex: none; border-radius: 8px; overflow: hidden; background: var(--muted); color: var(--muted-foreground); display: inline-flex; align-items: center; justify-content: center; }
.ed-fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-order { position: absolute; top: 4px; left: 4px; z-index: 1; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--foreground); color: var(--background); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.ed-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ed-item-name { font-size: 14px; font-weight: 600; }
.ed-ok { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--success-foreground); }
.ed-err { font-size: 13px; line-height: 18px; color: var(--danger-foreground); overflow-wrap: anywhere; }
.ed-progress { height: 6px; border-radius: 999px; background: var(--progress-track); overflow: hidden; }
.ed-progress-bar { display: block; height: 100%; width: 0; background: var(--progress-indicator, var(--primary)); transition: width 200ms ease; }
.ed-actions { display: flex; gap: 2px; flex: none; }
.ed-iconbtn { width: 36px; height: 36px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted-foreground); }
.ed-alt { display: flex; flex-direction: column; gap: 6px; }
.ed-counter { align-self: flex-end; font-size: 13px; color: var(--muted-foreground); }
.ed-counter.is-over { color: var(--danger-foreground); }
.ed-toggle { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.ed-toggle label { font-size: 14px; font-weight: 500; }
.ed-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ed-choice { height: 44px; border-radius: 10px; font-size: 15px; font-weight: 600; text-align: center; border: 1px solid var(--border); background: var(--card); color: var(--foreground); }
.ed-choice[aria-checked="true"] { border: 2px solid var(--primary); background: var(--brand-soft); color: var(--primary); }
.ed-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ed-tz { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted-foreground); }
.ed-tz strong { color: var(--foreground); font-weight: 600; }
.ed-tz .ed-lnk { font-size: 13px; min-height: 32px; }
.ed-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
.ed-preview { flex: 1 1 320px; max-width: 360px; display: flex; flex-direction: column; gap: 8px; position: sticky; top: 88px; }
.ed-pv-card { border: 1px solid var(--border); border-radius: 12px; background: var(--card); overflow: hidden; }
.ed-pv-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.ed-pv-who { display: flex; flex-direction: column; min-width: 0; }
.ed-pv-user { font-size: 14px; font-weight: 600; }
.ed-pv-when { font-size: 12px; color: var(--muted-foreground); }
.ed-pv-media { position: relative; aspect-ratio: 1 / 1; background: var(--muted); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ed-pv-media.is-reel { aspect-ratio: 4 / 5; }
.ed-pv-ph { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted-foreground); font-size: 13px; padding: 0 12px; text-align: center; overflow-wrap: anywhere; }
.ed-count { position: absolute; top: 10px; right: 10px; z-index: 1; padding: 2px 8px; border-radius: 999px; background: hsl(222 47% 11% / 0.7); color: #fff; font-size: 12px; font-weight: 600; }
.ed-dots { display: flex; justify-content: center; gap: 4px; padding-top: 10px; flex-wrap: wrap; }
.ed-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--border-strong); }
.ed-dot.is-on { background: var(--primary); }
.ed-pv-caption { margin: 0; padding: 10px 12px 14px; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.ed-pv-foot { font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
/* "Your recent posts": the new post first, then the account's latest posts from Instagram. */
.ed-grid-sec { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ed-grid-head { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; }
.ed-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.ed-cell { position: relative; aspect-ratio: 1 / 1; min-width: 0; background: var(--muted); color: var(--muted-foreground); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.ed-cell.is-new::after { content: ""; position: absolute; inset: 0; z-index: 1; border: 2px solid var(--primary); pointer-events: none; }
.ed-cell-new { position: absolute; left: 6px; top: 6px; z-index: 2; padding: 1px 8px; border-radius: 999px; background: var(--primary); color: var(--primary-foreground); font-size: 11px; line-height: 16px; font-weight: 700; }
.ed-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px; border: 1px solid var(--warning-border); border-radius: 12px; background: var(--warning-background); color: var(--warning-foreground); }
.ed-empty-title { margin: 0; font-size: 16px; font-weight: 600; }
.ed-empty-text { margin: 0; font-size: 14px; line-height: 21px; }

/* Post detail: side panel (desktop), bottom sheet (phone). */
.pd-under { pointer-events: none; }
.pd-lock { overflow: hidden; }
.pd-overlay { position: fixed; inset: 0; z-index: 90; }
.pd-backdrop { position: absolute; inset: 0; background: var(--overlay); cursor: default; }
.pd-panel { position: absolute; top: 0; right: 0; bottom: 0; width: 440px; max-width: 100%; display: flex; flex-direction: column; overflow: hidden; background: var(--card); border-left: 1px solid var(--border); box-shadow: -18px 0 44px -10px hsl(222 47% 11% / 0.18); }
.pd-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--border); }
.pd-title { margin: 0; font-size: 18px; line-height: 26px; font-weight: 600; }
.pd-close { width: 40px; height: 40px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.pd-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 18px; padding: 20px; }
.pd-media { position: relative; flex: none; aspect-ratio: 1 / 1; max-height: 400px; border-radius: 12px; overflow: hidden; background: var(--muted); color: var(--muted-foreground); display: flex; align-items: center; justify-content: center; }
.pd-media.is-reel { aspect-ratio: 4 / 5; }
.pd-status { display: flex; flex-direction: column; gap: 8px; }
.pd-status-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pd-when { font-size: 14px; color: var(--muted-foreground); }
.pd-badge { display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid transparent; padding: 2px 10px; font-size: 12px; line-height: 16px; font-weight: 600; }
.pd-badge-scheduled { border-color: var(--border); color: var(--foreground); }
.pd-badge-publishing { background: var(--primary); color: var(--primary-foreground); }
.pd-badge-waiting { background: var(--warning-background); color: var(--warning-foreground); border-color: var(--warning-border); }
.pd-badge-failed { background: var(--danger); color: #fff; }
.pd-badge-posted { background: var(--success-background); color: var(--success-foreground); border-color: var(--success-border); }
.pd-badge-instagram { background: var(--muted); color: var(--muted-foreground); border-color: var(--border); }
.pd-counts { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; font-size: 15px; line-height: 21px; }
.pd-count { display: inline-flex; align-items: center; gap: 6px; }
.pd-counts .ed-info { margin-left: auto; }
.pd-reason { padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 21px; border: 1px solid var(--danger-border); background: var(--danger-background); color: var(--danger-foreground); }
.pd-reason.is-warning { border-color: var(--warning-border); background: var(--warning-background); color: var(--warning-foreground); }
.pd-busy { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 21px; color: var(--muted-foreground); }
.pd-spin { color: var(--primary); display: inline-flex; animation: pd-spin 1s linear infinite; }
@keyframes pd-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pd-spin { animation: none; } .ed-progress-bar, .ed-switch::after { transition: none; } }
.pd-dl { margin: 0; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px 12px; font-size: 14px; line-height: 21px; }
.pd-dl dt { color: var(--muted-foreground); }
.pd-dl dd { margin: 0; overflow-wrap: anywhere; }
.pd-strong { font-weight: 600; }
.pd-pre { white-space: pre-line; }
.pd-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--border); }
.pd-foot:empty { display: none; }
.pd-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 15px; }

@media (max-width: 767.98px) {
  .ed-title { font-size: 26px; line-height: 34px; }
  .ed-back { min-height: 44px; }
  .ed-tabs { display: flex; }
  .ed-tab { height: 44px; }
  .ed-form { flex: 1 1 100%; }
  .ed-preview { flex: 1 1 100%; max-width: none; width: 100%; position: static; }
  .ed[data-view="form"] .ed-preview { display: none; }
  .ed[data-view="preview"] .ed-form { display: none; }
  .ed-types { grid-template-columns: minmax(0, 1fr); }
  .ed-thumb { width: 64px; height: 64px; }
  .ed-iconbtn { width: 44px; height: 44px; }
  .ed-info { min-width: 44px; min-height: 44px; margin: -10px; }
  .ed-input, .ed-select { min-height: 44px; font-size: 16px; }
  .ed-textarea { font-size: 16px; }
  .ed-tz .ed-lnk { min-height: 44px; }
  .ed-foot { position: sticky; bottom: 0; z-index: 5; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px 0 max(12px, env(safe-area-inset-bottom)); background: var(--background); }
  .ed-foot .ed-btn { width: 100%; padding: 0 12px; }
  .pd-panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 85vh; max-height: 85dvh; border-left: 0; border-radius: 16px 16px 0 0; box-shadow: 0 -12px 40px -10px hsl(222 47% 11% / 0.25); }
  .pd-close { width: 44px; height: 44px; }
  .pd-media { max-height: 240px; }
  .pd-dl { grid-template-columns: 96px minmax(0, 1fr); }
  .pd-foot { padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
  .pd-foot .ed-btn { flex: 1; }
}
