/* Idolory: cyan accents, soft surfaces and a subtle atmospheric backdrop. */
:root {
  --bg: #f4f5f6;
  --page-gradient: radial-gradient(ellipse at 80% 0%, #a8bbef22, transparent 55%), radial-gradient(ellipse at 10% 25%, #9ddde822, transparent 60%);
  --sidebar-bg: linear-gradient(160deg, #ffffff, #f3f6fa);
  --surface: #ffffff;
  --surface-2: #f4f5f6;
  --surface-3: #e8ebee;
  --border: #e6e9ec;
  --border-strong: #d0d6dc;
  --text: #000000;
  --muted: #8a96a3;
  --faint: #b1bac3;
  --primary: #00aff0;
  --primary-hover: #008ccf;
  --primary-soft: #e5f7fe;
  --primary-text: #ffffff;
  --accent: #ff4d8d;
  --green: #18a957;
  --green-soft: #e2f6ea;
  --amber: #d98200;
  --amber-soft: #fff3de;
  --red: #ff4545;
  --red-soft: #ffe9e9;
  --blue: #00aff0;
  --blue-soft: #e5f7fe;
  --violet: #7f5af0;
  --violet-soft: #efeafe;
  --gray-soft: #eef0f2;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 16px 48px rgba(0, 20, 40, 0.16);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --pill: 1000px;
  /* Spacing scale (4 px grid): margins, gaps and paddings use it. */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  /* Type scale */
  --fs-xs: 11.5px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-2xl: 26px;
  --fs-3xl: 32px;
  /* One optical scale for every interface icon; hit areas stay independent. */
  --icon-xs: 12px;
  --icon-sm: 14px;
  --icon-md: 16px;
  --icon-lg: 18px;
  --icon-xl: 24px;
  --icon-stroke: 1.75;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --sidebar: 280px;
  --app-header-height: 72px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1119;
    --page-gradient: radial-gradient(ellipse at 85% 0%, #7567bb24, transparent 55%), radial-gradient(ellipse at 10% 30%, #26879e18, transparent 60%), linear-gradient(150deg, #101822, #11131e 55%, #15131f);
    --sidebar-bg: linear-gradient(165deg, #18222e, #131924 45%, #141822);
    --surface: #171d28;
    --surface-2: #1d2432;
    --surface-3: #272f3f;
    --border: #2a3241;
    --border-strong: #3b4558;
    --text: #ffffff;
    --muted: #8a96a3;
    --faint: #5d6772;
    --primary: #00aff0;
    --primary-hover: #26bdf5;
    --primary-soft: #05283a;
    --accent: #ff5c97;
    --green: #2fd17a;
    --green-soft: #0d2a1b;
    --amber: #f2b13c;
    --amber-soft: #302207;
    --red: #ff6464;
    --red-soft: #361414;
    --blue: #00aff0;
    --blue-soft: #05283a;
    --violet: #a58bff;
    --violet-soft: #241a45;
    --gray-soft: #1f1f23;
    --shadow: none;
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

/* The hidden attribute always wins over component display rules (.btn, .stack…). */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
body {
  min-height: 100vh;
}
body,
.app-header {
  background-color: var(--bg);
  background-image: var(--page-gradient);
  background-attachment: fixed;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
h1 {
  font-size: var(--fs-2xl);
  font-weight: 750;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -0.015em;
}
h3 {
  font-size: 15px;
  font-weight: 620;
}
p {
  margin: 0;
}

.boot {
  display: grid;
  place-items: center;
  height: 100vh;
  color: var(--muted);
}

/* ---------- Layout ---------- */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px 20px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.sidebar > .brand, .sidebar > .model-switch { flex-shrink: 0; }
.sidebar > .nav { flex: 1; min-height: 80px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.sidebar-wallet {
  flex-shrink: 0;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
  border-radius: var(--radius);
  background: radial-gradient(ellipse at 0% 100%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 75%), radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--violet) 10%, transparent), transparent 70%), var(--surface);
}
.sidebar-wallet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.sidebar-wallet-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 500; }
.sidebar-wallet-label .icon { --icon-size: 14px; color: var(--primary); }
.sidebar-wallet-balance { font-size: 21px; font-weight: 650; line-height: 1.2; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.sidebar-wallet-meter { height: 4px; overflow: hidden; border-radius: var(--pill); background: color-mix(in srgb, var(--muted) 18%, transparent); }
.sidebar-wallet-meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--violet)); }
.sidebar-wallet-usage { margin: 8px 0 12px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.sidebar-wallet-offer { display: grid; grid-template-columns: 1fr auto; gap: 2px 6px; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--primary) 15%, var(--border)); font-size: 11px; line-height: 1.5; }
.sidebar-wallet-offer > span { grid-column: 1 / -1; color: var(--text); }
.sidebar-wallet-offer > strong { font-size: 13px; font-weight: 650; color: var(--primary); }
.sidebar-wallet-offer > small { align-self: center; color: var(--muted); font-size: 9px; }
.sidebar-wallet .sidebar-wallet-topup { display: flex; width: 100%; min-height: 34px; margin-top: 12px; padding: 7px 10px; border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); border-radius: 8px; background: color-mix(in srgb, var(--primary) 12%, var(--surface)); color: var(--text); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.sidebar-wallet .sidebar-wallet-topup:hover { background: color-mix(in srgb, var(--primary) 22%, var(--surface)); border-color: var(--primary); }
.sidebar-wallet-topup .icon { --icon-size: 14px; color: var(--primary); }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  padding: 0 10px 24px;
  color: var(--text);
  text-decoration: none;
  font-weight: 750;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.brand img {
  width: 132px;
  height: 42px;
  flex: none;
  object-fit: contain;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--pill);
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}
.nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}
.nav a.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 650;
}
.nav a .icon {
  --icon-size: var(--icon-lg);
}
.nav a .social-logo { width: var(--icon-lg); height: var(--icon-lg); flex: none; }
.nav a.nav-create, .btn.btn-create {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 6px 0;
  color: #202b3d;
  font-weight: 650;
  background: linear-gradient(112deg, #ace7ee 0%, #c1c5f5 34%, #edc8eb 66%, #f7dbb3 100%);
  box-shadow: inset 0 1px 0 #ffffff80, 0 3px 12px #b6c4ec20;
}
.nav a.nav-create:hover, .btn.btn-create:hover { filter: brightness(1.06); }
.nav a.nav-create.active { box-shadow: inset 0 0 0 1px #ffffff70, 0 3px 16px #bdc4ed40; }
.nav a.nav-create::after, .btn.btn-create::after {
  content: '';
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, #ffffff70 48%, transparent 70%);
  transform: translateX(-110%);
  animation: create-reflection 8s ease-in-out infinite;
}
@keyframes create-reflection { 0%, 65% { transform: translateX(-110%); } 90%, 100% { transform: translateX(110%); } }
@media (prefers-reduced-motion: reduce) { .nav a.nav-create::after, .btn.btn-create::after { animation: none; } }
.nav .count {
  margin-left: auto;
  min-width: 20px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--primary);
  color: var(--primary-text);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
.nav .sep {
  margin: 12px 10px 4px;
  font-size: 11px;
  font-weight: 650;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.icon {
  display: inline-block;
  width: var(--icon-size, var(--icon-md));
  height: var(--icon-size, var(--icon-md));
  flex: none;
  vertical-align: middle;
  color: inherit;
  stroke: currentColor;
  fill: none;
  stroke-width: var(--icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.icon-link > .icon {
  --icon-size: var(--icon-sm);
}

/* Account controls stay in the header; the sidebar holds the model and navigation. */
.app-header { position: sticky; top: 0; z-index: 30; min-height: var(--app-header-height); display: flex; align-items: center; gap: 22px; padding: 12px 32px; }
.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.header-wallet { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 6px 11px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); white-space: nowrap; text-decoration: none; font-size: 12px; }
.header-wallet:hover { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.header-wallet .icon { --icon-size: 15px; color: var(--primary); }
.header-wallet b { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.header-wallet-label { color: var(--muted); }
.header-menu { position: relative; }
.header-menu-trigger { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; min-width: 32px; padding: 6px; border-radius: 7px; color: var(--muted); cursor: pointer; list-style: none; }
.header-menu-trigger::-webkit-details-marker { display: none; }
.header-menu-trigger::marker { content: ''; }
.header-menu-trigger:hover, .header-menu[open] > summary { color: var(--text); background: var(--surface-2); }
.header-menu-trigger:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.header-menu-trigger .icon { --icon-size: 16px; }
.header-menu-trigger .icon:last-child:not(:first-child) { --icon-size: 12px; }
.header-email { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 12px; }
.header-menu-panel { position: absolute; top: calc(100% + 14px); right: 0; z-index: 1; width: 292px; max-width: calc(100vw - 32px); padding: 8px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg); }
.header-menu:not([open]) > .header-menu-panel { display: none; }
.header-menu-panel a, .header-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 9px 11px; border: 0; border-radius: 6px; background: transparent; color: var(--text); text-align: left; text-decoration: none; font: inherit; font-size: 13px; cursor: pointer; }
.header-menu-panel a:hover, .header-menu-panel a.active, .header-menu-item:hover { background: var(--surface-2); color: var(--text); }
.header-menu-panel .icon { --icon-size: 15px; color: var(--muted); }
.header-menu-panel .divider { margin-top: 7px; border-top: 1px solid var(--border); padding-top: 14px; }
.header-account-info { display: grid; gap: 4px; padding: 12px 11px 16px; margin-bottom: 4px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.header-account-info b { font-size: 13px; font-weight: 600; }
.header-account-info span { font-size: 12px; color: var(--muted); }
.header-account-info small { font-size: 11px; color: var(--muted); margin-top: 3px; }
.header-preference { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 11px; font-size: 12px; }
.header-client-view { padding: 10px 11px; }
.header-client-view .switch { gap: 12px; }
.header-client-view .switch .txt { font-size: 12px; }
.header-client-view .switch .txt small { font-size: 11px; margin-top: 3px; }
.header-client-view .switch input { display: block; position: absolute; opacity: 0; width: 1px; height: 1px; }
.header-client-view .switch input:focus-visible + .track { outline: 2px solid var(--primary); outline-offset: 3px; }
.header-menu-panel .header-logout, .header-logout .icon { color: var(--red); }
.sidebar-toggle.btn, .nav-scrim { display: none; }
@media (max-width: 1200px) {
  .app-header { padding: 12px 24px; gap: 16px; }
  .header-email { display: none; }
}
@media (max-width: 860px) {
  :root { --app-header-height: 64px; }
  .app-header { flex-wrap: wrap; gap: 10px; padding: 10px 16px 8px; }
  .sidebar-toggle.btn { display: inline-flex; flex-shrink: 0; }
  .header-actions { gap: 6px; }
  .header-wallet-label { display: none; }
  .header-menu-panel { position: fixed; top: 60px; right: 12px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 80px); overflow-y: auto; }
  .shell.nav-open .nav-scrim { display: block; position: fixed; inset: 0; left: min(var(--sidebar), calc(100vw - 40px)); z-index: 39; border: 0; background: #0007; cursor: pointer; }
}
@media (max-width: 520px) {
  .app-header { gap: 6px; padding-inline: 12px; }
  .header-actions { gap: 2px; }
  .header-wallet { gap: 5px; padding: 6px 7px; }
  .header-menu-trigger { padding-inline: 5px; gap: 3px; }
}

.content-col {
  min-width: 0;
}
.main {
  min-width: 0;
  padding: var(--sp-8) var(--sp-10) 80px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
  flex-wrap: wrap;
}
.page-head p {
  color: var(--muted);
  margin-top: var(--sp-2);
  max-width: 760px;
  font-size: var(--fs-md);
  line-height: 1.55;
}
.page-head .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.page-head .actions .select-control {
  width: auto;
  min-width: 170px;
  max-width: 260px;
}

.banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.banner.sim {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: color-mix(in srgb, var(--amber) 25%, transparent);
}
.banner.danger {
  background: var(--red-soft);
  color: var(--red);
}
.banner.info {
  background: var(--blue-soft);
  color: var(--blue);
}
.banner b {
  font-weight: 650;
}
.banner > .icon,
.toast > .icon {
  margin-top: 0.2em;
}

/* ---------- Cartes & grilles ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card.pad {
  padding: var(--sp-6);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--border);
}
.card-body {
  padding: var(--sp-6);
}

.grid {
  display: grid;
  gap: var(--sp-5);
}
.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid.auto {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.grid.split {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
}
.grid.split-r {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  align-items: start;
}
.grid.auto-lg {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: var(--sp-4);
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.row.between {
  justify-content: space-between;
}
.spacer {
  flex: 1;
}
.muted {
  color: var(--muted);
}
.faint {
  color: var(--faint);
}
.small {
  font-size: 12.5px;
}
.tiny {
  font-size: 11.5px;
}
.mono {
  font-family: var(--mono);
  font-size: 12px;
}
.right {
  text-align: right;
}
.nowrap {
  white-space: nowrap;
}
.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pre {
  white-space: pre-wrap;
}

.kpi {
  padding: 16px 18px;
}
.kpi .label {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 550;
}
.kpi .value {
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin-top: 2px;
}
.kpi .sub {
  color: var(--faint);
  font-size: 12px;
}
.kpi.accent .value {
  color: var(--primary);
}

/* ---------- Boutons & formulaires ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 18px;
  border-radius: var(--pill);
  border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--border));
  background: var(--surface);
  color: var(--primary);
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, transform 0.05s;
  text-decoration: none !important;
}
.btn:hover {
  background: var(--primary-soft);
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-text);
}
.btn.primary:hover {
  background: var(--primary-hover);
}
.btn.danger {
  color: var(--red);
  border-color: color-mix(in srgb, var(--red) 35%, var(--border));
}
.btn.danger:hover {
  background: var(--red-soft);
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.btn.ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}
.btn.ghost.danger {
  color: var(--red);
}
.btn.sm {
  height: 30px;
  padding: 0 12px;
  font-size: 11.5px;
}
.btn.lg {
  height: 46px;
  padding: 0 24px;
  font-size: 14px;
}
.btn.block {
  width: 100%;
}
.btn .icon {
  --icon-size: var(--icon-sm);
}
.btn.lg .icon,
.btn.icon-only .icon {
  --icon-size: var(--icon-md);
}
.btn.icon-only {
  width: 36px;
  padding: 0;
}
.btn.sm.icon-only {
  width: 30px;
}

.field {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}
.field > label,
.label-text {
  font-size: 12.5px;
  font-weight: 620;
  color: var(--text);
}
.field .hint {
  font-size: 12px;
  color: var(--muted);
}
input[type='text'],
input[type='email'],
input[type='password'],
input[type='number'],
input[type='url'],
input[type='datetime-local'],
input[type='time'],
.select-trigger,
textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
textarea {
  height: auto;
  min-height: 90px;
  padding: 10px 11px;
  resize: vertical;
  line-height: 1.45;
}
input:focus,
.select-trigger:focus-visible,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
input[type='range'] {
  width: 100%;
  accent-color: var(--primary);
}
input[type='checkbox'] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
.form-grid .full {
  grid-column: 1 / -1;
}
.check {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 13.5px;
}
.check input {
  margin-top: 2px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.switch input {
  display: none;
}
.switch .track {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 99px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  transition: background 0.15s;
  flex: none;
}
.switch .track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s;
}
.switch input:checked + .track {
  background: var(--primary);
  border-color: var(--primary);
}
.switch input:checked + .track::after {
  transform: translateX(16px);
}
.switch .txt {
  font-size: 13.5px;
}
.switch .txt small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  border-radius: var(--pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}
.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 13px;
  border: 0;
  border-radius: var(--pill);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.segmented button:hover {
  color: var(--text);
}
.segmented button.on {
  background: var(--primary);
  color: var(--primary-text);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.choice {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--text);
}
.choice:hover {
  border-color: var(--border-strong);
}
.choice.on {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.choice .t {
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 8px;
}
.choice .d {
  color: var(--muted);
  font-size: 12.5px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12.5px;
}
.chip button {
  display: inline-grid;
  place-items: center;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}
.chip button .icon {
  --icon-size: var(--icon-xs);
}

/* ---------- Badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
  background: var(--gray-soft);
  color: var(--muted);
}
.badge.green {
  background: var(--green-soft);
  color: var(--green);
}
.badge.amber {
  background: var(--amber-soft);
  color: var(--amber);
}
.badge.red {
  background: var(--red-soft);
  color: var(--red);
}
.badge.blue {
  background: var(--blue-soft);
  color: var(--blue);
}
.badge.violet {
  background: var(--violet-soft);
  color: var(--violet);
}
.badge.primary {
  background: var(--primary-soft);
  color: var(--primary);
}
.badge.admin-tag {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 10.5px;
}
.badge.admin-tag .icon {
  --icon-size: var(--icon-xs);
}
.admin-box {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  font-size: 12.5px;
}
.card.admin-card {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}
.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge .dot.pulse {
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}

/* ---------- Contenus ---------- */

.content-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); align-items: start; }
.content-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}
.content-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--surface-2);
  overflow: hidden;
}
.media img,
.media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media .placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--faint);
  text-align: center;
  padding: 16px;
  background: repeating-linear-gradient(135deg, var(--surface-2), var(--surface-2) 12px, var(--surface-3) 12px, var(--surface-3) 24px);
}
.media .placeholder.working {
  background: linear-gradient(110deg, var(--surface-2) 30%, var(--surface-3) 50%, var(--surface-2) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
.media .tl,
.media .tr,
.media .bl {
  position: absolute;
  display: flex;
  gap: 5px;
}
.media .tl {
  top: 9px;
  left: 9px;
}
.media .tr {
  top: 9px;
  right: 9px;
}
.media .bl {
  bottom: 9px;
  left: 9px;
}
.media .badge {
  backdrop-filter: blur(6px);
}
.overlay-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 650;
  background: rgba(10, 12, 20, 0.62);
  color: #fff;
  backdrop-filter: blur(6px);
}
.overlay-pill .icon {
  --icon-size: var(--icon-xs);
}
.content-card .body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 9px;
  padding: 14px 16px 16px;
  flex: 1;
}
.content-card .meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.content-card .title {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 620;
  font-size: 13.5px;
}
.content-card .cap {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12.5px;
}
.content-card .foot {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: space-between;
  min-width: 0;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.content-card .err {
  color: var(--red);
  font-size: 12px;
}
.content-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.content-accounts { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 24px; }
.content-account { display: inline-flex; align-items: center; gap: 6px; flex: 0 1 auto; min-width: 0; color: var(--text); font-size: 11px; font-weight: 550; }
.content-account > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content-account .social-logo, .publication-destination .social-logo { width: 16px; height: 16px; flex: none; }
.content-account-more { flex: none; border: 1px solid var(--border); border-radius: 6px; padding: 2px 5px; background: transparent; color: var(--muted); font: inherit; font-size: 10px; cursor: pointer; }
.content-account-more:hover { color: var(--primary); border-color: var(--primary); }
.content-no-account { display: flex; align-items: center; gap: 6px; min-height: 24px; font-size: 11px; color: var(--muted); }
.content-no-account .icon { --icon-size: 13px; }
.content-card-context { display: grid; gap: 3px; min-width: 0; font-size: 10px; color: var(--muted); }
.content-character { color: var(--text); font-size: 11px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content-timestamp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content-cost { flex: none; display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-size: 11px; font-variant-numeric: tabular-nums; }
.content-cost .icon { --icon-size: 14px; }
.content-card .media .badge { font-size: 10px; }
.publication-accounts { display: grid; gap: 10px; min-width: 0; }
.publication-list { display: grid; gap: 8px; max-height: 260px; overflow: auto; }
.publication-row { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; min-width: 0; }
.publication-destination { display: flex; align-items: center; gap: 8px; min-width: 0; }
.publication-destination .handle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 550; }
.publication-destination .badge { font-size: 10px; }
.publication-row .publication-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; margin: 5px 0 0 24px; color: var(--muted); font-size: 11px; }
.publication-row .publication-meta button { border: 0; background: none; padding: 0; color: var(--primary); font: inherit; cursor: pointer; }
.publication-row .err { font-size: 11px; color: var(--red); margin-top: 6px; }
.publication-picker { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; }
.publication-choices { display: grid; gap: 4px; max-height: 220px; overflow: auto; }
.publication-choice { display: flex; align-items: center; gap: 9px; padding: 7px; min-width: 0; border-radius: 6px; font-size: 12px; cursor: pointer; }
.publication-choice:hover { background: var(--surface-2); }
.publication-choice .social-logo { width: 16px; height: 16px; }
.publication-choice span { min-width: 0; overflow-wrap: anywhere; }
.publication-choice input { flex: none; accent-color: var(--primary); }
.publication-choice:has(input:disabled) { color: var(--muted); }

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  overflow-x: auto;
}
.tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.tabs button.on {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.tabs .n {
  font-size: 11px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--surface-2);
}

/* ---------- Tables ---------- */

.table-wrap {
  overflow-x: auto;
}
table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: var(--surface);
  position: sticky;
  top: 0;
}
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table tbody tr:hover td {
  background: var(--surface-2);
}
.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.table tr.dim td {
  opacity: 0.55;
}

/* ---------- Modal & toasts ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 10, 18, 0.55);
  backdrop-filter: blur(3px);
  animation: fade 0.12s ease-out;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: pop 0.14s ease-out;
}
.modal.wide {
  width: min(1080px, 100%);
}
@keyframes pop {
  from {
    transform: scale(0.97);
    opacity: 0;
  }
}
.modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-head h2 {
  flex: 1;
}
.modal-body {
  padding: 20px;
  overflow-y: auto;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

#toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: grid;
  gap: 8px;
}
.toast {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 380px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--text);
  color: var(--surface);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  animation: pop 0.15s ease-out;
}
.toast.error {
  background: var(--red);
  color: #fff;
}
.toast.success {
  background: var(--green);
  color: #fff;
}

/* ---------- Visionneuse ---------- */

.viewer {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 4 / 5;
}
.viewer.vertical {
  aspect-ratio: 9 / 16;
  max-height: 70vh;
  margin: 0 auto;
}
.viewer img,
.viewer video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.viewer .nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.85);
  color: #111;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.viewer .nav-btn.prev {
  left: 10px;
}
.viewer .nav-btn.next {
  right: 10px;
}
.viewer .dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
}
.viewer .dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}
.viewer .dots span.on {
  background: #fff;
}

.image-zoom-trigger {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.image-zoom-trigger:focus-visible { outline: 2px solid var(--primary); outline-offset: -4px; }
.modal.image-zoom {
  width: min(1600px, calc(100vw - 48px));
  height: calc(100dvh - 48px);
  max-height: calc(100dvh - 48px);
  background: #0e1119;
}
.image-zoom .modal-head { flex: none; }
.image-zoom .modal-head h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-zoom .modal-body { flex: 1; min-height: 0; padding: 0; overflow: hidden; }
.image-zoom-stage { width: 100%; height: 100%; overflow: auto; overscroll-behavior: contain; }
.image-zoom-canvas {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  margin: auto;
  background: transparent;
  cursor: zoom-in;
}
.image-zoom-canvas img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; }
.image-zoom-canvas.is-zoomed { cursor: zoom-out; }
.image-zoom-canvas:focus-visible { outline: 2px solid var(--primary); outline-offset: -4px; }
@media (max-width: 560px) {
  .modal.image-zoom { width: calc(100vw - 24px); height: calc(100dvh - 48px); }
  .image-zoom .modal-head { padding: 12px; gap: 6px; }
  .image-zoom .modal-head h2 { font-size: 14px; }
  .image-zoom-toggle { flex: none; }
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.content-detail .detail-grid > .stack > .viewer { max-height: min(48vh, 480px); }
.detail-navigation { display: flex; align-items: center; gap: 4px; flex: none; }
.detail-navigation .btn { min-width: 32px; min-height: 32px; padding: 6px; }
.detail-navigation .icon { --icon-size: 16px; }
.detail-position { min-width: 58px; text-align: center; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.content-detail .modal-head { flex: none; }
.variation-panel { padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(135deg, rgba(0,180,225,.065), rgba(138,118,245,.045)); display: grid; gap: 12px; }
.variation-panel h3, .variation-panel p { margin: 0; }
.variation-panel h3 { font-size: 14px; font-weight: 600; }
.variation-controls { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.variation-count { display: grid; gap: 5px; }
.variation-count input { width: 88px; padding: 8px 10px; height: 36px; }
.variation-progress { display: grid; gap: 7px; }
.variation-progress progress { display: block; width: 100%; height: 4px; border: 0; border-radius: 8px; overflow: hidden; background: var(--border); accent-color: var(--primary); }
.variation-progress progress::-webkit-progress-bar { background: var(--border); }
.variation-progress progress::-webkit-progress-value { background: var(--primary); border-radius: 8px; }
.variation-thumbnails { display: grid; grid-auto-flow: column; grid-auto-columns: 80px; gap: 8px; overflow-x: auto; padding-bottom: 5px; max-width: 100%; }
.variation-thumbnail { position: relative; display: grid; gap: 5px; border: 1px solid var(--border); border-radius: 9px; background: transparent; padding: 4px; color: var(--muted); cursor: pointer; font: inherit; font-size: 10px; }
.variation-thumbnail:hover, .variation-thumbnail:focus-visible { border-color: var(--primary); color: var(--text); }
.variation-thumbnail img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 5px; }
.variation-assigned { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; background: #15262c; border-radius: 50%; padding: 3px; color: var(--primary); }
.variation-assigned .icon { width: 11px; height: 11px; }
.variation-notice { color: var(--amber); }
.variation-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.variation-comparison .viewer { width: 100%; height: min(62vh, 620px); min-height: 0; max-height: none; aspect-ratio: auto; }
@media (max-width: 560px) { .variation-comparison { grid-template-columns: minmax(0, 1fr); } .variation-comparison .viewer { height: 38vh; } }

.thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.thumb {
  position: relative;
  width: 74px;
  height: 92px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb button {
  display: grid;
  place-items: center;
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  line-height: 20px;
  padding: 0;
}
.thumb button .icon {
  --icon-size: var(--icon-xs);
}

.dropzone {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 30px 20px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.dropzone:hover,
.dropzone.over {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}
.dropzone .icon {
  --icon-size: var(--icon-xl);
}

.progress {
  height: 6px;
  border-radius: 99px;
  background: var(--surface-3);
  overflow: hidden;
}
.progress > div {
  height: 100%;
  background: var(--primary);
  border-radius: 99px;
  transition: width 0.2s;
}
.progress.warn > div {
  background: var(--amber);
}
.progress.over > div {
  background: var(--red);
}

.empty {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 50px 20px;
  text-align: center;
  color: var(--muted);
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
}
.empty-icon > .icon {
  --icon-size: var(--icon-xl);
}
.empty h3 {
  color: var(--text);
}

.checklist {
  display: grid;
  gap: 2px;
}
.checklist a,
.checklist div.item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none !important;
}
.checklist a:hover {
  background: var(--surface-2);
}
.checklist .tick {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--border-strong);
  flex: none;
}
.checklist .done .tick {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.checklist .done .t {
  color: var(--muted);
  text-decoration: line-through;
}
.checklist .tick .icon {
  --icon-size: var(--icon-xs);
}

.events {
  display: grid;
}
.event {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.event:last-child {
  border-bottom: 0;
}
.event .lvl {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex: none;
  background: var(--faint);
}
.event .lvl.success {
  background: var(--green);
}
.event .lvl.warn {
  background: var(--amber);
}
.event .lvl.error {
  background: var(--red);
}
.event .lvl.info {
  background: var(--blue);
}
.event .when {
  margin-left: auto;
  color: var(--faint);
  font-size: 11.5px;
  white-space: nowrap;
  padding-left: 8px;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.list-item:last-child {
  border-bottom: 0;
}
.list-item .mini {
  width: 44px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
  flex: none;
}
.list-item .mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #00aff0, #008ccf);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: none;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.stat-row div {
  padding: 8px;
  border-radius: 10px;
  background: var(--surface-2);
  text-align: center;
}
.stat-row b {
  display: block;
  font-size: 16px;
}
.stat-row span {
  font-size: 11px;
  color: var(--muted);
}

.quote-box {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
}
.quote-box .big {
  font-size: 24px;
  font-weight: 750;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.quote-lines {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.quote-lines div {
  padding: 10px;
  border-radius: 10px;
  background: var(--surface);
}
.quote-lines b {
  display: block;
  font-size: 17px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 26px 0 12px;
}
.section-title:first-child {
  margin-top: 0;
}

.kbd {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

@media (max-width: 1100px) {
  .grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    z-index: 40;
    left: 0;
    width: min(var(--sidebar), calc(100vw - 40px));
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform 0.2s;
    box-shadow: var(--shadow-lg);
  }
  .shell.nav-open .sidebar {
    visibility: visible;
    transform: none;
  }
  .main {
    padding: var(--sp-5) var(--sp-4) 64px;
  }
  .grid.cols-2,
  .grid.cols-3,
  .grid.split,
  .grid.split-r,
  .form-grid,
  .quote-lines {
    grid-template-columns: 1fr;
  }
  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Soul ID: real training status ---------- */

.soul-panel {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.soul-panel.active {
  border-color: color-mix(in srgb, var(--blue) 45%, var(--border));
  background: color-mix(in srgb, var(--blue) 6%, var(--surface-2));
}
.soul-panel.completed {
  border-color: color-mix(in srgb, var(--green) 40%, var(--border));
}
.soul-panel.failed {
  border-color: color-mix(in srgb, var(--red) 40%, var(--border));
}
.work-bar {
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent) 0 0 / 40% 100% no-repeat, var(--surface-3);
  animation: work 1.4s ease-in-out infinite;
}
@keyframes work {
  0% {
    background-position: -40% 0, 0 0;
  }
  100% {
    background-position: 140% 0, 0 0;
  }
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.steps li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
}
.steps .mark {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--border-strong);
  margin-top: 1px;
}
.steps .mark .icon {
  --icon-size: var(--icon-xs);
}
.steps li.done .mark {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.steps li.error .mark {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.steps li.active .mark {
  border-color: var(--blue);
  border-top-color: transparent;
  animation: spin 0.9s linear infinite;
}
.steps li.todo .lbl {
  color: var(--faint);
}
.steps li.active .lbl {
  font-weight: 650;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.soul-thumb {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.progress-line {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Scheduler ---------- */

.scheduler .sched-page-head { align-items: center; justify-content: flex-start; gap: 14px; margin-bottom: 18px; }
.sched-page-head h1 { font-size: 26px; letter-spacing: -.035em; }
.sched-account { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 330px; }
.sched-account .social-logo { width: 18px; height: 18px; flex: none; }
.sched-account .select-trigger { min-height: 36px; border-color: transparent; background: transparent; font-size: 12px; padding-left: 4px; }
.sched-account .select-trigger:hover { background: var(--surface-2); }
.sched-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.sched-date-nav { display: flex; align-items: center; gap: 3px; }
.sched-toolbar .range { padding: 0 8px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.sched-toolbar .btn { min-height: 30px; }
.sched-tz { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.sched-tz .icon { --icon-size: 12px; }
.sched { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.sched-tray { min-width: 0; border-radius: 12px; transition: background .15s; }
.sched-tray.over { outline: 2px dashed var(--primary); outline-offset: 5px; background: var(--primary-soft); }
.tray-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; min-height: 28px; }
.tray-head h2 { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.tray-count { font-size: 12px; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.tray-navigation { display: flex; gap: 2px; }
.tray-navigation .btn { min-width: 26px; min-height: 26px; padding: 4px; }
.tray-list { display: grid; grid-auto-flow: column; grid-auto-columns: 126px; gap: 10px; overflow-x: auto; padding: 2px 1px 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.filter-pills { display: inline-flex; gap: 3px; }
.filter-pills button { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 27px; padding: 0 7px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; }
.filter-pills button .icon { --icon-size: 14px; }
.filter-pills button.on { background: var(--surface-3); color: var(--text); }
.tray-card { position: relative; height: 164px; overflow: hidden; display: block; padding: 0; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); color: #fff; cursor: grab; user-select: none; scroll-snap-align: start; text-align: left; font: inherit; }
.tray-card::after { content: ''; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.7)); pointer-events: none; }
.tray-card > img { width: 100%; height: 100%; object-fit: cover; transition: transform .18s; }
.tray-card:hover { border-color: var(--primary); }
.tray-card:hover > img { transform: scale(1.035); }
.tray-card:active { cursor: grabbing; }
.tray-card:focus-visible, .cal-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.tray-placeholder { display: grid; place-items: center; height: 100%; color: var(--muted); }
.tray-format, .tray-unlinked { position: absolute; top: 7px; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 23px; padding: 0 6px; border-radius: 7px; background: rgba(8,12,20,.55); color: #fff; font-size: 10px; backdrop-filter: blur(5px); }
.tray-format { left: 7px; }
.tray-unlinked { right: 7px; }
.tray-format .icon, .tray-unlinked .icon { --icon-size: 12px; }
.tray-caption { position: absolute; left: 9px; right: 9px; bottom: 9px; z-index: 1; font-size: 11px; font-weight: 500; line-height: 1.35; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-shadow: 0 1px 3px #000; }
.err-dot { position: absolute; top: 7px; right: 7px; z-index: 2; display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: var(--red); color: #fff; }
.err-dot .icon { --icon-size: 13px; }
.tray-unlinked + .err-dot { top: 35px; }
.tray-empty { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.sched-cal { overflow: hidden; position: relative; }
.sched-drop-hint { position: absolute; top: 0; left: 0; right: 0; z-index: 10; min-height: 47px; display: flex; align-items: center; justify-content: center; padding: 10px 14px; border-bottom: 1px solid var(--primary); background: var(--surface); color: var(--primary); font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; pointer-events: none; }
.sched-drag-image { position: fixed; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; }
.sched-drag-preview { position: fixed; z-index: 1000; display: grid; gap: 4px; width: 188px; padding: 10px 12px; border: 1px solid var(--primary); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-lg); pointer-events: none; }
.sched-drag-preview strong { color: var(--primary); font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.sched-drag-preview > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); font-size: 10px; }
.cal-scroll { overflow: auto; max-height: max(340px, calc(100dvh - 410px)); min-height: 340px; }
@media (max-width: 800px) {
  .scheduler .sched-page-head { gap: 8px; }
  .sched-page-head h1 { font-size: 23px; }
  .sched-account { order: 3; max-width: 100%; width: 100%; }
  .tray-list { grid-auto-columns: 112px; gap: 8px; }
  .tray-card { height: 148px; }
  .sched-toolbar { padding: 6px 8px; }
  .sched-toolbar .range { font-size: 12px; padding: 0 3px; }
}
.cal-grid {
  display: grid;
  min-width: 100%;
  width: max-content;
}
.cal-corner,
.cal-head {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.cal-corner {
  left: 0;
  z-index: 7;
}
.cal-head {
  padding: 9px 6px;
  text-align: center;
  border-left: 1px solid var(--border);
  transition: background 0.12s;
}
.cal-head .dow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.cal-head .dnum { display: inline; font-weight: 650; font-size: 15px; }
.cal-head.today .dow,
.cal-head.today .dnum {
  color: var(--primary);
}
.cal-head .quota {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  min-height: 18px;
}
.cal-head .quota.full {
  color: var(--green);
  font-weight: 650;
}
.cal-head .quota.over-quota {
  color: var(--amber);
}
.cal-head.over {
  background: var(--primary-soft);
}
.cal-head.past,
.cal-day.past {
  opacity: 0.55;
}
.cal-gutter {
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--surface);
}
.cal-gutter span {
  position: absolute;
  right: 8px;
  transform: translateY(-50%);
  font-size: 10.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.cal-day {
  position: relative;
  border-left: 1px solid var(--border);
  background-image: repeating-linear-gradient(to bottom, var(--border) 0, var(--border) 1px, transparent 1px, transparent var(--hour));
}
.cal-day.today {
  background-color: color-mix(in srgb, var(--primary) 3%, transparent);
}
.cal-window {
  position: absolute;
  left: 0;
  right: 0;
  background: color-mix(in srgb, var(--primary) 3%, transparent);
  pointer-events: none;
}
.cal-now {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--red);
  z-index: 3;
  pointer-events: none;
}
.cal-marker {
  position: absolute;
  left: 2px;
  right: 2px;
  border-top: 2px dashed var(--primary);
  z-index: 8;
  pointer-events: none;
}
.cal-marker span {
  position: absolute;
  top: -28px;
  left: 4px;
  font-size: 12px;
  font-weight: 650;
  background: var(--primary);
  color: var(--primary-text);
  border-radius: 6px;
  padding: 3px 8px;
  font-variant-numeric: tabular-nums;
}
.cal-item { position: absolute; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border-strong); box-shadow: 0 2px 6px rgba(0,0,0,.12); cursor: grab; z-index: 2; overflow: hidden; user-select: none; }
.cal-item::after { content: ''; position: absolute; inset: 30% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.65)); pointer-events: none; }
.cal-item:hover { z-index: 9; border-color: var(--primary); box-shadow: var(--shadow); }
.cal-item img, .cal-item .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; display: grid; place-items: center; }
.cal-item .ph .icon { --icon-size: 20px; color: var(--muted); }
.cal-item .tm { position: absolute; bottom: 7px; left: 8px; z-index: 1; color: #fff; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px #000; }
.cal-item .k { position: absolute; top: 6px; right: 6px; z-index: 1; width: 14px; height: 14px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.8)); }
.cal-item.is-crowded { container-type: inline-size; }
.cal-item.is-crowded .tm { left: 1px; right: 1px; bottom: 5px; text-align: center; font-size: clamp(7px, 22cqi, 11px); letter-spacing: -.05em; }
.cal-item.is-crowded:is(:hover, :focus-visible) { left: 4px !important; width: calc(100% - 8px) !important; z-index: 9; }
.cal-item.st-posting { border-color: var(--blue); cursor: default; }
.cal-item.st-posted { border-color: var(--green); }
.cal-item.st-posted .k { color: #91ffbc; }
.cal-item.st-failed { border-color: var(--red); cursor: pointer; }
.cal-item.st-failed .k { color: #ff808d; }
.is-dragging .cal-item {
  pointer-events: none;
}

/* ---------- Copy a feed ---------- */

.cf-title { display: flex; align-items: center; gap: 10px; }
.cf-title .social-logo { width: 28px; height: 28px; flex: none; }

.chip.on {
  border-color: var(--primary);
  background: var(--primary-soft);
}
button.link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
body.no-scroll {
  overflow: hidden;
}
.cf-body {
  display: grid;
  gap: var(--sp-6);
}

/* Tabs */
.cf-tabs {
  display: flex;
  gap: var(--sp-1);
  border-bottom: 1px solid var(--border);
}
.cf-tabs button {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  height: 44px;
  padding: 0 var(--sp-4);
  margin-bottom: -1px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: var(--fs-md);
  font-weight: 650;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.cf-tabs button:hover {
  color: var(--text);
}
.cf-tabs button.on {
  color: var(--text);
  border-bottom-color: var(--primary);
}
.cf-tabs .icon {
  --icon-size: var(--icon-md);
}
.cf-count {
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--pill);
  background: var(--surface-3);
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 700;
}
.cf-tabs button.on .cf-count {
  background: var(--primary-soft);
  color: var(--primary);
}

/* Fetch form */
.cf-search {
  padding: var(--sp-6);
  display: grid;
  gap: var(--sp-4);
}
.cf-search-form {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.cf-field {
  display: grid;
  gap: var(--sp-2);
  min-width: 170px;
}
.cf-field.grow {
  flex: 1 1 280px;
}
.cf-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.cf-field .select-trigger,
.cf-input {
  height: 46px;
  border-radius: 12px;
}
.cf-input {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0 var(--sp-4);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.cf-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
.cf-input input {
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none !important;
  font-size: var(--fs-lg);
}
.cf-input .icon {
  --icon-size: var(--icon-md);
  color: var(--muted);
}
.cf-search-form > .btn {
  min-width: 150px;
}
.cf-search-foot {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
  color: var(--muted);
}
.cf-price-hint,
.cf-hint {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.cf-price-hint {
  color: var(--text);
  font-weight: 650;
}
.cf-price-hint .icon {
  color: var(--primary);
}
.cf-search-foot .icon {
  --icon-size: var(--icon-md);
  flex: none;
}

/* Results */
.cf-results {
  display: grid;
  gap: var(--sp-6);
}
.cf-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  flex-wrap: wrap;
}
.cf-profile {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-width: 0;
}
.cf-avatar {
  width: 52px;
  height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  color: #fff;
  font-size: var(--fs-xl);
  font-weight: 750;
}
.cf-profile-text h2 {
  font-size: var(--fs-xl);
}
.cf-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-2);
  margin-top: var(--sp-1);
  font-size: var(--fs-sm);
  color: var(--muted);
}
.cf-meta > span:not(.badge) + span:not(.badge)::before {
  content: '·';
  margin-right: var(--sp-2);
  color: var(--faint);
}
.cf-save {
  display: grid;
  gap: var(--sp-2);
  min-width: 240px;
  padding: var(--sp-3) var(--sp-4);
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.cf-save-line {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.cf-save.ok {
  color: var(--green);
}
.cf-save.warn {
  color: var(--amber);
}
.cf-save.busy {
  color: var(--primary);
}
.cf-save .icon {
  --icon-size: var(--icon-md);
}
.cf-progress {
  height: 4px;
  border-radius: var(--pill);
  background: var(--surface-3);
  overflow: hidden;
}
.cf-progress i {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
  transition: width 0.4s var(--ease);
}
.spinner.sm {
  width: 16px;
  height: 16px;
}
.spinner.xs {
  width: 11px;
  height: 11px;
  border-width: 1.5px;
}
.cf-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 304px;
  grid-template-areas: "media selection";
  gap: var(--sp-6);
  align-items: start;
}
.cf-main {
  grid-area: media;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-5);
  min-width: 0;
}

/* Toolbar */
.cf-toolbar {
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.cf-toolbar-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.cf-pills {
  display: inline-flex;
  gap: var(--sp-1);
  padding: var(--sp-1);
  border-radius: var(--pill);
  background: var(--surface-2);
}
.cf-pills button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 var(--sp-4);
  border: 0;
  border-radius: var(--pill);
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 650;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.cf-pills button:hover {
  color: var(--text);
}
.cf-pills button.on {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.cf-pills .icon {
  --icon-size: var(--icon-sm);
}
.cf-pills .n {
  font-size: var(--fs-xs);
  color: var(--faint);
  font-weight: 700;
}
.cf-pills button.on .n {
  color: var(--primary);
}
.cf-searchbox,
.cf-sort {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  height: 38px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--muted);
}
.cf-searchbox:focus-within,
.cf-sort:focus-within {
  border-color: var(--primary);
}
.cf-searchbox .icon,
.cf-sort .icon {
  --icon-size: var(--icon-md);
  flex: none;
}
.cf-searchbox {
  flex: 1 1 200px;
}
.cf-searchbox input {
  width: 100%;
  height: 36px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: var(--fs-sm);
}
.cf-sort .select-control { width: auto; }
.cf-sort .select-trigger {
  width: auto;
  height: 36px;
  padding: 0 var(--sp-1);
  border: 0;
  background: transparent;
  font-size: var(--fs-sm);
  font-weight: 600;
  box-shadow: none !important;
}
.cf-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.cf-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
}
.cf-chip .icon {
  --icon-size: var(--icon-sm);
  opacity: 0;
  margin-left: -20px;
  transition: opacity 0.12s, margin 0.12s;
}
.cf-chip.on {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}
.cf-chip.on .icon {
  opacity: 1;
  margin-left: 0;
}
.cf-shown {
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* Grid of posts */
.cf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--sp-5);
}
.cf-empty-grid {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: var(--sp-3);
  padding: var(--sp-12) var(--sp-4);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--muted);
}
.cf-tile {
  display: grid;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  outline: none;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s;
}
.cf-tile:hover,
.cf-tile:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 20, 40, 0.14);
}
.cf-tile:focus-visible {
  border-color: var(--primary);
}
.cf-tile.sel {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}
.cf-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--surface-3);
  overflow: hidden;
}
.cf-media > img,
.cf-media > .ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: grid;
  place-items: center;
  color: var(--faint);
  transition: transform 0.4s var(--ease);
}
.cf-tile:hover .cf-media > img {
  transform: scale(1.03);
}
.cf-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--pill);
  background: rgba(10, 12, 16, 0.72);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.cf-type .icon {
  --icon-size: var(--icon-sm);
}
.cf-type.t-video {
  background: color-mix(in srgb, var(--accent) 88%, #000);
}
.cf-type.t-carousel {
  background: color-mix(in srgb, var(--violet) 88%, #000);
}
.cf-media > .cf-type {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
}
.cf-check {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid #fff;
  background: rgba(0, 0, 0, 0.28);
  color: transparent;
  cursor: pointer;
  transition: background 0.12s, transform 0.12s;
}
.cf-check:hover {
  transform: scale(1.08);
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.7);
}
.cf-check .icon {
  --icon-size: var(--icon-md);
}
.cf-tile.sel .cf-check {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.cf-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(10, 12, 16, 0.5);
  backdrop-filter: blur(4px);
  color: #fff;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.18s, transform 0.18s var(--ease);
}
.cf-play.video {
  opacity: 0.95;
  transform: none;
}
.cf-tile:hover .cf-play {
  opacity: 1;
  transform: scale(1.05);
}
.cf-play .icon {
  --icon-size: var(--icon-lg);
}
.cf-play.video .icon {
  margin-left: 2px;
}
.cf-shade {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: flex-end;
  padding: var(--sp-6) var(--sp-3) var(--sp-3);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), transparent);
  pointer-events: none;
}
.cf-stats {
  display: flex;
  gap: var(--sp-3);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 700;
}
.cf-stats > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.cf-stats .icon {
  --icon-size: var(--icon-sm);
}
.cf-tile.blocked {
  cursor: pointer;
}
.cf-tile.blocked .cf-media > img {
  filter: grayscale(1) brightness(0.5);
}
.cf-blocked {
  position: absolute;
  inset: auto var(--sp-3) var(--sp-3);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}
.cf-blocked .icon {
  --icon-size: var(--icon-sm);
  flex: none;
  margin-top: 1px;
}
.cf-tile.blocked .cf-shade {
  display: none;
}
.cf-tile-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  min-height: 48px;
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-sm);
}
.cf-price {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 750;
  color: var(--primary);
  white-space: nowrap;
}
.cf-price .icon {
  --icon-size: var(--icon-sm);
}
.cf-versions-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
}

/* Only the page scrolls; secondary controls live in the settings dialog. */
.cf-panel-wrap {
  grid-area: selection;
  position: sticky;
  top: calc(var(--app-header-height) + 12px);
  z-index: 12;
}
.cf-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: var(--surface);
  box-shadow: 0 8px 28px #0002;
}
.cf-panel-sum {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.cf-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cf-total {
  font-size: var(--fs-2xl);
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--primary);
  line-height: 1.15;
}
.cf-settings { justify-content: flex-start; min-width: 0; }
.cf-settings span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.cf-settings .icon { flex: none; --icon-size: 14px; }
.cf-consent { align-items: flex-start; font-size: 11px; line-height: 1.45; color: var(--muted); }
.cf-consent input { flex: none; margin-top: 2px; }
.cf-generate { min-height: 42px; }

/* States */
.cf-state {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-6);
}

/* History */
.cf-history {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-5);
}
.cf-hcard {
  display: grid;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  outline: none;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s;
}
.cf-hcard:hover,
.cf-hcard:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 20, 40, 0.12);
}
.cf-hcard.current {
  border-color: var(--primary);
}
.cf-mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  aspect-ratio: 4 / 1.25;
  background: var(--surface-3);
}
.cf-mosaic > * {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--surface-2);
}
.cf-hbody {
  display: grid;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-5) var(--sp-3);
}
.cf-hrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.cf-hrow h3 {
  font-size: var(--fs-lg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cf-hstats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-top: var(--sp-1);
  font-size: var(--fs-sm);
  font-weight: 650;
}
.cf-hstats > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cf-hstats .icon {
  --icon-size: var(--icon-sm);
  color: var(--muted);
}
.cf-hdone {
  color: var(--green);
}
.cf-hdone .icon {
  color: var(--green) !important;
}
.cf-herr {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge .spinner.xs {
  border-color: color-mix(in srgb, currentColor 25%, transparent);
  border-top-color: currentColor;
}

/* Viewer */
.cf-viewer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  padding: var(--sp-6);
  background: rgba(4, 6, 10, 0.86);
  backdrop-filter: blur(6px);
  animation: fade 0.15s ease-out;
}
.cf-viewer-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  width: min(1120px, 100%);
  height: min(86vh, 820px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: pop 0.16s var(--ease);
}
.cf-viewer-top {
  position: absolute;
  top: var(--sp-4);
  left: var(--sp-4);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: var(--pill);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.cf-viewer-top span {
  padding: 0 6px;
}
.cf-viewer-top button {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.cf-viewer-top button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
}
.cf-viewer-top button:disabled {
  opacity: 0.3;
  cursor: default;
}
.cf-viewer-top .icon {
  --icon-size: var(--icon-md);
}
.cf-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  background: #000;
}
.cf-stage > img,
.cf-stage > video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  grid-area: 1 / 1;
}
.cf-stage > img.dim {
  filter: blur(14px) brightness(0.45);
  transform: scale(1.06);
}
.cf-stage-msg {
  grid-area: 1 / 1;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: var(--sp-3);
  max-width: 340px;
  padding: var(--sp-6);
  color: #fff;
  text-align: center;
  font-weight: 600;
}
.cf-stage-msg.error .icon {
  --icon-size: var(--icon-xl);
  color: var(--amber);
}
.cf-slide {
  position: absolute;
  top: 50%;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  cursor: pointer;
  z-index: 1;
}
.cf-slide:disabled {
  opacity: 0;
  pointer-events: none;
}
.cf-slide.prev {
  left: var(--sp-4);
}
.cf-slide.next {
  right: var(--sp-4);
}
.cf-dots {
  position: absolute;
  bottom: var(--sp-4);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 1;
}
.cf-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}
.cf-dots i.on {
  background: #fff;
}
.cf-slide-count {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  padding: 4px 10px;
  border-radius: var(--pill);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  z-index: 1;
}
.cf-nav {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background 0.12s;
}
.cf-nav:hover {
  background: rgba(255, 255, 255, 0.24);
}
.cf-nav:disabled {
  opacity: 0.25;
  cursor: default;
}
.cf-nav .icon {
  --icon-size: var(--icon-lg);
}
.cf-info {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-height: 0;
  border-left: 1px solid var(--border);
}
.cf-info-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-4) var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--border);
}
.cf-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
}
.cf-kpi {
  display: grid;
  gap: var(--sp-1);
  padding: var(--sp-4) var(--sp-6);
}
.cf-kpi + .cf-kpi {
  border-left: 1px solid var(--border);
}
.cf-kpi-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-xs);
  font-weight: 650;
  color: var(--muted);
}
.cf-kpi-label .icon {
  --icon-size: var(--icon-xs);
}
.cf-kpi b {
  font-size: var(--fs-xl);
  font-weight: 750;
  letter-spacing: -0.02em;
}
.cf-info-body {
  display: grid;
  align-content: start;
  gap: var(--sp-5);
  padding: var(--sp-6);
  overflow-y: auto;
}
.cf-info-body .banner {
  margin: 0;
}
.cf-section {
  display: grid;
  gap: var(--sp-2);
}
.cf-section h4 {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.cf-caption {
  white-space: pre-wrap;
  font-size: var(--fs-md);
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.cf-version-list {
  display: grid;
  gap: var(--sp-2);
}
.cf-version {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.cf-version-n {
  font-weight: 750;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.cf-info-foot {
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-6) var(--sp-6);
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.cf-cost {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.cf-cost b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xl);
  color: var(--primary);
}
.cf-cost .icon {
  --icon-size: var(--icon-md);
}

@media (max-width: 1100px), (max-height: 600px) {
  .cf-split { grid-template-columns: minmax(0, 1fr); grid-template-areas: "selection" "media"; }
  .cf-panel-wrap { top: calc(var(--app-header-height) + 8px); }
  .cf-panel {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
    grid-template-areas: "summary settings" "summary generate" "consent consent";
    gap: 8px 16px;
    padding: 12px 16px;
  }
  .cf-panel-sum { grid-area: summary; align-content: center; gap: 2px; }
  .cf-panel-heading { justify-content: flex-start; gap: 8px; }
  .cf-panel .cf-count { font-size: 10px; }
  .cf-selection-types { font-size: 11px; }
  .cf-balance { display: none; }
  .cf-settings { grid-area: settings; min-height: 32px; padding-block: 5px; }
  .cf-generate { grid-area: generate; min-height: 36px; }
  .cf-consent { grid-area: consent; font-size: 10px; }
  .cf-main { scroll-margin-top: calc(var(--app-header-height) + 180px); }
}
@media (max-width: 480px) {
  .cf-panel { padding: 10px; gap: 6px 10px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .cf-panel .btn { padding-inline: 10px; font-size: 12px; }
  .cf-total { font-size: 22px; }
  .cf-pills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; border-radius: 16px; }
  .cf-pills button { justify-content: center; }
}
@media (max-width: 860px) {
  .cf-search-form > * {
    flex: 1 1 100%;
  }
  .cf-searchbox {
    flex: 1;
  }
  .cf-searchbox input {
    width: 100%;
  }
  .cf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-3);
  }
  .cf-viewer {
    padding: 0;
  }
  .cf-nav {
    display: none;
  }
  .cf-viewer-card {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 55vh) auto;
    height: 100%;
    border-radius: 0;
    overflow-y: auto;
  }
  .cf-info {
    border-left: 0;
  }
}

.spinner {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--primary-soft);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}

/* Folded technical details (content detail) */
.fold {
  border-top: 1px solid var(--border);
  padding-top: 4px;
}
.fold-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 2px;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-align: left;
}
.fold-head .chev {
  transition: transform 0.15s;
  color: var(--muted);
}
.fold-head.open .chev {
  transform: rotate(180deg);
}
.fold-body {
  padding-bottom: 6px;
}
/* NSFW tag of a reference photo: a red pill when tagged; otherwise a discreet shield on hover to tag it by hand. */
.thumb .ref-tag {
  top: auto;
  right: auto;
  bottom: 4px;
  left: 4px;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
}
.thumb .ref-tag .icon { --icon-size: 11px; transform: none; }
.thumb:hover .ref-tag,
.thumb .ref-tag:focus-visible { opacity: 0.8; }
.thumb.is-nsfw .ref-tag {
  opacity: 1;
  width: auto;
  height: 18px;
  padding: 0 6px;
  border-radius: var(--pill);
  background: var(--red);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 18px;
}
.thumb.is-nsfw img { filter: saturate(0.6) brightness(0.8); }
.nsfw-pill {
  position: absolute;
  top: 4px;
  left: 4px;
  padding: 0 6px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--pill);
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}


/* Shared searchable dropdowns: one small chevron, aligned to the label. */
.select-control { display: inline-flex; width: 100%; min-width: 0; vertical-align: middle; }
select.select-native { display: none !important; }
.select-trigger { display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; min-width: 0; }
.select-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-chevron { --icon-size: 14px; color: var(--muted); transition: transform 0.16s; }
.select-trigger[aria-expanded='true'] .select-chevron { transform: rotate(180deg); }
.select-trigger:disabled { opacity: 0.5; cursor: not-allowed; }
.select-panel { position: fixed; z-index: 10000; display: flex; flex-direction: column; padding: 6px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: 0 12px 40px #0003; overflow: hidden; }
.select-search-row { display: flex; align-items: center; gap: 9px; padding: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.select-search-row .icon { --icon-size: 14px; color: var(--muted); }
.select-search { width: 100%; min-width: 0; height: 24px; padding: 0; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 13px; box-shadow: none !important; }
.select-options { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.select-option { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 36px; padding: 8px 10px; border: 0; border-radius: 7px; background: transparent; color: inherit; text-align: left; font: inherit; font-size: 13px; cursor: pointer; }
.select-option-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.select-option[aria-selected='true'] { color: var(--primary); }
.select-option.is-focused { background: var(--surface-2); }
.select-option:disabled { opacity: 0.4; cursor: not-allowed; }
.select-option-check { --icon-size: 14px; visibility: hidden; }
.select-option[aria-selected='true'] .select-option-check { visibility: visible; }
.select-group { padding: 12px 10px 5px; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 650; }
.select-no-results { padding: 14px 10px; font-size: 13px; color: var(--muted); }
.select-no-results:empty { display: none; }

/* Social connections: one account per row, with transparent brand artwork. */
.social-accounts { gap: 24px; }
.social-accounts .page-head { margin-bottom: 10px; }
.social-quota { display: flex; align-items: baseline; gap: 4px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.social-quota b { color: var(--text); font-weight: 600; }
.social-add.btn { gap: 8px; padding: 10px 18px; font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.social-list-head { gap: 16px; }
.social-list-head h2 { font-size: 15px; font-weight: 600; }
.social-list-head .select-control, .social-list-head select { width: 200px; }
.social-list-head .actions { gap: 12px; }
.social-table-wrap { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.social-table { min-width: 860px; }
.social-table th { padding: 13px 20px; font-size: 11px; font-weight: 500; background: var(--surface-2); }
.social-table td { padding: 21px 20px; }
.social-table th:last-child { text-align: right; }
.social-table td:last-child { width: 1%; white-space: nowrap; }
.social-identity { display: flex; align-items: center; gap: 10px; }
.social-avatar { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; object-fit: cover; }
.social-handle { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.social-logo { display: block; width: 22px; height: 22px; flex: 0 0 auto; object-fit: contain; }
.social-network { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 13px; }
.social-model { color: var(--muted); }
.social-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); white-space: nowrap; font-size: 12px; }
.social-status i { width: 5px; height: 5px; flex-shrink: 0; border-radius: 50%; background: currentColor; }
.social-status.connected { color: var(--green); }
.social-status.warning { color: var(--amber); }
.social-schedule { display: grid; gap: 4px; white-space: nowrap; font-size: 12px; }
.social-schedule small { color: var(--muted); font-size: 11px; }
.social-account-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.social-account-actions > .btn:first-child { margin-right: 10px; }
.social-account-actions .btn { font-size: 11px; letter-spacing: 0; text-transform: none; }
.social-account-actions .icon-only { color: var(--muted); }
.social-table .social-empty { padding: 0; }
.social-empty .empty { padding: 56px 24px; }
.social-connect-modal { width: min(460px, 100%); }
.social-connect-modal .modal-head { padding: 22px 24px 14px; border-bottom: 0; }
.social-connect-modal .modal-head h2 { font-size: 19px; font-weight: 600; }
.social-connect-modal .modal-body { padding: 0 24px 24px; }
.social-connect-modal .modal-foot { padding: 16px 24px; background: transparent; }
.social-picker { display: grid; gap: 22px; }
.social-network-options { display: grid; }
.social-network-option { display: flex; align-items: center; gap: 18px; padding: 20px 4px; width: 100%; text-align: left; color: var(--text); border: 0; border-bottom: 1px solid var(--border); background: transparent; cursor: pointer; transition: color .15s; }
.social-network-option:last-child { border-bottom: 0; }
.social-network-option .social-logo { width: 30px; height: 30px; }
.social-network-option > span { flex: 1; font-size: 15px; font-weight: 550; }
.social-network-option > .icon { width: 16px; height: 16px; color: var(--muted); transition: transform .15s, color .15s; }
.social-network-option:hover > .icon { color: var(--text); transform: translateX(3px); }
.social-network-option:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 4px; }
.social-picker-note { color: var(--muted); font-size: 12px; line-height: 1.5; }
.social-connection-network { display: flex; align-items: center; gap: 12px; padding: 12px 0 4px; font-size: 15px; font-weight: 600; }
.social-connection-network .social-logo { width: 30px; height: 30px; }
@media (max-width: 720px) {
  .social-accounts { gap: 20px; }
  .social-accounts .page-head { align-items: flex-start; }
  .social-list-head { flex-wrap: wrap; }
  .social-list-head .actions { margin-left: auto; }
  .social-list-head .select-control, .social-list-head select { width: 170px; }
  .social-connect-modal .modal-head { padding: 18px 20px 12px; }
  .social-connect-modal .modal-body { padding: 0 20px 20px; }
}

/* Model switcher (top of the sidebar): round photo of the model + its name. */
.model-switch {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-4);
  padding: var(--sp-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.model-avatar {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  color: #fff;
  font-weight: 750;
  font-size: var(--fs-md);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px color-mix(in srgb, var(--primary) 55%, transparent);
}
.model-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.model-switch select,
.model-switch .select-control {
  flex: 1;
  min-width: 0;
}
.model-switch .select-trigger {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border-color: transparent;
  background: transparent;
  font-weight: 650;
}
.model-switch .select-trigger:hover {
  border-color: var(--border);
}
.model-switch-empty {
  flex: 1;
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* Reels are previewed whole, in 9:16 (photos and carousels stay 4:5); cards keep their own height in the grids. */
.content-card {
  align-self: start;
}
.content-card.kind-reel .media,
.cf-tile.t-video .cf-media {
  aspect-ratio: 9 / 16;
}
.cf-grid {
  align-items: start;
}

/* ---------- Creation dashboard ---------- */
.db { display: grid; gap: 32px; }
.db-hello { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 8px 0 4px; }
.db-hello-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: clamp(22px, 2.2vw, 30px); font-weight: 650; letter-spacing: -.04em; }
.db-hello-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-strong); }
.db-hello-sub { margin-top: 10px; color: var(--muted); }
.db-hello-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.db-hello-actions .btn, .sc-cta .btn { font-size: 12px; text-transform: none; letter-spacing: 0; }
.db-onboard { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--surface) 75%, transparent); }
.db-onboard-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.db-onboard-head h2 { font-size: 14px; font-weight: 600; }
.db-onboard-head h2 .muted { margin-left: 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.db-onboard-head p { color: var(--muted); font-size: 12px; margin-top: 4px; }
.db-onboard-head > button { margin-left: auto; align-self: flex-start; }
.db-ring { display: block; width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; background: conic-gradient(var(--primary) var(--p), var(--border) 0); mask: radial-gradient(circle, transparent 53%, #000 56%); }
.db-onboard-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.db-onboard-step { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 185px; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.db-onboard-step.done { background: color-mix(in srgb, var(--surface) 45%, transparent); }
.db-step-state { display: grid; place-items: center; width: 21px; height: 21px; margin-bottom: 7px; border: 1px dashed var(--border-strong); border-radius: 50%; color: var(--muted); font-size: 10px; }
.db-onboard-step.done .db-step-state { color: var(--green); background: var(--green-soft); border-color: transparent; }
.db-step-state .icon { --icon-size: 12px; }
.db-onboard-step h3 { font-size: 12px; font-weight: 600; }
.db-onboard-step p { font-size: 11px; line-height: 1.55; color: var(--muted); margin-bottom: 6px; }
.db-step-done, .db-step-btn.btn { margin-top: auto; font-size: 10px; text-transform: none; letter-spacing: 0; }
.db-step-btn.btn { max-width: 100%; min-height: 30px; height: auto; padding: 6px 10px; white-space: normal; text-align: center; }
.db-step-done { display: flex; align-items: center; gap: 5px; padding: 5px 0; color: var(--green); }
.db-step-done .icon { --icon-size: 12px; }
.db-section { display: grid; gap: 16px; min-width: 0; }
.db-section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.db-section-head h2 { font-size: 16px; font-weight: 600; }
.db-section-head p { margin-top: 5px; font-size: 12px; }
.db-flows { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.db-flow { cursor: pointer; }
.db-flow .example-open { z-index: 3; }
.db-flow .example-play { z-index: 4; }
.db-flow { overflow: hidden; min-width: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .2s; }
.db-flow:hover { color: var(--text); text-decoration: none; border-color: color-mix(in srgb, var(--primary) 60%, var(--border)); transform: translateY(-3px); box-shadow: 0 8px 24px #0002; }
.db-flow:focus-visible, .db-thumb:focus-visible, .db-next-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
.db-flow-media { position: relative; aspect-ratio: 4 / 3; margin: 5px 5px 0; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.db-flow-media > img, .db-flow-media > video { width: 100%; height: 100%; object-fit: cover; object-position: center 24%; }
.db-flow-tag { position: absolute; left: 8px; top: 8px; display: flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 5px; background: #111924a8; backdrop-filter: blur(8px); color: #fff; font-size: 10px; }
.db-flow-tag .icon { --icon-size: 12px; }
.db-flow-body { display: flex; flex-direction: column; gap: 9px; min-height: 136px; padding: 13px; }
.db-flow-body h3 { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: 13px; }
.db-flow-body h3 .icon { --icon-size: 13px; color: var(--muted); }
.db-flow-body p { color: var(--muted); font-size: 11px; line-height: 1.6; }
.db-flow-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }
.db-flow-chips span { padding: 3px 6px; border: 1px solid var(--border); border-radius: 4px; color: var(--muted); font-size: 9px; }
.db-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 20px 0; border-block: 1px solid var(--border); }
.db-stat { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 0 20px; border-left: 1px solid var(--border); }
.db-stat:first-child { padding-left: 0; border: 0; }
.db-stat .l { font-size: 11px; color: var(--muted); }
.db-stat .v { font-size: clamp(20px, 2vw, 26px); line-height: 1.2; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.db-stat .s { color: var(--muted); font-size: 10px; }
.db-stat a { display: inline-flex; align-items: center; gap: 3px; }
.db-stat .icon { --icon-size: 12px; }
.db-admin { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 14px; font-size: 11px; color: var(--muted); }
.db-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 17%); gap: 12px; overflow-x: auto; padding: 4px 4px 12px; margin: -4px; scrollbar-width: thin; }
.db-thumb { min-width: 0; align-self: start; padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; color: var(--text); text-align: left; background: var(--surface); font: inherit; cursor: pointer; }
.db-thumb:hover { border-color: var(--border-strong); }
.db-thumb .m { position: relative; aspect-ratio: 4 / 5; background: var(--surface-2); }
.db-thumb.kind-reel .m { aspect-ratio: 9 / 16; }
.db-thumb .m > img { width: 100%; height: 100%; object-fit: cover; }
.db-thumb .ph { display: grid; place-items: center; height: 100%; color: var(--faint); }
.db-thumb .k { position: absolute; left: 8px; top: 8px; display: flex; align-items: center; gap: 4px; border-radius: 4px; background: #111924ba; color: #fff; padding: 3px 6px; font-size: 9px; }
.db-thumb .k .icon { --icon-size: 11px; }
.db-thumb .st { position: absolute; left: 8px; bottom: 8px; }
.db-thumb .st .badge { font-size: 9px; }
.db-thumb .tt { padding: 10px 10px 3px; font-size: 11px; font-weight: 500; }
.db-thumb .when { padding: 0 10px 10px; font-size: 10px; color: var(--muted); }
.db-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.db-panel { min-width: 0; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.db-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 36px 20px 20px; text-align: center; color: var(--muted); }
.db-empty > .icon { --icon-size: 22px; }
.db-next { display: grid; gap: 4px; margin-top: 16px; }
.db-next-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.db-next-item .mini { width: 38px; height: 46px; flex-shrink: 0; border-radius: 5px; overflow: hidden; background: var(--surface-2); }
.db-next-item .mini img { width: 100%; height: 100%; object-fit: cover; }
.db-next-item .txt { display: grid; gap: 5px; min-width: 0; flex: 1; }
.db-next-item b { font-size: 11px; font-weight: 500; }
.db-next-item .small { font-size: 10px; }
.db-chart { display: flex; align-items: flex-end; gap: 7px; height: 142px; margin-top: 26px; }
.db-day { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; }
.db-day .bars { display: flex; align-items: flex-end; gap: 3px; width: 100%; flex: 1; border-bottom: 1px solid var(--border); }
.db-day .bars i { display: block; flex: 1; border-radius: 3px 3px 0 0; }
.db-day > span { font-size: 9px; color: var(--muted); }
.db-chart .c, .db-legend .c { background: var(--primary); }
.db-chart .p, .db-legend .p { background: var(--violet); }
.db-legend { display: flex; justify-content: flex-end; gap: 16px; margin-top: 14px; font-size: 10px; color: var(--muted); }
.db-legend span { display: inline-flex; align-items: center; gap: 5px; }
.db-legend i { width: 6px; height: 6px; border-radius: 2px; }
.sc { position: relative; overflow: hidden; padding: 24px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); }
.sc-aurora { position: absolute; inset: 0; background: radial-gradient(ellipse at 15% 0%, #00aff01c, transparent 60%), radial-gradient(ellipse at 95% 100%, #a58bff20, transparent 60%); pointer-events: none; }
.sc-head { position: relative; }
.sc-kicker { display: flex; align-items: center; gap: 6px; color: var(--primary); font-size: 11px; margin-bottom: 10px; }
.sc-title { font-size: 22px; font-weight: 600; letter-spacing: -.025em; }
.sc-sub { margin-top: 10px; max-width: 640px; color: var(--muted); font-size: 12px; }
.sc-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.sc-rail { position: relative; overflow-x: auto; scrollbar-width: thin; margin: 24px -24px -24px; padding: 0 24px 20px; }
.sc-track { display: flex; gap: 10px; }
.sc-tile { position: relative; width: 120px; height: 150px; flex-shrink: 0; margin: 0; border-radius: 9px; overflow: hidden; background: var(--surface-2); }
.sc-tile > img, .sc-tile > video { width: 100%; height: 100%; object-fit: cover; }
.sc-tile figcaption { display: flex; align-items: center; gap: 4px; position: absolute; bottom: 7px; left: 7px; color: #fff; background: #111924ba; border-radius: 4px; padding: 3px 5px; font-size: 9px; }
.sc-tile figcaption .icon { --icon-size: 10px; }
@media (max-width: 1250px) {
  .db-flows { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .db-hello { align-items: flex-start; }
  .db-hello-actions .btn.ghost { display: none; }
  .db-onboard-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .db-onboard-step { min-height: 174px; }
}
@media (max-width: 1050px) {
  .db-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 0; }
  .db-stat:nth-child(4) { border-left: 0; padding-left: 0; }
  .db-cols { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .db { gap: 26px; }
  .db-hello { flex-direction: column; gap: 16px; }
  .db-hello-title { gap: 8px; font-size: 23px; }
  .db-hello-avatar { width: 30px; height: 30px; }
  .db-hello-sub { font-size: 12px; }
  .db-onboard { padding: 14px; }
  .db-onboard-head { gap: 8px; }
  .db-onboard-head h2 { font-size: 12px; }
  .db-onboard-head p { font-size: 11px; }
  .db-onboard-step { padding: 12px; }
  .db-flows { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .db-flow-body { padding: 11px; min-height: 145px; }
  .db-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .db-stat { padding: 0 14px; }
  .db-stat:nth-child(4) { border-left: 1px solid var(--border); padding-left: 14px; }
  .db-stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .db-panel { padding: 18px; }
  .sc { padding: 20px; }
  .sc-title { font-size: 20px; }
  .sc-rail { margin-inline: -20px; margin-bottom: -20px; padding-inline: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .db-flow { transition: none; }
  .db-flow:hover { transform: none; }
}

/* ---------- Content dialog: lighter layout (title + status in the header, two main actions, "…" menu) ---------- */
.content-detail .modal-head h2 { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.detail-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-badges { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.detail-badges .badge { font-size: 11px; }
.detail-grid.kind-reel { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
.detail-main { display: grid; gap: 22px; align-content: start; min-width: 0; }
.detail-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.link-btn { border: 0; background: none; padding: 0; color: var(--primary); font: inherit; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; cursor: pointer; text-decoration: none; }
.link-btn:hover { text-decoration: underline; }
.detail-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.more-menu { position: relative; }
.more-menu > summary { list-style: none; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; min-width: 220px; display: grid; padding: 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg); }
.more-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 13px; text-align: left; text-decoration: none; cursor: pointer; }
.more-item:hover { background: var(--surface-2); }
.more-item .icon { width: 16px; height: 16px; color: var(--muted); }
.more-item.danger, .more-item.danger .icon { color: var(--red); }
.caption-edit { min-height: 140px; line-height: 1.55; resize: vertical; }
.schedule-account { display: flex; align-items: center; gap: 8px; }
.schedule-account .social-logo { width: 18px; height: 18px; }
@media (max-width: 860px) {
  .detail-grid.kind-reel { grid-template-columns: 1fr; }
  .content-detail .modal-head h2 { flex-wrap: wrap; }
}

/* Tokens reserved for a generation still running (debited only on success). */
.is-reserved { opacity: 0.85; }
.reserved-note { margin-left: 4px; font-size: 0.85em; font-weight: 500; opacity: 0.75; }

/* Carousel editor (content detail): numbered thumbnails, remove, add from the library. */
.carousel-editor { display: flex; flex-direction: column; gap: 8px; }
.carousel-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.carousel-cell, .carousel-add { position: relative; width: 58px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.carousel-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-num { position: absolute; left: 4px; bottom: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #0009; color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
.carousel-remove { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: #000a; color: #fff; cursor: pointer; opacity: 0.85; }
.carousel-remove:hover { background: var(--red); opacity: 1; }
.carousel-remove .icon { --icon-size: 11px; }
.carousel-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 10px; cursor: pointer; border-style: dashed; }
.carousel-add:hover { color: var(--text); border-color: var(--primary); }
.carousel-add .icon { --icon-size: 16px; }
/* Library picker */
.library-grid { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; max-height: 60vh; overflow: auto; padding: 2px; }
.library-cell { position: relative; flex: none; display: block; width: 112px; height: 140px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--surface-2); cursor: pointer; }
.library-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.library-cell[aria-pressed='true'] { border-color: var(--primary); }
.library-order { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: #0006; color: #fff; font-size: 11px; font-weight: 700; }
.library-cell[aria-pressed='true'] .library-order { background: var(--primary); border-color: var(--primary); }
.library-order:empty { background: #0003; }

/* Contents: multi-selection to build a carousel. */
.content-grid.selecting .content-card { cursor: copy; }
.content-card.is-selected { outline: 2px solid var(--primary); outline-offset: 2px; }
.content-card.is-selected::before { content: attr(data-order); position: absolute; z-index: 3; top: 10px; left: 50%; transform: translateX(-50%); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 2px 8px #0005; }
.content-card { position: relative; }
.select-bar { position: sticky; bottom: 16px; z-index: 20; display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 12px 10px 16px; border: 1px solid var(--border); border-radius: 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); box-shadow: 0 10px 30px #0006; }
.select-bar[hidden] { display: none; }
.select-count { font-size: 13px; color: var(--muted); }
.btn.on { border-color: var(--primary); color: var(--primary); }

/* Scheduler: menu on a planned post, multi-selection (Cmd/Ctrl + click). */
.sched-menu { position: fixed; right: auto; z-index: 60; min-width: 190px; }
.sched-menu-hint { padding: 6px 10px 4px; border-top: 1px solid var(--border); margin-top: 4px; }
.cal-item.is-picked { outline: 2px solid var(--primary); outline-offset: 1px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 25%, transparent); }
.sched-pick-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); width: min(520px, calc(100vw - 32px)); margin: 0; }

/* Copy a feed: photos kept from a carousel. */
.cf-partial { position: absolute; left: 8px; bottom: 8px; z-index: 2; padding: 3px 7px; border-radius: 6px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; }
.cf-photo-pick { position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 1px solid #ffffff55; border-radius: 999px; background: #101722c8; color: #fff; font: inherit; font-size: 13px; cursor: pointer; backdrop-filter: blur(10px); }
.cf-photo-pick .icon { --icon-size: 14px; opacity: 0.4; }
.cf-photo-pick.on { background: var(--primary); border-color: var(--primary); }
.cf-photo-pick.on .icon { opacity: 1; }
.cf-dots i.kept { box-shadow: 0 0 0 2px var(--primary); }
.cf-picks-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: var(--sp-3) var(--sp-6); border-bottom: 1px solid var(--border); }

/* Animate a photo into a reel. */
.animate-btn { align-self: flex-start; }
.animate-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.animate-thumb { position: relative; width: 64px; height: 80px; padding: 0; border: 2px solid transparent; border-radius: 9px; overflow: hidden; background: var(--surface-2); cursor: pointer; }
.animate-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.animate-thumb.on { border-color: var(--primary); }
.animate-single { width: 96px; height: 120px; object-fit: cover; border-radius: 10px; }
.animate-price { display: flex; align-items: center; gap: 6px; min-height: 24px; }
