/* ═══════════════════════════════════════════════════════════════════════
   Главная, «Мои», шапка мастера — чистый стиль CypSways.
   Подключается последним, поэтому перекрывает старые слои.
   ═══════════════════════════════════════════════════════════════════════ */
[hidden] { display: none !important; }

/* ── Главная: шапка ───────────────────────────────────────────────── */
.hm-top { display: flex; align-items: center; gap: 12px; margin: 2px 0 16px; }
.hm-ava {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1689ff, #b845e0); color: #fff;
  font: 800 19px var(--font-heading);
  box-shadow: 0 0 0 2px rgba(255,255,255,.08), 0 8px 20px rgba(0,0,0,.35);
}
.hm-ava img, .profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-avatar.has-photo { padding: 0 !important; overflow: hidden; }
.hm-hello { flex: 1; min-width: 0; }
.hm-hello small { display: block; color: var(--text-3); font-size: 10.5px; font-weight: 800; letter-spacing: .14em; }
.hm-hello b { display: block; margin-top: 2px; font: 800 21px var(--font-heading); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: none; flex-shrink: 0;
  background: var(--surface); color: #fff; font-size: 17px; box-shadow: var(--glass-shadow);
  transition: transform var(--dur-press) var(--ease-scale);
}
.hm-icon-btn:active { transform: scale(.9); }

/* ── Главная: карточка «Создать» ──────────────────────────────────── */
.hm-hero {
  position: relative; overflow: hidden; cursor: pointer;
  padding: 22px 20px 20px; border-radius: 28px;
  background: var(--hero-bg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 18px 40px rgba(61,26,85,.45);
  transition: transform var(--dur-press) var(--ease-scale);
}
.hm-hero:active { transform: scale(.985); }
.hm-hero__art { position: absolute; right: 10px; top: 8px; width: 120px; height: 120px; pointer-events: none; }
.hm-hero__gift {
  position: absolute; right: 8px; top: 10px; font-size: 76px; line-height: 1;
  filter: drop-shadow(0 14px 22px rgba(18,7,24,.55));
  transform: rotate(10deg);
  animation: hmFloat 4.2s ease-in-out infinite;
}
@keyframes hmFloat { 0%, 100% { transform: rotate(10deg) translateY(0); } 50% { transform: rotate(6deg) translateY(-6px); } }
.hm-hero__spark { position: absolute; color: #ffd6fc; text-shadow: 0 0 12px rgba(255,214,252,.9); animation: hmTwinkle 2.6s ease-in-out infinite; }
.hm-hero__spark--1 { left: 6px; top: 22px; font-size: 14px; }
.hm-hero__spark--2 { left: 30px; top: 86px; font-size: 10px; animation-delay: .8s; }
.hm-hero__spark--3 { right: 2px; top: 92px; font-size: 12px; animation-delay: 1.5s; }
@keyframes hmTwinkle { 0%, 100% { opacity: .2; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.15); } }
.hm-hero__kicker {
  display: inline-flex; padding: 5px 11px; border-radius: 999px;
  background: rgba(0,0,0,.22); box-shadow: var(--nav-glass-shadow);
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff;
}
.hm-hero__title { position: relative; margin: 14px 0 0; max-width: 220px; font: 800 28px/1.08 var(--font-heading); letter-spacing: -.02em; color: #fff; }
.hm-hero__sub { position: relative; margin: 8px 0 18px; max-width: 230px; color: rgba(255,255,255,.78); font-size: 14px; line-height: 1.45; }
.hm-hero__btn {
  position: relative; overflow: hidden; width: 100%; min-height: 54px; border: none; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: #fff; color: #2a0f3a; font: 800 16px var(--font-heading);
  box-shadow: 0 10px 26px rgba(18,7,24,.45);
}
.hm-hero__btn i { color: #b845e0; }
.hm-hero__btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(184,69,224,.18), transparent);
  transform: translateX(-135%) skewX(-12deg); animation: cwSheen 3.4s var(--ease-inout) 1.2s infinite;
}

/* ── Главная: статистика ──────────────────────────────────────────── */
.hm-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--glass-shadow);
  overflow: hidden;
}
.hm-stat {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 14px 6px;
  border: none; background: none; color: #fff; position: relative;
  transition: background-color .15s;
}
.hm-stat + .hm-stat::before { content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 1px; background: var(--line); }
.hm-stat:active { background: rgba(255,255,255,.04); }
.hm-stat b { font: 800 26px var(--font-heading); line-height: 1; font-variant-numeric: tabular-nums; }
.hm-stat span { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-3); font-weight: 600; }
.hm-stat--live b { color: var(--success); }
.hm-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); animation: cwPulse 1.6s infinite; }

/* ── Главная: секции ─────────────────────────────────────────────── */
.hm-section { margin-top: 20px; }
.hm-section__head { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 10px; }
.hm-section__head h2 { font: 800 18px var(--font-heading); letter-spacing: -.01em; }
.hm-section__head button { border: none; background: none; color: var(--accent-2); font: 600 14px var(--font-main); display: flex; align-items: center; gap: 6px; }
.hm-section__head button i { font-size: 11px; }
.hm-live { display: flex; flex-direction: column; gap: 8px; }
.hm-live-row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; text-align: left; color: #fff;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--glass-shadow);
  transition: transform var(--dur-press) var(--ease-scale);
}
.hm-live-row:active { transform: scale(.97); }
.hm-live-row__body { flex: 1; min-width: 0; }
.hm-live-row__body b { display: block; font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-live-row__body small { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12.5px; color: var(--text-3); }
.hm-live-row > i { color: var(--text-3); font-size: 12px; }

.hm-steps { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--glass-shadow); overflow: hidden; }
.hm-step { display: flex; align-items: center; gap: 12px; padding: 14px; border: none; background: none; color: #fff; text-align: left; width: 100%; position: relative; }
.hm-step + .hm-step::before { content: ""; position: absolute; left: 58px; right: 0; top: 0; height: 1px; background: var(--line); }
button.hm-step:active { background: rgba(255,255,255,.04); }
.hm-step__n {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-2); font: 800 14px var(--font-heading);
}
.hm-step__text { flex: 1; min-width: 0; }
.hm-step__text b { display: block; font-size: 14.5px; }
.hm-step__text small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-3); }
.hm-step > i { color: var(--text-3); font-size: 12px; }

/* ── «Мои»: шапка и фильтры ───────────────────────────────────────── */
.list-header { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 14px; }
.list-header h1 { font: 800 26px var(--font-heading) !important; letter-spacing: -.02em; }
.list-header-actions { display: flex; gap: 8px; }
.list-header-actions .icon-btn { width: 44px !important; height: 44px !important; border-radius: 50% !important; }
.cw-filter-bar { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.cw-filter-bar::-webkit-scrollbar { display: none; }
.filter-pill { flex-shrink: 0; min-height: 38px; padding: 0 16px !important; font-weight: 700 !important; font-size: 13px !important; }

/* ── «Мои»: карточка ──────────────────────────────────────────────── */
.gc {
  margin-bottom: 10px; padding: 14px; border-radius: 22px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--glass-shadow);
  transition: transform var(--dur-press) var(--ease-scale);
}
.gc:active { transform: scale(.98); }
.gc-top { display: flex; align-items: flex-start; gap: 12px; }
.gc-ava {
  --h: 220;
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, hsl(var(--h) 85% 58%), hsl(calc(var(--h) + 50) 75% 46%));
  color: #fff; font: 800 17px var(--font-heading);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.gc-head { flex: 1; min-width: 0; }
.gc-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 15px; font-weight: 700; line-height: 1.3; color: #fff;
}
.gc-sub { display: block; margin-top: 3px; font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-status {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: rgba(255,255,255,.06); color: var(--text-2);
}
.gc-status--live { background: var(--success-soft); color: var(--success); }
.gc-status--plan { background: var(--warn-soft); color: var(--warn); }
.gc-status--done { background: var(--accent-soft); color: var(--accent-2); }
.gc-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.gc-dot--live { background: var(--success); animation: cwPulse 1.6s infinite; }
.gc-dot--plan { background: var(--warn); }
.gc-dot--done { background: var(--accent-2); }
.gc-dot--draft, .gc-dot--off { background: rgba(255,255,255,.4); }
.gc-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 0 54px; font-size: 12.5px; color: var(--text-2); }
.gc-meta span { display: inline-flex; align-items: center; gap: 6px; }
.gc-meta i { color: var(--text-3); font-size: 11px; }
.gc-actions { display: flex; gap: 8px; margin-top: 14px; }
.gc-btn {
  min-height: 44px; border: none; border-radius: 999px; padding: 0 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 14px var(--font-main); color: #fff; background: var(--surface-2); box-shadow: var(--nav-glass-shadow);
  transition: transform var(--dur-press) var(--ease-scale);
}
.gc-btn:active { transform: scale(.95); }
.gc-btn--primary { flex: 1; background: var(--accent); box-shadow: 0 6px 18px rgba(22,137,255,.3); }
.gc-btn--gold { flex: 1; background: linear-gradient(135deg, #ffcc33, #f1aa05); color: #2b1d00; box-shadow: 0 6px 18px rgba(241,170,5,.3); }
.gc-btn--icon { flex: 0 0 44px; padding: 0; }

/* ── Мастер: шапка ───────────────────────────────────────────────── */
.wizard-top { padding: max(10px, calc(env(safe-area-inset-top) + 6px)) 16px 12px !important; }
.wz-bar { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; }
.wz-close {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: var(--surface); color: #fff; box-shadow: var(--glass-shadow); font-size: 16px;
  transition: transform var(--dur-press) var(--ease-scale);
}
.wz-close:active { transform: scale(.9); }
.wz-title { text-align: center; min-width: 0; }
.wz-title b { display: block; font: 800 18px var(--font-heading); letter-spacing: -.01em; }
.wz-title small { display: block; margin-top: 1px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.wizard-top .wizard-dots { display: flex !important; gap: 5px; margin: 12px 0 0 !important; }
.wizard-top .wizard-dot { flex: 1; height: 4px !important; width: auto !important; border-radius: 4px !important; background: rgba(255,255,255,.08) !important; transition: background .3s; }
.wizard-top .wizard-dot.done, .wizard-top .wizard-dot.active { background: linear-gradient(90deg, var(--accent), #b845e0) !important; }
.wizard-top .wizard-sub { margin: 10px 0 0 !important; text-align: center; font-size: 13px !important; color: var(--text-3) !important; }
.wizard-top .wizard-step-badge, .wizard-top .wizard-title, .wizard-top .wizard-topbar, .wizard-top .wizard-progress-track { display: none !important; }

/* ── Мастер: меньше коробок и капса ──────────────────────────────── */
#step-1 .section-header, #step-4 .section-header { display: none !important; }
.wiz-card { padding: 16px !important; }
.section-header { gap: 12px !important; margin-bottom: 14px !important; align-items: center !important; }
.section-header-icon { width: 38px !important; height: 38px !important; font-size: 15px !important; border-radius: 12px !important; }
.section-header-title { font: 800 17px var(--font-heading) !important; }
.wiz-field-label__text, .wiz-section-label, .recent-channels__label {
  text-transform: none !important; letter-spacing: 0 !important;
  font-size: 14px !important; font-weight: 700 !important; color: #fff !important;
}
.wiz-field-label__text--accent { color: #fff !important; }
.wiz-field-label__star { display: none !important; }
.wiz-field-label__hint { color: var(--text-3) !important; font-weight: 500 !important; }
.wiz-field-group { margin-bottom: 4px; }
.wiz-divider { background: var(--line) !important; margin: 16px 0 !important; }
.wiz-count-badge { background: rgba(255,255,255,.06) !important; color: var(--text-2) !important; border: none !important; }

/* шаг «Условия»: плоские строки вместо коробок в коробке */
.wiz-setting-card, .boost-card {
  background: none !important; border: none !important; box-shadow: none !important;
  padding: 4px 0 !important; margin: 0 !important; border-radius: 0 !important;
}
.boost-card { border-top: 1px solid var(--line) !important; padding-top: 16px !important; margin-top: 16px !important; display: flex; align-items: center; gap: 12px; }
.boost-card__icon { width: 38px !important; height: 38px !important; border-radius: 12px !important; box-shadow: none !important; flex-shrink: 0; }
.boost-card__icon::before, .boost-card__icon::after { display: none !important; }
.wiz-setting-row__title, .boost-card__title { font-size: 15px !important; font-weight: 700 !important; }
.wiz-info-banner { background: rgba(48,209,88,.08) !important; border: none !important; border-radius: 12px !important; color: #9be8b0 !important; margin-top: 10px !important; }

/* ── Профиль ─────────────────────────────────────────────────────── */
.profile-hero { padding: 26px 20px 22px !important; }
.profile-avatar { width: 88px !important; height: 88px !important; font: 800 34px var(--font-heading) !important; }
.profile-name { font: 800 24px var(--font-heading) !important; }
.profile-section { border-radius: 22px !important; }
.profile-section__label { text-transform: none !important; letter-spacing: 0 !important; font: 800 17px var(--font-heading) !important; color: #fff !important; }

@media (prefers-reduced-motion: reduce) {
  .hm-hero__gift, .hm-hero__spark, .hm-hero__btn::after { animation: none !important; }
}

/* старый глобальный градиент h1 */
.hm-hero__title, .hm-section__head h2, .wz-title b { background: none !important; -webkit-text-fill-color: #fff !important; color: #fff !important; }

#step-4 .wiz-field-group { margin-top: 16px !important; }
.channel-chip, .recent-chip { flex: 0 0 auto !important; max-width: 100%; }
.channel-chips { justify-content: flex-start !important; }

/* подсказка на шаге «Канал» */
.wz-hint {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 14px; text-align: left; color: #fff;
  border-radius: 20px; border: 1px dashed rgba(255,255,255,.12); background: rgba(255,255,255,.025);
  transition: transform var(--dur-press) var(--ease-scale);
}
.wz-hint:active { transform: scale(.97); }
.wz-hint__icon { width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-2); font-size: 16px; }
.wz-hint__text { flex: 1; min-width: 0; }
.wz-hint__text b { display: block; font-size: 14px; }
.wz-hint__text small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-3); line-height: 1.35; }
.wz-hint > i { color: var(--text-3); font-size: 12px; }

/* ── Шторка «Итоги розыгрыша» ─────────────────────────────────────── */
.ws-loading, .ws-empty { padding: 18px 4px; color: var(--text-3); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.ws-list { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 4px; max-height: 46vh; overflow-y: auto; }
.ws-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.ws-row:first-child { background: rgba(255,204,51,.08); border-color: rgba(255,204,51,.28); }
.ws-medal { width: 30px; text-align: center; font-size: 24px; flex-shrink: 0; }
.ws-place { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center; background: rgba(255,255,255,.08); font: 800 12px var(--font-main); color: var(--text-2); }
.ws-body { flex: 1; min-width: 0; }
.ws-body b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-body small { display: block; font-size: 12px; color: var(--text-3); }
.ws-prize { flex-shrink: 0; max-width: 42%; padding: 5px 10px; border-radius: 999px; background: rgba(255,204,51,.12); color: #ffd666; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-note { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--success); }
.qa-action--primary { background: var(--accent) !important; border-color: transparent !important; box-shadow: 0 8px 20px rgba(22,137,255,.3) !important; }
.qa-action--primary i { color: #fff !important; }

/* Подсказка pull-to-refresh: не занимает место, пока не тянут */
.list-pull-hint { max-height: 0; padding: 0 !important; overflow: hidden; transition: opacity .2s, max-height .2s, padding .2s; }
.list-pull-hint.visible { max-height: 40px; padding: 4px 0 12px !important; }

/* Анимации входа не должны оставлять transform на экране: с ним position:fixed внутри
   (панель «Назад/Далее» мастера) привязывался к экрану, а не к окну, и на длинных шагах
   кнопки уезжали за нижний край. backwards = стартовый кадр до анимации, после — ничего. */
.cw-screen, .cw-screen.active > *, .cw-fade { animation-fill-mode: backwards !important; }

/* Правила: читаемый текст в нижней шторке */
.terms-body .terms-list { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.terms-body .terms-list p { font-size: 14px; line-height: 1.5; color: var(--text-2); }
.terms-body .terms-list b { color: #fff; font-weight: 700; }
