/* ==========================================================================
   Контент-завод — Liquid Glass panel
   ========================================================================== */

/* Animatable theme colours (smooth platform switching) */
@property --accent   { syntax: '<color>'; inherits: true; initial-value: #d8b46a; }
@property --accent-2 { syntax: '<color>'; inherits: true; initial-value: #9b7bff; }
@property --orb-1    { syntax: '<color>'; inherits: true; initial-value: #6b4bd6; }
@property --orb-2    { syntax: '<color>'; inherits: true; initial-value: #d8b46a; }
@property --orb-3    { syntax: '<color>'; inherits: true; initial-value: #2a1f55; }
@property --orb-4    { syntax: '<color>'; inherits: true; initial-value: #5a2a4a; }
@property --on-accent { syntax: '<color>'; inherits: true; initial-value: #140f06; }

@font-face {
  font-family: "Playfair Display";
  src: url("/fonts/playfair.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #07060b;
  --text: rgba(255, 255, 255, .95);
  --text-2: rgba(255, 255, 255, .68);
  --text-3: rgba(255, 255, 255, .44);
  --text-4: rgba(255, 255, 255, .28);
  --hair: rgba(255, 255, 255, .13);
  --hair-2: rgba(255, 255, 255, .07);
  --glass-fill: rgba(255, 255, 255, .065);
  --glass-fill-2: rgba(255, 255, 255, .10);
  --field-fill: rgba(8, 8, 14, .34);
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #ff5a6e;
  --glow: color-mix(in srgb, var(--accent) 55%, transparent);
  --glow-soft: color-mix(in srgb, var(--accent) 22%, transparent);

  --r-xl: 34px;
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 13px;

  --ease: cubic-bezier(.22, .9, .25, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  --font-brand: "Playfair Display", "Didot", "Bodoni 72", Georgia, serif;

  /* default = brand (gold / violet) until a platform is picked */
  --accent: #d8b46a; --accent-2: #9b7bff; --on-accent: #140f06;
  --orb-1: #6b4bd6; --orb-2: #d8b46a; --orb-3: #2a1f55; --orb-4: #5a2a4a;

  transition: --accent .9s var(--ease), --accent-2 .9s var(--ease), --on-accent .6s var(--ease),
              --orb-1 1.3s var(--ease), --orb-2 1.3s var(--ease), --orb-3 1.5s var(--ease), --orb-4 1.5s var(--ease);
}

:root[data-platform="youtube"] {
  --accent: #ff2e4d; --accent-2: #ff8a3d; --on-accent: #fff;
  --orb-1: #ff1f45; --orb-2: #ff7a2e; --orb-3: #5c0718; --orb-4: #2c0a26;
}
:root[data-platform="tiktok"] {
  --accent: #2af2ee; --accent-2: #ff2d6f; --on-accent: #041316;
  --orb-1: #19d9e0; --orb-2: #ff2d6f; --orb-3: #07324a; --orb-4: #3a0b2a;
}
:root[data-platform="instagram"] {
  --accent: #ff3d8b; --accent-2: #ffb347; --on-accent: #fff;
  --orb-1: #8a3ab9; --orb-2: #ff3d8b; --orb-3: #ff8a3d; --orb-4: #3a1d6b;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 45%, transparent); }
svg { display: block; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ==========================================================================
   Living background
   ========================================================================== */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background:
  radial-gradient(120% 90% at 50% -10%, color-mix(in srgb, var(--orb-3) 45%, transparent), transparent 60%),
  radial-gradient(90% 80% at 110% 110%, color-mix(in srgb, var(--orb-4) 55%, transparent), transparent 60%),
  var(--bg); }
.orb { position: absolute; border-radius: 50%; will-change: transform; mix-blend-mode: screen; opacity: .62; }
.orb.o1 { width: 62vmax; height: 62vmax; left: -18vmax; top: -22vmax;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--orb-1) 78%, transparent), transparent 72%);
  animation: drift-a 28s ease-in-out infinite alternate; }
.orb.o2 { width: 52vmax; height: 52vmax; right: -16vmax; top: 6vmax;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--orb-2) 70%, transparent), transparent 72%);
  animation: drift-b 34s ease-in-out infinite alternate; }
.orb.o3 { width: 58vmax; height: 58vmax; left: 12vmax; bottom: -34vmax;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--orb-3) 90%, transparent), transparent 72%);
  animation: drift-c 40s ease-in-out infinite alternate; opacity: .75; }
.orb.o4 { width: 34vmax; height: 34vmax; left: 44vw; top: 30vh;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent-2) 55%, transparent), transparent 72%);
  animation: drift-d 24s ease-in-out infinite alternate; opacity: .35; }
@keyframes drift-a { to { transform: translate3d(12vmax, 8vmax, 0) scale(1.12); } }
@keyframes drift-b { to { transform: translate3d(-10vmax, 14vmax, 0) scale(.92); } }
@keyframes drift-c { to { transform: translate3d(8vmax, -10vmax, 0) scale(1.08); } }
@keyframes drift-d { to { transform: translate3d(-16vmax, -8vmax, 0) scale(1.3); } }
.grain { position: absolute; inset: -50%; opacity: .07; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.vignette { position: absolute; inset: 0; background: radial-gradient(130% 100% at 50% 40%, transparent 55%, rgba(0,0,0,.55)); pointer-events: none; }
.wave, .wave-ring { position: fixed; left: 0; top: 0; width: 40vmax; height: 40vmax; margin: -20vmax 0 0 -20vmax;
  border-radius: 50%; pointer-events: none; will-change: transform, opacity; z-index: -1; }
.wave { background: radial-gradient(circle, color-mix(in srgb, var(--accent) 60%, transparent) 0, color-mix(in srgb, var(--accent-2) 30%, transparent) 35%, transparent 62%); mix-blend-mode: screen; }
.wave-ring { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 70%, transparent), 0 0 60px 10px color-mix(in srgb, var(--accent) 45%, transparent), inset 0 0 60px 10px color-mix(in srgb, var(--accent-2) 35%, transparent); }

/* ==========================================================================
   Glass material
   ========================================================================== */
.glass {
  position: relative;
  background:
    linear-gradient(160deg, rgba(255,255,255,.13) 0%, rgba(255,255,255,.045) 38%, rgba(255,255,255,.03) 62%, rgba(255,255,255,.07) 100%),
    var(--glass-fill);
  -webkit-backdrop-filter: blur(26px) saturate(175%);
  backdrop-filter: blur(26px) saturate(175%);
  border-radius: var(--r-lg);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    inset 0 -1px 0 rgba(255,255,255,.05),
    inset 0 0 0 1px rgba(255,255,255,.06),
    0 24px 60px -24px rgba(0,0,0,.7),
    0 2px 10px rgba(0,0,0,.18);
  isolation: isolate;
}
/* specular rim — bright at the top-left, soft at the bottom-right */
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: linear-gradient(135deg, rgba(255,255,255,.62), rgba(255,255,255,.10) 26%, rgba(255,255,255,0) 48%, rgba(255,255,255,.06) 72%, rgba(255,255,255,.34));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  transition: opacity .5s var(--ease);
}
/* light that follows the pointer */
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, -40%), rgba(255,255,255,.11), transparent 42%);
  opacity: 0; transition: opacity .45s var(--ease);
}
.glass.lit::after { opacity: 1; }
.glass > * { position: relative; z-index: 3; }
.glass--strong { background: linear-gradient(160deg, rgba(255,255,255,.16), rgba(255,255,255,.06) 45%, rgba(255,255,255,.09)), rgba(22,20,32,.42); }
.glass--dark { background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.02) 50%), rgba(6,6,12,.55); }
body.rim-flash .glass::before { animation: rim-flash .9s var(--ease); }
@keyframes rim-flash { 30% { opacity: 1; filter: drop-shadow(0 0 6px var(--glow)); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 90%, white), rgba(255,255,255,.12) 30%, transparent 50%, rgba(255,255,255,.1) 72%, color-mix(in srgb, var(--accent-2) 80%, white)); } }

/* ==========================================================================
   Top bar + navigation
   ========================================================================== */
.edge-top { position: fixed; left: 0; right: 0; top: 0; height: 104px; z-index: 39; pointer-events: none;
  background: linear-gradient(180deg, rgba(7,6,11,.86) 0%, rgba(7,6,11,.55) 50%, rgba(7,6,11,0) 100%);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  -webkit-mask: linear-gradient(180deg, #000 55%, transparent); mask: linear-gradient(180deg, #000 55%, transparent); }
.edge-bottom { display: none; }
.topbar {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 40;
  width: min(1320px, calc(100% - 28px)); height: 64px; padding: 0 10px 0 22px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  border-radius: 999px;
}
.brand { display: flex; align-items: baseline; gap: 10px; min-width: 0; text-decoration: none; }
.wordmark {
  font: 700 25px/1 var(--font-brand); letter-spacing: .14em;
  background: linear-gradient(100deg, #fff6df 0%, #e7c98b 30%, #b8904a 55%, #fff1cf 75%, #d8b46a 100%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gold-sheen 9s ease-in-out infinite;
}
@keyframes gold-sheen { 50% { background-position: 100% 0; } }
.brand-sub { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.top-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.mode-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 13px; border-radius: 999px;
  border: 0; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px var(--hair), inset 0 1px 0 rgba(255,255,255,.18);
  font-weight: 650; font-size: 13px; letter-spacing: .06em; transition: transform .25s var(--spring), background .3s;
}
.mode-chip:hover { background: rgba(255,255,255,.12); }
.mode-chip:active { transform: scale(.95); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 currentColor; flex: none; }
.dot.live { background: #ff3b5c; color: #ff3b5c; animation: pulse 1.8s infinite; }
.dot.warn { background: var(--warn); }
.dot.run { background: var(--accent); color: var(--accent); animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 70%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 0; background: rgba(255,255,255,.07);
  box-shadow: inset 0 0 0 1px var(--hair), inset 0 1px 0 rgba(255,255,255,.18); color: var(--text-2); transition: transform .25s var(--spring), color .2s, background .2s; }
.icon-btn:hover { color: var(--text); background: rgba(255,255,255,.12); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 19px; height: 19px; }
.run-badge { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 650;
  background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); color: var(--text); cursor: pointer; border: 0; }

/* ==========================================================================
   Liquid segmented control (the lens)
   ========================================================================== */
.lseg { position: relative; display: flex; padding: 5px; gap: 0; border-radius: 999px; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.lseg-item {
  position: relative; z-index: 1; flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 9px;
  height: 42px; padding: 0 18px; border: 0; border-radius: 999px; background: none; color: var(--text-3);
  font-weight: 620; font-size: 14.5px; letter-spacing: -.005em; white-space: nowrap; transition: color .35s var(--ease);
  -webkit-tap-highlight-color: transparent; outline: none;
}
.lseg-item:hover { color: var(--text-2); }
.lseg-item:focus-visible { box-shadow: 0 0 0 2px var(--glow); }
.lseg-item svg { width: 18px; height: 18px; flex: none; }
.lseg-item .sub { display: none; }
.lseg-lens {
  position: absolute; z-index: 2; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px; overflow: hidden; pointer-events: none;
  transform-origin: 50% 50%; will-change: transform, width;
  background:
    radial-gradient(120% 130% at 50% 118%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.17), rgba(255,255,255,.035) 55%, rgba(255,255,255,.08));
  -webkit-backdrop-filter: blur(6px) saturate(210%);
  backdrop-filter: blur(6px) saturate(210%);
  box-shadow:
    inset 0 1px .5px rgba(255,255,255,.9),
    inset 0 -1px 1px rgba(255,255,255,.28),
    inset 1px 0 1px rgba(255,255,255,.16),
    inset -1px 0 1px rgba(255,255,255,.16),
    inset 0 0 0 1px rgba(255,255,255,.13),
    inset 0 -12px 20px -12px color-mix(in srgb, var(--accent) 75%, transparent),
    0 12px 30px -12px var(--glow),
    0 2px 8px rgba(0,0,0,.3);
}
.lseg-lens::after { /* soft specular highlight along the top edge */
  content: ""; position: absolute; left: 1px; right: 1px; top: 1px; height: 60%; border-radius: inherit;
  background: radial-gradient(75% 95% at 50% 0%, rgba(255,255,255,.30), rgba(255,255,255,.06) 55%, rgba(255,255,255,0) 75%);
  pointer-events: none;
}
.lseg-ghosts { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.lseg-ghost { position: absolute; display: flex; align-items: center; justify-content: center; gap: 9px; color: #fff;
  font-weight: 680; font-size: 14.5px; white-space: nowrap; letter-spacing: -.005em; text-shadow: 0 1px 10px rgba(0,0,0,.25); }
.lseg-ghost svg { width: 18px; height: 18px; color: var(--accent); filter: drop-shadow(0 0 8px var(--glow)); }
.lseg-ghost .sub { display: none; }

/* XL — platform picker */
.lseg--xl { padding: 7px; border-radius: 30px; }
.lseg--xl .lseg-item, .lseg--xl .lseg-ghost { flex-direction: column; gap: 5px; height: 94px; font-size: 16px; border-radius: 24px; }
.lseg--xl .lseg-item svg, .lseg--xl .lseg-ghost svg { width: 28px; height: 28px; }
.lseg--xl .lseg-item .sub, .lseg--xl .lseg-ghost .sub { display: block; font-size: 11.5px; font-weight: 550; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.lseg--xl .lseg-lens { top: 7px; bottom: 7px; border-radius: 24px; }
.lseg--sm .lseg-item, .lseg--sm .lseg-ghost { height: 34px; font-size: 13px; padding: 0 14px; }
.lseg--sm { padding: 4px; }
.lseg--sm .lseg-lens { top: 4px; bottom: 4px; }
.lseg--tabs { background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--hair-2); }
.lseg--tabs .lseg-item, .lseg--tabs .lseg-ghost { height: 44px; padding: 0 20px; font-size: 14px; }

/* ==========================================================================
   Layout
   ========================================================================== */
.shell { width: min(1320px, calc(100% - 28px)); margin: 0 auto; padding: 104px 0 64px; }
.view { display: none; }
.view.active { display: block; animation: view-in .6s var(--ease-out) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(14px) scale(.99); filter: blur(6px); } }

.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 10px 4px 22px; flex-wrap: wrap; }
.eyebrow { font-size: 12px; font-weight: 650; letter-spacing: .2em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.hero-title { margin: 0; font-size: clamp(30px, 4.2vw, 50px); line-height: 1.04; font-weight: 750; letter-spacing: -.03em; }
.morph { position: relative; display: inline-grid; vertical-align: bottom; }
.morph > span { grid-area: 1 / 1; white-space: nowrap;
  background: linear-gradient(95deg, #fff 0%, color-mix(in srgb, var(--accent) 80%, white) 45%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .08em; }
.hero-note { color: var(--text-2); max-width: 420px; font-size: 14.5px; }

.picker { padding: 18px; border-radius: var(--r-xl); margin-bottom: 18px; }
.picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 6px 14px; flex-wrap: wrap; }
.picker-title { font-size: 13px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }

.studio-grid { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(360px, .9fr); gap: 20px; align-items: start; }
.side { position: sticky; top: 96px; }

/* ==========================================================================
   Cards & steps
   ========================================================================== */
.stack { display: grid; gap: 16px; }
.card { padding: 22px 22px 22px; border-radius: var(--r-lg); }
.card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.card-head .grow { flex: 1; min-width: 0; }
.card-title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.015em; }
.card-sub { margin: 2px 0 0; color: var(--text-3); font-size: 13.5px; }
.bubble {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; font-weight: 750; font-size: 14px;
  background: linear-gradient(160deg, rgba(255,255,255,.2), rgba(255,255,255,.05)); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 0 0 1px var(--hair);
  color: var(--text-2); transition: background .5s var(--ease), color .4s, box-shadow .5s;
}
.bubble svg { width: 17px; height: 17px; }
.card.done .bubble { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 95%, white), var(--accent)); color: var(--on-accent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 6px 18px -6px var(--glow); }
.panels { position: relative; }
.panel { display: none; }
.panel.active { display: grid; gap: 16px; }

/* ==========================================================================
   Fields
   ========================================================================== */
.field-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 4px 8px; font-size: 12.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.field {
  width: 100%; border: 0; outline: none; border-radius: var(--r-md); padding: 14px 16px; resize: none;
  background: var(--field-fill); color: var(--text); font-size: 15px; line-height: 1.55;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.35), inset 0 0 0 1px var(--hair-2), 0 1px 0 rgba(255,255,255,.06);
  transition: box-shadow .3s var(--ease), background .3s;
}
.field::placeholder { color: var(--text-4); }
.field:focus { background: rgba(8,8,14,.5); box-shadow: inset 0 1px 2px rgba(0,0,0,.35), inset 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent), 0 0 0 4px var(--glow-soft); }
textarea.field { min-height: 120px; }
.field-row { display: flex; gap: 10px; align-items: stretch; }
.field-row .field { flex: 1; }
.counter { font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text-4); }
.counter.over { color: var(--bad); }
.hint { margin: 8px 4px 0; font-size: 13px; color: var(--text-3); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hint b { color: var(--text-2); font-weight: 650; }
.gap-16 { height: 16px; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 46px; padding: 0 20px;
  border: 0; border-radius: 999px; font-weight: 650; font-size: 14.5px; white-space: nowrap; color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06));
  -webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.32), inset 0 0 0 1px var(--hair), 0 8px 20px -10px rgba(0,0,0,.6);
  transition: transform .35s var(--spring), box-shadow .3s var(--ease), background .3s, opacity .3s; overflow: hidden; isolation: isolate;
  text-decoration: none;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { background: linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.08)); }
.btn:active { transform: scale(.955); }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn--sm svg { width: 16px; height: 16px; }
.btn--primary {
  height: 58px; padding: 0 30px; font-size: 16.5px; font-weight: 720; color: var(--on-accent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 78%, white) 0%, var(--accent) 48%, color-mix(in srgb, var(--accent) 80%, var(--accent-2)) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), inset 0 -2px 6px rgba(0,0,0,.18), 0 14px 34px -12px var(--glow), 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent);
}
.btn--primary:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 65%, white) 0%, var(--accent) 52%, color-mix(in srgb, var(--accent) 72%, var(--accent-2)) 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 -2px 6px rgba(0,0,0,.18), 0 18px 44px -12px var(--glow), 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent); }
.btn--primary::after { /* travelling gloss */
  content: ""; position: absolute; inset: 0; z-index: -1; transform: translateX(-120%) skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); width: 40%;
}
.btn--primary:not(:disabled):hover::after { animation: gloss 1.1s var(--ease); }
@keyframes gloss { to { transform: translateX(360%) skewX(-20deg); } }
.btn--wide { width: 100%; }
.btn--accent { color: var(--text); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 30%, rgba(255,255,255,.08)), color-mix(in srgb, var(--accent) 16%, rgba(255,255,255,.03)));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 10px 26px -14px var(--glow); }
.btn--accent:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 40%, rgba(255,255,255,.1)), color-mix(in srgb, var(--accent) 22%, rgba(255,255,255,.04))); }
.btn--ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--hair-2); -webkit-backdrop-filter: none; backdrop-filter: none; }
.btn .spin { display: none; }
.btn[aria-busy="true"] { pointer-events: none; }
.btn[aria-busy="true"] .spin { display: inline-block; }
.btn[aria-busy="true"] .ico { display: none; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; opacity: .9; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cta-box { display: grid; gap: 14px; }
.cta-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--text-3); font-size: 13.5px; }

/* toggle */
.toggle { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-md); cursor: pointer; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--hair-2); transition: background .3s; }
.toggle:hover { background: rgba(255,255,255,.07); }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.switch { position: relative; width: 52px; height: 30px; flex: none; border-radius: 999px; background: rgba(255,255,255,.12); box-shadow: inset 0 1px 3px rgba(0,0,0,.4), inset 0 0 0 1px var(--hair-2); transition: background .35s var(--ease); }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(180deg, #fff, #dcdce6); box-shadow: 0 3px 8px rgba(0,0,0,.35), inset 0 -1px 1px rgba(0,0,0,.1); transition: transform .45s var(--spring), width .25s var(--ease); }
.toggle input:checked + .switch { background: var(--accent); box-shadow: inset 0 1px 3px rgba(0,0,0,.2), 0 0 18px -4px var(--glow); }
.toggle input:checked + .switch::after { transform: translateX(22px); }
.toggle:active .switch::after { width: 30px; }
.toggle input:checked:active + .switch::after { transform: translateX(16px); }
.toggle-text { flex: 1; min-width: 0; }
.toggle-text b { display: block; font-weight: 650; }
.toggle-text span { color: var(--text-3); font-size: 13px; }
.toggle.danger input:checked + .switch { background: #ff3b5c; }

/* ==========================================================================
   Chips (hashtags / tags)
   ========================================================================== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border-radius: var(--r-md); background: var(--field-fill);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.35), inset 0 0 0 1px var(--hair-2); min-height: 54px; align-items: center; cursor: text; }
.chips:focus-within { box-shadow: inset 0 1px 2px rgba(0,0,0,.35), inset 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent), 0 0 0 4px var(--glow-soft); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06)); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 0 0 1px var(--hair);
  animation: chip-in .45s var(--spring) both; }
.chip.tag-accent { color: color-mix(in srgb, var(--accent) 70%, white); }
.chip button { width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; color: var(--text-2); padding: 0; }
.chip button:hover { background: rgba(255,255,255,.22); color: #fff; }
.chip button svg { width: 12px; height: 12px; }
.chip.locked { padding-right: 12px; opacity: .75; }
@keyframes chip-in { from { opacity: 0; transform: scale(.6); } }
.chip-input { flex: 1; min-width: 120px; border: 0; outline: none; background: none; height: 32px; padding: 0 6px; font-size: 14px; }
.chip-input::placeholder { color: var(--text-4); }

/* ==========================================================================
   Description editor
   ========================================================================== */
.desc-grid { display: grid; gap: 16px; }
.desc-empty { display: grid; place-items: center; text-align: center; gap: 12px; padding: 26px 16px; border-radius: var(--r-md); background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px var(--hair-2); }
.desc-empty p { margin: 0; color: var(--text-2); max-width: 380px; }
.source-badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 650; letter-spacing: .02em; text-transform: none;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: color-mix(in srgb, var(--accent) 70%, white); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.source-badge.warn { background: rgba(251,191,36,.12); color: #fcd66b; box-shadow: inset 0 0 0 1px rgba(251,191,36,.35); }
.source-badge svg { width: 13px; height: 13px; }
.skeleton { position: relative; overflow: hidden; border-radius: var(--r-md); background: rgba(255,255,255,.05); }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 18%, rgba(255,255,255,.08)), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-line { height: 46px; } .sk-block { height: 140px; } .sk-chips { height: 54px; }
.ai-writing { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14px; margin: 2px 4px 12px; }
.ai-orb { width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent)); animation: spin 1.2s linear infinite; box-shadow: 0 0 16px var(--glow); -webkit-mask: radial-gradient(circle, transparent 5px, #000 6px); mask: radial-gradient(circle, transparent 5px, #000 6px); }

/* ==========================================================================
   Video pickers
   ========================================================================== */
.dropzone { position: relative; display: grid; place-items: center; text-align: center; gap: 10px; min-height: 190px; padding: 26px; border-radius: var(--r-lg); cursor: pointer;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 12px, rgba(255,255,255,.015) 12px 24px);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.14); transition: box-shadow .35s var(--ease), background .35s, transform .4s var(--spring); }
.dropzone:hover, .dropzone.over { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 70%, transparent), 0 0 0 6px var(--glow-soft); transform: scale(1.005); }
.dropzone.over { transform: scale(1.02); }
.dz-icon { width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 55%, rgba(255,255,255,.2)), color-mix(in srgb, var(--accent) 25%, transparent)); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 10px 26px -10px var(--glow); }
.dz-icon svg { width: 26px; height: 26px; color: #fff; }
.dropzone b { font-size: 16px; }
.dropzone span { color: var(--text-3); font-size: 13.5px; }
.upload-progress { width: 100%; max-width: 420px; }
.uploaded { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: var(--r-md); background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--hair-2); }
.uploaded video { width: 64px; height: 112px; border-radius: 12px; object-fit: cover; background: #000; flex: none; }
.uploaded .grow { flex: 1; min-width: 0; }
.uploaded b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uploaded span { color: var(--text-3); font-size: 13px; }

.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; max-height: 520px; overflow: auto; padding: 4px; margin: -4px; scrollbar-width: thin; }
.vcard { position: relative; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; border: 0; padding: 0; background: #0c0b12; text-align: left;
  box-shadow: inset 0 0 0 1px var(--hair), 0 10px 24px -14px rgba(0,0,0,.8); transition: transform .45s var(--spring), box-shadow .35s var(--ease); }
.vcard:hover { transform: translateY(-3px) scale(1.02); }
.vcard img, .vcard video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vcard .ph { position: absolute; inset: 0; background: radial-gradient(120% 80% at 30% 20%, color-mix(in srgb, var(--accent) 30%, #1a1626), #0b0a12 70%); }
.vcard .ph svg { position: absolute; left: 50%; top: 42%; width: 30px; height: 30px; transform: translate(-50%, -50%); color: rgba(255,255,255,.35); }
.vcard .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 10px; font-size: 12px; line-height: 1.3; font-weight: 600;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.82)); color: #fff; }
.vcard .cap small { display: block; color: rgba(255,255,255,.62); font-weight: 500; margin-top: 3px; }
.vcard.selected { box-shadow: 0 0 0 2px var(--accent), 0 0 0 7px var(--glow-soft), 0 18px 36px -12px var(--glow); transform: scale(1.03); }
.vcard .check { position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent);
  transform: scale(0); transition: transform .45s var(--spring); box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.vcard.selected .check { transform: scale(1); }
.vcard .check svg { width: 15px; height: 15px; }
.list-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.vcard .vwarn { position: absolute; left: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(251,191,36,.92); color: #1a1405; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.vcard .vwarn svg { width: 15px; height: 15px; }

/* HeyGen: what the avatar says */
.field-label .btn { text-transform: none; letter-spacing: 0; font-weight: 600; }
.hg-text-note { min-height: 20px; flex-direction: column; align-items: flex-start; gap: 6px; }
.hg-text-note:empty { display: none; }
.hg-text-note .ai-writing { margin: 0; }
.ok-line, .warn-line { display: inline-flex; align-items: flex-start; gap: 7px; line-height: 1.4; }
.ok-line svg, .warn-line svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.ok-line svg { color: var(--accent); }
.warn-line { color: #fcd66b; }

/* feed: paste / fix a post link by hand */
.link-form { display: grid; gap: 8px; }
.link-form[hidden] { display: none; }
.link-note { margin: 0; font-size: 13px; color: var(--text-3); }
.link-row { display: flex; gap: 8px; }
.link-row .field { flex: 1; min-width: 0; height: 40px; }

/* ==========================================================================
   Preview phone
   ========================================================================== */
.stage { position: relative; min-width: 0; }
.side, .stack, .panels, .panel, .prod, .preview, .terminal { min-width: 0; }
.stage > .stage-view { animation: stage-in .7s var(--ease-out) both; }
@keyframes stage-in { from { opacity: 0; transform: scale(.96) translateY(10px); filter: blur(8px); } }
.preview { padding: 18px; border-radius: var(--r-xl); }
.preview-head { display: flex; align-items: center; justify-content: space-between; margin: 2px 4px 14px; }
.phone { position: relative; width: min(100%, 300px); aspect-ratio: 9 / 18.4; margin: 0 auto; border-radius: 44px; padding: 9px;
  background: linear-gradient(160deg, rgba(255,255,255,.34), rgba(255,255,255,.06) 40%, rgba(255,255,255,.14));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 0 0 1px rgba(255,255,255,.2), 0 30px 70px -26px rgba(0,0,0,.9), 0 0 60px -20px var(--glow); }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: #050508; }
.phone-screen video, .phone-screen img.poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px;
  background: radial-gradient(90% 60% at 30% 25%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%),
              radial-gradient(80% 60% at 80% 80%, color-mix(in srgb, var(--accent-2) 40%, transparent), transparent 70%), #07070c; }
.phone-empty .wordmark { font-size: 26px; }
.phone-empty p { margin: 10px 0 0; color: rgba(255,255,255,.62); font-size: 13px; }
.phone-top { position: absolute; left: 0; right: 0; top: 0; padding: 16px 16px 30px; display: flex; justify-content: center; background: linear-gradient(180deg, rgba(0,0,0,.45), transparent); }
.phone-chip { font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.16); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.phone-side { position: absolute; right: 10px; bottom: 96px; display: grid; gap: 16px; }
.phone-side span { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.phone-side svg { width: 18px; height: 18px; }
.phone-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 60px 18px 16px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.78)); }
.phone-handle { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.phone-handle i { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, #e7c98b, #9b7bff); display: block; }
.phone-text { font-size: 12.5px; line-height: 1.38; color: rgba(255,255,255,.92); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.phone-text .ht { color: color-mix(in srgb, var(--accent) 75%, white); font-weight: 600; }
.preview-desc { margin-top: 16px; padding: 14px 16px; border-radius: var(--r-md); background: rgba(0,0,0,.22); box-shadow: inset 0 0 0 1px var(--hair-2); max-height: 230px; overflow: auto; }
.preview-desc h4 { margin: 0 0 6px; font-size: 14.5px; line-height: 1.35; }
.preview-desc p { margin: 0; white-space: pre-line; color: var(--text-2); font-size: 13px; }
.preview-desc .ht { color: color-mix(in srgb, var(--accent) 70%, white); }
.preview-desc .muted { color: var(--text-4); font-size: 13px; }

/* ==========================================================================
   Production (live job)
   ========================================================================== */
.prod { padding: 20px; border-radius: var(--r-xl); }
.prod-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.prod-head .grow { flex: 1; min-width: 0; }
.prod-state { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); display: flex; align-items: center; gap: 8px; }
.prod-title { margin: 3px 0 0; font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer { font: 600 14px var(--font-mono); color: var(--text-2); font-variant-numeric: tabular-nums; }
.liquid-bar { position: relative; height: 14px; border-radius: 999px; overflow: hidden; background: rgba(0,0,0,.35); box-shadow: inset 0 1px 3px rgba(0,0,0,.5), inset 0 0 0 1px var(--hair-2); margin-bottom: 20px; }
.liquid-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; overflow: hidden;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, var(--accent-2)), var(--accent));
  box-shadow: 0 0 18px var(--glow), inset 0 1px 0 rgba(255,255,255,.5); transition: width 1.1s var(--ease); }
.liquid-fill::before { content: ""; position: absolute; inset: 0; width: 200%;
  background: repeating-linear-gradient(-45deg, rgba(255,255,255,.22) 0 10px, transparent 10px 20px); animation: bar-flow 1.2s linear infinite; }
.liquid-fill::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 50%; background: linear-gradient(180deg, rgba(255,255,255,.45), transparent); }
.done .liquid-fill::before, .error .liquid-fill::before { animation: none; opacity: .3; }
.error .liquid-fill { background: linear-gradient(90deg, #ff8a8a, var(--bad)); box-shadow: 0 0 18px rgba(255,90,110,.5); }
@keyframes bar-flow { to { transform: translateX(-28px); } }
.timeline { display: grid; gap: 4px; margin-bottom: 18px; }
.tl-step { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 16px; transition: background .4s var(--ease); }
.tl-step.active { background: color-mix(in srgb, var(--accent) 10%, rgba(255,255,255,.03)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent); }
.tl-icon { position: relative; width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 2px var(--hair); color: var(--text-4); transition: all .5s var(--ease); }
.tl-icon svg { width: 15px; height: 15px; }
.tl-step.active .tl-icon { box-shadow: none; }
.tl-step.active .tl-icon::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 25%, var(--accent)); animation: spin 1s linear infinite;
  -webkit-mask: radial-gradient(circle, transparent 12px, #000 13px); mask: radial-gradient(circle, transparent 12px, #000 13px); }
.tl-step.active .tl-icon::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--glow); animation: pulse 1.4s infinite; color: var(--accent); }
.tl-step.done .tl-icon { background: var(--accent); color: var(--on-accent); box-shadow: 0 4px 14px -4px var(--glow); animation: pop .5s var(--spring); }
.tl-step.error .tl-icon { background: var(--bad); color: #fff; }
@keyframes pop { 0% { transform: scale(.6); } }
.tl-label { flex: 1; font-weight: 600; color: var(--text-3); transition: color .4s; }
.tl-step.active .tl-label, .tl-step.done .tl-label { color: var(--text); }
.tl-time { font: 500 12.5px var(--font-mono); color: var(--text-4); }
.terminal { position: relative; border-radius: var(--r-md); background: rgba(3, 3, 8, .72); box-shadow: inset 0 0 0 1px var(--hair-2), inset 0 10px 30px -20px #000; overflow: hidden; }
.term-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--hair-2); font-size: 12px; color: var(--text-3); }
.term-dots { display: flex; gap: 6px; }
.term-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.15); display: block; }
.term-dots i:nth-child(1) { background: #ff5f57; } .term-dots i:nth-child(2) { background: #febc2e; } .term-dots i:nth-child(3) { background: #28c840; }
.term-body { height: 260px; overflow: auto; padding: 10px 12px 14px; font: 12px/1.6 var(--font-mono); color: rgba(220, 225, 240, .78); scrollbar-width: thin; overscroll-behavior: contain; }
.term-body .l { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; animation: line-in .35s var(--ease) both; }
.term-body .l.warn { color: #fcd66b; } .term-body .l.err { color: #ff8b98; } .term-body .l.ok { color: #7ff0c0; } .term-body .l.step { color: color-mix(in srgb, var(--accent) 75%, white); font-weight: 600; }
.term-body .t { color: rgba(255,255,255,.3); }
@keyframes line-in { from { opacity: 0; transform: translateX(-4px); } }
.term-follow { position: absolute; right: 12px; bottom: 12px; }
.result { display: grid; gap: 14px; margin-bottom: 18px; animation: stage-in .8s var(--ease-out) both; }
.result-video { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 9 / 16; max-height: 440px; width: auto; margin: 0 auto; background: #000; box-shadow: 0 20px 50px -20px var(--glow), inset 0 0 0 1px var(--hair); }
.result-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.result-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: color-mix(in srgb, var(--ok) 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 35%, transparent); }
.result-banner.bad { background: rgba(255, 90, 110, .12); box-shadow: inset 0 0 0 1px rgba(255, 90, 110, .35); }
.result-banner .ico { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #04130c; }
.result-banner.bad .ico { background: var(--bad); color: #fff; }
.result-banner .ico svg { width: 18px; height: 18px; }
.result-banner b { display: block; }
.result-banner span { color: var(--text-2); font-size: 13.5px; }
.shot { width: 100%; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--hair); display: block; }
.burst { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 5; }
.burst i { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff, var(--accent) 60%); box-shadow: 0 0 12px var(--glow); }

/* ==========================================================================
   Feed
   ========================================================================== */
.feed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.fcard { position: relative; border-radius: 26px; overflow: hidden; aspect-ratio: 9 / 16; cursor: pointer; background: #0b0a12; border: 0; padding: 0; text-align: left; color: #fff;
  box-shadow: inset 0 0 0 1px var(--hair), 0 22px 44px -22px rgba(0,0,0,.9); transition: transform .5s var(--spring), box-shadow .4s var(--ease); animation: card-in .7s var(--ease-out) both; }
.fcard:hover { transform: translateY(-6px) scale(1.015); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2), 0 30px 60px -24px var(--glow); }
@keyframes card-in { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.fcard.fresh { animation: card-fresh 1.2s var(--spring) both; }
@keyframes card-fresh { 0% { opacity: 0; transform: scale(.7) translateY(-30px); filter: blur(10px); } 60% { box-shadow: 0 0 0 3px var(--accent), 0 0 60px var(--glow); } }
.fcard img, .fcard video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.fcard:hover img { transform: scale(1.05); }
.fcard .ph { position: absolute; inset: 0; background: radial-gradient(100% 70% at 30% 20%, color-mix(in srgb, var(--accent) 35%, #1b1728), #0a0910 72%); }
.fcard-top { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; justify-content: space-between; gap: 8px; z-index: 2; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(10,10,16,.38); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), inset 0 1px 0 rgba(255,255,255,.2); color: #fff; }
.pill svg { width: 14px; height: 14px; }
.pill.p-youtube svg { color: #ff4d6a; } .pill.p-tiktok svg { color: #2af2ee; } .pill.p-instagram svg { color: #ff5fa2; }
.fcard-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 14px 14px; z-index: 2; background: linear-gradient(180deg, transparent, rgba(0,0,0,.85)); }
.fcard-title { font-weight: 700; font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fcard-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; color: rgba(255,255,255,.66); font-size: 12px; font-weight: 600; align-items: center; }
.fcard-meta span { display: inline-flex; align-items: center; gap: 4px; }
.fcard-meta svg { width: 13px; height: 13px; }
.fcard .play { position: absolute; left: 50%; top: 45%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; display: grid; place-items: center; z-index: 2;
  background: rgba(255,255,255,.18); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 0 0 1px rgba(255,255,255,.25);
  opacity: 0; transform: scale(.7); transition: all .45s var(--spring); }
.fcard:hover .play { opacity: 1; transform: scale(1); }
.fcard .play svg { width: 22px; height: 22px; margin-left: 3px; }
.feed-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.stats-row { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { padding: 12px 18px; border-radius: 20px; min-width: 120px; }
.stat b { display: block; font-size: 22px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--text-3); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

.empty { display: grid; place-items: center; text-align: center; gap: 14px; padding: 60px 20px; border-radius: var(--r-xl); }
.empty .em-icon { width: 76px; height: 76px; border-radius: 26px; display: grid; place-items: center; background: linear-gradient(160deg, rgba(255,255,255,.2), rgba(255,255,255,.04)); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 0 0 1px var(--hair); }
.empty .em-icon svg { width: 32px; height: 32px; color: color-mix(in srgb, var(--accent) 70%, white); }
.empty h3 { margin: 0; font-size: 20px; }
.empty p { margin: 0; color: var(--text-3); max-width: 420px; }

/* ==========================================================================
   Journal
   ========================================================================== */
.jlist { display: grid; gap: 10px; }
.jrow { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 22px; cursor: pointer; border: 0; text-align: left; color: inherit; width: 100%;
  transition: transform .4s var(--spring); animation: card-in .6s var(--ease-out) both; }
.jrow:hover { transform: translateX(4px); }
.jrow .st { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; }
.jrow .st svg { width: 18px; height: 18px; }
.jrow .st.done { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.jrow .st.error { background: rgba(255,90,110,.16); color: var(--bad); }
.jrow .st.running { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.jrow .t { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jrow .s { color: var(--text-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jrow .when { color: var(--text-3); font-size: 13px; text-align: right; white-space: nowrap; }

/* ==========================================================================
   Sheet (modal) / toasts / login
   ========================================================================== */
.sheet-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(3,3,8,.45);
  -webkit-backdrop-filter: blur(8px) saturate(120%); backdrop-filter: blur(8px) saturate(120%); animation: fade-in .35s var(--ease) both; }
.sheet-backdrop.closing { animation: fade-out .3s var(--ease) both; }
.sheet { width: min(860px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: var(--r-xl); padding: 24px; animation: sheet-in .6s var(--spring) both; scrollbar-width: thin; }
.sheet.narrow { width: min(460px, 100%); }
.closing .sheet { animation: sheet-out .3s var(--ease) both; }
@keyframes fade-in { from { opacity: 0; } } @keyframes fade-out { to { opacity: 0; } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(30px) scale(.94); filter: blur(6px); } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(16px) scale(.97); } }
.sheet-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.sheet-head .grow { flex: 1; min-width: 0; }
.sheet-head h3 { margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: -.015em; }
.sheet-head p { margin: 4px 0 0; color: var(--text-3); font-size: 13.5px; }
.sheet-grid { display: grid; grid-template-columns: 300px 1fr; gap: 22px; }
.sheet-video { border-radius: 24px; overflow: hidden; aspect-ratio: 9 / 16; background: #000; box-shadow: inset 0 0 0 1px var(--hair), 0 24px 50px -24px var(--glow); }
.sheet-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.kv { display: grid; gap: 14px; }
.kv h5 { margin: 0 0 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.kv .box { padding: 12px 14px; border-radius: var(--r-sm); background: rgba(0,0,0,.25); box-shadow: inset 0 0 0 1px var(--hair-2); white-space: pre-line; font-size: 14px; color: var(--text-2); max-height: 220px; overflow: auto; }
.status-rows { display: grid; gap: 8px; }
.srow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--hair-2); }
.srow .grow { flex: 1; min-width: 0; }
.srow b { display: block; font-weight: 650; }
.srow span { color: var(--text-3); font-size: 13px; }

.toasts { position: fixed; top: 90px; left: 50%; transform: translateX(-50%); z-index: 90; display: grid; gap: 10px; width: min(440px, calc(100% - 28px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: center; padding: 13px 16px; border-radius: 20px; animation: toast-in .6s var(--spring) both; font-size: 14px; }
.toast.out { animation: toast-out .35s var(--ease) both; }
.toast .ti { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--accent) 25%, transparent); color: color-mix(in srgb, var(--accent) 70%, white); }
.toast.ok .ti { background: rgba(52,211,153,.2); color: var(--ok); } .toast.bad .ti { background: rgba(255,90,110,.2); color: var(--bad); }
.toast .ti svg { width: 15px; height: 15px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-18px) scale(.9); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px) scale(.96); } }

body.locked .topbar, body.locked .tabbar, body.locked .shell { visibility: hidden; }
.login { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(400px, 100%); padding: 34px 28px 28px; border-radius: 34px; text-align: center; display: grid; gap: 16px; animation: sheet-in .7s var(--spring) both; }
.login-card .wordmark { font-size: 34px; }
.login-card p { margin: -6px 0 6px; color: var(--text-3); }
.login-card.shake { animation: shake .5s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }

/* bottom tab bar (mobile) */
.tabbar { display: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .studio-grid .side { order: 2; }
  .studio-grid.running .side { order: -1; }
}
@media (max-width: 820px) {
  .topbar { grid-template-columns: 1fr auto; height: 58px; top: 10px; padding-left: 18px; }
  .topbar .nav-top { display: none; }
  .brand-sub { display: none; }
  .wordmark { font-size: 22px; }
  .shell { padding: 86px 0 130px; width: calc(100% - 32px); }
  .edge-top { height: 88px; }
  .edge-bottom { display: block; position: fixed; left: 0; right: 0; bottom: 0; height: 120px; z-index: 39; pointer-events: none;
    background: linear-gradient(0deg, rgba(7,6,11,.85), rgba(7,6,11,0));
    -webkit-mask: linear-gradient(0deg, #000 50%, transparent); mask: linear-gradient(0deg, #000 50%, transparent); }
  .tabbar { display: flex; position: fixed; z-index: 40; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(420px, calc(100% - 28px)); border-radius: 999px; padding: 6px; }
  .tabbar .lseg { width: 100%; background: none; box-shadow: none; padding: 0; }
  .tabbar .lseg-item, .tabbar .lseg-ghost { flex-direction: column; gap: 2px; height: 52px; font-size: 11px; padding: 0 6px; }
  .tabbar .lseg-lens { top: 0; bottom: 0; }
  .lseg--xl .lseg-item, .lseg--xl .lseg-ghost { height: 84px; font-size: 14px; padding: 0 6px; }
  .lseg--xl .sub { font-size: 10px !important; letter-spacing: .04em !important; }
  .lseg-item, .lseg-ghost { padding: 0 10px; font-size: 13.5px; }
  .card { padding: 18px 16px; }
  .picker { padding: 12px; }
  .sheet { padding: 18px; }
  .sheet-grid { grid-template-columns: 1fr; }
  .sheet-video { max-width: 280px; margin: 0 auto; width: 100%; }
  .feed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stats-row { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat { min-width: 0; padding: 10px 12px; border-radius: 18px; }
  .stat b { font-size: 19px; }
  .stat span { font-size: 10.5px; letter-spacing: .04em; }
  .prod { padding: 16px; }
  .term-body { height: 220px; font-size: 11.5px; }
  .fcard { border-radius: 20px; }
  .jrow { grid-template-columns: auto 1fr auto; }
  .jrow .when { display: none; }
  .hero { margin-top: 4px; }
  .toasts { top: 76px; }
}
@media (max-width: 560px) {
  .field-row { flex-direction: column; }
  .field-row .btn { width: 100%; }
  .hero-note { font-size: 13.5px; }
  .phone { width: min(100%, 270px); }
}
@media (max-width: 420px) {
  .lseg--md .lseg-item span.lbl, .lseg--md .lseg-ghost span.lbl { font-size: 12.5px; }
  .lseg--md .lseg-item svg, .lseg--md .lseg-ghost svg { display: none; }
  .btn--primary { height: 54px; font-size: 15.5px; padding: 0 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .orb { animation: none; }
}

/* ==========================================================================
   Публикация через заливщик Нарезчика (выбор проекта на входе убран 12.11 — одна панель)
   ========================================================================== */
.topbar { padding-left: 12px; }
.brand-wrap { display: flex; align-items: center; gap: 12px; min-width: 0; }
.back-proj { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px var(--hair), inset 0 1px 0 rgba(255,255,255,.16);
  color: var(--text-2); text-decoration: none; transition: background .3s, color .3s, transform .25s var(--spring); }
.back-proj:hover { background: rgba(255,255,255,.13); color: var(--text); }
.back-proj:active { transform: scale(.92); }
.back-proj svg { width: 17px; height: 17px; }

.ghost-sel { appearance: none; -webkit-appearance: none; max-width: 210px; height: 30px; padding: 0 28px 0 12px; border: 0; border-radius: 999px;
  background: rgba(255,255,255,.08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-opacity='.7' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 9px center / 13px;
  box-shadow: inset 0 0 0 1px var(--hair); color: var(--text); font-size: 13px; font-weight: 650; text-overflow: ellipsis; cursor: pointer; }
.ghost-sel:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
.ghost-sel option { color: #111; }
.ghost-link { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hair); }
.ghost-link:hover { color: var(--text); }

.pub { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: rgba(251,191,36,.18); color: #ffd978; box-shadow: inset 0 0 0 1px rgba(251,191,36,.35); white-space: nowrap; }
.pub--processing { background: rgba(52,211,153,.14); color: #8ff0c8; box-shadow: inset 0 0 0 1px rgba(52,211,153,.35); }
.pub--login, .pub--failed, .pub--lost { background: rgba(255,90,110,.16); color: #ff9aa8; box-shadow: inset 0 0 0 1px rgba(255,90,110,.38); }
.pub--check { background: rgba(155,123,255,.18); color: #cbbcff; box-shadow: inset 0 0 0 1px rgba(155,123,255,.4); }
.pub-row { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--r-md);
  background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--hair-2); color: var(--text-2); font-size: 13.5px; }

@media (max-width: 820px) {
  .topbar { padding-left: 10px; }
  .back-proj { width: 34px; height: 34px; }
  .brand-wrap { gap: 10px; }
}
@media (max-width: 420px) {
  .ghost-sel { max-width: 160px; }
}

/* ==========================================================================
   Анимации Claude Code
   ========================================================================== */
.l-short { display: none; }
.opt-label { margin: 14px 4px 8px; font-size: 12px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); display: flex; align-items: center; gap: 8px; }
.opt-label:first-of-type { margin-top: 0; }
.opt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { height: 38px; padding: 0 15px; border: 0; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--text-2);
  font-weight: 620; font-size: 14px; box-shadow: inset 0 0 0 1px var(--hair-2); transition: background .25s var(--ease), color .25s, box-shadow .25s, transform .2s var(--spring); }
.opt:hover { background: rgba(255,255,255,.1); color: var(--text); }
.opt:active { transform: scale(.95); }
.opt.on { color: var(--on-accent); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 80%, white), var(--accent));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 8px 22px -10px var(--glow); }
.toggles { display: grid; gap: 4px; }
.link-btn { display: inline-flex; align-items: center; gap: 7px; margin: 10px 4px 0; padding: 0; border: 0; background: none; color: var(--text-3); font-size: 13.5px; font-weight: 600; }
.link-btn:hover { color: var(--text); }
.link-btn svg { width: 15px; height: 15px; }
.link-btn + .field { margin-top: 10px; }
.an-status, .an-sched { display: grid; gap: 8px; }
.an-sched { margin-top: 10px; }
.an-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--hair-2); }
.an-row .grow { flex: 1; min-width: 0; }
.an-row b { display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-row span:not(.dot):not(.an-ico):not(.an-chev) { display: block; color: var(--text-3); font-size: 13px; }
.an-row--btn { width: 100%; border: 0; text-align: left; color: inherit; cursor: pointer; transition: background .25s var(--ease), transform .2s var(--spring); }
.an-row--btn:hover { background: rgba(255,255,255,.09); }
.an-row--btn:active { transform: scale(.985); }
.an-ico { width: 34px; height: 34px; flex: none; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 18%, transparent); color: color-mix(in srgb, var(--accent) 70%, white); }
.an-ico svg { width: 17px; height: 17px; }
.an-chev { color: var(--text-4); }
.an-chev svg { width: 16px; height: 16px; }
.prod-note { display: flex; align-items: baseline; gap: 10px; margin: -6px 2px 16px; font-size: 13.5px; color: var(--text-2); }
.prod-note b { font: 700 15px var(--font-mono); color: var(--text); font-variant-numeric: tabular-nums; }
.prod-note span { min-width: 0; }
.prod-stop { flex: none; }
.claude-eye { margin: 0 0 18px; border-radius: var(--r-md); overflow: hidden; background: rgba(0,0,0,.35); box-shadow: inset 0 0 0 1px var(--hair); }
.claude-eye img { display: block; width: 100%; max-height: 520px; object-fit: contain; background: #0b0a10; }
.claude-eye figcaption { padding: 8px 12px; font-size: 12px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.muted-note { margin: 12px 2px 0; color: var(--text-3); font-size: 13px; }
.muted-note code, .set-sec code { font: 12.5px var(--font-mono); padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.08); color: var(--text-2); word-break: break-all; }
.login-steps { display: grid; gap: 12px; }
.step-line { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 18px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--hair-2); }
.step-line .grow { flex: 1; min-width: 0; display: grid; gap: 8px; justify-items: start; }
.step-line b { font-weight: 650; }
.step-line span { color: var(--text-3); font-size: 13px; }
.step-line .link-row { width: 100%; }
.step-n { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--on-accent); background: var(--accent); }
.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.set-sec { display: grid; gap: 10px; align-content: start; padding: 16px; border-radius: var(--r-md); background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px var(--hair-2); }
.set-sec--wide { grid-column: 1 / -1; }
.set-sec h4 { margin: 0 0 2px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.set-sec .opt-label { margin: 6px 2px 0; }
.set-sec .muted-note { margin: 0; }
.set-field { display: grid; gap: 6px; font-size: 13px; color: var(--text-3); font-weight: 600; }
.set-field select.field { height: 44px; padding: 0 14px; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.set-field select.field option { color: #111; }
.set-sec .toggle { padding: 10px 6px; }
.set-sec .chips { padding: 8px; }
.chip-input[type="time"] { color-scheme: dark; max-width: 140px; }
.send-form { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-md); background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, var(--hair-2)); }
.send-form .pub-row { padding: 0; background: none; box-shadow: none; }
.send-form .field-label { margin: 4px 2px -2px; }
.pub--draft { background: rgba(251,191,36,.14); color: #fcd66b; box-shadow: inset 0 0 0 1px rgba(251,191,36,.3); }
.fcard-tags { display: inline-flex; gap: 6px; }
.pill--icon { padding: 0 8px; }
.pill--icon svg { width: 15px; height: 15px; color: color-mix(in srgb, var(--accent) 70%, white); }

@media (max-width: 820px) {
  .set-grid { grid-template-columns: minmax(0, 1fr); }
  .opt { height: 36px; padding: 0 13px; font-size: 13.5px; }
  .claude-eye img { max-height: 420px; }
}
@media (max-width: 560px) {
  #mode-seg .l-long, #mode-seg ~ * .l-long { display: none; }
  #mode-seg .l-short { display: inline; }
  .lseg--md .lseg-item, .lseg--md .lseg-ghost { padding: 0 6px; }
}

/* высокий лист: прокрутка внутри, чтобы стеклянная рамка не уезжала вместе с содержимым */
.sheet:has(> .sheet-scroll) { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.sheet-scroll { min-height: 0; overflow: auto; padding: 24px; scrollbar-width: thin; overscroll-behavior: contain; }
.step-line .link-row .field { height: 44px; }
.step-line .link-row .btn { height: 44px; padding: 0 18px; font-size: 14.5px; }
@media (max-width: 820px) { .sheet-scroll { padding: 18px; } }
@media (max-width: 560px) {
  .an-row [data-settings] { display: none; }        /* та же кнопка — шестерёнка в шапке карточки */
}
@media (max-width: 420px) {
  .fcard .pill--icon { display: none; }
}

/* ── стиль каталога: выбор стиля (02.11) ─────────────────────────────── */
#an-format, #an-format [data-slot] { min-width: 0; }
.sty-grid { contain: inline-size; width: 100%; max-width: 100%; min-width: 0;
  display: grid; grid-auto-flow: column; grid-auto-columns: 84px; gap: 10px; overflow-x: auto; padding: 4px 2px 10px;
  scroll-snap-type: x proximity; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.sty { position: relative; display: grid; gap: 6px; padding: 0; border: 0; background: none; color: var(--text-2); cursor: pointer;
  text-align: left; scroll-snap-align: start; transition: transform .2s var(--spring); }
.sty img { width: 84px; height: 149px; object-fit: cover; border-radius: 14px; display: block; background: rgba(255,255,255,.05);
  box-shadow: inset 0 0 0 1px var(--hair-2); opacity: .82; transition: opacity .25s, box-shadow .25s; }
.sty:hover img { opacity: 1; }
.sty:active { transform: scale(.96); }
.sty.on img { opacity: 1; box-shadow: 0 0 0 2px var(--accent), 0 8px 26px -8px var(--glow); }
.sty.on { color: var(--text); }
.sty:focus-visible { outline: none; }
.sty:focus-visible img { box-shadow: 0 0 0 2px var(--accent), 0 0 0 5px var(--glow-soft); }
.sty-n { position: absolute; left: 6px; top: 6px; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 8px; display: grid; place-items: center;
  font: 700 12px/1 var(--font-mono); color: #fff; background: rgba(0,0,0,.62); }
.sty-tag { position: absolute; right: 6px; top: 6px; height: 20px; padding: 0 6px; border-radius: 7px; display: grid; place-items: center;
  font: 700 10.5px/1 var(--font); letter-spacing: .06em; color: var(--on-accent); background: var(--accent); }
.sty-name { font-size: 12px; line-height: 1.25; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sty-about { display: grid; gap: 4px; margin-top: 6px; padding: 12px 14px; border-radius: var(--r-sm); background: rgba(255,255,255,.04);
  box-shadow: inset 0 0 0 1px var(--hair-2); font-size: 13px; color: var(--text-3); }
.sty-about b { color: var(--text); font-size: 14px; font-weight: 650; }

/* ── расписания автозаливки ─────────────────────────────────────────── */
.sched-list { display: grid; gap: 14px; }
.sched { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-md); background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--hair); }
.sched-head { display: flex; align-items: center; gap: 10px; }
.sched-head .field { flex: 1; min-width: 0; height: 42px; }
.sched-state { font-size: 13px; color: var(--text-3); margin: -2px 2px 0; }
.toggle--mini { padding: 6px; background: none; box-shadow: none; flex: none; }
.toggle--mini:hover { background: none; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sched-plats { display: grid; gap: 8px; }
.sched-plat { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; align-items: center; }
.sched-plat .field { height: 40px; padding: 0 12px; }
.sched-plat .opt { width: 100%; }
/* 11.11: подсказки расписания и окно «с — до» у «каждые N часов» */
.sched-note { font-size: 12.5px; line-height: 1.45; color: var(--text-3); margin: 2px 2px 0; }
.row2--tight { gap: 8px; }
.row2--tight .field[type="time"] { color-scheme: dark; min-width: 0; }
[data-freqbox][hidden] { display: none !important; }
.sched-styles { gap: 6px; }
.opt--sm { height: 32px; padding: 0 11px; font-size: 13px; }
.sched-more summary { cursor: pointer; color: var(--text-3); font-size: 13px; padding: 4px 2px; }
.sched-more .field { margin-top: 8px; }
.sched-btns { justify-content: space-between; flex-wrap: wrap; }
.sched input[type="date"].field { height: 42px; padding: 0 12px; }
@media (max-width: 560px) {
  .row2 { grid-template-columns: minmax(0, 1fr); }
  .sched-plat { grid-template-columns: 96px minmax(0, 1fr); }
}

/* ==========================================================================
   История студии: все ролики завода — выбрать любой и выложить
   ========================================================================== */
.vcard .vsent { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; }
.vcard .vsent i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #8ff0c8;
  background: rgba(10,9,16,.72); box-shadow: inset 0 0 0 1px rgba(52,211,153,.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.vcard .vsent i.wait { color: #ffd978; box-shadow: inset 0 0 0 1px rgba(251,191,36,.45); }
.vcard .vsent i.bad { color: #ff9aa8; box-shadow: inset 0 0 0 1px rgba(255,90,110,.5); }
.vcard .vsent svg { width: 14px; height: 14px; }
.vcard .vnew { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; color: #ffd978; background: rgba(10,9,16,.72); box-shadow: inset 0 0 0 1px rgba(251,191,36,.4);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hist-sel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 14px; padding: 12px 14px; border-radius: var(--r-md);
  background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--hair-2); font-size: 13px; color: var(--text-2); min-width: 0; }
.hist-sel > b { color: var(--text); font-weight: 650; flex-basis: 100%; overflow: hidden; text-overflow: ellipsis; }
.hist-sel a { text-decoration: none; }
.pub svg { width: 13px; height: 13px; margin-right: 5px; flex: none; }
.pub--published, .pub--sent { background: rgba(52,211,153,.14); color: #8ff0c8; box-shadow: inset 0 0 0 1px rgba(52,211,153,.35); }
.hist-sel .pub { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* пять режимов студии: колонка уже, чем длинные подписи, — короткие подписи (контейнерный запрос) */
#studio-grid > .stack { container-type: inline-size; grid-template-columns: minmax(0, 1fr); }
@container (max-width: 1040px) {
  #mode-seg .l-long { display: none; }
  #mode-seg .l-short { display: inline; }
  #mode-seg .lseg-item, #mode-seg .lseg-ghost { padding: 0 12px; gap: 7px; }
}
#hist-seg { flex: none; width: 216px; }
#hist-seg .lseg-item, #hist-seg .lseg-ghost { padding: 0 10px; }

/* рубрика «История за минуту»: как устроен выпуск */
.rubric-note { display: grid; gap: 4px; margin-bottom: 14px; padding: 12px 14px; border-radius: var(--r-md);
  background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--hair-2); font-size: 13px; line-height: 1.45; color: var(--text-2); }
.rubric-note b { color: var(--text); font-weight: 650; margin-bottom: 2px; }

/* студия Claude: что за формат — одной строкой под выбором формата */
.fmt-about { margin: 10px 4px 12px; min-height: 1.45em; line-height: 1.45; }

/* ==========================================================================
   Клиенты КЗ (05.11): вход по логину, раздел «Клиенты», очередь Claude, «Сочинить из идеи»
   ========================================================================== */
.login-note { font-size: 12.5px; color: var(--text-4); margin-top: -4px; }
.pub--published { background: rgba(52,211,153,.14); color: #8ff0c8; box-shadow: inset 0 0 0 1px rgba(52,211,153,.35); }
.pill--owner { gap: 5px; max-width: 128px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill--owner svg { width: 13px; height: 13px; flex: none; }
.owner-sel { appearance: none; -webkit-appearance: none; width: auto; max-width: 240px; height: 38px; padding: 0 34px 0 16px; border-radius: 999px; font-size: 13.5px; font-weight: 650;
  background: rgba(255,255,255,.07) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-opacity='.7' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center / 14px; cursor: pointer; }
.owner-sel option { color: #111; }
.idea-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.idea-tools .link-btn { margin: 0 4px; }
.idea-tools + .field { margin-top: 10px; }
.prod-note b svg { width: 18px; height: 18px; vertical-align: -3px; }
.jrow .st.queued { background: rgba(251,191,36,.16); color: #fcd66b; }

.cl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.cl-card { padding: 18px; border-radius: var(--r-lg); display: grid; gap: 14px; align-content: start; animation: card-in .6s var(--ease-out) both; }
.cl-card.off { opacity: .6; }
.cl-head { display: flex; align-items: center; gap: 12px; }
.cl-head .grow { flex: 1; min-width: 0; }
.cl-head b { display: block; font-size: 16.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-head .grow span { display: block; color: var(--text-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-avatar { width: 42px; height: 42px; flex: none; border-radius: 15px; display: grid; place-items: center; font-weight: 760; font-size: 18px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 45%, transparent), rgba(255,255,255,.05));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), inset 0 0 0 1px var(--hair); }
.cl-avatar svg { width: 18px; height: 18px; }
.cl-quota { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 18px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--hair-2); }
.cl-quota b { font-size: 28px; font-weight: 780; letter-spacing: -.03em; font-variant-numeric: tabular-nums; min-width: 34px; }
.cl-quota span { flex: 1; min-width: 0; color: var(--text-3); font-size: 13px; }
.cl-quota.low b { color: var(--bad); }
.cl-rows { display: grid; gap: 8px; }
.cl-rows > div { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 10px; font-size: 13.5px; align-items: start; }
.cl-rows i { font-style: normal; color: var(--text-4); font-size: 11.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; padding-top: 2px; }
.cl-rows span { color: var(--text-2); min-width: 0; overflow-wrap: anywhere; }
.cl-rows .muted { color: var(--text-3); }
.cl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cl-chips .chip { height: 26px; padding: 0 10px; font-size: 12.5px; }
.cl-btns { gap: 8px; }
.cl-admin { margin-top: 18px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 22px; }
.cl-admin .grow { flex: 1; min-width: 0; }
.cl-admin b { display: block; }
.cl-admin .grow span { color: var(--text-3); font-size: 13px; }
.cl-avatar--admin { background: rgba(255,255,255,.08); }
.cred { display: grid; gap: 8px; }
.cred > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; align-items: center; padding: 12px 14px; border-radius: 16px;
  background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--hair-2); }
.cred i { font-style: normal; color: var(--text-4); font-size: 11.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.cred b { overflow-wrap: anywhere; font-weight: 650; }
.cred .mono { font-family: var(--font-mono); font-size: 16px; letter-spacing: .04em; }
@media (max-width: 820px) {
  .feed-toolbar .owner-sel { order: 3; width: 100%; max-width: none; }
}
@media (max-width: 560px) {
  .cl-list { grid-template-columns: minmax(0, 1fr); }
  .cl-btns .btn { flex: 1 1 auto; }
  .cl-rows > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .cl-admin { flex-wrap: wrap; }
  .cl-admin .btn { width: 100%; }
}
.share-form { display: grid; gap: 8px; padding-top: 6px; }
.share-form h5 { margin: 0; }
.share-form .owner-sel { flex: 1; max-width: none; min-width: 0; width: 100%; }
.kv { min-width: 0; }

/* ==========================================================================
   12.11: одна панель. Разделы Нарезчика — его страница в iframe между шапкой и нижним меню
   (nzframe.js), у владельца в меню восемь разделов, на телефоне пять и «Ещё»
   ========================================================================== */
.nz-host { position: fixed; left: 0; right: 0; top: 86px; bottom: 0; z-index: 30; }
.nz-host[hidden] { display: none; }
.nz-frame { display: block; width: 100%; height: 100%; border: 0; background: transparent; color-scheme: dark;
  opacity: 0; transition: opacity .35s var(--ease-out); }
.nz-host.ready .nz-frame { opacity: 1; }
.nz-wait { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px;
  color: var(--text-3); font-size: 13.5px; pointer-events: none; transition: opacity .3s; }
.nz-host.ready .nz-wait { opacity: 0; }
.nz-spin { width: 22px; height: 22px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .8s linear infinite; }
.nz-fail { position: absolute; left: 50%; top: 28%; transform: translateX(-50%); width: min(420px, calc(100% - 32px));
  display: grid; gap: 8px; justify-items: start; padding: 20px 22px; border-radius: var(--r-lg, 22px); }
.nz-fail b { font-size: 16px; }
.nz-fail span { color: var(--text-2); font-size: 13.5px; line-height: 1.45; }
.nz-fail .btn { margin-top: 6px; }
body.nz-on { overflow: hidden; }
body.locked .nz-host { visibility: hidden; }
/* окно входа в аккаунт — во весь экран, как в самом Нарезчике; закрыл — шапка и меню на месте */
body.nz-full .nz-host { z-index: 60; }
body.nz-full .topbar, body.nz-full .tabbar, body.nz-full .edge-top, body.nz-full .edge-bottom { visibility: hidden; }

.more-list { display: grid; gap: 8px; }
.more-item { display: flex; align-items: center; gap: 14px; width: 100%; height: 54px; padding: 0 16px; border: 0; border-radius: 18px;
  background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--hair-2); color: var(--text); font: inherit;
  font-size: 15.5px; font-weight: 600; text-align: left; cursor: pointer; transition: background .25s, transform .25s var(--spring); }
.more-item svg { width: 20px; height: 20px; flex: none; color: var(--text-2); }
.more-item:hover { background: rgba(255,255,255,.1); }
.more-item:active { transform: scale(.98); }
.more-item.on { background: rgba(255,255,255,.13); box-shadow: inset 0 0 0 1px var(--hair); }
.more-item:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }

/* восемь разделов в шапке: плотнее, а где тесно — без значков и без подписи у логотипа */
body.is-owner .lseg--tabs .lseg-item, body.is-owner .lseg--tabs .lseg-ghost { padding: 0 14px; gap: 7px; font-size: 13.5px; }
@media (max-width: 1380px) {
  body.is-owner .topbar .brand-sub { display: none; }
  body.is-owner .lseg--tabs .lseg-item svg, body.is-owner .lseg--tabs .lseg-ghost svg { display: none; }
}
/* дальше восемь не помещаются — у владельца нижнее меню, как на телефоне */
@media (min-width: 821px) and (max-width: 1100px) {
  body.is-owner .topbar { grid-template-columns: 1fr auto; }
  body.is-owner .topbar .nav-top { display: none; }
  body.is-owner .shell { padding-bottom: 130px; }
  body.is-owner .edge-bottom { display: block; position: fixed; left: 0; right: 0; bottom: 0; height: 120px; z-index: 39; pointer-events: none;
    background: linear-gradient(0deg, rgba(7,6,11,.85), rgba(7,6,11,0));
    -webkit-mask: linear-gradient(0deg, #000 50%, transparent); mask: linear-gradient(0deg, #000 50%, transparent); }
  body.is-owner .tabbar { display: flex; position: fixed; z-index: 40; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom));
    transform: translateX(-50%); width: min(460px, calc(100% - 28px)); border-radius: 999px; padding: 6px; }
  body.is-owner .tabbar .lseg { width: 100%; background: none; box-shadow: none; padding: 0; }
  body.is-owner .tabbar .lseg-item, body.is-owner .tabbar .lseg-ghost { flex-direction: column; gap: 2px; height: 52px; font-size: 11px; padding: 0 6px; }
  body.is-owner .tabbar .lseg-lens { top: 0; bottom: 0; }
}
