/* ClipWa: панель «Создание музыки» (/music и «Сочинить музыку с ИИ» в /app).
   Только внешний вид, логика Alpine в index.html/app.js не менялась.
   Эталон: /canvas-clip (карточки шагов cw-step/cw-head/cw-num из cw-skin.css).
   Все классы с префиксом cwm-. Подключается после cw-skin.css. */

.cwm{ position:relative; animation:cwm-rise .28s ease; }
@keyframes cwm-rise{ from{ opacity:0; transform:translateY(6px); } }

/* ── шапка ── */
.cwm-hero{ display:flex; align-items:flex-start; gap:14px; margin:4px 0 16px; }
.cwm-hero-ic{ flex:none; width:44px; height:44px; border-radius:13px; display:grid; place-items:center; color:#fff;
  background:var(--grad); box-shadow:0 8px 22px rgba(125,92,245,.35); }
.cwm-hero-ic svg{ width:22px; height:22px; }
.cwm-hero-tx{ flex:1; min-width:0; }
.cwm-hero h1{ font-size:24px; line-height:1.2; margin:2px 0 4px; }
.cwm-hero p{ color:var(--mut); font-size:13.5px; line-height:1.5; margin:0; max-width:60ch; }
.cwm-x{ flex:none; width:40px; height:40px; border-radius:11px; border:1px solid var(--bd2); background:rgba(255,255,255,.03);
  color:var(--mut); font-size:15px; cursor:pointer; transition:.15s; }
.cwm-x:hover{ color:#fff; border-color:rgba(255,255,255,.26); background:rgba(255,255,255,.06); }

/* ── карточки шагов ── */
.cwm-form{ display:flex; flex-direction:column; }
.cwm-step{ margin-bottom:14px; animation:cwm-rise .25s ease; }
.cwm-step .cw-head{ margin-bottom:16px; }
.cwm-lbl{ display:block; font-size:12.5px; font-weight:600; color:var(--mut); margin:0 0 8px; letter-spacing:.01em; }
.cwm-lbl b{ color:#fff; font-weight:650; margin-left:4px; font-variant-numeric:tabular-nums; }
.cwm-opt-note{ font-weight:400; color:var(--faint); }
.cwm-req{ font-weight:500; color:#cdbcff; }
.cwm-hint{ font-size:12.5px; color:var(--faint); line-height:1.55; margin:8px 0 0; }
.cwm-ok{ font-size:12.5px; color:var(--grn,#34c98a); line-height:1.55; margin:10px 0 0; }
.cwm-warn{ font-size:12.5px; color:#ffb84d; line-height:1.55; margin:8px 0 0; }
.cwm-err{ margin:0 0 10px; }
.cwm-ellip{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#fff; font-size:13.5px; }
.cwm-step textarea, .cwm-step input[type=text], .cwm-step select{ width:100%; background:var(--bg2); border:1px solid var(--bd2);
  border-radius:var(--r2); padding:12px 14px; font-size:14px; line-height:1.6; }
.cwm-step textarea{ resize:vertical; display:block; }
.cwm-step input::placeholder, .cwm-step textarea::placeholder{ color:var(--faint); }
/* текст песни: строки как в «Анимационном ролике» */
.cwm-lyrics{ font-size:15px !important; line-height:1.8 !important; background:
  repeating-linear-gradient(transparent 0 calc(1.8em - 1px), rgba(255,255,255,.035) calc(1.8em - 1px) 1.8em) 0 12px/100% 1.8em local, var(--bg2) !important; }

/* ── шаг 1: источник ── */
.cwm-src{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.cwm-src-opt{ position:relative; display:flex; flex-direction:column; align-items:flex-start; gap:4px; padding:14px 14px 14px;
  text-align:left; cursor:pointer; border-radius:var(--r2); border:1.5px solid var(--bd); background:var(--bg2); color:var(--tx);
  font:inherit; transition:border-color .15s, background .15s, transform .15s, box-shadow .15s; }
.cwm-src-opt::after{ content:""; position:absolute; right:14px; top:16px; width:14px; height:14px; border-radius:50%; border:2px solid var(--bd2); transition:.15s; }
.cwm-src-opt:hover{ border-color:rgba(125,92,245,.55); transform:translateY(-1px); }
.cwm-src-opt:active{ transform:scale(.98); }
.cwm-src-opt.active{ border-color:var(--vio); background:linear-gradient(135deg, rgba(125,92,245,.16), rgba(162,116,255,.05)); box-shadow:0 0 0 3px rgba(125,92,245,.12); }
.cwm-src-opt.active::after{ border-color:var(--vio); background:radial-gradient(var(--vio2) 0 3.5px, transparent 4.5px); }
.cwm-src-ic{ font-size:22px; line-height:1; margin-bottom:6px; }
.cwm-src-opt b{ font-size:14px; font-weight:650; color:#fff; padding-right:22px; }
.cwm-src-opt > span:last-child{ font-size:12.5px; color:var(--mut); line-height:1.45; }

/* ── шаг 2: вкладки «Свой текст / Описать идею» ── */
.cwm-tabs{ display:flex; padding:3px; border-radius:var(--r2); background:var(--bg2); border:1px solid var(--bd); margin-bottom:14px; }
.cwm-tab{ flex:1; padding:9px 14px; border-radius:8px; border:none; background:none; color:var(--mut); font:inherit; font-size:13.5px;
  font-weight:600; cursor:pointer; transition:.15s; min-height:40px; }
.cwm-tab:hover{ color:#fff; }
.cwm-tab.active{ background:rgba(125,92,245,.22); color:#fff; box-shadow:inset 0 0 0 1px rgba(125,92,245,.45); }
.cwm-draft-btn{ min-height:44px; }
.cwm-draft{ margin-top:16px; padding-top:16px; border-top:1px solid var(--bd); }
.cwm-draft-head{ display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:8px; flex-wrap:wrap; }
.cwm-danger{ color:#f06a6a !important; padding:6px 11px !important; font-size:12.5px !important; }
.cwm-row-wrap{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:10px; }
.cwm-row-wrap .cwm-hint{ margin:0; }

/* голос: подсказка, запись */
.cwm-note{ display:flex; gap:10px; align-items:flex-start; padding:11px 13px; margin-bottom:14px; border-radius:var(--r2);
  background:rgba(255,255,255,.03); border:1px solid var(--bd); color:var(--mut); font-size:13px; line-height:1.55; }
.cwm-note b{ color:#fff; font-weight:600; }
.cwm-note-ic{ flex:none; width:18px; height:18px; margin-top:1px; border-radius:50%; display:grid; place-items:center;
  font-size:11px; font-weight:700; font-style:italic; color:var(--vio2); border:1.5px solid var(--vio2); }
.cwm-picked{ margin:0 0 12px; }
.cwm-rec{ display:flex; align-items:center; gap:14px; width:100%; padding:14px 16px; border-radius:var(--r); cursor:pointer; text-align:left;
  border:1.5px dashed rgba(125,92,245,.55); background:rgba(125,92,245,.07); color:var(--tx); font:inherit; transition:.15s; }
.cwm-rec:hover{ border-style:solid; border-color:var(--vio); background:rgba(125,92,245,.13); }
.cwm-rec:active{ transform:scale(.99); }
.cwm-rec-ic{ flex:none; width:46px; height:46px; border-radius:50%; display:grid; place-items:center; color:#fff;
  background:var(--grad); box-shadow:0 6px 18px rgba(125,92,245,.4); }
.cwm-rec-ic svg{ width:21px; height:21px; }
.cwm-rec b{ display:block; font-size:14.5px; font-weight:650; color:#fff; }
.cwm-rec small{ display:block; font-size:12.5px; color:var(--mut); margin-top:2px; }
.cwm-recbar{ display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:var(--r); background:rgba(224,69,69,.07);
  border:1px solid rgba(224,69,69,.3); }
.cwm-rec-time{ font-size:15px; font-weight:650; color:#fff; font-variant-numeric:tabular-nums; min-width:40px; }
.cwm-rec-eq{ display:flex; align-items:center; gap:3px; height:22px; }
.cwm-rec-eq i{ width:3px; height:100%; border-radius:2px; background:#ff7a7a; animation:cwm-eq 1s ease-in-out infinite; transform-origin:center; }
.cwm-rec-eq i:nth-child(2){ animation-delay:-.2s; } .cwm-rec-eq i:nth-child(3){ animation-delay:-.4s; }
.cwm-rec-eq i:nth-child(4){ animation-delay:-.6s; } .cwm-rec-eq i:nth-child(5){ animation-delay:-.8s; }
.cwm-voicebox{ margin-top:12px; padding:12px 14px; border-radius:var(--r); background:var(--bg2); border:1px solid rgba(52,201,138,.35); }

/* свой бит: файл как кнопка-зона */
.cwm-file{ position:relative; display:flex; align-items:center; gap:14px; padding:14px 16px; margin:0; border-radius:var(--r); cursor:pointer;
  border:1.5px dashed var(--bd2); background:var(--bg2); transition:.15s; }
.cwm-file:hover{ border-color:var(--vio); background:rgba(125,92,245,.07); }
.cwm-file input[type=file]{ position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.cwm-file-on{ border-style:solid; border-color:rgba(52,201,138,.45); }
.cwm-file-ic{ flex:none; width:42px; height:42px; border-radius:11px; display:grid; place-items:center; color:var(--vio2); background:rgba(125,92,245,.14); }
.cwm-file-on .cwm-file-ic{ color:var(--grn,#34c98a); background:rgba(52,201,138,.12); }
.cwm-file-ic svg{ width:20px; height:20px; }
.cwm-file-tx{ min-width:0; }
.cwm-file-tx b{ display:block; color:#fff; font-size:14px; font-weight:650; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cwm-file-tx small{ display:block; color:var(--mut); font-size:12.5px; margin-top:2px; }

/* ── шаг 3: голос и звучание ── */
.cwm-group{ margin-top:16px; }
.cwm-step .cw-head + .cwm-group, .cwm-step .cw-head + [style*="display: none"] + .cwm-group{ margin-top:0; }
.cwm-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.cwm-chips .dur-pill{ min-height:38px; padding:7px 15px; font-size:13.5px; display:inline-flex; align-items:center; gap:4px; }
.cwm-chips .dur-pill.active{ background:rgba(125,92,245,.2); border-color:var(--vio); color:#fff; box-shadow:0 0 0 3px rgba(125,92,245,.14); }
.cwm-voice{ position:relative; display:inline-flex; align-items:center; gap:3px; }
.cwm-ico-pill{ padding:7px 11px !important; }
.cwm-add-pill{ border-style:dashed !important; color:#cdbcff !important; }
.cwm-add-pill:hover{ border-style:solid !important; }
.cwm-two{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.cwm-two > div{ min-width:0; }
.cwm-dur{ margin-top:14px; }
.cwm-dur select{ max-width:260px; }
.cwm-step .style-wand{ width:46px; border-radius:var(--r2); font-size:17px; }

/* переключатель «Без вокала» */
.cwm-switch{ display:flex; align-items:center; gap:12px; padding:12px 14px; margin:0 0 4px; border-radius:var(--r2); cursor:pointer;
  background:var(--bg2); border:1px solid var(--bd); transition:border-color .15s; }
.cwm-switch:hover{ border-color:var(--bd2); }
.cwm-switch input{ position:absolute; opacity:0; width:1px; height:1px; }
.cwm-switch-ui{ flex:none; position:relative; width:40px; height:24px; border-radius:999px; background:#2c2b38; transition:background .2s; }
.cwm-switch-ui::after{ content:""; position:absolute; left:3px; top:3px; width:18px; height:18px; border-radius:50%; background:#fff;
  box-shadow:0 2px 6px rgba(0,0,0,.4); transition:transform .2s cubic-bezier(.3,.7,.4,1); }
.cwm-switch input:checked + .cwm-switch-ui{ background:var(--vio); }
.cwm-switch input:checked + .cwm-switch-ui::after{ transform:translateX(16px); }
.cwm-switch input:focus-visible + .cwm-switch-ui{ box-shadow:0 0 0 3px rgba(125,92,245,.35); }
.cwm-switch-tx b{ display:block; color:#fff; font-size:14px; font-weight:600; }
.cwm-switch-tx small{ display:block; color:var(--faint); font-size:12px; margin-top:1px; }

/* «Точная настройка» — раскрывающийся блок */
.cwm-adv{ margin-top:18px; border-radius:var(--r2); border:1px solid var(--bd); background:var(--bg2); overflow:hidden; transition:border-color .15s; }
.cwm-adv.open{ border-color:rgba(125,92,245,.35); }
.cwm-adv-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; min-height:52px; padding:12px 14px;
  border:none; background:none; color:#fff; font:inherit; font-size:14px; font-weight:600; text-align:left; cursor:pointer; }
.cwm-adv-head:hover{ background:rgba(255,255,255,.025); }
.cwm-adv-head small{ display:block; font-size:12px; font-weight:400; color:var(--faint); margin-top:2px; }
.cwm-adv-act{ flex:none; display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; color:#cdbcff; }
.cwm-adv-act svg{ width:16px; height:16px; transition:transform .2s; }
.cwm-adv.open .cwm-adv-act svg{ transform:rotate(180deg); }
.cwm-adv-body{ padding:4px 14px 14px; animation:cwm-rise .2s ease; }
.cwm-adv-body select, .cwm-adv-body input[type=text]{ background:rgba(0,0,0,.25) !important; }
.cwm-range{ margin-top:14px; }
.cwm-range input[type=range]{ width:100%; accent-color:var(--vio); height:24px; }

/* ── нижняя панель «Создать трек»: прилипает к низу экрана, пока видна форма ── */
.cwm-foot{ position:sticky; bottom:12px; z-index:20; display:flex; align-items:center; gap:14px; flex-wrap:wrap;
  padding:12px 12px 12px 18px; margin-top:2px; border-radius:var(--r); border:1px solid rgba(125,92,245,.4);
  background:rgba(22,20,32,.88); backdrop-filter:blur(14px) saturate(1.3); -webkit-backdrop-filter:blur(14px) saturate(1.3);
  box-shadow:0 16px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.02) inset; }
.cwm-foot-info{ flex:1; min-width:150px; display:flex; flex-direction:column; gap:2px; }
.cwm-foot-info b{ color:#fff; font-size:13.5px; font-weight:650; }
.cwm-foot-info span{ color:var(--mut); font-size:12.5px; font-variant-numeric:tabular-nums; }
.cwm-foot-btns{ display:flex; gap:8px; flex:none; }
.cwm-back{ min-height:48px; padding:0 18px; }
.cwm-go{ min-height:48px; padding:0 26px; font-size:15px; border-radius:var(--r2); box-shadow:0 10px 26px rgba(125,92,245,.4); }
.cwm-go .cost-tag{ color:rgba(255,255,255,.8); font-size:12px; font-weight:600; margin-left:8px; padding:2px 8px; border-radius:999px; background:rgba(0,0,0,.2); }
.has-player-bar .cwm-foot{ bottom:calc(84px + env(safe-area-inset-bottom)); }

/* ── ожидание трека ── */
.cwm-state{ text-align:center; padding:34px 22px 26px; animation:cwm-rise .25s ease; }
.cwm-eq{ display:flex; justify-content:center; align-items:center; gap:5px; height:54px; margin:0 auto 18px; }
.cwm-eq i{ width:6px; height:100%; border-radius:3px; background:var(--grad); animation:cwm-eq 1.1s ease-in-out infinite; transform-origin:center; }
.cwm-eq i:nth-child(2){ animation-delay:-.15s; } .cwm-eq i:nth-child(3){ animation-delay:-.3s; } .cwm-eq i:nth-child(4){ animation-delay:-.45s; }
.cwm-eq i:nth-child(5){ animation-delay:-.6s; } .cwm-eq i:nth-child(6){ animation-delay:-.75s; } .cwm-eq i:nth-child(7){ animation-delay:-.9s; }
@keyframes cwm-eq{ 0%,100%{ transform:scaleY(.25); } 50%{ transform:scaleY(1); } }
.cwm-state-title{ font-family:'Sora',sans-serif; font-size:19px; font-weight:700; color:#fff; margin:0 0 6px; }
.cwm-state-sub{ color:var(--mut); font-size:13.5px; margin:0; }
.cwm-state-msg{ display:inline-block; margin:12px 0 0; padding:6px 12px; border-radius:999px; font-size:12.5px; color:#d9ccff;
  background:rgba(125,92,245,.1); border:1px solid rgba(125,92,245,.25); }
.cwm-state .eta-progress{ max-width:420px; margin:14px auto 0; }
.cwm-skel{ display:grid; gap:10px; max-width:460px; margin:20px auto 0; }
.cwm-skel-row{ display:flex; align-items:center; gap:12px; padding:12px; border-radius:12px; background:var(--bg2); border:1px solid var(--bd); }
.cwm-skel-num{ flex:none; width:34px; height:34px; border-radius:50%; display:grid; place-items:center; font-size:13px; font-weight:700; color:var(--faint); background:rgba(255,255,255,.05); }
.cwm-skel-wave{ flex:1; height:26px; border-radius:6px; opacity:.6;
  background:repeating-linear-gradient(90deg, #2c2b38 0 3px, transparent 3px 6px);
  -webkit-mask:linear-gradient(90deg, #000 0 30%, rgba(0,0,0,.25) 50%, #000 70%) 0 0/200% 100%;
          mask:linear-gradient(90deg, #000 0 30%, rgba(0,0,0,.25) 50%, #000 70%) 0 0/200% 100%;
  animation:cwm-shim 1.6s linear infinite; }
@keyframes cwm-shim{ to{ -webkit-mask-position:-200% 0; mask-position:-200% 0; } }
.cwm-slow{ max-width:460px; margin:18px auto 0; padding:12px 14px; text-align:left; border-radius:var(--r2);
  background:rgba(255,184,77,.06); border:1px solid rgba(255,184,77,.28); }
.cwm-slow p{ font-size:12.5px; color:var(--mut); line-height:1.55; margin:0; }
.cwm-slow p b{ color:#fff; }
.cwm-slow .cwm-slow-t{ font-size:13.5px; color:#ffd24a; font-weight:600; margin:0 0 4px; }

/* ── выбор из 2 вариантов ── */
.cwm-pick{ animation:cwm-rise .25s ease; }
.cwm-pick-head{ display:flex; align-items:center; gap:12px; margin:0 0 14px; }
.cwm-pick-ok{ flex:none; width:34px; height:34px; border-radius:50%; display:grid; place-items:center; font-weight:800; color:#0b2a1c;
  background:linear-gradient(135deg,var(--grn,#34c98a),#28bd72); box-shadow:0 6px 18px rgba(52,201,138,.3); }
.cwm-pick-head h2{ font-size:17px; font-weight:700; color:#fff; margin:0; }
.cwm-pick-head p{ color:var(--mut); font-size:13px; margin:2px 0 0; }
.cwm-pick-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.cwm-var{ margin:0 !important; padding:16px !important; display:flex; flex-direction:column; gap:12px; transition:border-color .15s, transform .15s; }
.cwm-var:hover{ border-color:rgba(125,92,245,.4); }
.cwm-var-head{ display:flex; align-items:center; gap:12px; }
.cwm-var-num{ flex:none; width:38px; height:38px; border-radius:10px; display:grid; place-items:center; font-size:15px; font-weight:750; color:#fff;
  background:linear-gradient(135deg,#2a2440,#1b1b24); border:1px solid rgba(125,92,245,.35); }
.cwm-var-tt{ flex:1; min-width:0; }
.cwm-var-tt b{ display:block; font-size:14.5px; font-weight:650; color:#fff; }
.cwm-var-tt small{ display:block; font-size:12.5px; color:var(--faint); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-top:1px; }
.cwm-var-dur{ flex:none; font-size:12.5px; color:var(--mut); font-variant-numeric:tabular-nums; padding:4px 9px; border-radius:999px; background:rgba(255,255,255,.05); }
.cwm-var .wave-player{ background:var(--bg2); }
.cwm-var-go{ min-height:46px; margin-top:auto; }

/* ── телефон ── */
@media (max-width:760px){
  .cwm-src{ grid-template-columns:1fr; gap:8px; }
  .cwm-src-opt{ display:grid; grid-template-columns:30px 1fr; column-gap:10px; row-gap:1px; align-items:center; padding:12px 40px 12px 12px; }
  .cwm-src-opt::after{ top:50%; margin-top:-7px; }
  .cwm-src-ic{ grid-row:span 2; margin:0; font-size:22px; text-align:center; }
  .cwm-src-opt b{ padding-right:0; }
  .cwm-pick-grid{ grid-template-columns:1fr; }
}
@media (max-width:640px){
  .cwm-hero{ gap:12px; margin-bottom:12px; }
  .cwm-hero-ic{ width:40px; height:40px; border-radius:12px; }
  .cwm-hero h1{ font-size:20px; }
  .cwm-hero p{ font-size:13px; }
  .cwm-two{ grid-template-columns:1fr; }
  .cwm-dur select{ max-width:none; }
  /* на телефоне html/body с overflow-x:hidden (app.css) ломают sticky, поэтому панель фиксированная */
  .cwm-form{ padding-bottom:118px; }
  .cwm-foot{ position:fixed; left:8px; right:8px; bottom:calc(8px + env(safe-area-inset-bottom)); margin:0; padding:10px; gap:8px; }
  .has-player-bar .cwm-foot{ bottom:calc(80px + env(safe-area-inset-bottom)); }
  .cwm-foot-info{ flex-direction:row; flex-wrap:wrap; gap:2px 10px; min-width:0; flex-basis:100%; padding:0 4px; }
  .cwm-foot-info b{ font-size:12.5px; }
  .cwm-foot-btns{ flex:1; }
  .cwm-back{ padding:0 14px; }
  .cwm-go{ flex:1; padding:0 14px; }
  .cwm-state{ padding:28px 16px 20px; }
  .cwm-rec{ padding:12px 14px; }
}
/* ── текст под формой (только /music, подставляет сервер: web.py _music_seo_block) ──
   Вторичный по отношению к форме: прозрачные карточки, приглушённый текст. */
.cwm-seo{ margin:34px 0 8px; color:var(--mut); font-size:13.5px; line-height:1.65; }
.cwm-seo-crumbs{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:12.5px; color:var(--faint); margin:0 0 12px; }
.cwm-seo-crumbs a{ color:var(--mut); text-decoration:none; }
.cwm-seo-crumbs a:hover{ color:#fff; }
.cwm-seo-card{ padding:20px 22px; margin-bottom:12px; border-radius:var(--r); border:1px solid var(--bd); background:rgba(255,255,255,.015); }
.cwm-seo-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.cwm-seo-grid > .cwm-seo-card{ margin-bottom:12px; }
.cwm-seo h2{ font-family:'Sora',sans-serif; font-size:16px; font-weight:700; color:#fff; margin:0 0 10px; line-height:1.3; }
.cwm-seo h3{ font-size:14px; font-weight:650; color:#fff; margin:0 0 4px; line-height:1.4; }
.cwm-seo p{ margin:0 0 8px; }
.cwm-seo b{ color:var(--tx); font-weight:600; }
.cwm-seo ul, .cwm-seo ol{ margin:0; padding:0 0 0 18px; }
.cwm-seo li{ margin:0 0 7px; }
.cwm-seo li:last-child{ margin-bottom:0; }
.cwm-seo a{ color:#cdbcff; text-decoration:underline; text-decoration-color:rgba(205,188,255,.35); text-underline-offset:3px; }
.cwm-seo a:hover{ color:#fff; text-decoration-color:currentColor; }
.cwm-seo-steps{ list-style:none; padding:0 !important; counter-reset:cwmseo; display:grid; gap:8px; margin-top:12px !important; }
.cwm-seo-steps li{ counter-increment:cwmseo; position:relative; padding:10px 12px 10px 48px; margin:0; border-radius:var(--r2);
  background:var(--bg2); border:1px solid var(--bd); }
.cwm-seo-steps li::before{ content:counter(cwmseo); position:absolute; left:12px; top:10px; width:26px; height:26px; border-radius:8px;
  display:grid; place-items:center; font-size:12.5px; font-weight:750; background:rgba(125,92,245,.16); color:#cdbcff; }
.cwm-seo-final{ margin:12px 0 0 !important; padding-left:2px; }
.cwm-seo-more{ margin:12px 0 0 !important; }
.cwm-seo-qa{ padding:12px 0; border-top:1px solid var(--bd); }
.cwm-seo-qa:first-of-type{ border-top:none; padding-top:2px; }
.cwm-seo-qa p{ margin:0; }
.cwm-seo-links li{ margin-bottom:8px; }
@media (max-width:760px){
  .cwm-seo-grid{ grid-template-columns:1fr; gap:0; }
}
@media (max-width:640px){
  /* панель «Создать трек» на телефоне фиксированная: отступ снизу переносим с формы на текст */
  .cwm-form:has(+ .cwm-seo){ padding-bottom:0; }
  .cwm-seo{ margin-top:26px; padding-bottom:118px; font-size:13px; }
  .cwm-seo-card{ padding:16px; }
}

/* пока видна форма трека, кнопку помощника поднимаем над панелью «Создать трек» */
@media (max-width:640px){
  body:has(.cwm:not([style*="display: none"]) .cwm-form:not([style*="display: none"])) .chat-fab{ bottom:calc(118px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion:reduce){
  .cwm, .cwm-step, .cwm-state, .cwm-pick, .cwm-adv-body{ animation:none; }
  .cwm-eq i, .cwm-rec-eq i, .cwm-skel-wave{ animation:none; }
}
