/* ══════════════════════════════════════════════
   СНИМИИ.рф — дизайн-система (фиолетовый акцент)
   ══════════════════════════════════════════════ */

:root {
  --purple:        #8b5cf6;
  --purple-light:  #a78bfa;
  --purple-dark:   #6d28d9;
  --purple-dim:    rgba(139,92,246,.12);
  --purple-glow:   rgba(139,92,246,.25);

  --bg:            #0f0f14;
  --bg-surface:    #18181f;
  --bg-elevated:   #22222c;
  --bg-card:       #1c1c25;

  --text-primary:  #f0eef8;
  --text-secondary:#b8b0d4;
  --text-muted:    #6b6480;

  --border-subtle: rgba(139,92,246,.12);
  --border-default:rgba(139,92,246,.22);
  --border-strong: rgba(139,92,246,.4);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;

  --sky:    #60a5fa;
  --teal:   #2dd4bf;
  --amber:  #fbbf24;
  --rose:   #f87171;
  --green:  #4ade80;
}

[data-theme="light"] {
  --bg:            #f8f6ff;
  --bg-surface:    #ffffff;
  --bg-elevated:   #f0ecff;
  --bg-card:       #faf8ff;
  --text-primary:  #1a1030;
  --text-secondary:#4a3870;
  --text-muted:    #9080b8;
  --border-subtle: rgba(139,92,246,.1);
  --border-default:rgba(139,92,246,.2);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 72px;
}

a { color: var(--purple-light); text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Хедер ──────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15,15,20,.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header__inner {
  max-width: 680px; margin: 0 auto;
  padding: 0 16px;
  height: 52px;
  display: flex; align-items: center; justify-content: space-between;
}
.site-logo { display: flex; align-items: center; gap: 8px; }
.site-logo__name {
  font-size: 1rem; font-weight: 900; letter-spacing: .06em;
  color: #ffffff;
}
.site-logo__dots { display: flex; gap: 4px; align-items: center; }
.site-logo__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--purple-light); opacity: .85;
}

.site-header__actions { display: flex; align-items: center; gap: 8px; }
.header-balance {
  font-size: .75rem; font-weight: 700; color: var(--amber);
  background: rgba(251,191,36,.08);
  padding: 4px 10px; border-radius: 20px;
  border: 1px solid rgba(251,191,36,.2);
}
.header-btn {
  font-size: .78rem; font-weight: 700;
  padding: 6px 14px; border-radius: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  transition: all .15s;
}
.header-btn:hover { border-color: var(--purple); }
.header-btn--accent { background: var(--purple); border-color: var(--purple); color: #fff; }
.header-btn--accent:hover { background: var(--purple-dark); }
.header-user-btn { display: flex; align-items: center; gap: 6px; }
.header-user-ava {
  width: 22px; height: 22px; background: var(--purple); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 800; color: #fff; flex-shrink: 0;
}

/* ── Нижняя навигация ───────────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(15,15,20,.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
}
.bottom-nav__inner {
  max-width: 680px; margin: 0 auto;
  display: flex; justify-content: space-around;
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 5px 14px; border-radius: 14px;
  font-size: .6rem; font-weight: 700; letter-spacing: .04em;
  color: var(--text-muted);
  text-transform: uppercase; transition: color .15s, background .15s;
  position: relative;
}
.nav-item:hover { color: var(--purple-light); }
.nav-item.active {
  color: var(--purple-light);
  background: rgba(139,92,246,.13);
}
.nav-item.active::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 24px; height: 2.5px; border-radius: 0 0 3px 3px;
  background: var(--purple);
}
.nav-item__icon { font-size: 1.15rem; line-height: 1; }
.nav-item--create .nav-item__icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1rem;
  box-shadow: 0 0 20px var(--purple-glow);
  transition: box-shadow .15s, transform .1s;
}
.nav-item--create.active .nav-item__icon,
.nav-item--create:hover .nav-item__icon {
  box-shadow: 0 0 28px rgba(139,92,246,.5);
  transform: scale(1.08);
}
.nav-item--create { color: var(--purple-light); }
.nav-item--create.active { background: none; }
.nav-item--create.active::before { display: none; }

/* ── Футер ──────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  margin-top: 40px;
}
.footer__inner { max-width: 680px; margin: 0 auto; padding: 28px 16px 16px; }
.footer__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-bottom: 20px;
}
.footer__col h4 { font-size: .7rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.footer__col a { display: block; font-size: .78rem; color: var(--text-secondary); margin-bottom: 6px; }
.footer__col a:hover { color: var(--purple-light); }
.footer__bottom { display: flex; justify-content: space-between; font-size: .7rem; color: var(--text-muted); padding-top: 12px; border-top: 1px solid var(--border-subtle); }
@media(max-width:480px) { .footer__grid { grid-template-columns: repeat(2,1fr); } }

/* ══════════════════════════════════════════════
   ГЛАВНАЯ — ДОСКА
   ══════════════════════════════════════════════ */
.board-page { max-width: 680px; margin: 0 auto; padding: 16px; }

.board-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.board-header__title {
  font-size: 1.15rem; font-weight: 900; color: var(--text-primary);
}
.board-wgt-btn {
  display: flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700; color: var(--text-muted);
  padding: 6px 12px; border-radius: 20px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  transition: all .15s;
}
.board-wgt-btn:hover { border-color: var(--purple); color: var(--purple-light); }

/* Хиро-блок */
.sn-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0f0a1e 0%, #1a0f35 50%, #0f0f1e 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: 32px 24px;
  margin-bottom: 16px;
}
.sn-hero__beam {
  position: absolute; pointer-events: none;
  border-radius: 50%; filter: blur(60px); opacity: .35;
}
.sn-hero__beam--1 { width: 300px; height: 180px; background: var(--purple); top: -60px; right: -60px; }
.sn-hero__beam--2 { width: 200px; height: 200px; background: #3b1a6b; bottom: -60px; left: -40px; }
.sn-hero__inner { position: relative; z-index: 1; }
.sn-hero__logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sn-hero__logo-ring {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(139,92,246,.15);
  border: 1.5px solid rgba(139,92,246,.35);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple-light);
}
.sn-hero__logo-text { font-size: .65rem; font-weight: 800; color: var(--purple-light); letter-spacing: .1em; }
.sn-hero__title {
  font-size: 1.85rem; font-weight: 900; line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.sn-hero__title-accent {
  background: linear-gradient(135deg, var(--purple-light), #c4b5fd);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.sn-hero__pills { display: flex; flex-wrap: wrap; gap: 6px; }
.sn-hero__pill {
  font-size: .7rem; font-weight: 700;
  padding: 4px 11px; border-radius: 20px;
  background: rgba(139,92,246,.1);
  border: 1px solid rgba(139,92,246,.2);
  color: var(--text-secondary);
}
.sn-hero__pill--price { background: rgba(139,92,246,.2); border-color: rgba(139,92,246,.4); color: var(--purple-light); }

/* Быстрые действия на главной */
.board-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.board-quick__btn {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px; border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  text-align: left; transition: all .15s;
}
.board-quick__btn:hover { border-color: var(--purple); background: var(--purple-dim); }
.board-quick__btn--accent { background: linear-gradient(135deg, rgba(109,40,217,.3), rgba(139,92,246,.15)); border-color: var(--border-default); }
.board-quick__ic { font-size: 1.4rem; }
.board-quick__name { font-size: .88rem; font-weight: 800; color: var(--text-primary); }
.board-quick__hint { font-size: .68rem; color: var(--text-muted); }

/* Последние видео */
.board-section { margin-bottom: 20px; }
.board-section__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.board-section__title { font-size: .82rem; font-weight: 800; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .05em; }
.board-section__link { font-size: .72rem; color: var(--purple-light); }

.board-empty {
  text-align: center; padding: 32px 16px;
  background: var(--bg-card); border: 1px dashed var(--border-subtle);
  border-radius: var(--r-lg); color: var(--text-muted);
  font-size: .82rem;
}
.board-empty__ico { font-size: 2rem; margin-bottom: 8px; }

/* Смотрии-блоки (заглушка + будущая лента) */
.board-smotrii-feed { }
.board-smotrii-stub {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px dashed var(--border-subtle);
}
.board-smotrii-stub__badge {
  font-size: .62rem; font-weight: 800; padding: 3px 8px; border-radius: 10px;
  background: rgba(139,92,246,.12); border: 1px solid rgba(139,92,246,.25);
  color: var(--purple-light); white-space: nowrap; flex-shrink: 0;
}
.board-smotrii-stub__text { font-size: .75rem; color: var(--text-muted); }

/* Горизонтальная лента (для реальных данных когда Смотрии появится) */
.board-smotrii-scroll {
  display: flex; gap: 10px; overflow-x: auto;
  padding-bottom: 4px; scrollbar-width: none;
}
.board-smotrii-scroll::-webkit-scrollbar { display: none; }
.board-smotrii-card {
  flex-shrink: 0; width: 140px;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--r-md); overflow: hidden;
}
.board-smotrii-card__thumb {
  width: 100%; aspect-ratio: 16/9;
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--text-muted);
}
.board-smotrii-card__info { padding: 8px; }
.board-smotrii-card__title { font-size: .7rem; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-smotrii-card__meta { font-size: .62rem; color: var(--text-muted); margin-top: 2px; }

/* ══════════════════════════════════════════════
   СОЗДАТЬ ВИДЕО
   ══════════════════════════════════════════════ */
.cr-page { max-width: 680px; margin: 0 auto; padding: 16px; }

/* Герой */
.cr-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0f0a1e, #1a0f35 60%, #0f0f1e);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: 28px 24px;
  margin-bottom: 20px;
}
.cr-hero__beam { position: absolute; border-radius: 50%; filter: blur(50px); opacity: .3; pointer-events: none; }
.cr-hero__beam--1 { width: 250px; height: 150px; background: var(--purple); top: -50px; right: -50px; }
.cr-hero__beam--2 { width: 180px; height: 180px; background: #3b1a6b; bottom: -60px; left: -30px; }
.cr-hero__inner { position: relative; z-index: 1; }
.cr-hero__title { font-size: 1.5rem; font-weight: 900; margin-bottom: 10px; }
.cr-hero__title-accent { background: linear-gradient(135deg, var(--purple-light), #c4b5fd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.cr-hero__pills { display: flex; flex-wrap: wrap; gap: 6px; }
.cr-hero__pill { font-size: .68rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; background: rgba(139,92,246,.1); border: 1px solid rgba(139,92,246,.2); color: var(--text-secondary); }
.cr-hero__pill--accent { background: rgba(139,92,246,.2); border-color: rgba(139,92,246,.35); color: var(--purple-light); }

/* Режимы */
.cr-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.cr-mode {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px; border-radius: var(--r-md);
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  transition: all .15s;
}
.cr-mode:hover { border-color: var(--purple); }
.cr-mode.active { border-color: var(--purple); background: var(--purple-dim); }
.cr-mode__ic {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.cr-mode__ic--t2v  { background: linear-gradient(135deg,#2d1b5e,#4c2e9e); color: var(--purple-light); }
.cr-mode__ic--i2v  { background: linear-gradient(135deg,#1b3a5e,#2e6a9e); color: var(--sky); }
.cr-mode__ic--v2v  { background: linear-gradient(135deg,#1b4a3a,#2e8e6a); color: var(--teal); }
.cr-mode__ic--char { background: linear-gradient(135deg,#4a2e1b,#8e5a2e); color: var(--amber); }
.cr-mode__ic--clip { background: linear-gradient(135deg,#4a1b2e,#8e2e5a); color: #f0abfc; }
.cr-mode__ic--slide{ background: linear-gradient(135deg,#1b1b4a,#2e2e8e); color: #93c5fd; }
.cr-mode__name { font-size: .72rem; font-weight: 800; color: var(--text-primary); }
.cr-mode__hint { font-size: .6rem; color: var(--text-muted); text-align: center; }
.cr-mode--featured { border-color: var(--purple); }

/* Степ */
.cr-step { animation: fadeIn .2s ease; }
@keyframes fadeIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:none} }

.cr-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 700; color: var(--text-muted);
  margin-bottom: 14px; transition: color .15s;
}
.cr-back:hover { color: var(--purple-light); }
.cr-wiz-title { font-size: 1.1rem; font-weight: 900; margin-bottom: 16px; color: var(--text-primary); }

/* Поля */
.cr-label { font-size: .72rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin: 14px 0 6px; }
.cr-optional { font-weight: 400; text-transform: none; letter-spacing: 0; }

.cr-field { position: relative; margin-bottom: 4px; }
.cr-prompt {
  width: 100%; padding: 11px 36px 11px 13px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-default);
  border-radius: var(--r-md);
  color: var(--text-primary); font-size: .85rem; resize: none; outline: none;
  transition: border-color .15s;
}
.cr-prompt:focus { border-color: var(--purple); }
.cr-prompt::placeholder { color: var(--text-muted); }
.cr-clear {
  position: absolute; right: 10px; top: 10px;
  font-size: .9rem; color: var(--text-muted); transition: color .15s;
}
.cr-clear:hover { color: var(--text-primary); }

.cr-input {
  width: 100%; padding: 10px 13px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-default);
  border-radius: var(--r-md);
  color: var(--text-primary); font-size: .85rem; outline: none;
  transition: border-color .15s;
}
.cr-input:focus { border-color: var(--purple); }

/* Чипы */
.cr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.cr-chip {
  font-size: .72rem; font-weight: 700; padding: 5px 12px; border-radius: 20px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-secondary); transition: all .12s;
}
.cr-chip:hover { border-color: var(--purple); }
.cr-chip.active { background: var(--purple-dim); border-color: var(--purple); color: var(--purple-light); }
.cr-chips--s .cr-chip { font-size: .68rem; padding: 4px 10px; }

/* Вибы / стили */
.cr-vibes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.cr-vibe {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: var(--r-md);
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-subtle);
  font-size: .75rem; font-weight: 700; color: var(--text-secondary);
  transition: all .12s;
}
.cr-vibe:hover { border-color: var(--purple); }
.cr-vibe.active { border-color: var(--purple); background: var(--purple-dim); color: var(--text-primary); }
.cr-vibe__sw { width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0; }

/* Форматы */
.cr-fmts { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.cr-fmt {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 10px 8px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--r-md);
  flex: 1; min-width: 70px; transition: all .12s;
}
.cr-fmt:hover { border-color: var(--purple); }
.cr-fmt.active { border-color: var(--purple); background: var(--purple-dim); }
.cr-fmt__box { background: var(--border-default); border-radius: 2px; flex-shrink: 0; }
.cr-fmt.active .cr-fmt__box { background: var(--purple); }
.cr-fmt__name { font-size: .68rem; font-weight: 800; color: var(--text-primary); }
.cr-fmt__hint { font-size: .6rem; color: var(--text-muted); }
.cr-fmt__use { font-size: .58rem; color: var(--text-muted); text-align: center; }

/* Длительность */
.cr-dur { display: flex; gap: 6px; }
.cr-dur-btn {
  flex: 1; padding: 10px; border-radius: var(--r-md);
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-subtle);
  font-size: .8rem; font-weight: 800; color: var(--text-secondary);
  transition: all .12s;
}
.cr-dur-btn:hover { border-color: var(--purple); }
.cr-dur-btn.active { border-color: var(--purple); background: var(--purple-dim); color: var(--purple-light); }
.cr-dur-btn span { display: block; font-size: .62rem; font-weight: 400; color: var(--text-muted); }

/* Модели */
.cr-models { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.cr-mdl {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px; border-radius: var(--r-md);
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-subtle);
  transition: all .12s;
}
.cr-mdl:hover { border-color: var(--purple); }
.cr-mdl.active { border-color: var(--purple); background: var(--purple-dim); }
.cr-mdl__top { display: flex; align-items: center; justify-content: space-between; }
.cr-mdl__name { font-size: .75rem; font-weight: 800; color: var(--text-primary); }
.cr-mdl__badge {
  font-size: .58rem; font-weight: 700; padding: 2px 6px; border-radius: 10px;
  background: rgba(139,92,246,.15); color: var(--purple-light);
}
.cr-mdl__badge--fast { background: rgba(74,222,128,.1); color: var(--green); }
.cr-mdl__provider { font-size: .62rem; color: var(--text-muted); }
.cr-mdl__desc { font-size: .68rem; color: var(--text-secondary); }

/* Inline ref (загрузка фото/видео) */
.cr-ref-inline {
  border-radius: var(--r-md);
  border: 1.5px dashed var(--border-default);
  overflow: hidden; margin-bottom: 4px;
  transition: border-color .15s;
}
.cr-ref-inline:hover { border-color: var(--purple); }
.cr-ref-inline__zone {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; cursor: pointer;
}
.cr-ref-inline__ico { font-size: 1.4rem; flex-shrink: 0; }
.cr-ref-inline__title { font-size: .82rem; font-weight: 700; color: var(--text-primary); }
.cr-ref-inline__sub { font-size: .7rem; color: var(--text-muted); }
.cr-ref-inline__prev-wrap { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bg-elevated); }
.cr-ref-inline__img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.cr-ref-inline__loaded { font-size: .78rem; font-weight: 700; color: var(--green); }
.cr-ref-inline__clear { font-size: .7rem; font-weight: 700; color: var(--text-muted); margin-left: auto; padding: 4px 8px; border-radius: 6px; background: var(--bg-card); border: 1px solid var(--border-subtle); }

/* Разделитель */
.cr-sep { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.cr-sep::before, .cr-sep::after { content:''; flex: 1; height: 1px; background: var(--border-subtle); }
.cr-sep span { font-size: .68rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }

/* Кнопка Submit */
.cr-submit {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  color: #fff; font-size: .9rem; font-weight: 800;
  border-radius: var(--r-md); border: none;
  transition: opacity .15s, transform .1s;
  margin-top: 8px;
}
.cr-submit:hover { opacity: .92; }
.cr-submit:active { transform: scale(.99); }

/* Прогресс */
.cr-progress { display: flex; align-items: center; gap: 10px; padding: 14px; background: var(--bg-elevated); border-radius: var(--r-md); margin-top: 8px; }
.cr-spin { width: 18px; height: 18px; border: 2px solid var(--border-default); border-top-color: var(--purple); border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Результат */
.cr-result {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden; margin-top: 8px;
}
.cr-result video { width: 100%; display: block; max-height: 400px; }
.cr-result__actions { display: flex; gap: 8px; padding: 12px; }
.cr-result__btn {
  flex: 1; padding: 9px; font-size: .78rem; font-weight: 700;
  border-radius: var(--r-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-primary); transition: all .12s; text-align: center;
}
.cr-result__btn:hover { border-color: var(--purple); }
.cr-result__btn--accent { background: var(--purple-dim); border-color: var(--purple); color: var(--purple-light); }

/* ══════════════════════════════════════════════
   МАСТЕРСКАЯ
   ══════════════════════════════════════════════ */
.ws-page { max-width: 680px; margin: 0 auto; padding: 16px; }
.ws-title { font-size: 1.1rem; font-weight: 900; margin-bottom: 16px; }
.ws-empty { text-align: center; padding: 40px 16px; color: var(--text-muted); font-size: .85rem; }
.ws-empty__ico { font-size: 2.5rem; margin-bottom: 10px; }

.ws-task {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden; margin-bottom: 10px;
}
.ws-task__top { padding: 12px 14px; display: flex; align-items: flex-start; gap: 10px; }
.ws-task__thumb {
  width: 64px; height: 64px; border-radius: 8px;
  background: var(--bg-elevated); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--text-muted);
  overflow: hidden;
}
.ws-task__thumb video { width: 100%; height: 100%; object-fit: cover; }
.ws-task__info { flex: 1; min-width: 0; }
.ws-task__prompt { font-size: .8rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.ws-task__meta { font-size: .68rem; color: var(--text-muted); }
.ws-task__status { display: inline-flex; align-items: center; gap: 4px; font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: 10px; }
.ws-task__status--processing { background: rgba(251,191,36,.1); color: var(--amber); }
.ws-task__status--done { background: rgba(74,222,128,.1); color: var(--green); }
.ws-task__status--error { background: rgba(248,113,113,.1); color: var(--rose); }

/* ══════════════════════════════════════════════
   ПРОФИЛЬ
   ══════════════════════════════════════════════ */
.prof-page { max-width: 680px; margin: 0 auto; padding: 16px; }
.prof-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl); padding: 24px;
  margin-bottom: 12px;
}
.prof-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 900; color: #fff;
  margin-bottom: 12px;
}
.prof-name { font-size: 1.1rem; font-weight: 900; color: var(--text-primary); margin-bottom: 4px; }
.prof-email { font-size: .78rem; color: var(--text-muted); }
.prof-balance-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-subtle); }
.prof-balance__val { font-size: 1.3rem; font-weight: 900; color: var(--amber); }
.prof-balance__label { font-size: .72rem; color: var(--text-muted); }

.prof-section-title { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 8px; }

.prof-storage { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--r-xl); padding: 20px; margin-bottom: 12px; }
.prof-storage__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.prof-storage__title { font-size: .88rem; font-weight: 800; color: var(--text-primary); }
.prof-storage__used-text { font-size: .72rem; color: var(--text-muted); }
.prof-storage__bar-wrap { height: 6px; background: var(--bg-elevated); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.prof-storage__bar { height: 100%; background: var(--purple); border-radius: 3px; transition: width .5s ease; }
.prof-storage__bar--warn { background: var(--amber); }
.prof-storage__bar--danger { background: var(--rose); }
.prof-storage__meta { font-size: .7rem; color: var(--text-muted); margin-bottom: 12px; }
.prof-storage__pkgs-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.prof-storage__pkg { padding: 10px 6px; border-radius: var(--r-md); background: var(--bg-elevated); border: 1px solid var(--border-default); font-size: .68rem; font-weight: 700; color: var(--text-secondary); transition: all .12s; }
.prof-storage__pkg:hover { border-color: var(--purple); color: var(--purple-light); }
.prof-storage__pkg--best { border-color: var(--purple); background: var(--purple-dim); color: var(--purple-light); }

/* Темы */
.prof-themes { display: flex; flex-wrap: wrap; gap: 8px; }
.prof-theme-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--r-md);
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-subtle);
  font-size: .75rem; font-weight: 700; color: var(--text-secondary);
  transition: all .12s;
}
.prof-theme-btn:hover { border-color: var(--purple); }
.prof-theme-btn.active { border-color: var(--purple); background: var(--purple-dim); color: var(--purple-light); }
.prof-theme-sw { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; }

/* ══════════════════════════════════════════════
   УТИЛИТЫ
   ══════════════════════════════════════════════ */
.page-pad { max-width: 680px; margin: 0 auto; padding: 16px; }
.u-mt { margin-top: 16px; }
.u-mb { margin-bottom: 16px; }
.u-muted { color: var(--text-muted); }
.u-center { text-align: center; }

/* Скроллбар */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 2px; }

@media(max-width:480px) {
  .cr-modes { grid-template-columns: repeat(2, 1fr); }
  .cr-models { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: repeat(2,1fr); }
}
