/* ==========================================================================
   CreaterOS design system
   Dark-first "creator studio": near-black canvas, soft neon glows, glassy
   bento cards, Instagram-warm gradient accents. Light theme via [data-theme].
   ========================================================================== */

:root {
  --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --accent-1: #ff3d7f;
  --accent-2: #ff8a3d;
  --accent-3: #8b5cff;
  --gradient: linear-gradient(120deg, var(--accent-3) 0%, var(--accent-1) 45%, var(--accent-2) 100%);
  --gradient-soft: linear-gradient(120deg, rgba(139, 92, 255, 0.16), rgba(255, 61, 127, 0.14) 50%, rgba(255, 138, 61, 0.12));

  --ok: #33d69f;
  --warn: #ffb547;
  --bad: #ff5c6c;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --sidebar-w: 272px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Dark (default) */
  --bg: #09080d;
  --bg-elev: #111018;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-solid: #15131d;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f2f8;
  --text-2: #b4afc3;
  --text-3: #7d788d;
  --input-bg: rgba(255, 255, 255, 0.04);
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
  --glow-opacity: 1;
  color-scheme: dark;
}

[data-theme='light'] {
  --bg: #f7f5f2;
  --bg-elev: #ffffff;
  --surface: rgba(255, 255, 255, 0.75);
  --surface-2: rgba(20, 16, 30, 0.04);
  --surface-solid: #ffffff;
  --border: rgba(20, 16, 30, 0.08);
  --border-strong: rgba(20, 16, 30, 0.16);
  --text: #16131f;
  --text-2: #57516a;
  --text-3: #8f899f;
  --input-bg: #ffffff;
  --shadow: 0 20px 50px -24px rgba(40, 20, 60, 0.25);
  --glow-opacity: 0.45;
  color-scheme: light;
}

/* ── Reset & base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  /* Ambient glows */
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: var(--glow-opacity);
  background:
    radial-gradient(600px 400px at 85% -5%, rgba(255, 61, 127, 0.16), transparent 70%),
    radial-gradient(700px 500px at 10% 0%, rgba(139, 92, 255, 0.14), transparent 70%),
    radial-gradient(500px 400px at 60% 110%, rgba(255, 138, 61, 0.1), transparent 70%);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.025em; line-height: 1.1; margin: 0; font-weight: 700; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; }
p { margin: 0; }
code, .mono { font-family: var(--font-mono); font-size: 0.85em; }
code { background: var(--surface-2); padding: 0.1em 0.4em; border-radius: 6px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
::selection { background: rgba(255, 61, 127, 0.35); }

/* ── Utilities ───────────────────────────────────────────────────────── */
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 0.85rem; }
.xs { font-size: 0.75rem; }
.center { text-align: center; }
.row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.tight { gap: 0.4rem; }
.stack > * + * { margin-top: 0.75rem; }
.stack-lg > * + * { margin-top: 1.25rem; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 15px; height: 15px; }
.icon.lg { width: 22px; height: 22px; }

/* ── Brand ───────────────────────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.03em; text-decoration: none; color: var(--text); }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; background: var(--gradient); display: grid; place-items: center;
  box-shadow: 0 8px 24px -8px rgba(255, 61, 127, 0.7);
}
.brand-mark svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2.2; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  --btn-bg: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 40px; padding: 0 1rem; border-radius: 12px; border: 1px solid var(--border);
  background: var(--btn-bg); color: var(--text); font: 600 0.9rem/1 var(--font-body);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 0.15s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.btn:hover { border-color: var(--border-strong); background: var(--surface); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .chip:focus-within, a:focus-visible {
  outline: 2px solid var(--accent-1); outline-offset: 2px;
}
.btn[disabled], .btn.is-busy { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  border: 0; color: #fff; background: var(--gradient); background-size: 150% 100%;
  box-shadow: 0 10px 30px -12px rgba(255, 61, 127, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover { background: var(--gradient); background-position: 100% 0; box-shadow: 0 14px 34px -12px rgba(255, 61, 127, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: transparent; }
.btn-danger { color: var(--bad); border-color: rgba(255, 92, 108, 0.3); background: rgba(255, 92, 108, 0.08); }
.btn-danger:hover { background: rgba(255, 92, 108, 0.15); border-color: rgba(255, 92, 108, 0.5); }
.btn-sm { height: 32px; padding: 0 0.7rem; font-size: 0.82rem; border-radius: 10px; }
.btn-lg { height: 52px; padding: 0 1.5rem; font-size: 1rem; border-radius: 16px; }
.btn-icon { width: 40px; padding: 0; }
.btn-sm.btn-icon { width: 32px; }
.btn-block { width: 100%; }
.is-busy { position: relative; color: transparent !important; }
.is-busy::after {
  content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: spin 0.7s linear infinite;
}
.btn:not(.btn-primary).is-busy::after { border-color: var(--border-strong); border-top-color: var(--text); }
.link { color: var(--accent-1); text-decoration: none; font-weight: 600; cursor: pointer; background: none; border: 0; padding: 0; font: inherit; }
.link:hover { text-decoration: underline; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Forms ───────────────────────────────────────────────────────────── */
label.field, .field { display: block; }
.field-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--text); }
.field-hint { display: block; font-size: 0.8rem; color: var(--text-3); margin-top: 0.4rem; }
.field-hint.ok { color: var(--ok); }
.field-hint.warn { color: var(--warn); }
.field-hint.bad { color: var(--bad); }
input[type='text'], input[type='email'], input[type='password'], input[type='time'], input[type='number'], input:not([type]), select, textarea {
  width: 100%; height: 44px; padding: 0 0.9rem; border-radius: 12px; border: 1px solid var(--border);
  background: var(--input-bg); color: var(--text); font: 400 0.95rem var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
textarea { height: auto; min-height: 110px; padding: 0.75rem 0.9rem; line-height: 1.55; resize: vertical; }
textarea.mono { font-family: var(--font-mono); font-size: 0.82rem; }
select { appearance: none; padding-right: 2.2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23918aa3' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9rem center; }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-1); box-shadow: 0 0 0 4px rgba(255, 61, 127, 0.15); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input[type='file'] { font: inherit; color: var(--text-2); font-size: 0.85rem; }
input[type='file']::file-selector-button { font: 600 0.82rem var(--font-body); color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 0.5rem 0.8rem; margin-right: 0.75rem; cursor: pointer; }

/* Switch */
.reel-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.9rem 1.1rem; margin: 0.5rem 0 0.4rem calc(42px + 0.85rem); padding: 0.9rem 0 0.2rem 1rem; border-left: 2px solid var(--border); }
.reel-options .span-all { grid-column: 1 / -1; }
.input-suffix { display: flex; align-items: center; gap: 0.6rem; }
.input-suffix input { max-width: 110px; }
.input-suffix span { color: var(--text-3); font-size: 0.85rem; }
@media (max-width: 560px) { .reel-options { margin-left: 0.4rem; } }
.switch { display: flex; align-items: center; gap: 0.85rem; cursor: pointer; padding: 0.35rem 0; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-strong); position: relative; cursor: pointer; flex: none; transition: background 0.25s var(--ease); margin: 0; }
.switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-2); transition: transform 0.25s var(--ease), background 0.25s; }
.switch input:checked { background: var(--gradient); border-color: transparent; }
.switch input:checked::after { transform: translateX(18px); background: #fff; }
.switch input:disabled { opacity: 0.45; cursor: not-allowed; }
.switch-text strong { display: block; font-size: 0.92rem; font-weight: 600; }
.switch-text span { display: block; font-size: 0.8rem; color: var(--text-3); }

/* ── Cards ───────────────────────────────────────────────────────────── */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.35rem; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.card-title { display: flex; align-items: center; gap: 0.55rem; font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; }
.card-title .icon { color: var(--accent-1); }
.card-sub { color: var(--text-3); font-size: 0.85rem; margin-top: 0.2rem; }
.card-glow::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(255, 61, 127, 0.5), transparent 40%, transparent 60%, rgba(139, 92, 255, 0.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.bento { display: grid; gap: 1rem; grid-template-columns: repeat(12, 1fr); }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

/* Stat tile */
.stat-value { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; margin-top: 0.6rem; }
.stat-label { display: flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; color: var(--text-3); font-weight: 500; }
.stat-foot { margin-top: 0.5rem; font-size: 0.82rem; color: var(--text-2); }

/* ── Badges & chips ──────────────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 0.4rem; height: 24px; padding: 0 0.6rem; border-radius: 999px; font-size: 0.74rem; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.no-dot::before { display: none; }
.pill.ok { color: var(--ok); background: rgba(51, 214, 159, 0.12); }
.pill.warn { color: var(--warn); background: rgba(255, 181, 71, 0.12); }
.pill.bad { color: var(--bad); background: rgba(255, 92, 108, 0.12); }
.pill.accent { color: var(--accent-3); background: rgba(139, 92, 255, 0.14); }
.pill.accent::before { display: none; }
.pill.accent .icon { width: 13px; height: 13px; }
.pill.live::before { box-shadow: 0 0 0 0 currentColor; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(51, 214, 159, 0.6); } 70% { box-shadow: 0 0 0 7px rgba(51, 214, 159, 0); } 100% { box-shadow: 0 0 0 0 rgba(51, 214, 159, 0); } }
.chip { display: inline-flex; align-items: center; gap: 0.35rem; height: 30px; padding: 0 0.75rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.8rem; font-weight: 500; color: var(--text-2); }
.chip.accent { background: rgba(255, 61, 127, 0.12); border-color: rgba(255, 61, 127, 0.3); color: var(--text); }
.kbd { font-family: var(--font-mono); font-size: 0.72rem; padding: 0.1rem 0.4rem; border: 1px solid var(--border-strong); border-radius: 6px; color: var(--text-3); }

/* ── Avatars ─────────────────────────────────────────────────────────── */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center; font-weight: 700; color: #fff; background: var(--gradient); font-family: var(--font-display); }
.avatar-ring { padding: 2px; border-radius: 50%; background: var(--gradient); flex: none; display: inline-flex; }
.avatar-ring > .avatar { border: 2px solid var(--bg); }
.avatar-ring.muted-ring { background: var(--border-strong); }
.avatar-xl { width: 76px; height: 76px; font-size: 1.8rem; }
.avatar-sm { width: 30px; height: 30px; font-size: 0.8rem; }

/* ── App shell ───────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 1.5rem;
  padding: 1.25rem 1rem; border-right: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); z-index: 30;
}
.sidebar-section { display: flex; flex-direction: column; gap: 0.25rem; min-height: 0; }
.sidebar-section.scroll { overflow-y: auto; flex: 1; margin: 0 -0.5rem; padding: 0 0.5rem; }
.sidebar .eyebrow { padding: 0 0.6rem 0.4rem; }
.nav-item {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.6rem; border-radius: 12px; text-decoration: none;
  color: var(--text-2); font-weight: 500; font-size: 0.92rem; transition: background 0.2s, color 0.2s; border: 1px solid transparent; cursor: pointer; background: none; width: 100%; text-align: left; font-family: inherit;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.nav-item .avatar { width: 32px; height: 32px; font-size: 0.85rem; }
.nav-item .avatar-ring > .avatar { border-width: 2px; }
.nav-item .meta { min-width: 0; flex: 1; }
.nav-item .meta strong { display: block; font-weight: 600; color: var(--text); font-size: 0.9rem; }
.nav-item .meta span { display: block; font-size: 0.74rem; color: var(--text-3); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--text-3); }
.status-dot.ok { background: var(--ok); box-shadow: 0 0 10px rgba(51, 214, 159, 0.8); }
.status-dot.warn { background: var(--warn); }
.status-dot.bad { background: var(--bad); box-shadow: 0 0 10px rgba(255, 92, 108, 0.8); }
.add-account { border: 1px dashed var(--border-strong); justify-content: center; color: var(--text-2); margin-top: 0.4rem; }
.add-account:hover { border-color: var(--accent-1); color: var(--text); }
.user-chip { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.user-chip .avatar { width: 34px; height: 34px; font-size: 0.85rem; }

.scrim { display: none; }
.main-col { min-width: 0; }
.main { min-width: 0; padding: 2rem clamp(1rem, 3vw, 2.5rem) 4rem; }
.main-inner { max-width: 1180px; margin: 0 auto; }
.topbar { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head p { color: var(--text-2); margin-top: 0.4rem; }

/* Segmented tabs */
.tabs { display: inline-flex; gap: 0.25rem; padding: 0.3rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); margin: 1.5rem 0; overflow-x: auto; max-width: 100%; }
.tabs a { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.5rem 0.95rem; border-radius: 10px; text-decoration: none; color: var(--text-2); font-weight: 600; font-size: 0.87rem; white-space: nowrap; transition: background 0.2s, color 0.2s; }
.tabs a:hover { color: var(--text); }
.tabs a.active { background: var(--surface-solid); color: var(--text); box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.5); }
.tabs .count { font-size: 0.7rem; padding: 0 0.4rem; border-radius: 999px; background: var(--surface-2); color: var(--text-3); }

/* ── Account hero ────────────────────────────────────────────────────── */
.hero-card { overflow: hidden; padding: 1.6rem; }
.hero-card::after {
  content: ''; position: absolute; right: -80px; top: -120px; width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 61, 127, 0.35), transparent 65%); pointer-events: none; opacity: var(--glow-opacity);
}
.hero-top { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-top h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.hero-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.5rem; position: relative; z-index: 1; }

.countdown { font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1; margin-top: 0.7rem; }
.countdown small { font-size: 0.5em; font-weight: 600; letter-spacing: -0.02em; color: var(--text-2); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: flex; gap: 0.9rem; align-items: center; padding: 0.6rem 0; position: relative; }
.timeline li:not(:last-child)::after { content: ''; position: absolute; left: 21px; top: 44px; bottom: -6px; width: 1px; background: var(--border-strong); }
.timeline .when { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; text-align: center; flex: none; line-height: 1.05; }
.timeline .when b { display: block; font-family: var(--font-display); font-size: 1rem; }
.timeline .when span { display: block; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.timeline li:first-child .when { background: var(--gradient); color: #fff; }
.timeline li:first-child .when span { color: rgba(255, 255, 255, 0.8); }

/* Activity feed */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 0.85rem; align-items: flex-start; padding: 0.85rem 0; border-top: 1px solid var(--border); }
.feed li:first-child { border-top: 0; padding-top: 0.2rem; }
.feed .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); }
.feed .dot.ok { color: var(--ok); background: rgba(51, 214, 159, 0.12); }
.feed .dot.bad { color: var(--bad); background: rgba(255, 92, 108, 0.12); }
.feed .dot.warn { color: var(--warn); background: rgba(255, 181, 71, 0.12); }
.feed .body { min-width: 0; flex: 1; }
.feed .body strong { font-weight: 600; font-size: 0.9rem; }
.feed .err { color: var(--bad); font-size: 0.82rem; margin-top: 0.2rem; word-break: break-word; }

/* Checklist */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.checklist li { display: flex; align-items: center; gap: 0.7rem; font-size: 0.9rem; color: var(--text-2); }
.checklist .tick { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1.5px dashed var(--border-strong); flex: none; }
.checklist .done { color: var(--text); }
.checklist .done .tick { border: 0; background: var(--gradient); color: #fff; }
.progress { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 0.9rem 0 1.1rem; }
.progress span { display: block; height: 100%; background: var(--gradient); border-radius: inherit; transition: width 0.6s var(--ease); }

/* ── Publishing settings ─────────────────────────────────────────────── */
.mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; }
.mode-card {
  position: relative; display: flex; flex-direction: column; gap: 0.5rem; padding: 1rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
}
.mode-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.mode-card .mode-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); transition: background 0.2s, color 0.2s; }
.mode-card strong { font-size: 0.95rem; }
.mode-card small { color: var(--text-3); font-size: 0.8rem; line-height: 1.45; }
.mode-card:has(input:checked) { border-color: transparent; background: var(--gradient-soft); box-shadow: 0 0 0 1.5px var(--accent-1), 0 18px 40px -20px rgba(255, 61, 127, 0.6); }
.mode-card:has(input:checked) .mode-icon { background: var(--gradient); color: #fff; }
.mode-card:has(input:focus-visible) { outline: 2px solid var(--accent-1); outline-offset: 2px; }

.folder-input { display: flex; gap: 0.5rem; }
.folder-input input { flex: 1; min-width: 0; }
.share-hint { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.85rem 1rem; border-radius: var(--radius); background: var(--gradient-soft); border: 1px solid var(--border); font-size: 0.85rem; color: var(--text-2); margin-bottom: 1.2rem; }
.share-hint code { cursor: copy; }

.schedule-list { display: grid; gap: 0.6rem; }
.slot { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding: 0.6rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.slot input[type='time'] { width: 150px; height: 38px; font-family: var(--font-mono); font-size: 0.9rem; }
.slot .cron-input { width: 200px; height: 38px; font-family: var(--font-mono); font-size: 0.85rem; }
.days { display: flex; gap: 0.3rem; flex-wrap: wrap; flex: 1; }
.day { position: relative; }
.day input { position: absolute; opacity: 0; }
.day span { display: grid; place-items: center; width: 38px; height: 32px; border-radius: 10px; font-size: 0.75rem; font-weight: 600; background: var(--surface-2); color: var(--text-3); cursor: pointer; transition: all 0.15s; border: 1px solid transparent; }
.day input:checked + span { background: rgba(255, 61, 127, 0.16); color: var(--text); border-color: rgba(255, 61, 127, 0.45); }
.day input:focus-visible + span { outline: 2px solid var(--accent-1); }
.slot-note { font-size: 0.75rem; color: var(--text-3); }

.sticky-save {
  position: sticky; bottom: 1rem; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem 0.75rem 0.75rem 1.2rem; border-radius: 18px; margin-top: 1.25rem;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}

/* Drive access + folder picker */
.access-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.access-option { position: relative; display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.9rem 1rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.access-option input { position: absolute; opacity: 0; }
.access-option:has(input:checked) { border-color: var(--accent-1); background: var(--gradient-soft); }
.access-option:has(input:focus-visible) { outline: 2px solid var(--accent-1); outline-offset: 2px; }
.access-option strong { display: block; font-size: 0.92rem; }
.access-option span.faint { display: block; font-size: 0.8rem; }
.google-mark { width: 34px; height: 34px; border-radius: 10px; background: #fff; display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); }
.google-mark svg { width: 20px; height: 20px; }
.connect-google { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; padding: 1.1rem; border-radius: var(--radius); background: var(--gradient-soft); border: 1px solid var(--border); margin-bottom: 1.25rem; }
.folder-pick { display: flex; align-items: center; gap: 0.75rem; width: 100%; min-height: 52px; padding: 0.55rem 0.6rem 0.55rem 0.9rem; border-radius: 14px; border: 1px dashed var(--border-strong); background: var(--input-bg); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.folder-pick:hover { border-color: var(--accent-1); }
.folder-pick.has-value { border-style: solid; }
.folder-pick .folder-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 181, 71, 0.14); color: var(--warn); flex: none; }
.folder-pick .meta { flex: 1; min-width: 0; }
.folder-pick .meta strong { display: block; font-size: 0.92rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-pick .meta span { display: block; font-size: 0.75rem; color: var(--text-3); }
.folder-modal { width: min(640px, calc(100vw - 2rem)); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem; font-size: 0.85rem; margin-bottom: 0.6rem; min-height: 28px; }
.crumbs button { background: none; border: 0; color: var(--text-2); font: inherit; padding: 0.2rem 0.45rem; border-radius: 8px; cursor: pointer; }
.crumbs button:hover { background: var(--surface-2); color: var(--text); }
.crumbs button:last-child { color: var(--text); font-weight: 600; }
.crumbs .sep { color: var(--text-3); }
.folder-list { height: 340px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); padding: 0.35rem; background: var(--surface); }
.folder-row { display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.6rem 0.7rem; border-radius: 12px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.folder-row:hover, .folder-row:focus-visible { background: var(--surface-2); outline: none; }
.folder-row .folder-ico { color: var(--warn); }
.folder-row .grow strong { display: block; font-weight: 500; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-row .grow span { display: block; font-size: 0.72rem; color: var(--text-3); }
.folder-row .pick { opacity: 0; }
.folder-row:hover .pick, .folder-row:focus-visible .pick { opacity: 1; }
.new-folder { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.new-folder input { height: 36px; }

/* Notifications */
.bell { position: relative; }
.bell .count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 0.68rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.bell .count.soft { background: var(--accent-3); }
.nav-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 0.66rem; font-weight: 700; display: inline-grid; place-items: center; }
.nav-badge.soft { background: var(--surface-2); color: var(--text-2); }
.nav-badge.new { background: var(--accent-3); }

/* ── Music library (admin) ─────────────────────────────────────────── */
.music-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.75rem; }
.music-stat { padding: 0.9rem 1rem; }
.music-stat-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin-top: 0.2rem; }
.music-stat-value.ok { color: var(--ok); }
.track-list { display: grid; gap: 0.1rem; }
.track-row { display: flex; align-items: flex-start; gap: 0.9rem; padding: 0.85rem 0.2rem; border-top: 1px solid var(--border); }
.track-row:first-child { border-top: 0; }
.track-row.is-off { opacity: 0.55; }
.track-row .chip { height: 24px; font-size: 0.72rem; padding: 0 0.55rem; }
.track-play { flex: none; border-radius: 50%; }
.track-play.is-playing { background: var(--gradient); color: #fff; border-color: transparent; }
.track-side { display: flex; align-items: center; gap: 0.4rem; flex: none; }
@media (max-width: 560px) { .track-row { flex-wrap: wrap; } .track-side { margin-left: auto; } }

/* ── What's new ──────────────────────────────────────────────────────── */
.update-item { display: flex; align-items: center; gap: 1rem; color: inherit; text-decoration: none; transition: border-color 0.2s var(--ease), transform 0.2s var(--ease); }
.update-item:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.update-item .feature-icon { margin: 0; flex: none; }
.update-item > .icon:last-child { color: var(--text-3); flex: none; }
.update-item.unread { border-color: color-mix(in srgb, var(--accent-3) 45%, var(--border)); }
.update-detail { max-width: 720px; }
.update-detail .lead { font-size: 1.05rem; margin-top: 0.5rem; line-height: 1.55; }
.update-detail section { margin-top: 1.5rem; }
.update-detail h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.update-detail ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.45rem; color: var(--text-2); line-height: 1.55; }
.update-detail .btn-primary { margin-top: 1.75rem; }
.update-toast { color: inherit; text-decoration: none; cursor: pointer; }
.toast.update-toast .icon { color: var(--accent-3); }
.update-toast .eyebrow { margin-bottom: 0.15rem; }

dialog.drawer { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(440px, 100vw); border-radius: 24px 0 0 24px; border-right: 0; display: none; flex-direction: column; padding: 0; }
dialog.drawer[open] { display: flex; animation: drawer-in 0.3s var(--ease); }
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.2rem 0.9rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 0 0.6rem 1.2rem; }
.notif { display: flex; gap: 0.8rem; align-items: flex-start; width: 100%; padding: 0.8rem 0.7rem; border-radius: 14px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; position: relative; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--surface); }
.notif.unread::before { content: ''; position: absolute; left: 2px; top: 1.3rem; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-1); }
.notif .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-2); }
.notif .dot.error { color: var(--bad); background: rgba(255, 92, 108, 0.12); }
.notif .dot.warning { color: var(--warn); background: rgba(255, 181, 71, 0.12); }
.notif .dot.success { color: var(--ok); background: rgba(51, 214, 159, 0.12); }
.notif .body { flex: 1; min-width: 0; }
.notif .body strong { display: block; font-size: 0.9rem; font-weight: 600; }
.notif .body p { font-size: 0.82rem; color: var(--text-2); margin-top: 0.15rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.notif .meta { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.35rem; font-size: 0.72rem; color: var(--text-3); }
.notif .read-btn { flex: none; opacity: 0.6; }
.notif:hover .read-btn { opacity: 1; }

/* Run details */
.steps-list { list-style: none; margin: 0; padding: 0; }
.steps-list li { display: flex; gap: 0.85rem; padding: 0.55rem 0; position: relative; }
.steps-list li:not(:last-child)::after { content: ''; position: absolute; left: 13px; top: 36px; bottom: -8px; width: 2px; background: var(--border); }
.step-icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-3); z-index: 1; }
.step-icon.done { background: rgba(51, 214, 159, 0.15); color: var(--ok); }
.step-icon.failed { background: rgba(255, 92, 108, 0.15); color: var(--bad); }
.step-icon.running { background: rgba(255, 181, 71, 0.15); color: var(--warn); }
.step-icon.running .icon { animation: spin 1.2s linear infinite; }
.step-icon.skipped { opacity: 0.55; }
.steps-list .step-body { flex: 1; min-width: 0; padding-top: 0.2rem; }
.steps-list .step-body strong { font-size: 0.9rem; font-weight: 600; }
.steps-list li.skipped strong { color: var(--text-3); font-weight: 500; }
.steps-list .step-note { font-size: 0.8rem; color: var(--text-2); margin-top: 0.15rem; word-break: break-word; }
.steps-list .step-error { font-size: 0.82rem; color: var(--bad); margin-top: 0.25rem; word-break: break-word; }
.caption-preview { white-space: pre-wrap; font-size: 0.85rem; color: var(--text-2); background: var(--surface-2); border-radius: 12px; padding: 0.85rem 1rem; max-height: 260px; overflow-y: auto; }
.feed li.clickable { cursor: pointer; border-radius: 12px; margin: 0 -0.5rem; padding-left: 0.5rem; padding-right: 0.5rem; }
.feed li.clickable:hover { background: var(--surface-2); }

/* ── Automations ─────────────────────────────────────────────────────── */
.rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.rule-card { display: flex; flex-direction: column; gap: 1rem; }
.flow { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.6rem; align-items: stretch; }
.flow-step { padding: 0.75rem; border-radius: 14px; background: var(--surface-2); min-width: 0; }
.flow-step .eyebrow { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.4rem; }
.flow-arrow { display: grid; place-items: center; color: var(--accent-1); }
.keyword { display: inline-flex; margin: 0.15rem 0.2rem 0 0; padding: 0.15rem 0.55rem; border-radius: 8px; background: rgba(255, 61, 127, 0.14); color: var(--text); font-size: 0.78rem; font-weight: 600; }
.bubble { font-size: 0.82rem; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── History grid ────────────────────────────────────────────────────── */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.post { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.post-media { aspect-ratio: 4 / 5; background: var(--gradient-soft); display: grid; place-items: center; color: var(--text-3); position: relative; overflow: hidden; }
.post-media img { width: 100%; height: 100%; object-fit: cover; }
.post-media .type { position: absolute; top: 0.6rem; right: 0.6rem; }
.post-body { padding: 0.85rem 0.95rem 0.95rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.post-caption { font-size: 0.82rem; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: auto; }

/* ── Connections ─────────────────────────────────────────────────────── */
.platform { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.platform-logo { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; flex: none; }
.platform-logo.ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.platform-logo.threads { background: #000; border: 1px solid var(--border-strong); }
.platform-logo.drive { background: var(--surface-2); }

/* ── Tables ──────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); font-weight: 600; padding: 0 0.75rem 0.6rem; }
td { padding: 0.75rem; border-top: 1px solid var(--border); }

/* ── Empty states & skeletons ────────────────────────────────────────── */
.empty { text-align: center; padding: 2.5rem 1rem; }
.empty .empty-art { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 1rem; display: grid; place-items: center; background: var(--gradient-soft); border: 1px solid var(--border); color: var(--accent-1); }
.empty h3 { margin-bottom: 0.4rem; }
.empty p { color: var(--text-2); max-width: 30rem; margin: 0 auto; }
.skeleton { border-radius: var(--radius-lg); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border: 1px solid var(--border); }
@keyframes shimmer { to { background-position: -200% 0; } }

.callout { display: flex; gap: 0.85rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: var(--radius); border: 1px solid rgba(255, 181, 71, 0.3); background: rgba(255, 181, 71, 0.08); margin-bottom: 1rem; }
.callout .icon { color: var(--warn); margin-top: 2px; }
.callout.bad { border-color: rgba(255, 92, 108, 0.35); background: rgba(255, 92, 108, 0.08); }
.callout.bad .icon { color: var(--bad); }
.callout strong { display: block; margin-bottom: 0.15rem; }

/* ── Onboarding / connect ────────────────────────────────────────────── */
.connect-hero { max-width: 640px; margin: 3rem auto; text-align: center; }
.connect-orb {
  width: 120px; height: 120px; margin: 0 auto 1.75rem; border-radius: 36px; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
  box-shadow: 0 30px 80px -20px rgba(214, 36, 159, 0.7); animation: float 6s ease-in-out infinite;
}
.connect-orb svg { width: 56px; height: 56px; stroke-width: 1.6; }
@keyframes float { 50% { transform: translateY(-10px) rotate(-3deg); } }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin: 2rem 0; text-align: left; }
.step { padding: 1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.step b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--gradient); color: #fff; font-size: 0.8rem; margin-bottom: 0.6rem; }
.step p { font-size: 0.85rem; color: var(--text-2); }

/* ── Dialogs ─────────────────────────────────────────────────────────── */
dialog {
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 0; background: var(--surface-solid); color: var(--text);
  width: min(620px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.8);
}
dialog::backdrop { background: rgba(5, 4, 10, 0.6); backdrop-filter: blur(6px); }
dialog[open] { animation: pop 0.25s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.4rem 0; }
.dialog-body { padding: 1.2rem 1.4rem; overflow-y: auto; max-height: calc(100vh - 12rem); }
.dialog-foot { display: flex; justify-content: flex-end; gap: 0.6rem; padding: 0 1.4rem 1.3rem; }
.segmented { display: inline-flex; padding: 0.25rem; border-radius: 12px; background: var(--surface-2); gap: 0.25rem; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; padding: 0.4rem 0.85rem; border-radius: 9px; font-size: 0.85rem; font-weight: 600; color: var(--text-2); cursor: pointer; }
.segmented input:checked + span { background: var(--surface-solid); color: var(--text); box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.5); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 0.5rem; max-height: 280px; overflow-y: auto; margin-top: 0.75rem; }
.media-grid button { padding: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: var(--surface-2); border: 2px solid transparent; cursor: pointer; color: var(--text-3); font-size: 0.7rem; }
.media-grid button.selected { border-color: var(--accent-1); box-shadow: 0 0 0 3px rgba(255, 61, 127, 0.25); }
.media-grid img { width: 100%; height: 100%; object-fit: cover; }

/* ── Menus ───────────────────────────────────────────────────────────── */
.menu { position: relative; }
.menu-panel { position: absolute; bottom: calc(100% + 8px); left: 0; right: 0; padding: 0.35rem; border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow); z-index: 40; }
.menu-panel .nav-item { font-size: 0.88rem; }

/* ── Toasts ──────────────────────────────────────────────────────────── */
#toasts { position: fixed; right: 1.25rem; bottom: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; z-index: 1000; max-width: min(400px, calc(100vw - 2.5rem)); }
.toast {
  display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.85rem 1rem; border-radius: 14px; font-size: 0.9rem;
  background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow); animation: toast-in 0.35s var(--ease);
}
.toast .icon { margin-top: 1px; color: var(--ok); }
.toast.error .icon { color: var(--bad); }
.toast.warn .icon { color: var(--warn); }
.toast.leaving { animation: toast-out 0.25s forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(0.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }

/* ── Auth pages ──────────────────────────────────────────────────────── */
.auth { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.auth-art { position: relative; overflow: hidden; padding: 2.5rem; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--border); }
.auth-art::before { content: ''; position: absolute; inset: -20%; background: conic-gradient(from 200deg at 60% 40%, rgba(139, 92, 255, 0.5), rgba(255, 61, 127, 0.45), rgba(255, 138, 61, 0.35), rgba(139, 92, 255, 0.5)); filter: blur(80px); opacity: calc(0.55 * var(--glow-opacity) + 0.2); animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { to { transform: rotate(25deg) scale(1.1); } }
.auth-art > * { position: relative; }
.auth-quote { font-family: var(--font-display); font-size: clamp(2rem, 3.4vw, 3.1rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1.05; max-width: 14ch; }
.auth-form-wrap { display: grid; place-items: center; padding: 2rem 1.25rem; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 2rem; margin: 1.5rem 0 0.4rem; }
.float-card { position: absolute; padding: 0.85rem 1rem; border-radius: 16px; background: color-mix(in srgb, var(--surface-solid) 80%, transparent); border: 1px solid var(--border-strong); box-shadow: var(--shadow); backdrop-filter: blur(16px); font-size: 0.85rem; display: flex; gap: 0.7rem; align-items: center; animation: float 7s ease-in-out infinite; }
.float-card .icon { color: var(--accent-1); }
.error-text { color: var(--bad); font-size: 0.87rem; }

/* ── Landing ─────────────────────────────────────────────────────────── */
.landing-nav { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem clamp(1rem, 4vw, 3rem); max-width: 1240px; margin: 0 auto; }
.landing-hero { max-width: 1240px; margin: 0 auto; padding: 3rem clamp(1rem, 4vw, 3rem) 2rem; display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.landing-hero h1 { font-size: clamp(2.8rem, 6.5vw, 5.4rem); line-height: 0.98; letter-spacing: -0.055em; font-weight: 800; }
.landing-hero .lead { font-size: 1.15rem; color: var(--text-2); max-width: 34rem; margin: 1.5rem 0 2rem; }
.mock { position: relative; }
.mock-phone { width: min(300px, 80vw); margin: 0 auto; aspect-ratio: 9 / 18.5; border-radius: 44px; padding: 10px; background: linear-gradient(160deg, #2a2733, #0e0d13); box-shadow: 0 50px 120px -30px rgba(255, 61, 127, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.mock-screen { height: 100%; border-radius: 36px; overflow: hidden; background: #0b0a10; display: flex; flex-direction: column; color: #f4f2f8; }
.mock-head { display: flex; align-items: center; gap: 0.6rem; padding: 1.2rem 1rem 0.7rem; font-size: 0.8rem; font-weight: 600; }
.mock-post { margin: 0 0.6rem; border-radius: 22px; aspect-ratio: 4 / 5; background: linear-gradient(160deg, #ff8a3d, #ff3d7f 50%, #8b5cff); position: relative; overflow: hidden; }
.mock-post::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 70% 25%, rgba(255, 255, 255, 0.55), transparent 35%), radial-gradient(circle at 20% 90%, rgba(0, 0, 0, 0.35), transparent 50%); }
.mock-cap { padding: 0.8rem 1rem; font-size: 0.72rem; color: #b4afc3; line-height: 1.5; }
.mock .float-card { color: var(--text); }
.logo-row { max-width: 1240px; margin: 2rem auto 0; padding: 0 clamp(1rem, 4vw, 3rem); }
.feature-bento { max-width: 1240px; margin: 4rem auto; padding: 0 clamp(1rem, 4vw, 3rem); display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.feature-bento .card { padding: 1.6rem; }
.feature-bento h3 { font-size: 1.35rem; margin: 1rem 0 0.5rem; }
.feature-bento p { color: var(--text-2); font-size: 0.93rem; }
.feature-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--gradient); color: #fff; }
.landing-cta { max-width: 1240px; margin: 0 auto 4rem; padding: 0 clamp(1rem, 4vw, 3rem); }
.landing-cta .card { text-align: center; padding: 3.5rem 1.5rem; overflow: hidden; }
.landing-cta h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.045em; }
.landing-foot { text-align: center; color: var(--text-3); font-size: 0.82rem; padding: 0 1rem 2rem; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .span-3 { grid-column: span 6; }
  .span-4, .span-5, .span-7, .span-8 { grid-column: span 12; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform 0.3s var(--ease); box-shadow: var(--shadow); background: var(--bg-elev); }
  .shell.nav-open .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 25; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
  .shell.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
  .main { padding-top: 1.25rem; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .landing-hero { grid-template-columns: 1fr; text-align: center; }
  .landing-hero .lead { margin-left: auto; margin-right: auto; }
  .landing-hero .row { justify-content: center; }
  .feature-bento { grid-template-columns: 1fr; }
  .feature-bento > * { grid-column: auto !important; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .span-3 { grid-column: span 12; }
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); }
  .slot input[type='time'] { width: 140px; }
  .sticky-save { flex-direction: column; align-items: stretch; }
  .tabs { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 901px) {
  #mobile-brand { display: none; }
}

/* ── Legal pages ─────────────────────────────────────────────────────── */
.legal { max-width: 760px; margin: 0 auto; padding: 2rem 1.25rem 4rem; line-height: 1.65; color: var(--text-2); }
.legal h1 { color: var(--text); margin-bottom: 0.4rem; }
.legal h2 { color: var(--text); font-size: 1.15rem; margin: 2rem 0 0.6rem; }
.legal p, .legal ul { margin: 0.6rem 0; }
.legal ul { padding-left: 1.2rem; display: grid; gap: 0.4rem; }
.legal a { color: var(--accent-3); }
.legal strong { color: var(--text); }
.landing-foot a { color: inherit; }
.legal-links { font-size: 0.8rem; color: var(--text-3); }
.legal-links a { color: inherit; text-decoration: underline; }
.danger-card { border-color: rgba(255, 92, 108, 0.28); }
.drive-mode-switch { margin-top: 1.1rem; font-size: 0.8rem; color: var(--text-3); }
.drive-using { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 1rem; }
.drive-using .google-mark { width: 22px; height: 22px; }
.usage-meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 0.4rem; }
.usage-meter span { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.usage-meter.warn span { background: var(--warn); }
.usage-meter.bad span { background: var(--bad); }

/* ── Aurora glass treatment ──────────────────────────────────────────── */
body { isolation: isolate; }
body::before {
  background-size: 120% 120%;
  animation: aurora-drift 24s ease-in-out infinite alternate;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.13;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}
@keyframes aurora-drift {
  0% { background-position: 0% 0%; transform: scale(1); }
  100% { background-position: 100% 80%; transform: scale(1.08); }
}

.card {
  overflow: hidden;
  border-color: rgba(255,255,255,.105);
  background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.018) 48%, rgba(255,255,255,.035)), color-mix(in srgb, var(--surface-solid) 58%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 24px 65px -38px rgba(0,0,0,.84);
  backdrop-filter: blur(28px) saturate(155%);
  -webkit-backdrop-filter: blur(28px) saturate(155%);
  transition: transform .45s var(--ease), border-color .35s, box-shadow .45s var(--ease), background .35s;
}
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(115deg, rgba(255,255,255,.075), transparent 28%, transparent 72%, rgba(255,61,127,.035));
  opacity: .7;
}
.card > * { position: relative; z-index: 1; }
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 32px 76px -38px rgba(0,0,0,.9), 0 0 34px -24px rgba(255,61,127,.5);
}
.card-glow::before {
  background: linear-gradient(135deg, rgba(255,255,255,.7), rgba(255,61,127,.58) 24%, transparent 48%, transparent 72%, rgba(139,92,255,.58));
  opacity: .72;
}
.hero-card { background: linear-gradient(125deg, rgba(139,92,255,.14), rgba(255,61,127,.06) 52%, rgba(255,255,255,.025)), color-mix(in srgb, var(--surface-solid) 54%, transparent); }
.hero-card::after { background: radial-gradient(circle, rgba(255,61,127,.26), transparent 67%); animation: orb-breathe 8s ease-in-out infinite alternate; }
@keyframes orb-breathe { to { transform: translate(-14px, 18px) scale(1.18); opacity: .7; } }

.sidebar {
  background: linear-gradient(180deg, rgba(23,19,33,.86), rgba(13,12,18,.76));
  border-right-color: rgba(255,255,255,.09);
  box-shadow: inset -1px 0 rgba(255,255,255,.035), 18px 0 70px -50px rgba(139,92,255,.42);
}
.nav-item { transition: transform .25s var(--ease), background .25s, border-color .25s, color .25s, box-shadow .25s; }
.nav-item:hover { transform: translateX(3px); }
.nav-item.active {
  background: linear-gradient(105deg, rgba(139,92,255,.22), rgba(255,61,127,.12));
  border-color: rgba(255,255,255,.12);
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 8px 24px -18px rgba(255,61,127,.75);
}
.topbar { background: rgba(13,12,18,.68); border-bottom-color: rgba(255,255,255,.09); }
.tabs { background: rgba(255,255,255,.045); border-color: rgba(255,255,255,.09); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.tabs a { transition: transform .25s var(--ease), color .2s, background .2s; }
.tabs a:hover { transform: translateY(-1px); }
.tabs a.active { background: linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,.055)); box-shadow: inset 0 1px rgba(255,255,255,.12), 0 8px 22px -16px rgba(0,0,0,.9); }
.btn { box-shadow: inset 0 1px rgba(255,255,255,.045); }
.btn-primary { box-shadow: 0 12px 34px -13px rgba(255,61,127,.82), inset 0 1px 0 rgba(255,255,255,.32); transition: transform .3s var(--ease), box-shadow .3s, background-position .35s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 42px -13px rgba(255,61,127,.95), 0 0 32px -18px rgba(255,138,61,.9), inset 0 1px 0 rgba(255,255,255,.38); }
input[type='text'], input[type='email'], input[type='password'], input[type='time'], input[type='number'], input:not([type]), select, textarea { backdrop-filter: blur(10px); }
dialog { background: linear-gradient(145deg, rgba(36,31,48,.96), rgba(18,16,25,.97)); backdrop-filter: blur(30px); }
.toast { background: linear-gradient(145deg, rgba(35,30,47,.92), rgba(17,15,23,.94)); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
#view > .bento > .card:nth-child(1) { animation: studio-arrive .72s var(--ease) both; }
#view > .bento > .card:nth-child(2) { animation: studio-arrive .72s .09s var(--ease) both; }
#view > .tabs, #tab > .bento > .card, #tab > .card, #tab > .post-grid > .post { animation: studio-arrive .68s var(--ease) both; }
#tab > .bento > .card:nth-child(2), #tab > .post-grid > .post:nth-child(2) { animation-delay: .07s; }
#tab > .bento > .card:nth-child(3), #tab > .post-grid > .post:nth-child(3) { animation-delay: .14s; }
#tab > .bento > .card:nth-child(4), #tab > .post-grid > .post:nth-child(4) { animation-delay: .21s; }
@keyframes studio-arrive { from { opacity: 0; translate: 0 14px; scale: .985; } to { opacity: 1; translate: 0 0; scale: 1; } }

.landing-nav {
  position: relative;
  z-index: 2;
  margin-top: 1rem;
  border: 1px solid rgba(255,255,255,.105);
  border-radius: 20px;
  background: linear-gradient(110deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  box-shadow: inset 0 1px rgba(255,255,255,.11), 0 18px 60px -44px rgba(0,0,0,.9);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}
.landing-hero { position: relative; padding-top: 4.5rem; padding-bottom: 3.5rem; }
.landing-hero > :first-child { animation: studio-arrive .8s var(--ease) both; }
.landing-hero .chip { border-color: rgba(255,255,255,.15); background: linear-gradient(110deg, rgba(139,92,255,.2), rgba(255,61,127,.11)); box-shadow: inset 0 1px rgba(255,255,255,.13), 0 0 28px -18px rgba(255,61,127,.65); }
.landing-hero h1 { text-shadow: 0 10px 55px rgba(139,92,255,.18); }
.mock { perspective: 1200px; filter: drop-shadow(0 45px 65px rgba(0,0,0,.36)); animation: showcase-arrive 1s .08s var(--ease) both; }
.mock::before {
  content: '';
  position: absolute;
  width: min(460px, 90vw);
  aspect-ratio: 1;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  border-radius: 50%;
  background: conic-gradient(from 90deg, rgba(255,138,61,.24), rgba(255,61,127,.28), rgba(139,92,255,.3), rgba(255,138,61,.24));
  filter: blur(72px);
  opacity: .86;
  animation: color-orbit 18s linear infinite;
  pointer-events: none;
}
@keyframes color-orbit { to { transform: translate(-50%,-50%) rotate(360deg); } }
@keyframes showcase-arrive { from { opacity: 0; transform: translateY(22px) rotateY(-8deg); } to { opacity: 1; transform: translateY(0) rotateY(0); } }
.mock-phone {
  position: relative;
  z-index: 1;
  transform: rotateY(-7deg) rotateZ(-3deg);
  transition: transform .8s var(--ease), box-shadow .5s;
  box-shadow: 0 55px 125px -34px rgba(255,61,127,.48), 0 0 0 1px rgba(255,255,255,.18), inset 0 0 0 1px rgba(255,255,255,.15);
  animation: phone-float 7s ease-in-out infinite;
}
.mock:hover .mock-phone { transform: rotateY(0) rotateZ(0) translateY(-6px) scale(1.015); }
@keyframes phone-float { 50% { translate: 0 -9px; } }
.mock-post img { width: 100%; height: 100%; object-fit: cover; }
.mock-post::after { mix-blend-mode: screen; opacity: .62; }
.mock-cap { color: #c5bfd0; }
.mock-cap b { color: #fff !important; }
.mock-cap span { color: #cf9dff !important; }
.mock .float-card {
  z-index: 2;
  border-color: rgba(255,255,255,.2);
  background: linear-gradient(135deg, rgba(38,32,52,.78), rgba(20,17,27,.66));
  box-shadow: inset 0 1px rgba(255,255,255,.18), 0 22px 55px -25px rgba(0,0,0,.85), 0 0 32px -24px rgba(255,61,127,.8);
  backdrop-filter: blur(24px) saturate(165%);
  -webkit-backdrop-filter: blur(24px) saturate(165%);
  animation-duration: 8s;
}
.mock .float-card .icon { color: #ffa4cf; filter: drop-shadow(0 0 8px rgba(255,61,127,.55)); }
.feature-bento { margin-top: 2rem; }
.feature-bento .card { min-height: 220px; position: relative; isolation: isolate; }
.feature-bento .card:nth-child(1) { animation: studio-arrive .7s .04s var(--ease) both; }
.feature-bento .card:nth-child(2) { animation: studio-arrive .7s .1s var(--ease) both; }
.feature-bento .card:nth-child(3) { animation: studio-arrive .7s .16s var(--ease) both; }
.feature-bento .card:nth-child(4) { animation: studio-arrive .7s .22s var(--ease) both; }
.feature-bento .card:nth-child(5) { animation: studio-arrive .7s .28s var(--ease) both; }
.feature-bento .feature-icon { box-shadow: 0 12px 28px -13px rgba(255,61,127,.8), inset 0 1px rgba(255,255,255,.35); transition: transform .4s var(--ease), box-shadow .4s; }
.feature-bento .card:hover .feature-icon { transform: translateY(-3px) rotate(-5deg) scale(1.05); box-shadow: 0 16px 34px -12px rgba(255,61,127,.92), inset 0 1px rgba(255,255,255,.45); }
.landing-cta .card { position: relative; isolation: isolate; border-color: rgba(255,255,255,.15); background: linear-gradient(115deg, rgba(139,92,255,.18), rgba(255,61,127,.11) 50%, rgba(255,138,61,.1)), rgba(20,17,27,.62); }
.landing-cta .card::before { content: ''; position: absolute; inset: -55% 15% auto; height: 150%; border-radius: 50%; background: radial-gradient(ellipse, rgba(255,61,127,.2), rgba(139,92,255,.12) 36%, transparent 70%); filter: blur(26px); z-index: 0; animation: cta-breathe 8s ease-in-out infinite alternate; }
.landing-cta .card > * { position: relative; z-index: 1; }
@keyframes cta-breathe { to { transform: translateX(16%) scale(1.15); opacity: .7; } }

.auth-art {
  background: linear-gradient(145deg, rgba(12,10,17,.28), rgba(12,10,17,.68)), url('/assets/creator-sunset.jpg') center / cover;
  border-right-color: rgba(255,255,255,.12);
}
.auth-art::before { opacity: .64; mix-blend-mode: screen; }
.auth-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,8,14,.25), transparent 36%, rgba(10,8,14,.4)), linear-gradient(90deg, rgba(10,8,14,.12), transparent 85%); pointer-events: none; }
.auth-art > * { z-index: 1; }
.auth-quote { max-width: 12ch; font-size: clamp(2.8rem, 4.5vw, 4.6rem); text-shadow: 0 12px 55px rgba(0,0,0,.38); }
.auth-card {
  position: relative;
  padding: 2.25rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.018)), rgba(19,16,25,.54);
  box-shadow: inset 0 1px rgba(255,255,255,.13), 0 34px 90px -48px rgba(0,0,0,.9);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  animation: studio-arrive .75s var(--ease) both;
}
.auth-card h1 { margin-top: 1.1rem; }
.auth-art .float-card { background: linear-gradient(135deg, rgba(38,32,52,.76), rgba(20,17,27,.66)); border-color: rgba(255,255,255,.23); }

[data-theme='light'] body::after { opacity: .045; }
[data-theme='light'] .card {
  border-color: rgba(83,64,106,.12);
  background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(255,255,255,.59) 52%, rgba(255,255,255,.74));
  box-shadow: inset 0 1px rgba(255,255,255,.96), 0 22px 56px -38px rgba(61,39,79,.32);
}
[data-theme='light'] .card:hover { border-color: rgba(112,73,207,.25); box-shadow: inset 0 1px rgba(255,255,255,.98), 0 30px 68px -38px rgba(61,39,79,.4); }
[data-theme='light'] .sidebar { background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(248,244,252,.82)); border-right-color: rgba(50,35,67,.1); }
[data-theme='light'] .landing-nav, [data-theme='light'] .auth-card { background: rgba(255,255,255,.72); border-color: rgba(50,35,67,.12); box-shadow: inset 0 1px rgba(255,255,255,.9), 0 24px 60px -42px rgba(61,39,79,.38); }
[data-theme='light'] .mock .float-card { background: rgba(35,29,45,.76); border-color: rgba(255,255,255,.2); }
[data-theme='light'] .landing-cta .card { background: linear-gradient(115deg, rgba(139,92,255,.12), rgba(255,61,127,.1) 50%, rgba(255,138,61,.11)), rgba(255,255,255,.82); }

@media (max-width: 900px) {
  .landing-nav { margin: .65rem .65rem 0; padding: .8rem 1rem; }
  .landing-hero { padding-top: 3.3rem; }
  .mock-phone { transform: rotateY(-4deg) rotateZ(-2deg); }
  .auth-card { max-width: 460px; }
}
@media (max-width: 560px) {
  .landing-hero { gap: 2rem; padding-top: 2.5rem; }
  .landing-hero .row { flex-direction: column; align-items: stretch; }
  .landing-hero .row .btn { width: 100%; }
  .mock .float-card { font-size: .74rem; padding: .65rem .75rem; }
  .mock .float-card:nth-of-type(2) { left: -3% !important; }
  .auth-card { padding: 1.5rem; border-radius: 24px; }
}

/* ── Live light and motion ───────────────────────────────────────────── */
body::before {
  background:
    radial-gradient(620px circle at var(--pointer-x, 78%) var(--pointer-y, 8%), rgba(255,61,127,.22), transparent 72%),
    radial-gradient(720px 520px at 8% 10%, rgba(139,92,255,.2), transparent 72%),
    radial-gradient(600px 520px at 84% 104%, rgba(255,138,61,.14), transparent 70%);
  background-size: 120% 120%;
  animation-duration: 15s;
  filter: saturate(135%);
}
body::after { opacity: .19; background-size: 64px 64px; }
.card {
  --spot-x: 50%;
  --spot-y: 8%;
  transform-style: preserve-3d;
  border-color: rgba(255,255,255,.15);
  background: linear-gradient(145deg, rgba(255,255,255,.105), rgba(255,255,255,.025) 46%, rgba(255,255,255,.052)), color-mix(in srgb, var(--surface-solid) 48%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.17), inset 0 -1px rgba(255,255,255,.025), 0 28px 74px -42px rgba(0,0,0,.92);
  backdrop-filter: blur(32px) saturate(170%);
  -webkit-backdrop-filter: blur(32px) saturate(170%);
}
.card::after {
  background:
    radial-gradient(420px circle at var(--spot-x) var(--spot-y), rgba(255,76,164,.22), transparent 70%),
    linear-gradient(115deg, rgba(255,255,255,.095), transparent 32%, transparent 68%, rgba(139,92,255,.09));
  opacity: .32;
  transition: opacity .35s ease;
}
.card:hover::after { opacity: .92; }
.card-glow::before {
  background: linear-gradient(115deg, rgba(255,255,255,.8), rgba(139,92,255,.75) 22%, rgba(255,61,127,.7) 48%, rgba(255,138,61,.68) 72%, rgba(255,255,255,.72));
  background-size: 260% 260%;
  animation: edge-glide 5.5s ease-in-out infinite;
  opacity: .86;
}
@keyframes edge-glide { 0%,100% { background-position: 0% 0%; } 50% { background-position: 100% 100%; } }
.hero-card::after {
  background:
    radial-gradient(560px circle at var(--spot-x,70%) var(--spot-y,30%), rgba(255,61,127,.34), transparent 69%),
    linear-gradient(115deg, rgba(255,255,255,.09), transparent 36%, transparent 75%, rgba(139,92,255,.13));
  opacity: .72;
}
.sidebar { box-shadow: inset -1px 0 rgba(255,255,255,.05), 22px 0 92px -46px rgba(139,92,255,.62); }
.nav-item.active { background-size: 180% 100%; animation: nav-hue 8s ease-in-out infinite alternate; }
@keyframes nav-hue { to { background-position: 100% 0; } }
.brand-mark { transition: transform .45s var(--ease), box-shadow .45s; }
.brand:hover .brand-mark { transform: rotate(-11deg) scale(1.09); box-shadow: 0 10px 34px -7px rgba(255,61,127,.95); }
.btn { position: relative; isolation: isolate; overflow: hidden; }
.btn:not(.is-busy)::after {
  content: '';
  position: absolute;
  inset: -80% auto -80% -42%;
  width: 29%;
  pointer-events: none;
  transform: skewX(-22deg) translateX(-220%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.32), transparent);
}
.btn > * { position: relative; z-index: 1; }
.btn:not(.is-busy):hover::after { transform: skewX(-22deg) translateX(560%); transition: transform .8s var(--ease); }
.btn-primary { filter: saturate(112%); }
.float-card { border-color: rgba(255,255,255,.28); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); }
.countdown { text-shadow: 0 0 34px rgba(255,61,127,.18); }

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: perspective(1100px) translateY(-6px) rotateX(var(--tilt-y,0deg)) rotateY(var(--tilt-x,0deg)) scale(1.012);
    border-color: rgba(255,255,255,.3);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 36px 88px -40px rgba(0,0,0,.94), 0 0 38px -22px rgba(255,61,127,.55);
  }
}
@media (hover: none) {
  .card:hover { transform: none; }
}
[data-theme='light'] body::before { opacity: .74; }
[data-theme='light'] .card {
  border-color: rgba(103,75,133,.2);
  background: linear-gradient(145deg, rgba(255,255,255,.82), rgba(255,255,255,.47) 46%, rgba(255,255,255,.7)), rgba(255,255,255,.48);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.98), inset 0 -1px rgba(103,75,133,.06), 0 28px 74px -42px rgba(72,43,97,.36);
}
[data-theme='light'] .card::after { background: radial-gradient(420px circle at var(--spot-x) var(--spot-y), rgba(255,61,127,.13), transparent 70%), linear-gradient(115deg, rgba(255,255,255,.4), transparent 38%, transparent 70%, rgba(139,92,255,.07)); }
[data-theme='light'] .card:hover { border-color: rgba(112,73,207,.34); box-shadow: inset 0 1px 0 #fff, 0 34px 78px -40px rgba(72,43,97,.42), 0 0 34px -24px rgba(112,73,207,.28); }

/* ── Kinetic creator stage ───────────────────────────────────────────── */
.gradient-text { background-size: 240% 240%; animation: color-surge 6s ease-in-out infinite alternate; }
@keyframes color-surge { to { background-position: 100% 50%; filter: hue-rotate(18deg); } }
.hero-card {
  min-height: 286px;
  padding: 2rem;
  background:
    radial-gradient(ellipse 48% 80% at 102% 0%, rgba(255,61,127,.34), transparent 76%),
    radial-gradient(ellipse 38% 90% at 70% 118%, rgba(255,138,61,.2), transparent 72%),
    linear-gradient(124deg, rgba(139,92,255,.24), rgba(255,61,127,.075) 48%, rgba(18,14,25,.65));
}
.hero-card .hero-top h1 { font-size: clamp(2.25rem, 4.2vw, 3.35rem); letter-spacing: -.065em; text-shadow: 0 5px 35px rgba(255,61,127,.3); }
.hero-card .avatar-ring { box-shadow: 0 0 0 5px rgba(255,255,255,.045), 0 0 42px rgba(255,61,127,.42); animation: avatar-throb 4s ease-in-out infinite; }
@keyframes avatar-throb { 50% { box-shadow: 0 0 0 8px rgba(255,255,255,.035), 0 0 58px rgba(139,92,255,.6); } }
.hero-card .hero-actions { margin-top: auto; padding-top: 1.75rem; }
.hero-card .btn-primary { box-shadow: 0 12px 38px -12px rgba(255,61,127,.95), 0 0 26px -12px rgba(255,138,61,.65), inset 0 1px 0 rgba(255,255,255,.4); }
.hero-card + .span-4 {
  min-height: 286px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 110% -8%, rgba(255,138,61,.35), transparent 48%),
    radial-gradient(circle at 100% 105%, rgba(255,61,127,.18), transparent 58%),
    linear-gradient(150deg, rgba(255,255,255,.09), rgba(255,255,255,.018)), rgba(17,14,23,.72);
}
.hero-card + .span-4::before {
  content: '';
  position: absolute;
  right: -90px;
  top: -90px;
  width: 235px;
  aspect-ratio: 1;
  border: 1px solid rgba(255,205,164,.2);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 32%, rgba(255,255,255,.28), rgba(255,138,61,.12) 14%, transparent 68%);
  box-shadow: 0 0 0 19px rgba(255,255,255,.025), 0 0 0 40px rgba(255,61,127,.025), inset 0 0 46px rgba(255,138,61,.12);
  animation: next-post-orbit 13s linear infinite;
  pointer-events: none;
}
@keyframes next-post-orbit { to { transform: rotate(360deg) scale(1.08); } }
.hero-card + .span-4 .countdown { position: relative; z-index: 1; font-size: clamp(2.65rem, 4vw, 3.65rem); text-shadow: 0 0 44px rgba(255,138,61,.3); }
#tab > .bento:first-child > .card:nth-child(-n + 4) { min-height: 156px; padding: 1.4rem; }
#tab > .bento:first-child > .card:nth-child(-n + 4)::before {
  position: absolute;
  right: -.035em;
  bottom: -.36em;
  color: rgba(255,255,255,.075);
  font: 800 clamp(7rem, 12vw, 10rem)/.8 var(--font-display);
  letter-spacing: -.12em;
  pointer-events: none;
  z-index: 0;
}
#tab > .bento:first-child > .card:nth-child(1)::before { content: '01'; }
#tab > .bento:first-child > .card:nth-child(2)::before { content: '02'; }
#tab > .bento:first-child > .card:nth-child(3)::before { content: '03'; }
#tab > .bento:first-child > .card:nth-child(4)::before { content: '04'; }
#tab > .bento:first-child > .card:nth-child(-n + 4) .stat-label { text-transform: uppercase; letter-spacing: .105em; font-size: .72rem; }
#tab > .bento:first-child > .card:nth-child(-n + 4) .stat-value {
  width: fit-content;
  margin-top: .85rem;
  font-size: clamp(2.5rem, 4vw, 3.45rem);
  line-height: .95;
  background: linear-gradient(118deg, #fff 8%, #ffb9dc 47%, #c1a0ff 86%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 8px 22px rgba(255,61,127,.22));
}
.progress span { background-size: 220% 100%; animation: progress-flare 2.4s linear infinite; }
@keyframes progress-flare { to { background-position: 100% 0; filter: brightness(1.35); } }
.timeline li:first-child .when { box-shadow: 0 0 28px -8px rgba(255,61,127,.75); animation: first-slot-pulse 3.6s ease-in-out infinite; }
@keyframes first-slot-pulse { 50% { box-shadow: 0 0 38px -4px rgba(255,138,61,.82); } }

.mock::after {
  content: '';
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  width: min(430px, 112%);
  aspect-ratio: 1.38;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 50%;
  background: radial-gradient(circle at 78% 19%, #fff 0 1px, rgba(255,61,127,.8) 2px, transparent 13px);
  box-shadow: 0 0 0 20px rgba(255,255,255,.018), 0 0 0 42px rgba(139,92,255,.02), inset 0 0 38px rgba(139,92,255,.08);
  transform: translate(-50%,-50%) rotate(-26deg) scaleY(.62);
  animation: orbital-sweep 24s linear infinite;
  pointer-events: none;
}
@keyframes orbital-sweep { to { transform: translate(-50%,-50%) rotate(334deg) scaleY(.62); } }
.mock-phone::before {
  content: '';
  position: absolute;
  z-index: 2;
  inset: 3px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 41px;
  background: linear-gradient(112deg, rgba(255,255,255,.14), transparent 24%, transparent 76%, rgba(255,61,127,.1));
  pointer-events: none;
}
.connect-orb { isolation: isolate; box-shadow: 0 30px 90px -14px rgba(214,36,159,.82), 0 0 78px -8px rgba(255,138,61,.42); }
.connect-orb::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -18px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 44px;
  box-shadow: 0 0 0 12px rgba(255,255,255,.025), 0 0 0 28px rgba(255,61,127,.025), 0 0 55px rgba(255,61,127,.5);
  animation: connect-pulse 3.2s ease-in-out infinite;
}
@keyframes connect-pulse { 50% { transform: rotate(12deg) scale(1.08); opacity: .55; } }
[data-theme='light'] .hero-card + .span-4 { background: radial-gradient(circle at 110% -8%, rgba(255,138,61,.2), transparent 48%), linear-gradient(150deg, rgba(255,255,255,.84), rgba(255,255,255,.58)); }
[data-theme='light'] #tab > .bento:first-child > .card:nth-child(-n + 4)::before { color: rgba(84,53,112,.085); }
[data-theme='light'] #tab > .bento:first-child > .card:nth-child(-n + 4) .stat-value { background-image: linear-gradient(118deg, #5734a6 8%, #ae3577 52%, #cc633e 92%); filter: drop-shadow(0 7px 18px rgba(112,73,207,.18)); }
@media (max-width: 1100px) {
  .hero-card, .hero-card + .span-4 { min-height: 250px; }
}
@media (max-width: 560px) {
  .hero-card { padding: 1.4rem; }
  .hero-card .hero-top h1 { font-size: 2.25rem; }
  .hero-card .hero-actions { padding-top: 1.25rem; }
  .mock::after { width: 104%; }
}
