@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=Syne:wght@600;700;800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700;9..144,800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap");

:root {
  --bg: #f0f4fa;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #0d9488;
  --accent2: #059669;
  --err: #dc2626;
  --border: #e2e8f0;
  --surface-muted: #f1f5f9;
  --surface-inset: #e8eef5;
  --radius: 12px;
  --font: "Plus Jakarta Sans", "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --landing-glow: rgba(13, 148, 136, 0.1);
  --landing-line: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 30px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.brand { font-weight: 700; letter-spacing: -0.02em; }
.brand a { color: inherit; text-decoration: none; }
nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }

.landing .hero {
  max-width: 720px;
  padding: 3rem 1.5rem;
}
.landing h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}
.lead { color: var(--muted); font-size: 1.05rem; margin: 0 0 1.5rem; }
.cta { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.features {
  padding: 2rem 1.5rem 4rem;
  border-top: 1px solid var(--border);
  max-width: 720px;
}
.features ul { color: var(--muted); padding-left: 1.2rem; }
.foot {
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--border);
}

.btn {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--card);
  cursor: pointer;
  font: inherit;
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--surface-muted); text-decoration: none; }
.btn.primary {
  background: linear-gradient(135deg, #14b8a6, #059669);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.25);
}
.btn.primary:hover { filter: brightness(1.05); text-decoration: none; }
.btn.ghost { background: transparent; }
.btn.wide { width: 100%; text-align: center; }

.auth {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}
.card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  padding: 1.75rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.card h1 { margin: 0 0 1rem; font-size: 1.35rem; }
.form label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.form input, .form textarea, .form select {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font: inherit;
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}
.err { color: var(--err); margin: 0 0 1rem; }
.muted { color: var(--muted); font-size: 0.9rem; }

.dash .panel { padding: 0; margin: 0; max-width: none; }
.dash h1 { margin-top: 0; }
.credits { font-weight: 600; color: var(--accent2); }
.box {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.box h2 { margin: 0 0 0.75rem; font-size: 1.1rem; }
.out {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: auto;
  font-size: 0.8rem;
  max-height: 240px;
  color: var(--text);
}
code { font-size: 0.85em; background: var(--surface-muted); padding: 0.1em 0.35em; border-radius: 4px; border: 1px solid var(--border); }

.steps { margin: 0 0 1rem; padding-left: 1.25rem; }
.steps li { margin: 0.35rem 0; }
.plan-block {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--surface-muted);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.plan-block h3 { margin: 0.75rem 0 0.35rem; font-size: 0.95rem; color: var(--muted); }
.plan-block h3:first-child { margin-top: 0; }
.plan-text { margin: 0; white-space: pre-wrap; }
.plan-block details { margin-top: 0.75rem; }

/* Индикаторы работы (анализ / генерация) */
@keyframes mp-spin {
  to { transform: rotate(360deg); }
}
@keyframes mp-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}
@keyframes mp-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: mp-spin 0.75s linear infinite;
  flex-shrink: 0;
}
.spinner--sm {
  width: 22px;
  height: 22px;
  border-width: 2px;
}

.work-busy {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  padding: 1.25rem 1rem;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
/* display:flex выше перебивает UA-стиль [hidden] — без этого блоки видны до старта */
.work-busy[hidden],
.preview-card[hidden],
.plan-block[hidden],
.dash-preview-empty[hidden],
.dash-preview-result[hidden] {
  display: none !important;
}
.work-busy--compact {
  margin: 0.5rem 0 0;
  padding: 0.85rem 1rem;
}
.work-busy-text {
  margin: 0;
  font-weight: 500;
}
.work-busy-sub {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  animation: mp-pulse 1.4s ease-in-out infinite;
}

.btn-loading {
  position: relative;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.88;
}
.btn-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 60%
  );
  animation: mp-shimmer 1.35s ease-in-out infinite;
}

.gen-workzone {
  margin-top: 0.75rem;
}

.preview-card {
  margin-top: 0.5rem;
  padding: 1rem;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.preview-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--text);
}
.preview-figure {
  margin: 0;
  padding: 0;
  text-align: center;
  background: var(--surface-inset);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.preview-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
.preview-actions {
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.plan-status-row {
  min-height: 1.5rem;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  margin-top: 0.35rem;
  text-align: center;
  text-decoration: none;
}
.btn-sm:hover { text-decoration: none; }

.recent-gen-box .recent-gen-grid {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
@media (max-width: 640px) {
  .recent-gen-box .recent-gen-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.recent-gen-box .recent-gen-grid > li {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}
.recent-gen-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow-sm);
}

button.recent-gen-card {
  cursor: pointer;
  font: inherit;
  width: 100%;
  text-align: center;
}
.recent-gen-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.recent-gen-thumb {
  display: block;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-inset);
  border: 1px solid var(--border);
}
.recent-gen-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.recent-gen-time {
  font-size: 0.75rem;
  color: var(--muted);
}
.recent-gen-dl {
  align-self: stretch;
}

/* ========== Лендинг ========== */
body.landing {
  background: var(--bg);
  color: var(--text);
}
body.landing a:not(.btn) {
  color: #0f766e;
}
body.landing a:not(.btn):hover {
  color: #0d9488;
}
body.landing .top {
  border-bottom-color: var(--landing-line);
}
.landing {
  position: relative;
}
.landing-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 100% 70% at 0% 0%, rgba(13, 148, 136, 0.14), transparent 55%),
    radial-gradient(ellipse 80% 55% at 100% 15%, rgba(59, 130, 246, 0.12), transparent 50%),
    radial-gradient(ellipse 70% 45% at 50% 100%, rgba(251, 191, 36, 0.1), transparent 42%),
    linear-gradient(180deg, #fafcff 0%, #eef2f9 100%);
}
.landing-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--landing-line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}
.landing .brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}
.landing .brand a {
  color: var(--text);
}
.landing-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem 1.25rem;
  flex-wrap: wrap;
}
.landing-nav > a:not(.btn) {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}
.landing-nav > a:not(.btn):hover {
  color: var(--text);
  text-decoration: none;
}
.btn--sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.875rem;
}
.btn--xl {
  padding: 0.75rem 1.35rem;
  font-size: 1rem;
  border-radius: 14px;
}
body.landing .btn--ghost-light {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: var(--text);
}
body.landing .btn--ghost-light:hover {
  background: #f1f5f9;
  text-decoration: none;
}
.btn--landing-primary {
  background: linear-gradient(135deg, #14b8a6, #059669);
  border: none;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 28px rgba(5, 150, 105, 0.28);
}
.btn--landing-primary:hover {
  filter: brightness(1.06);
  text-decoration: none;
  box-shadow: 0 8px 32px rgba(5, 150, 105, 0.35);
}
.landing-hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  display: grid;
  gap: 2.25rem;
  align-items: center;
}
@media (min-width: 900px) {
  .landing-hero {
    grid-template-columns: 1fr 1.05fr;
    padding-top: 3.25rem;
    padding-bottom: 4rem;
    gap: 3rem;
  }
  .landing-hero-copy {
    max-width: 34rem;
  }
}
.landing-hero-copy {
  min-width: 0;
}
.landing-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #0d9488;
}
.landing-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4.2vw, 2.85rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
  color: var(--text);
}
.landing-lead {
  margin: 0 0 1.5rem;
  font-size: 1.07rem;
  line-height: 1.65;
  color: #475569;
  max-width: 36rem;
}
.landing-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
}
.landing-trust-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 36rem;
}
.landing-trust-list li {
  position: relative;
  padding-left: 1.35rem;
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
}
.landing-trust-list li:last-child {
  margin-bottom: 0;
}
.landing-trust-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #14b8a6, #059669);
}
.landing-hero-figure {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--landing-line);
  box-shadow:
    0 4px 6px -1px rgba(15, 23, 42, 0.06),
    0 24px 48px -12px rgba(15, 23, 42, 0.12);
  background: var(--card);
  max-width: 560px;
  width: 100%;
  justify-self: center;
}
@media (min-width: 900px) {
  .landing-hero-figure {
    justify-self: end;
  }
}
.landing-hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}
.landing-strip {
  border-top: 1px solid var(--landing-line);
  border-bottom: 1px solid var(--landing-line);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.95));
  padding: 1.35rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 2rem;
}
.landing-strip-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #94a3b8;
}
.landing-mp-badges {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  align-items: center;
}
.landing-mp-badges li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem 0.45rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--landing-line);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  background: var(--card);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.mp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.35rem;
  border-radius: 10px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1;
}
.mp-badge--wb {
  background: linear-gradient(145deg, #e91eac, #9c0f7a);
}
.mp-badge--ozon {
  background: linear-gradient(145deg, #005bff, #003fa3);
}
.mp-badge--ym {
  background: linear-gradient(145deg, #ff3333, #c41e1e);
}
.mp-badge--sber {
  background: linear-gradient(145deg, #21a038, #0d7a2c);
}
.landing-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}
.landing-section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.55rem, 3vw, 2.05rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.landing-section-sub {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 40rem;
}
.landing-section-sub--faq {
  max-width: 42rem;
  line-height: 1.6;
}
.landing-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .landing-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}
.landing-steps li {
  display: flex;
  gap: 1rem;
  padding: 1.4rem;
  background: var(--card);
  border: 1px solid var(--landing-line);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}
.landing-step-num {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  background: linear-gradient(145deg, rgba(20, 184, 166, 0.18), rgba(5, 150, 105, 0.08));
  color: #0f766e;
  border-radius: 12px;
}
.landing-steps h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: var(--text);
}
.landing-steps p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}
.landing-cards {
  display: grid;
  gap: 1.1rem;
}
@media (min-width: 640px) {
  .landing-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
.landing-card {
  padding: 1.4rem 1.35rem;
  background: var(--card);
  border: 1px solid var(--landing-line);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}
.landing-card-icon {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 0.65rem;
  filter: grayscale(0.15);
}
.landing-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
  color: var(--text);
}
.landing-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}
.landing-card--soft {
  border-color: rgba(251, 191, 36, 0.35);
  background: linear-gradient(160deg, rgba(255, 251, 235, 0.9), var(--card));
}
.landing-section--pricing {
  background: linear-gradient(180deg, transparent, rgba(20, 184, 166, 0.06));
  border-top: 1px solid var(--landing-line);
  border-bottom: 1px solid var(--landing-line);
}
.landing-pricing {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}
.landing-pricing-lead {
  color: var(--muted);
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
}
.landing-pricing-list {
  text-align: left;
  margin: 0 0 1.75rem;
  padding: 1.25rem 1.5rem;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--landing-line);
  list-style: none;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}
.landing-pricing-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--landing-line);
  color: #334155;
  font-size: 0.95rem;
}
.landing-pricing-list li:last-child {
  border-bottom: none;
}
.landing-faq {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.landing-faq-item {
  border: 1px solid var(--landing-line);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.03);
}
.landing-faq-item summary {
  padding: 1rem 1.15rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text);
}
.landing-faq-item summary::-webkit-details-marker {
  display: none;
}
.landing-faq-item summary::after {
  content: "+";
  font-weight: 400;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
}
.landing-faq-item[open] summary::after {
  content: "−";
}
.landing-faq-item p {
  margin: 0;
  padding: 0 1.15rem 1.15rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}
.landing-legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}
.landing-legal p {
  margin: 0;
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.55;
  text-align: center;
}
.landing-footer {
  border-top: 1px solid var(--landing-line);
  padding: 1.5rem;
  background: #fff;
}
.landing-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.landing-footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
}
.landing-footer-nav {
  display: flex;
  gap: 1.25rem;
}
.landing-footer-nav a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.landing-footer-nav a:hover {
  color: var(--text);
}

/* Старые классы лендинга — совместимость */
.landing .hero {
  display: none;
}
.landing .features {
  display: none;
}

/* ========== Страницы входа / регистрации ========== */
.auth-page {
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 0;
  min-height: 100vh;
}
.auth-top {
  width: 100%;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.auth-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.auth-brand:hover {
  color: var(--accent);
  text-decoration: none;
}
.auth-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  width: 100%;
  background: linear-gradient(180deg, var(--bg) 0%, #e2e8f0 55%, var(--bg) 100%);
}
.auth-page .card {
  border-color: var(--border);
  box-shadow: var(--shadow-md);
}
.auth-page .card h1 {
  font-family: var(--font-display);
  font-weight: 800;
}

.auth-oauth {
  margin-bottom: 1rem;
}
.auth-oauth-label {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.auth-oauth-btns {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.btn-oauth {
  text-align: center;
  text-decoration: none;
  display: block;
  font-weight: 600;
}
.btn-oauth:hover {
  text-decoration: none;
}
.btn-oauth-google {
  border-color: #dadce0;
  background: #fff;
  color: #3c4043;
}
.btn-oauth-google:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 4px rgba(60, 64, 67, 0.15);
}
.btn-oauth-yandex {
  border-color: #fc3f1d;
  background: #fc3f1d;
  color: #fff;
  box-shadow: 0 2px 8px rgba(252, 63, 29, 0.25);
}
.btn-oauth-yandex:hover {
  filter: brightness(1.06);
  color: #fff;
}
.auth-oauth-or {
  position: relative;
  text-align: center;
  margin: 1rem 0 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.auth-oauth-or span {
  position: relative;
  z-index: 1;
  padding: 0 0.65rem;
  background: var(--card);
}
.auth-oauth-or::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border);
  z-index: 0;
}

/* ========== Кабинет: одноэкранный макет ========== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes mp-dash-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mp-credits-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.mp-animate-in {
  animation: mp-dash-in 0.35s ease-out both;
}

.dash {
  font-family: var(--font);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.dash .brand {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dash .top {
  flex-shrink: 0;
  border-bottom-color: var(--border);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 5;
}

.dash-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
}

.dash-nav-link {
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.dash-nav-link:hover {
  text-decoration: none;
  background: var(--surface-muted);
}

.dash-nav-email {
  font-size: 0.85rem;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credits-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(5, 150, 105, 0.12));
  border: 1px solid rgba(20, 184, 166, 0.35);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.credits-pill--bump {
  animation: mp-credits-bump 0.45s ease-out;
}

.dash-app {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.65rem 1rem 0.75rem;
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
}

.dash-toolbar {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.15rem 0 0.65rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.65rem;
}

.dash-toolbar__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}

.dash-toolbar__sub {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.dash-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, min(36vw, 380px));
  grid-template-rows: minmax(0, 1fr);
  gap: 0.75rem;
  align-items: stretch;
}

@media (max-width: 960px) {
  .dash {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .dash-app {
    flex: none;
    min-height: 0;
  }
  .dash-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    overflow: visible;
  }
  .dash-layout .dash-pane--output {
    order: -1;
  }
  .dash-pane--editor {
    min-height: 320px;
  }
  .dash-pane--output {
    max-height: none;
  }
  .dash-preview-result__figure {
    max-height: 50vh;
  }
  .dash-preview-result__img {
    max-height: 50vh;
  }
}

.dash-pane {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.dash-pane--editor {
  margin-top: 0;
  padding: 0.85rem 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dash-pane-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.25rem;
  scrollbar-gutter: stable;
}

.dash-pane-scroll::-webkit-scrollbar {
  width: 6px;
}
.dash-pane-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 6px;
}

.dash-pane--output {
  gap: 0.65rem;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
  max-height: 100%;
  -webkit-overflow-scrolling: touch;
}

.dash-pane--output > .box,
.dash-pane--output > .dash-output-card--preview {
  margin-top: 0;
}

.wizard-panel {
  position: relative;
  border: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(20, 184, 166, 0.07), var(--card) 38%);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.35s ease, background 0.35s ease;
}

.wizard-panel[data-wizard-screen="2"] {
  border-color: rgba(13, 148, 136, 0.28);
  background: linear-gradient(165deg, rgba(5, 150, 105, 0.08), var(--card) 40%);
}

/* Шапка мастера: полоса прогресса → шаги по центру → тумблеры в одну строку */
.dash-wizard-header {
  margin: 0 0 0.2rem;
}

.dash-wizard-header > .dash-wizard-bar {
  margin: 0 0 0.5rem;
}

.dash-wizard-header .dash-wizard-modes-bar {
  position: relative;
  top: auto;
  z-index: 1;
  margin: 0;
  padding: 0.4rem 0.45rem;
}

.wizard-track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.25rem;
  margin: 0 0 0.5rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
}

.wizard-track--centered {
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.4rem;
  max-width: 20rem;
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

.wizard-track--dual {
  justify-content: center;
}

.dash-wizard-modes-bar__inner--row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.4rem 0.55rem;
}

.dash-wizard-modes-bar__inner--row .dash-switch--toolbar--wizard {
  flex: 1 1 0;
  min-width: 0;
  max-width: calc(50% - 0.3rem);
}

@media (max-width: 720px) {
  .dash-wizard-modes-bar__inner--row {
    flex-wrap: wrap;
  }

  .dash-wizard-modes-bar__inner--row .dash-switch--toolbar--wizard {
    flex: 1 1 100%;
    max-width: none;
  }
}

.dash-aspect-hint {
  margin: -0.1rem 0 0.55rem;
  font-size: 0.72rem;
  line-height: 1.45;
  max-width: 36rem;
}

.wizard-track--dual .wizard-connector {
  flex: 1 1 20px;
  max-width: 100px;
}

.dash-wizard-bar {
  height: 4px;
  border-radius: 99px;
  background: var(--surface-inset);
  margin: 0 0 0.75rem;
  overflow: hidden;
}

.dash-wizard-bar__fill {
  display: block;
  height: 100%;
  width: 50%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.dash-wizard-screen-head {
  margin: 0 0 0.45rem;
}

.dash-wizard-screen-title {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

.dash-wizard-screen-sub {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
}

@keyframes dashWizardScreenIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.dash-wizard-screen--enter {
  animation: dashWizardScreenIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .dash-wizard-screen--enter {
    animation: none;
  }

  .dash-wizard-bar__fill {
    transition: none;
  }
}

.wizard-connector {
  flex: 1 1 12px;
  height: 2px;
  min-width: 8px;
  max-width: 32px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--border), rgba(20, 184, 166, 0.35));
  opacity: 0.85;
}

.wizard-step {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.wizard-step strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 0.68rem;
  border: 1px solid var(--border);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.wizard-step--active {
  color: var(--text);
  border-color: rgba(20, 184, 166, 0.45);
  background: rgba(20, 184, 166, 0.12);
}

.wizard-step--active strong {
  background: var(--accent2);
  color: #fff;
  border-color: transparent;
}

.wizard-step--done {
  color: var(--accent);
  border-color: rgba(20, 184, 166, 0.22);
}

.wizard-step--done strong {
  position: relative;
}

.wizard-step--done:not(.wizard-step--active) strong {
  font-size: 0;
  color: transparent;
  background: var(--accent2);
  border-color: transparent;
}

.wizard-step--done:not(.wizard-step--active) strong::before {
  content: "✓";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.62rem;
  font-weight: 800;
  color: #fff;
}

.wizard-hint--compact {
  margin: 0 0 0.55rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.78rem;
  line-height: 1.45;
}

/* display:flex перебивает нативное [hidden] (display:none) — без этого оба шага видны сразу */
.dash-wizard-step[hidden] {
  display: none !important;
}

.dash-wizard-step {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.dash-actions--split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.dash-actions--split .primary {
  margin-left: auto;
}

.plan-block--wizard-summary {
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  margin-bottom: 0.35rem;
}

.plan-block--wizard-summary__title {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.plan-block--wizard-summary__text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  max-height: 6rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.plan-block__more {
  margin-top: 0.45rem;
  font-size: 0.78rem;
}

.plan-ideas--compact {
  margin: 0.35rem 0 0.25rem;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  line-height: 1.4;
}

.plan-status-row--in-step {
  margin-bottom: 0.35rem;
}

.dash-plan-error-details {
  margin-top: 0.35rem;
  padding: 0.35rem 0.5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
}

.dash-details-tuning {
  margin: 0.35rem 0 0.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.4rem 0.65rem;
  background: var(--card);
}

.dash-details-tuning__summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.82rem;
  list-style: none;
}

.dash-details-tuning__summary::-webkit-details-marker {
  display: none;
}

.dash-details-tuning__summary::-moz-list-bullet {
  list-style: none;
}

.dash-display-settings--nested {
  margin-top: 0.5rem;
  margin-bottom: 0;
  border: none;
  box-shadow: none;
  background: transparent;
  overflow: visible;
}

.dash-display-settings--nested .dash-display-settings__inner {
  padding: 0.5rem 0 0.25rem;
}

.form--dash label {
  margin-bottom: 0.65rem;
}

.form--dash .dash-field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.dash-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

@media (max-width: 520px) {
  .dash-field-row {
    grid-template-columns: 1fr;
  }
}

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.35rem 0 0.15rem;
}

.dash-actions--primary {
  margin-top: 0.5rem;
}

.btn-dash {
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}

.btn-dash:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-dash--secondary {
  font-weight: 600;
}

.dash-drop {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: var(--surface-muted);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.dash-drop__zone {
  position: relative;
  display: block;
  min-height: 5.25rem;
  border-radius: 10px;
}

.dash-drop__zone .dash-drop__input {
  z-index: 2;
}

.dash-drop__hint {
  display: block;
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text);
  font-weight: 500;
  max-width: 22rem;
}

.dash-drop__hint strong {
  font-weight: 700;
  color: var(--text);
}

.dash-drop:hover {
  border-color: rgba(20, 184, 166, 0.45);
  background: rgba(20, 184, 166, 0.04);
}

.dash-drop--drag {
  border-color: var(--accent);
  background: rgba(20, 184, 166, 0.1);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.dash-drop--has-file {
  border-style: solid;
  border-color: rgba(20, 184, 166, 0.5);
  background: rgba(20, 184, 166, 0.06);
}

.dash-drop__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.dash-drop-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0 0.5rem 0.55rem;
  pointer-events: none;
}

.dash-drop-preview-item {
  width: 4.25rem;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.dash-drop-preview-item img {
  width: 4.25rem;
  height: 4.25rem;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: var(--card);
  display: block;
}

.dash-drop-preview-item__name {
  font-size: 0.58rem;
  line-height: 1.2;
  color: var(--muted);
  text-align: center;
  max-width: 4.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-drop__face {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.55rem 0.75rem 0.85rem;
  pointer-events: none;
}

.dash-drop__icon {
  font-size: 1.35rem;
  line-height: 1;
  margin-bottom: 0.35rem;
  opacity: 0.85;
}

.dash-drop__text {
  font-size: 0.78rem;
  color: var(--muted);
  max-width: 16rem;
}

.dash-drop__name {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}

.work-busy--inline {
  margin: 0.35rem 0;
}

.work-busy--preview {
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 140px;
  justify-content: center;
  margin: 0;
  border: none;
  background: transparent;
}

.work-busy--preview-slim {
  min-height: 0;
  padding: 1rem 0.5rem;
}

.dash-status-msg {
  min-height: 1.25rem;
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  transition: color 0.2s ease;
}

.dash-status-msg--footer {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.dash-status-msg--error {
  color: var(--err);
  font-weight: 500;
}

.plan-block--compact {
  max-height: min(28vh, 200px);
  overflow-y: auto;
  margin: 0.5rem 0;
  padding: 0.65rem 0.75rem;
}

.plan-block--compact h3 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0.5rem 0 0.2rem;
}

.plan-block--compact h3:first-child {
  margin-top: 0;
}

.plan-block--compact .plan-text {
  font-size: 0.8rem;
}

.plan-ideas {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  color: var(--text);
}

.plan-block__raw {
  margin-top: 0.5rem;
}

.out--compact {
  max-height: 100px;
  font-size: 0.7rem;
}

.dash-output-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.65rem 0.75rem;
}

.dash-recent-card {
  flex-shrink: 0;
}

.dash-output-heading {
  margin: 0 0 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Превью в правой колонке: один слот в сетке, без лишних рамок */
.dash-output-card--preview {
  padding: 0.35rem 0 0.55rem;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

.dash-preview-viewport {
  flex: 1;
  min-height: 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(130px, min(36vh, 300px));
  align-content: start;
}

.dash-preview-viewport > .dash-preview-empty,
.dash-preview-viewport > .work-busy.work-busy--preview,
.dash-preview-viewport > .dash-preview-result {
  grid-area: 1 / 1;
  min-height: 0;
  min-width: 0;
  align-self: stretch;
  justify-self: stretch;
  box-sizing: border-box;
}

.dash-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.2rem;
  padding: 0.35rem;
}

.dash-preview-empty__title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
}

.dash-preview-empty__sub {
  margin: 0;
  font-size: 0.76rem;
  max-width: 16rem;
  line-height: 1.35;
}

.dash-preview-result {
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: hidden;
}

.dash-preview-result__figure {
  position: relative;
  flex: 1 1 auto;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  max-height: min(44vh, 400px);
}

.dash-preview-result__img,
.dash-preview-img--contain {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
}

.dash-preview-result__err {
  margin-top: 0.25rem;
}

.dash-preview-expand {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.dash-preview-expand:hover {
  background: var(--card);
}

.dash-preview-layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.55rem;
  min-height: 0;
  flex: 1;
  width: 100%;
}

/* Колонка превью: сначала крупное изображение, под ним горизонтальная лента сессии */
.dash-preview-layout--stacked {
  flex-direction: column;
  align-items: stretch;
  gap: 0.6rem;
}

.dash-preview-layout--stacked .dash-preview-main {
  width: 100%;
  flex: 1 1 auto;
  min-height: min(42vh, 400px);
}

.dash-slide-strip--below {
  width: 100%;
  max-height: none;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.45rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.2rem 0 0.35rem;
  scrollbar-gutter: stable;
}

.dash-preview-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dash-slide-strip {
  flex-shrink: 0;
  width: 92px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: min(58vh, 480px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.15rem 0.1rem 0.15rem 0;
}

.dash-slide-strip__item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  padding: 0.25rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--surface-muted);
}

.dash-slide-strip__item--active {
  border-color: rgba(20, 184, 166, 0.55);
  background: rgba(20, 184, 166, 0.1);
}

.dash-slide-strip__thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface-inset);
}

.dash-slide-strip__thumb img {
  display: block;
  width: 100%;
  height: 72px;
  object-fit: cover;
}

.dash-slide-strip__label {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
}

.dash-slide-strip__votes {
  display: flex;
  gap: 0.2rem;
  justify-content: center;
}

.dash-slide-strip__vote.is-active {
  outline: 2px solid var(--accent2);
}

.dash-preview-feedback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.dash-batch-progress {
  margin-bottom: 0.5rem;
}

.dash-batch-progress__track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-inset);
  overflow: hidden;
}

.dash-batch-progress__fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  transition: width 0.35s ease;
}

.dash-batch-progress__track--sweep .dash-batch-progress__fill {
  transition: width 0.22s linear;
}

.dash-preview-viewport--batch {
  position: relative;
  outline: 2px solid rgba(13, 148, 136, 0.38);
  outline-offset: 2px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.08);
}

.dash-batch-progress__text {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.dash-revision-block,
.dash-fullcard-block {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.dash-lightbox__tools-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.dash-lightbox__tools-stack .dash-revision-block--modal,
.dash-lightbox__tools-stack .dash-fullcard-block--modal {
  margin-top: 0;
  padding: 0.9rem 1rem;
  border-top: none;
  border-radius: 14px;
  background: linear-gradient(160deg, var(--card) 0%, var(--surface-muted) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, border-color 0.2s ease;
}

.dash-lightbox__tools-stack .dash-revision-block--modal:hover,
.dash-lightbox__tools-stack .dash-fullcard-block--modal:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(13, 148, 136, 0.22);
}

.dash-lightbox__tools-stack textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dash-lightbox__tools-stack textarea:focus {
  outline: none;
  border-color: rgba(13, 148, 136, 0.5);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.dash-revision-block--modal .btn-dash,
.dash-fullcard-block--modal .btn-dash {
  width: 100%;
  justify-content: center;
}

.dash-lightbox__action-btn {
  transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.dash-lightbox__action-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(13, 148, 136, 0.2);
}

.dash-lightbox__action-btn:active:not(:disabled) {
  transform: translateY(0);
}

.dash-lightbox__chip-btn {
  transition: transform 0.12s ease, background 0.15s ease;
}

.dash-lightbox__chip-btn:hover {
  transform: scale(1.06);
}

.dash-lightbox__chip-btn:active {
  transform: scale(0.96);
}

.dash-lightbox__chip-btn.is-active {
  border-color: var(--accent2);
  background: rgba(20, 184, 166, 0.15);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
}

.dash-batch-progress--in-lightbox {
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: linear-gradient(160deg, var(--card) 0%, var(--surface-muted) 100%);
  border: 1px solid var(--border);
}

.dash-lightbox-batch__title {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.preview-card--dash-compact {
  padding: 0.45rem 0.5rem;
}

.dash-preview-compact-hint {
  font-size: 0.68rem;
  line-height: 1.35;
  margin: 0 0 0.45rem;
}

.preview-figure--dash-compact {
  max-height: min(36vh, 280px);
}

.preview-figure--dash-compact img,
.preview-figure--dash-compact .dash-preview-img--fit {
  max-height: min(36vh, 280px);
  cursor: pointer;
}

.dash-preview-img--opens-modal {
  cursor: pointer;
}

.dash-revision-block__title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.dash-fullcard-block__title {
  margin: 0 0 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.dash-fullcard-block__hint {
  margin: 0 0 0.55rem;
  font-size: 0.76rem;
  line-height: 1.45;
}

.dash-fullcard-block__need {
  margin: 0 0 0.55rem;
  font-size: 0.74rem;
  line-height: 1.4;
  color: var(--muted);
}

.dash-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Иначе display:flex перебивает нативное скрытие [hidden] — оверлей остаётся на весь экран */
.dash-lightbox[hidden] {
  display: none !important;
  pointer-events: none;
}

.dash-lightbox[hidden].dash-lightbox--visible {
  display: none !important;
}

.dash-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.dash-lightbox--visible .dash-lightbox__backdrop {
  opacity: 1;
}

.dash-lightbox__panel {
  position: relative;
  z-index: 1;
  width: min(96vw, 920px);
  max-width: min(96vw, 960px);
  max-height: 92vh;
  margin: 0;
  background: var(--card);
  border-radius: 20px;
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.04),
    0 24px 64px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(226, 232, 240, 0.95);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.96) translateY(16px);
  transition:
    opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.dash-lightbox--visible .dash-lightbox__panel {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Одиночная генерация (правки / основной слайд): полоса под шапкой попапа — остаётся видна при листании других слайдов */
.dash-lightbox-top-progress {
  flex-shrink: 0;
  padding: 0.65rem 2.85rem 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(20, 184, 166, 0.09), transparent);
}

.dash-lightbox-top-progress__text {
  margin: 0.4rem 0 0;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--muted);
}

.dash-lightbox__body {
  max-height: min(90vh, 900px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2.35rem 1.15rem 1.2rem;
  -webkit-overflow-scrolling: touch;
}

.dash-lightbox__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(252px, 320px);
  gap: 1.25rem;
  align-items: start;
}

.dash-lightbox__col--visual {
  min-width: 0;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.34s ease 0.04s,
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1) 0.04s;
}

.dash-lightbox__col--tools {
  min-width: 0;
  opacity: 0;
  transform: translateX(14px);
  transition:
    opacity 0.34s ease 0.08s,
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.08s;
}

.dash-lightbox--visible .dash-lightbox__col--visual,
.dash-lightbox--visible .dash-lightbox__col--tools {
  opacity: 1;
  transform: none;
}

.dash-lightbox__img-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: linear-gradient(180deg, var(--surface-inset) 0%, var(--surface-muted) 100%);
  border-radius: 14px;
  padding: 0.5rem;
  margin-bottom: 0.65rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* как у .work-busy: display:flex иначе перебивает нативное [hidden] */
#gen-lightbox-gen-busy[hidden],
.dash-lightbox-gen-busy--on-image[hidden] {
  display: none !important;
}

.dash-lightbox-gen-busy--on-image {
  position: absolute;
  inset: 0.5rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0;
  padding: 1rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.9);
}

.dash-lightbox-gen-busy--on-image .dash-lightbox-gen-busy__text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text);
  max-width: 16rem;
}

.dash-lightbox--generating .dash-lightbox__tools-stack .dash-lightbox__action-btn:disabled {
  opacity: 0.55;
}

.dash-lightbox--generating .dash-lightbox__backdrop,
.dash-lightbox--generating .dash-lightbox__close {
  pointer-events: auto;
  cursor: pointer;
}

/* Фоновая генерация после закрытия попапа */
.dash-gen-bg-toast {
  position: fixed;
  right: 1rem;
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  z-index: 210;
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.06),
    0 18px 40px rgba(15, 23, 42, 0.14);
}

.dash-gen-bg-toast[hidden] {
  display: none !important;
}

.dash-gen-bg-toast__inner {
  padding: 0.75rem 0.85rem;
}

.dash-gen-bg-toast__row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.dash-gen-bg-toast__spinner {
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.dash-gen-bg-toast__spinner[hidden] {
  display: none !important;
}

.dash-gen-bg-toast__text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text);
}

.dash-gen-bg-toast__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
  justify-content: flex-end;
}

.dash-gen-bg-toast__actions[hidden] {
  display: none !important;
}

.recent-cards-root {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 0.65rem;
  align-items: start;
  max-height: min(56vh, 520px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.2rem;
}

@media (min-width: 520px) {
  .recent-cards-root {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  }
}

.recent-card-bundle {
  min-width: 0;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
}

.recent-card-bundle__meta {
  margin: 0 0 0.3rem;
  font-size: 0.62rem;
  color: var(--muted);
  line-height: 1.25;
}

.recent-card-bundle__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.35rem;
}

.recent-card-bundle__slides--primary {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.recent-card-bundle__more {
  flex: 0 0 auto;
  align-self: center;
  white-space: nowrap;
  font-size: 0.68rem;
  padding: 0.25rem 0.45rem;
}

.recent-extras-dialog {
  max-width: min(92vw, 22rem);
  width: 100%;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  background: var(--panel, #fff);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.recent-extras-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.recent-extras-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.recent-extras-dialog__title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.recent-extras-dialog__close {
  border: none;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.1rem 0.35rem;
  cursor: pointer;
  color: var(--muted);
  border-radius: 6px;
}

.recent-extras-dialog__close:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.06);
}

.recent-extras-dialog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.25rem, 1fr));
  gap: 0.5rem;
  padding: 0.65rem 0.75rem 0.85rem;
  max-height: min(52vh, 360px);
  overflow-y: auto;
}

.recent-extras-dialog__cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
}

.recent-extras-dialog__thumb {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.recent-extras-dialog__thumb:hover {
  border-color: rgba(15, 23, 42, 0.28);
}

.recent-extras-dialog__thumb img {
  aspect-ratio: 3 / 4;
  width: 100%;
  object-fit: cover;
  display: block;
}

.recent-extras-dialog__cap {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.2rem 0.25rem 0.35rem;
  line-height: 1.2;
  text-align: center;
}

/* ——— Пополнение баланса (Robokassa) ——— */
.credits-pill--balance {
  border: none;
  cursor: pointer;
  font: inherit;
  gap: 0.5rem;
}
.credits-pill--balance:hover {
  box-shadow: 0 2px 12px rgba(5, 150, 105, 0.2);
}
.credits-pill--balance:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.credits-pill__balance-text {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.credits-pill__balance-val {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mp-balance-dialog {
  width: min(96vw, 920px);
  max-height: min(92vh, 900px);
  padding: 0;
  border: none;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
}
.mp-balance-dialog::backdrop {
  background: rgba(15, 23, 42, 0.48);
}
.mp-balance-dialog__panel {
  max-height: min(92vh, 900px);
  overflow-y: auto;
  padding: 1.15rem 1.25rem 1.35rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-md);
}
.mp-balance-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.mp-balance-dialog__title {
  margin: 0.15rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.mp-balance-dialog__eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.mp-balance-dialog__lead {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
}
.mp-balance-dialog__tariff-note {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
}
.mp-balance-dialog__close {
  flex-shrink: 0;
  border: none;
  background: var(--surface-muted);
  font-size: 1.35rem;
  line-height: 1;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted);
}
.mp-balance-dialog__close:hover {
  color: var(--text);
  background: var(--surface-inset);
}
.mp-balance-dialog__rows {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.mp-balance-dialog__row {
  display: grid;
  gap: 0.75rem;
}
.mp-balance-dialog__row--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.mp-balance-dialog__row--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 66%;
  margin: 0 auto;
  width: 100%;
}
@media (max-width: 800px) {
  .mp-balance-dialog__row--3 {
    grid-template-columns: 1fr;
  }
  .mp-balance-dialog__row--2 {
    grid-template-columns: 1fr;
    max-width: none;
  }
}
.mp-balance-dialog__offline {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: var(--surface-muted);
  border: 1px dashed var(--border);
}
.mp-balance-dialog__code {
  font-size: 0.78em;
  word-break: break-all;
}

.mp-pack-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1rem 1rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.mp-pack-card--featured {
  border-color: rgba(5, 150, 105, 0.45);
  box-shadow: 0 6px 22px rgba(5, 150, 105, 0.12);
}
.mp-pack-card__badge {
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.14);
  color: var(--accent2);
  margin-bottom: 0.45rem;
}
.mp-pack-card__badge--warm {
  background: rgba(234, 88, 12, 0.12);
  color: #c2410c;
}
.mp-pack-card__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.mp-pack-card__subtitle {
  margin: 0.2rem 0 0.65rem;
  font-size: 0.8rem;
  line-height: 1.35;
}
.mp-pack-card__price {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.mp-pack-card__credits {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent2);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.mp-pack-card__credits-icon {
  font-size: 1rem;
}
.mp-pack-card__enough {
  flex: 1;
  margin-bottom: 0.85rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: var(--surface-muted);
  font-size: 0.78rem;
}
.mp-pack-card__enough-title {
  margin: 0 0 0.35rem;
  font-weight: 700;
  color: var(--text);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mp-pack-card__enough-list {
  margin: 0;
  padding-left: 1rem;
  color: var(--muted);
  line-height: 1.45;
}
.mp-pack-card__buy {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: none;
  font: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  background: #0f172a;
  color: #fff;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.mp-pack-card__buy:hover:not(:disabled) {
  filter: brightness(1.08);
}
.mp-pack-card__buy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.mp-pack-card__buy--featured {
  background: linear-gradient(135deg, #a3e635, #84cc16);
  color: #0f172a;
  box-shadow: 0 4px 16px rgba(132, 204, 22, 0.35);
}
.mp-pack-card__buy--featured:hover:not(:disabled) {
  filter: brightness(1.05);
}

.recent-card-bundle__slides {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.75rem, 1fr));
  gap: 0.3rem;
  align-items: start;
}

.recent-card-bundle__slides--primary {
  grid-template-columns: 1fr;
  gap: 0;
}

.recent-card-bundle__slide {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.15rem;
}

.recent-card-bundle__slide--cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  max-height: min(52vh, 360px);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.1);
  border: 1px solid rgba(15, 23, 42, 0.1);
}

/* Миниатюры: превью на весь блок, кнопки поверх */
.recent-cards-root .recent-gen-card.recent-gen-card--tile {
  position: relative;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  gap: 0;
  text-align: left;
}

.recent-cards-root .recent-gen-card--cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.recent-cards-root .recent-gen-card--tile:hover {
  box-shadow: none;
  border: none;
}

.recent-cards-root .recent-gen-thumb {
  aspect-ratio: 3 / 4;
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.recent-cards-root .recent-card-bundle__slide--cover .recent-gen-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
  border-radius: 0;
  border: none;
}

.recent-cards-root .recent-gen-thumb img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.recent-cards-root .recent-gen-card__kind {
  position: absolute;
  bottom: 0.45rem;
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  margin: 0;
  padding: 0.14rem 0.35rem;
  max-width: calc(100% - 5.5rem);
  font-size: 0.55rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #fff;
  background: rgba(15, 23, 42, 0.75);
  border-radius: 6px;
  pointer-events: none;
}

.recent-gen-dl--on-thumb {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 4;
  margin: 0;
  width: 2.15rem;
  height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 11px;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  text-decoration: none;
  color: var(--text);
}

.recent-gen-dl--on-thumb:hover {
  background: #fff;
  border-color: rgba(13, 148, 136, 0.35);
}

.recent-card-bundle__more--on-thumb {
  position: absolute;
  bottom: 0.45rem;
  right: 0.45rem;
  z-index: 4;
  margin: 0;
  padding: 0.28rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

.recent-card-bundle__more--on-thumb:hover {
  border-color: rgba(13, 148, 136, 0.35);
}

.recent-cards-root .recent-card-bundle__slide:not(.recent-card-bundle__slide--cover) .recent-gen-dl {
  align-self: center;
  margin-top: 0.05rem;
  padding: 0.15rem 0.4rem;
  font-size: 0.7rem;
  line-height: 1;
  min-height: 0;
}

.recent-gen-card--tile {
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.35rem 0.45rem;
  min-width: 5.5rem;
}

.recent-gen-card__kind {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
  max-width: 5.5rem;
  text-align: center;
}

.dash-lightbox-card-strip-wrap {
  margin-bottom: 0.55rem;
}

.dash-lightbox-card-strip-label {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
}

.dash-lightbox-card-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: stretch;
}

.dash-lightbox-card-thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 76px;
  padding: 0;
  margin: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--surface-muted);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dash-lightbox-card-thumb:hover {
  border-color: rgba(13, 148, 136, 0.35);
}

.dash-lightbox-card-thumb.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.2);
}

.dash-lightbox-card-thumb img {
  display: block;
  width: 100%;
  height: 64px;
  object-fit: cover;
}

.dash-lightbox-card-thumb__cap {
  display: block;
  font-size: 0.62rem;
  line-height: 1.2;
  padding: 0.2rem 0.25rem;
  text-align: center;
  color: var(--muted);
  background: var(--card);
}

.dash-lightbox__actions.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dash-lightbox__actions .btn {
  transition: transform 0.16s ease, box-shadow 0.2s ease;
}

.dash-lightbox__actions .btn:hover {
  transform: translateY(-2px);
}

.dash-lightbox__actions {
  margin-bottom: 0.55rem;
}

.dash-lightbox__feedback {
  margin-bottom: 0.45rem;
  padding: 0.45rem 0;
}

.dash-lightbox__err {
  margin: 0 0 0.45rem;
}

.dash-lightbox__status {
  font-size: 0.8rem;
  line-height: 1.45;
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 11px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--text);
}

.dash-lightbox__status--error {
  background: rgba(220, 38, 38, 0.07);
  border-color: rgba(220, 38, 38, 0.22);
  color: var(--err);
}

.dash-lightbox__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 5;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.dash-lightbox__close:hover {
  background: var(--surface-muted);
  border-color: rgba(13, 148, 136, 0.35);
}

.dash-lightbox__close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.dash-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: min(58vh, 560px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
}

@media (max-width: 760px) {
  .dash-lightbox__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .dash-lightbox__col--tools {
    max-height: min(48vh, 420px);
    overflow-y: auto;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
  }

  .dash-lightbox__img {
    max-height: min(42vh, 400px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dash-lightbox__backdrop,
  .dash-lightbox__panel,
  .dash-lightbox__col--visual,
  .dash-lightbox__col--tools {
    transition: none !important;
  }

  .dash-lightbox--visible .dash-lightbox__backdrop {
    opacity: 1;
  }

  .dash-lightbox--visible .dash-lightbox__panel {
    opacity: 1;
    transform: none;
  }

  .dash-lightbox--visible .dash-lightbox__col--visual,
  .dash-lightbox--visible .dash-lightbox__col--tools {
    opacity: 1;
    transform: none;
  }

  .dash-batch-progress__fill {
    transition: none;
  }

  .dash-lightbox__action-btn,
  .dash-lightbox__actions .btn,
  .dash-lightbox__chip-btn {
    transition: none;
  }

  .dash-lightbox__action-btn:hover:not(:disabled),
  .dash-lightbox__actions .btn:hover {
    transform: none;
  }
}

@media (max-width: 960px) {
  .dash-layout {
    grid-template-columns: 1fr;
  }
  .dash-preview-viewport {
    grid-template-rows: minmax(160px, min(40vh, 300px));
  }
  .dash-slide-strip__item {
    flex-shrink: 0;
    width: 88px;
  }
  .dash-preview-result__figure {
    max-height: min(40vh, 320px);
  }
  .dash-preview-result__img {
    max-height: min(40vh, 320px);
  }
}

.dash-err-line {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
}

.dash-recent-card {
  flex-shrink: 0;
  padding: 0.55rem 0.65rem;
  position: relative;
  z-index: 1;
}

.dash-recent-heading {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.recent-gen-grid--dock {
  display: flex;
  flex-direction: row;
  gap: 0.45rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.15rem 0 0.35rem;
  margin: 0;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.recent-gen-grid--dock > li {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  scroll-snap-align: start;
  width: 76px;
}

.recent-gen-card--dock {
  padding: 0.35rem;
}

.recent-gen-card--dock .recent-gen-thumb {
  aspect-ratio: 1;
}

.recent-gen-card--dock .recent-gen-time {
  font-size: 0.65rem;
  text-align: center;
  line-height: 1.2;
}

.recent-gen-grid--dock .recent-gen-dl {
  margin-top: 0;
  padding: 0.2rem 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

.box--dev--compact {
  padding: 0.45rem 0.65rem;
  font-size: 0.8rem;
}

.box--dev--compact .out {
  max-height: 72px;
}

.box--dev {
  opacity: 0.92;
}

.box--dev > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  list-style: none;
}

.box--dev > summary::-webkit-details-marker {
  display: none;
}

.box--dev[open] > summary {
  margin-bottom: 0.75rem;
}

.btn:focus-visible,
.dash-drop:focus-within {
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .dash .mp-animate-in,
  .credits-pill--bump {
    animation: none !important;
  }
  .dash .wizard-step,
  .dash .btn-dash,
  .dash .dash-drop,
  .dash .credits-pill {
    transition: none !important;
  }
}

/* Расширенные настройки: категория и подача (референс — светлые карточки, миниатюры слева) */
.dash-display-settings {
  margin-top: 0.85rem;
  border-radius: 20px;
  background: linear-gradient(165deg, #eef2f7 0%, #f7f9fc 40%, #ffffff 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 12px 40px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.35);
  overflow: hidden;
}

.dash-display-settings__inner {
  padding: 1rem 1rem 1.1rem;
}

.dash-display-settings__head {
  margin-bottom: 0.85rem;
}

.dash-display-settings__title {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: #64748b;
}

.dash-display-settings__hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #64748b;
}

.dash-cat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  margin: 0 0 1.1rem;
  padding: 0;
}

@media (min-width: 520px) {
  .dash-cat-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.dash-cat-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.75rem;
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  cursor: pointer;
  font: inherit;
  color: inherit;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition:
    border-color 0.2s ease,
    box-shadow 0.22s ease,
    transform 0.15s ease,
    background 0.2s ease;
}

.dash-cat-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.dash-cat-item:active {
  transform: translateY(0) scale(0.995);
}

.dash-cat-item--selected {
  border-color: rgba(13, 148, 136, 0.55);
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.95), #ffffff);
  box-shadow:
    0 0 0 2px rgba(13, 148, 136, 0.22),
    0 10px 28px rgba(13, 148, 136, 0.12);
}

.dash-cat-item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.35);
}

.dash-cat-item__media {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  overflow: hidden;
  background: #f1f5f9;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.dash-cat-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dash-cat-item__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.dash-cat-item__title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.dash-cat-item__sub {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
}

.dash-layout-wrap {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
}

.dash-layout-wrap__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  color: #0f172a;
}

.dash-layout-wrap__hint {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #64748b;
}

.dash-layout-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0 0 0.75rem;
  padding: 0;
  max-height: min(40vh, 320px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.dash-layout-list::-webkit-scrollbar {
  width: 5px;
}
.dash-layout-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 6px;
}

.btn-dash-clear-layout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.95rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn-dash-clear-layout:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.dash-layout-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.65rem 0.55rem 0.55rem;
  text-align: left;
  border: 1px solid #e8ecf1;
  border-radius: 18px;
  background: #ffffff;
  cursor: pointer;
  font: inherit;
  color: inherit;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  transition:
    border-color 0.2s ease,
    box-shadow 0.22s ease,
    transform 0.15s ease,
    background 0.2s ease;
}

.dash-layout-card:hover {
  border-color: #d1d9e6;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.09);
  transform: translateY(-1px);
}

.dash-layout-card:active {
  transform: translateY(0);
}

.dash-layout-card--selected {
  border-color: rgba(13, 148, 136, 0.5);
  background: linear-gradient(120deg, rgba(240, 253, 250, 0.65), #ffffff 55%);
  box-shadow:
    0 0 0 2px rgba(13, 148, 136, 0.2),
    0 12px 32px rgba(13, 148, 136, 0.1);
}

.dash-layout-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.35);
}

.dash-layout-card__thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 14px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.dash-layout-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dash-layout-card__text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  padding-right: 0.25rem;
}

.dash-layout-card__title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.dash-layout-card__sub {
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.4;
}

/* Полноэкранный оверлей: план набора слайдов + генерация */

/* —— Дашборд: превью в колонке, лента слайдов —— */
.dash-pane--output .dash-slide-strip--sidebar-off {
  display: none !important;
}

.dash-preview-feedback-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.35rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
}

.dash-preview-feedback-hint {
  font-size: 0.68rem;
  font-weight: 400;
}

.dash-preview-fb-btn {
  min-width: 2.5rem;
  min-height: 2.5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dash-preview-fb-btn:hover {
  transform: scale(1.06);
  border-color: rgba(20, 184, 166, 0.45);
}

.dash-preview-fb-btn.is-active {
  border-color: var(--accent2);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.25);
  background: rgba(20, 184, 166, 0.12);
}

.dash-preview-feedback-inline--tight {
  margin-top: 0.35rem;
  padding: 0;
  border-top: none;
  gap: 0.35rem;
  font-size: 0.76rem;
}

.dash-field--drop-hero .dash-drop {
  min-height: 11.5rem;
  border-radius: 18px;
  border-width: 2px;
  transition: border-color 0.2s ease, box-shadow 0.25s ease;
}

.dash-field--drop-hero .dash-drop:hover,
.dash-field--drop-hero .dash-drop:focus-within {
  border-color: rgba(20, 184, 166, 0.45);
  box-shadow: 0 8px 28px rgba(20, 184, 166, 0.12);
}

.dash-field--drop-hero .dash-drop__icon:empty::before {
  content: '📷';
  font-size: 2.75rem;
  line-height: 1;
  display: block;
  margin-bottom: 0.35rem;
}

.dash-field--drop-hero .dash-drop__hint {
  font-size: 0.92rem;
  max-width: 100%;
}

.dash-field-row--compact {
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.dash-field--inline-select select.dash-select-compact {
  max-width: 7rem;
  font-size: 0.78rem;
  padding: 0.2rem 0.35rem;
  border-radius: 8px;
}

.dash-field--context-compact textarea {
  font-size: 0.82rem;
  min-height: 2.75rem;
}

.btn-dash--xl {
  padding: 0.85rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  border-radius: 12px;
}

.dash-tuning-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem 1.25rem;
  margin: 0 0 1rem;
  padding: 0.75rem 0.65rem;
  border-radius: 14px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
}

.dash-tuning-row__cat {
  flex: 0 0 13.75rem;
  min-width: 11rem;
  max-width: 100%;
}

.dash-category-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  max-height: min(52vh, 440px);
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.dash-category-list .dash-category-card .dash-layout-card__thumb {
  width: 64px;
  height: 64px;
  border-radius: 12px;
}

.dash-category-list .dash-category-card .dash-layout-card__title {
  font-size: 0.82rem;
}

.dash-category-list .dash-category-card .dash-layout-card__sub {
  font-size: 0.7rem;
  line-height: 1.35;
}

.dash-tuning-row__layouts {
  flex: 1 1 220px;
  min-width: 0;
}

.dash-tuning-row__label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.dash-select-compact {
  font-size: 0.8rem;
  padding: 0.28rem 0.45rem;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--card);
}

.dash-select-compact--full {
  width: 100%;
}

.dash-layout-list--row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.45rem;
  max-height: none;
  overflow: visible;
  padding: 0;
}

.btn-dash-clear-layout--text {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
  border: none;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}

.btn-dash-clear-layout--text:hover {
  color: var(--accent);
}

.dash-wizard-screen-head--minimal .dash-wizard-screen-title {
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

/* Заголовок шага 2: класс подписи поля + визуал секции мастера */
.form--dash .dash-field-label--wizard-step2 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.45rem;
}

.dash-wizard-screen-head--minimal .dash-wizard-screen-sub {
  font-size: 0.82rem;
  margin-top: 0.2rem;
}

.dash-prompt-host {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Режимы: в шапке мастера (.dash-wizard-header) —— */
.dash-wizard-modes-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.65rem 0.65rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.06), rgba(59, 130, 246, 0.05));
  border: 1px solid rgba(13, 148, 136, 0.18);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.05);
}

.dash-wizard-modes-bar__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: stretch;
  gap: 0.55rem 0.85rem;
}

/* Модалка: тумблеры столбиком сверху блока */
.dash-fullcard-modes-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  margin: 0 0 0.75rem;
}

.dash-switch {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.55rem 0.6rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.dash-switch:hover {
  border-color: rgba(13, 148, 136, 0.35);
  box-shadow: 0 4px 18px rgba(13, 148, 136, 0.1);
}

.dash-switch--toolbar {
  position: relative;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(100%, 20rem);
}

.dash-wizard-modes-bar__inner .dash-switch--toolbar {
  max-width: min(100%, 19.5rem);
}

/* В шапке мастера — как в попапе: плотная белая подложка и читаемый трек */
.dash-switch--toolbar--wizard {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.dash-switch--toolbar--modal {
  max-width: 100%;
  width: 100%;
  padding: 0.45rem 0.5rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.dash-switch--toolbar .dash-switch__copy {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 0.25rem;
}

.dash-switch--toolbar .dash-switch__ui {
  flex-shrink: 0;
  margin-top: 0.12rem;
}

.dash-switch--toolbar:focus-within {
  outline: 2px solid rgba(13, 148, 136, 0.45);
  outline-offset: 2px;
}

.dash-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.dash-switch--toolbar input {
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dash-switch__ui {
  flex: 0 0 auto;
  width: 3.1rem;
  height: 1.7rem;
  border-radius: 999px;
  background: #94a3b8;
  border: 1px solid rgba(15, 23, 42, 0.14);
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: background 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  margin-top: 0.12rem;
}

.dash-switch__ui::after {
  content: '';
  position: absolute;
  top: 0.18rem;
  left: 0.2rem;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.22);
  transition: transform 0.22s ease;
}

/* :has() + соседний селектор — старые браузеры и явный трек */
.dash-switch input:checked ~ .dash-switch__ui {
  background: linear-gradient(120deg, #0d9488, #14b8a6);
  border-color: rgba(13, 148, 136, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 0 0 2px rgba(13, 148, 136, 0.22);
}

.dash-switch input:checked ~ .dash-switch__ui::after {
  transform: translateX(1.35rem);
}

.dash-switch--accent input:checked ~ .dash-switch__ui {
  background: linear-gradient(120deg, #2563eb, #38bdf8);
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 0 2px rgba(37, 99, 235, 0.2);
}

.dash-switch:has(input:checked) .dash-switch__ui {
  background: linear-gradient(120deg, #0d9488, #14b8a6);
  border-color: rgba(13, 148, 136, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 0 0 2px rgba(13, 148, 136, 0.22);
}

.dash-switch:has(input:checked) .dash-switch__ui::after {
  transform: translateX(1.35rem);
}

.dash-switch--accent:has(input:checked) .dash-switch__ui {
  background: linear-gradient(120deg, #2563eb, #38bdf8);
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 0 2px rgba(37, 99, 235, 0.2);
}

.dash-switch__copy {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.dash-switch__title {
  font-weight: 750;
  font-size: 0.88rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.dash-switch__sub {
  font-size: 0.72rem;
  line-height: 1.35;
}

.dash-manual-review-panel {
  margin: 0 0 1.1rem;
  padding: 1rem 1rem 1.1rem;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 10px 36px rgba(15, 23, 42, 0.07);
  animation: dash-panel-in 0.35s ease;
}

@keyframes dash-panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.dash-manual-review-panel__head {
  margin-bottom: 0.75rem;
}

.dash-manual-review-panel__title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.dash-manual-review-panel__lead {
  margin: 0;
  font-size: 0.78rem;
}

.dash-manual-review-panel__grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dash-manual-review-panel__full {
  margin-bottom: 0;
}

.dash-manual-review-panel--hidden-only {
  margin: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
  animation: none;
}

.dash-manual-review-panel--hidden-only:not([hidden]) {
  min-height: 0;
}

.dash-manual-compact-bar {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.92) 0%, var(--surface-muted) 48%, rgba(20, 184, 166, 0.07) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 10px 32px rgba(15, 23, 42, 0.06);
}

.dash-manual-compact-bar[hidden] {
  display: none !important;
}

.dash-manual-compact-bar__hint {
  margin: 0 0 0.75rem;
  font-size: 0.76rem;
  line-height: 1.4;
}

.dash-manual-compact-bar__fields {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.85rem 1.15rem;
}

.dash-manual-compact-bar__cell {
  flex: 1 1 13.5rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dash-manual-compact-bar__cell--usp {
  flex: 1.4 1 17rem;
}

.dash-manual-compact-bar__cell[hidden] {
  display: none !important;
}

.dash-manual-compact-bar__label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0;
  cursor: pointer;
}

.dash-manual-compact-bar__label-text {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #334155;
}

.dash-manual-compact-bar__tag {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f766e;
  background: rgba(20, 184, 166, 0.14);
  border: 1px solid rgba(20, 184, 166, 0.22);
}

.dash-manual-compact-bar__tag--sub {
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.68rem;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.04);
  border-color: var(--border);
}

.dash-manual-compact-bar__input,
.dash-manual-compact-bar__textarea {
  width: 100%;
  font-size: 0.875rem;
  line-height: 1.45;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: var(--card);
  font-family: inherit;
  box-sizing: border-box;
  color: var(--text);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.dash-manual-compact-bar__input::placeholder,
.dash-manual-compact-bar__textarea::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.dash-manual-compact-bar__input:hover,
.dash-manual-compact-bar__textarea:hover {
  border-color: rgba(13, 148, 136, 0.28);
}

.dash-manual-compact-bar__input:focus,
.dash-manual-compact-bar__textarea:focus {
  outline: none;
  border-color: rgba(13, 148, 136, 0.55);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
  background: #fff;
}

.dash-manual-compact-bar__textarea {
  resize: vertical;
  min-height: 4.25rem;
  max-height: 9rem;
}

.dash-textarea-review {
  width: 100%;
  font-size: 0.8rem;
  line-height: 1.45;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  font-family: inherit;
  resize: vertical;
  min-height: 2.5rem;
}

.dash-textarea-review--prompt {
  min-height: 14rem;
  font-size: 0.76rem;
  line-height: 1.5;
}

.dash-field--dimmed {
  opacity: 0.48;
  pointer-events: none;
}

.dash-batch-review-root {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding-right: 0.25rem;
  margin: 0.5rem 0 0.75rem;
}

.dash-batch-slide-card {
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.92);
}

.dash-batch-slide-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.dash-batch-slide-card__n {
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0d9488;
}

.dash-batch-slide-card--light {
  padding: 0.5rem 0.58rem;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(248, 250, 252, 0.98);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.dash-batch-slide-card__head--minimal {
  justify-content: flex-start;
  margin-bottom: 0.35rem;
}

.dash-batch-slide-card__head--minimal .dash-batch-slide-card__n {
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: #64748b;
}

.dash-field--batch-light {
  margin-bottom: 0.32rem;
}

.dash-field-label--batch-light {
  font-size: 0.62rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dash-input-batch--light {
  padding: 0.3rem 0.42rem;
  font-size: 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  background: #fff;
}

.dash-batch-slide-card__remove--text {
  margin-top: 0.3rem;
  width: auto;
  align-self: flex-start;
  padding: 0.15rem 0;
  border: none;
  background: transparent;
  font-size: 0.7rem;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.dash-batch-slide-card__remove--text:hover {
  color: #0d9488;
}

.dash-batch-slide-card__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.dash-batch-slide-card__preview {
  margin: 0.45rem 0 0;
  font-size: 0.65rem;
  line-height: 1.4;
  max-height: 4.2rem;
  overflow: hidden;
}

.dash-input-batch {
  width: 100%;
  font-size: 0.78rem;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: inherit;
}

.dash-field--batch .dash-field-label {
  font-size: 0.72rem;
  font-weight: 600;
}

.dash-fullcard-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.dash-fullcard-slide-count {
  margin: 0 0 0.65rem;
}

.dash-fullcard-slide-count .dash-field-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
}

/* Второй уровень: согласование поверх лайтбокса */
.dash-batch-approve-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.25rem 0.75rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.dash-batch-approve-overlay[hidden] {
  display: none !important;
  pointer-events: none;
}

.dash-batch-approve-overlay__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  margin: 0;
  padding: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

.dash-batch-approve-overlay__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 1040px);
  max-height: min(88vh, 720px);
  margin-top: 0.25rem;
  padding: 1rem 1.1rem 1.15rem;
  background: var(--card);
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dash-batch-approve-overlay__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.dash-batch-approve-overlay__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dash-batch-approve-overlay__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
  margin-left: auto;
}

.dash-batch-approve-overlay__cost {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  line-height: 1.45;
}

.dash-batch-review-root--grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  max-height: min(58vh, 520px);
  overflow-y: auto;
  padding-right: 0.2rem;
  margin: 0;
}

@media (max-width: 900px) {
  .dash-batch-review-root--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .dash-batch-review-root--grid {
    grid-template-columns: 1fr;
  }
}

.dash-batch-slide-card__remove:not(.dash-batch-slide-card__remove--text) {
  margin-top: 0.5rem;
  width: 100%;
}

.dash-lightbox-batch__actions {
  margin-top: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.dash-lightbox-batch__stop,
.dash-lightbox-batch__resume {
  width: 100%;
}
