/* ================= Interiora ================= */
:root {
  --ink: #1c1530;
  --ink-2: #4a4360;
  --muted: #8a8399;
  --cream: #fbf7f2;
  --tint: #f5efe7;
  --surface: #ffffff;
  --line: #ece4da;
  --coral: #ff7a59;
  --gold: #f6b968;
  --violet: #a87bff;
  --grad: linear-gradient(120deg, #ff7a59 0%, #f6b968 50%, #a87bff 100%);
  --shadow-sm: 0 2px 8px rgba(28, 21, 48, .06);
  --shadow: 0 18px 50px -18px rgba(28, 21, 48, .25);
  --shadow-lg: 0 40px 80px -30px rgba(28, 21, 48, .35);
  --r: 20px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --glass: rgba(255, 255, 255, .8);
  --deep: #1c1530;          /* тёмные плашки: кнопки, бегущая строка, toast */
  --warm-soft: #fff5f0;
  --line-strong: #e0d6ca;
  --blob-opacity: .45;
  color-scheme: light;
}
/* ================= Тёмная тема ================= */
:root[data-theme="dark"] {
  --ink: #f2edf9;
  --ink-2: #c7bfd6;
  --muted: #8e86a2;
  --cream: #0f0b1a;
  --tint: #171127;
  --surface: #1a1430;
  --line: #2c2443;
  --line-strong: #3a3157;
  --glass: rgba(26, 20, 48, .78);
  --deep: #2d2350;
  --warm-soft: #2a1a26;
  --blob-opacity: .16;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .35);
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, .7);
  --shadow-lg: 0 40px 80px -30px rgba(0, 0, 0, .8);
  color-scheme: dark;
}
:root[data-theme="dark"] .aidemo { background: #2a2214; border-color: #4a3b1c; color: #f0d28f; }
:root[data-theme="dark"] .nav.scrolled { background: rgba(15, 11, 26, .82); }
:root[data-theme="dark"] .auth-bg i { opacity: .22; }
:root[data-theme="dark"] .code-boxes input.filled { border-color: #7a4a3a; }
:root[data-theme="dark"] .feature-img, :root[data-theme="dark"] .style-card img { filter: brightness(.9); }
input, textarea, select { color: inherit; }

/* Смена темы: круг расходится от кнопки (View Transitions API) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }
/* Запасной вариант для браузеров без View Transitions — плавный переход цветов */
html.theme-fade, html.theme-fade * { transition: background-color .5s ease, color .5s ease, border-color .5s ease, box-shadow .5s ease !important; }

.theme-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(8px); cursor: pointer; display: grid; place-items: center; overflow: hidden; color: var(--ink); transition: transform .35s var(--ease), box-shadow .35s; }
.theme-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.theme-btn svg { position: absolute; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .6s var(--ease), opacity .4s; }
.theme-btn .i-sun { color: #f2a23a; }
.theme-btn .i-moon { color: #a87bff; transform: translateY(30px) rotate(-90deg); opacity: 0; }
:root[data-theme="dark"] .theme-btn .i-sun { transform: translateY(-30px) rotate(90deg); opacity: 0; }
:root[data-theme="dark"] .theme-btn .i-moon { transform: none; opacity: 1; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body.is-loading, body.no-scroll { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hide-sm { margin-left: 4px; }

/* ================= Splash ================= */
#splash {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: radial-gradient(1200px 800px at 50% 40%, #2a1f47 0%, #140f24 60%, #0d0a18 100%);
  color: #fff;
  transition: clip-path 1s var(--ease), opacity .6s;
  clip-path: inset(0 0 0 0);
}
#splash.out { clip-path: inset(0 0 100% 0); }
.splash-glow {
  position: absolute; width: 520px; height: 520px; border-radius: 50%;
  background: var(--grad); filter: blur(120px); opacity: .35;
  animation: glow 3s ease-in-out infinite alternate;
}
@keyframes glow { to { transform: scale(1.2) rotate(40deg); opacity: .5; } }
.splash-inner { position: relative; text-align: center; }
.splash-mark { width: 110px; height: 110px; margin: 0 auto 18px; overflow: visible; }
.splash-mark .draw {
  fill: none; stroke: url(#sg); stroke-width: 6; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 320; stroke-dashoffset: 320;
  animation: draw 1.2s var(--ease) forwards .1s;
}
.splash-mark .d2 { animation-delay: .6s; }
.splash-mark .spark { fill: #f6b968; transform-origin: 92px 22px; transform: scale(0); animation: pop .5s var(--ease) forwards 1.1s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { 60% { transform: scale(1.6); } to { transform: scale(1); } }
.splash-word { font-family: var(--serif); font-size: 56px; font-weight: 700; letter-spacing: .02em; display: flex; justify-content: center; }
.splash-word span { display: inline-block; opacity: 0; transform: translateY(30px) rotate(8deg); animation: letter .7s var(--ease) forwards; }
.splash-word span:nth-child(1) { animation-delay: .7s } .splash-word span:nth-child(2) { animation-delay: .76s }
.splash-word span:nth-child(3) { animation-delay: .82s } .splash-word span:nth-child(4) { animation-delay: .88s }
.splash-word span:nth-child(5) { animation-delay: .94s } .splash-word span:nth-child(6) { animation-delay: 1s }
.splash-word span:nth-child(7) { animation-delay: 1.06s } .splash-word span:nth-child(8) { animation-delay: 1.12s }
.splash-word span:nth-child(9) { animation-delay: 1.18s }
@keyframes letter { to { opacity: 1; transform: none; } }
.splash-sub { margin-top: 6px; letter-spacing: .35em; text-transform: uppercase; font-size: 12px; color: rgba(255,255,255,.6); opacity: 0; animation: fade .8s forwards 1.4s; }
@keyframes fade { to { opacity: 1; } }
.splash-bar { width: 160px; height: 3px; margin: 26px auto 0; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.splash-bar i { display: block; height: 100%; width: 0; background: var(--grad); animation: bar 2s var(--ease) forwards .3s; }
@keyframes bar { to { width: 100%; } }

/* ================= Buttons ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; cursor: pointer; text-decoration: none; font-weight: 700;
  border-radius: 999px; padding: 12px 22px; font-size: 15px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-primary { color: #fff; background: var(--grad); background-size: 200% 100%; box-shadow: 0 10px 30px -10px rgba(255, 122, 89, .7); }
.btn-primary:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 16px 40px -12px rgba(168, 123, 255, .7); }
.btn-ghost { background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.btn-ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); background: var(--surface); }
.btn-light { background: #fff; color: #1c1530; box-shadow: 0 12px 30px -12px rgba(0,0,0,.45); }
.btn-light:hover { transform: translateY(-2px) scale(1.02); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 16px; transition: transform .3s var(--ease); }
.icon-btn:hover { transform: rotate(90deg); }

/* ================= Nav ================= */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; transition: background .3s, box-shadow .3s, padding .3s; padding: 18px 0; }
.nav.scrolled { background: rgba(251, 247, 242, .82); backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 1px 0 var(--line); padding: 10px 0; }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; font-size: 22px; text-decoration: none; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgba(255,122,89,.8); }
.logo-mark svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 5; stroke-linejoin: round; }
.nav-links { display: flex; gap: 26px; margin: 0 auto; }
.nav-links a { text-decoration: none; font-weight: 600; font-size: 14px; color: var(--ink-2); position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--grad); transform: scaleX(0); transition: transform .35s var(--ease); border-radius: 2px; }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.credits-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 14px; font-weight: 600; transition: transform .3s var(--ease); }
.credits-chip:hover { transform: translateY(-1px); }
.coin { width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--grad); color: #fff; display: inline-grid; place-items: center; font-size: 11px; }
.credits-chip.bump { animation: bump .6s var(--ease); }
@keyframes bump { 40% { transform: scale(1.18); } }
.user-menu { position: relative; }
.avatar { width: 32px; height: 32px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; font-size: 14px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 46px; height: 46px; font-size: 18px; }
.user-drop { position: absolute; right: 0; top: calc(100% + 10px); width: 290px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 14px; opacity: 0; transform: translateY(-8px) scale(.98); transform-origin: top right; pointer-events: none; transition: opacity .25s var(--ease), transform .35s var(--ease); z-index: 60; }
.user-drop.open { opacity: 1; transform: none; pointer-events: auto; }
.ud-head { display: flex; align-items: center; gap: 12px; padding: 4px 4px 14px; border-bottom: 1px solid var(--line); }
.ud-who { min-width: 0; text-align: left; }
.ud-name { font-weight: 800; font-size: 15px; }
.ud-email { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================= Hero ================= */
.hero { position: relative; padding: 150px 0 90px; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: var(--blob-opacity); animation: float 14s ease-in-out infinite alternate; pointer-events: none; }
.b1 { width: 520px; height: 520px; background: #ffc2ae; top: -120px; left: -160px; }
.b2 { width: 460px; height: 460px; background: #dccbff; top: 80px; right: -140px; animation-delay: -4s; }
.b3 { width: 380px; height: 380px; background: #ffe2b5; bottom: -160px; left: 40%; animation-delay: -8s; }
@keyframes float { to { transform: translate(60px, 40px) scale(1.12); } }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 60px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink-2); backdrop-filter: blur(8px); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 0 rgba(255,122,89,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255,122,89,0); } 100% { box-shadow: 0 0 0 0 rgba(255,122,89,0); } }
.hero h1 { font-family: var(--serif); font-size: clamp(42px, 5.6vw, 76px); line-height: 1.04; margin: 22px 0 22px; letter-spacing: -.01em; }
.hero h1 em { font-style: italic; display: inline-block; transition: opacity .4s, transform .4s var(--ease); }
.hero h1 em.swap { opacity: 0; transform: translateY(12px); }
.lead { font-size: 18px; line-height: 1.65; color: var(--ink-2); max-width: 540px; margin: 0 0 32px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 44px; }
.hero-stats b { display: block; font-family: var(--serif); font-size: 34px; }
.hero-stats span { font-size: 13px; color: var(--muted); font-weight: 600; }

.hero-visual { position: relative; height: 560px; }
.showcase { position: absolute; inset: 20px 30px 40px 40px; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); transform: rotate(2deg); transition: transform .6s var(--ease); background: #ddd; }
.hero-visual:hover .showcase { transform: rotate(0deg) scale(1.01); }
.showcase-imgs img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.12); transition: opacity 1.2s ease, transform 6s ease-out; }
.showcase-imgs img.on { opacity: 1; transform: scale(1); }
.showcase-scan { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,.0) 45%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 55%, transparent 100%); background-size: 100% 200%; animation: scan 4.5s linear infinite; mix-blend-mode: overlay; }
@keyframes scan { from { background-position: 0 -100%; } to { background-position: 0 100%; } }
.showcase-label { position: absolute; left: 20px; bottom: 20px; display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(10px); font-weight: 700; }
.showcase-label .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grad); }
.float-card { position: absolute; background: var(--glass); backdrop-filter: blur(14px); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); animation: bob 6s ease-in-out infinite; }
.fc-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.fc-palette { top: 0; left: -10px; animation-delay: -1s; }
.fc-swatches { display: flex; gap: 6px; }
.fc-swatches i { width: 28px; height: 28px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); transition: background .8s; }
.fc-materials { bottom: 0; right: -10px; animation-delay: -3s; }
.fc-materials ul { list-style: none; margin: 0; padding: 0; font-size: 13px; font-weight: 600; }
.fc-materials li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.fc-materials li i { width: 16px; height: 16px; border-radius: 50%; background: var(--grad); position: relative; }
.fc-materials li i::after { content: "✓"; position: absolute; inset: 0; color: #fff; font-size: 10px; display: grid; place-items: center; font-style: normal; }
.fc-ai { top: 46%; right: -20px; font-weight: 700; font-size: 14px; animation-delay: -2s; }
.sparkle { display: inline-block; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 50% { transform: translateY(-14px); } }

/* ================= Marquee ================= */
.marquee { overflow: hidden; padding: 22px 0; background: var(--deep); color: #fff; transform: rotate(-1.2deg); margin: 0 -20px; }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 40s linear infinite; font-family: var(--serif); font-size: 26px; font-style: italic; }
.marquee-track span { display: inline-flex; align-items: center; gap: 48px; white-space: nowrap; }
.marquee-track span::after { content: "✦"; font-style: normal; font-size: 18px; color: var(--gold); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ================= Sections ================= */
.section { padding: 120px 0; position: relative; }
.section-tint { background: var(--tint); }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 60px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-head h2 { font-family: var(--serif); font-size: clamp(34px, 4vw, 52px); margin: 12px 0 14px; line-height: 1.1; }
.section-head p { color: var(--ink-2); font-size: 17px; line-height: 1.6; margin: 0; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 34px 30px; overflow: hidden; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.step:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.step:nth-child(2) { transition-delay: .08s; } .step:nth-child(3) { transition-delay: .16s; }
.step-num { position: absolute; right: 22px; top: 14px; font-family: var(--serif); font-size: 64px; font-weight: 700; color: var(--tint); }
.step-icon { width: 58px; height: 58px; border-radius: 16px; background: var(--grad); display: grid; place-items: center; margin-bottom: 22px; box-shadow: 0 12px 24px -10px rgba(255,122,89,.8); }
.step-icon svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.step h3 { font-size: 21px; margin: 0 0 10px; }
.step p { color: var(--ink-2); line-height: 1.6; margin: 0; }

/* Style grid */
.style-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.style-card { position: relative; border-radius: var(--r); overflow: hidden; cursor: pointer; aspect-ratio: 3 / 4; background: #ddd; box-shadow: var(--shadow-sm); transition: transform .6s var(--ease), box-shadow .6s var(--ease); border: 0; padding: 0; text-align: left; }
.style-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.style-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,15,36,0) 35%, rgba(20,15,36,.85) 100%); transition: opacity .5s; }
.style-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.style-card:hover img { transform: scale(1.08); }
.sc-info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 20px; color: #fff; }
.sc-info h3 { font-family: var(--serif); font-size: 24px; margin: 0 0 4px; }
.sc-info p { margin: 0; font-size: 13px; line-height: 1.45; color: rgba(255,255,255,.82); }
.sc-palette { display: flex; gap: 5px; margin-top: 12px; }
.sc-palette i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); }
.sc-cta { position: absolute; top: 16px; right: 16px; z-index: 2; padding: 8px 14px; border-radius: 999px; background: var(--glass); color: var(--ink); font-size: 13px; font-weight: 700; opacity: 0; transform: translateY(-8px); transition: all .4s var(--ease); }
.style-card:hover .sc-cta { opacity: 1; transform: none; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(200px, auto); gap: 22px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 30px; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.feature-big { grid-row: span 2; display: flex; flex-direction: column; overflow: hidden; }
.feature-img { flex: 1; min-height: 220px; margin: 24px -30px -30px; background-size: cover; background-position: center; transition: transform 1.2s var(--ease); }
.feature-big:hover .feature-img { transform: scale(1.05); }
.f-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--tint); display: grid; place-items: center; font-size: 22px; margin-bottom: 18px; color: var(--coral); }
.feature h3 { margin: 0 0 8px; font-size: 20px; }
.feature p { margin: 0; color: var(--ink-2); line-height: 1.6; }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
/* Карточка тарифа: при наведении/выборе плавно увеличивается и заливается тёмным цветом */
.plan {
  position: relative; isolation: isolate; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  padding: 34px 30px; display: flex; flex-direction: column;
  transition: transform .55s var(--ease), box-shadow .55s var(--ease), color .45s ease, border-color .45s;
}
.plan::before, .plan::after { content: ""; position: absolute; border-radius: inherit; z-index: -1; opacity: 0; transition: opacity .45s ease; pointer-events: none; }
.plan::before { inset: -2px; background: var(--grad); }          /* градиентная рамка */
.plan::after { inset: 0; background: var(--deep); border-radius: 22px; } /* тёмная заливка */
.plan .plan-per, .plan-price small { transition: opacity .45s; }
:is(.plan:hover, .plans:not(:hover) .plan.selected) { transform: scale(1.06); color: #fff; border-color: transparent; box-shadow: var(--shadow-lg); z-index: 2; }
:is(.plan:hover, .plans:not(:hover) .plan.selected)::before, :is(.plan:hover, .plans:not(:hover) .plan.selected)::after { opacity: 1; }
:is(.plan:hover, .plans:not(:hover) .plan.selected) li::before { background: rgba(255,255,255,.12); color: var(--gold); }
:is(.plan:hover, .plans:not(:hover) .plan.selected) .btn { background: var(--grad); box-shadow: 0 10px 30px -10px rgba(255, 122, 89, .7); }
.plan li::before { transition: background .45s, color .45s; }
.plan .btn { transition: transform .3s var(--ease), box-shadow .3s, background .45s; }
.plan-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
.plan h3 { margin: 0; font-size: 20px; }
.plan-price { font-family: var(--serif); font-size: 48px; font-weight: 700; margin: 16px 0 4px; }
.plan-price small { font-family: var(--sans); font-size: 15px; font-weight: 600; opacity: .6; }
.plan-per { font-size: 14px; opacity: .65; margin-bottom: 22px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 28px; flex: 1; }
.plan li { display: flex; gap: 10px; align-items: center; padding: 7px 0; font-weight: 500; }
.plan li::before { content: "✓"; width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--tint); color: var(--coral); }
.plan .btn { width: 100%; background: var(--deep); color: #fff; box-shadow: none; }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 12px; padding: 0 24px; transition: box-shadow .3s; }
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 0; font-weight: 700; font-size: 17px; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; font-weight: 400; transition: transform .3s var(--ease); color: var(--coral); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 22px; color: var(--ink-2); line-height: 1.65; }

/* CTA band */
.cta-band { padding: 100px 0; text-align: center; color: #fff; background: radial-gradient(800px 400px at 20% 0%, rgba(255,122,89,.55), transparent 60%), radial-gradient(700px 400px at 90% 100%, rgba(168,123,255,.6), transparent 60%), var(--deep); }
.cta-band h2 { font-family: var(--serif); font-size: clamp(32px, 4vw, 50px); margin: 0 0 12px; }
.cta-band p { color: rgba(255,255,255,.75); margin: 0 0 30px; font-size: 17px; }

.footer { padding: 36px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: space-between; }
.footer p { margin: 0; color: var(--muted); font-size: 14px; }

/* ================= Studio ================= */
.studio { position: fixed; inset: 0; z-index: 200; background: var(--cream); display: flex; flex-direction: column; opacity: 0; pointer-events: none; transform: scale(1.02); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.studio.open { opacity: 1; pointer-events: auto; transform: none; }
.studio-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(10px); }
.studio-tag { font-family: var(--sans); font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--tint); color: var(--coral); margin-left: 4px; }
.studio-top-right { display: flex; gap: 10px; align-items: center; }
.studio-body { flex: 1; display: grid; grid-template-columns: 440px 1fr; min-height: 0; }
.studio-form { overflow-y: auto; padding: 24px; border-right: 1px solid var(--line); background: var(--surface); }
.aidemo { background: #fff6e6; border: 1px solid #f4dcae; color: #7a5a1e; padding: 12px 14px; border-radius: 12px; font-size: 13px; line-height: 1.5; margin-bottom: 18px; }
.s-block { margin-bottom: 26px; }
.s-title { display: flex; align-items: center; gap: 10px; font-weight: 800; margin-bottom: 12px; }
.s-title span { width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 13px; display: grid; place-items: center; }
.s-title em { font-style: normal; font-weight: 600; font-size: 12px; color: var(--muted); background: var(--tint); padding: 3px 8px; border-radius: 999px; }
.dropzone { position: relative; display: grid; place-items: center; min-height: 190px; border: 2px dashed var(--line-strong); border-radius: 18px; cursor: pointer; overflow: hidden; transition: border-color .3s, background .3s; background: var(--cream); }
.dropzone:hover, .dropzone.over { border-color: var(--coral); background: var(--warm-soft); }
.dz-empty { text-align: center; padding: 20px; display: grid; gap: 6px; justify-items: center; }
.dz-empty span { font-size: 13px; color: var(--muted); }
.dz-icon { width: 54px; height: 54px; border-radius: 16px; background: var(--grad); display: grid; place-items: center; margin-bottom: 6px; animation: bob 3s ease-in-out infinite; }
.dz-icon svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.dropzone img { width: 100%; height: 240px; object-fit: cover; }
.dz-change { position: absolute; right: 10px; bottom: 10px; padding: 7px 14px; border-radius: 999px; border: 0; background: var(--glass); font-weight: 700; font-size: 13px; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 14px; transition: all .25s var(--ease); }
.chip:hover { border-color: var(--coral); }
.chip.active { background: var(--deep); color: #fff; border-color: var(--deep); }
.mini-styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-style { position: relative; border: 0; padding: 0; border-radius: 14px; overflow: hidden; aspect-ratio: 1; cursor: pointer; background: #ddd; outline: 3px solid transparent; outline-offset: 2px; transition: outline-color .25s, transform .3s var(--ease); }
.mini-style img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.mini-style:hover img { transform: scale(1.1); }
.mini-style span { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 8px 7px; font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.75)); text-align: center; }
.mini-style.active { outline-color: var(--coral); transform: scale(.96); }
.mini-style.active::after { content: "✓"; position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.dims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dims label span { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
input[type="number"], textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font: inherit; background: var(--cream); transition: border-color .25s, box-shadow .25s; resize: vertical; }
input[type="number"]:focus, textarea:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 4px rgba(255,122,89,.15); background: var(--surface); }
.hint { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.s-submit { position: sticky; bottom: -24px; background: linear-gradient(transparent, var(--surface) 30%); padding: 20px 0 24px; margin-bottom: -24px; }
.cost { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.25); }
#generateBtn .sparkle { background: none; color: #fff; -webkit-background-clip: initial; }
.form-error { color: #c0392b; font-weight: 600; font-size: 14px; margin: 10px 0 0; text-align: center; }

.studio-result { overflow-y: auto; padding: 32px; display: flex; flex-direction: column; }
.result-empty { margin: auto; text-align: center; max-width: 440px; }
.re-art { position: relative; height: 230px; margin-bottom: 28px; }
.re-art img { position: absolute; width: 210px; height: 160px; object-fit: cover; border-radius: 18px; box-shadow: var(--shadow); left: 50%; top: 30px; }
.re-art img:nth-child(1) { transform: translateX(-110%) rotate(-10deg); animation: bob 6s ease-in-out infinite; }
.re-art img:nth-child(2) { transform: translateX(-50%); z-index: 2; top: 10px; animation: bob 6s ease-in-out infinite -2s; }
.re-art img:nth-child(3) { transform: translateX(10%) rotate(10deg); animation: bob 6s ease-in-out infinite -4s; }
.result-empty h3 { font-family: var(--serif); font-size: 28px; margin: 0 0 8px; }
.result-empty p { color: var(--muted); margin: 0; }

.result-loading { margin: auto; width: 100%; max-width: 640px; text-align: center; }
.scan-box { position: relative; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4/3; background: #222; }
.scan-box img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.6) brightness(.85); animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 50% { filter: saturate(1.1) brightness(1); } }
.scan-line { position: absolute; left: 0; right: 0; height: 120px; top: -120px; background: linear-gradient(180deg, transparent, rgba(255,122,89,.0) 20%, rgba(246,185,104,.55) 85%, #fff 100%); animation: scanline 2.2s ease-in-out infinite; mix-blend-mode: screen; }
@keyframes scanline { to { top: 100%; } }
.scan-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px); background-size: 40px 40px; }
.loading-text { margin: 24px 0 14px; font-weight: 700; font-size: 18px; min-height: 28px; transition: opacity .3s; }
.progress { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; max-width: 360px; margin: 0 auto; }
.progress i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 6px; transition: width .6s var(--ease); }

.result-done { animation: rise .8s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } }
.result-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.result-head h3 { font-family: var(--serif); font-size: 28px; margin: 0; }
.ba { position: relative; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); user-select: none; touch-action: none; cursor: ew-resize; background: #222; }
.ba > img { width: 100%; display: block; }
.ba-before { position: absolute; inset: 0; width: 50%; overflow: hidden; }
.ba-before img { position: absolute; top: 0; left: 0; height: 100%; width: auto; max-width: none; object-fit: cover; }
.ba-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; background: #fff; transform: translateX(-50%); }
.ba-handle span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 800; box-shadow: var(--shadow); color: var(--coral); }
.ba-tag { position: absolute; top: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(20,15,36,.6); color: #fff; font-size: 12px; font-weight: 700; backdrop-filter: blur(6px); }
.ba-tag-l { left: 14px; } .ba-tag-r { right: 14px; }

.materials { margin-top: 28px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.m-summary { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.m-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.m-stat b { display: block; font-family: var(--serif); font-size: 26px; }
.m-stat span { font-size: 12px; color: var(--muted); font-weight: 600; }
.m-palette { grid-column: 1 / -1; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.m-palette h4, .m-card h4 { margin: 0 0 12px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { text-align: center; font-size: 11px; color: var(--muted); font-weight: 600; cursor: pointer; }
.swatch i { display: block; width: 56px; height: 56px; border-radius: 14px; margin-bottom: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); transition: transform .3s var(--ease); }
.swatch:hover i { transform: translateY(-4px); }
.m-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; opacity: 0; animation: rise .7s var(--ease) forwards; }
.m-card ul { list-style: none; margin: 0; padding: 0; }
.m-card li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.m-card li:first-child { border-top: 0; }
.m-card li b { white-space: nowrap; color: var(--coral); }
.m-note { font-size: 12px; color: var(--muted); margin-top: 6px; }
.m-tip { grid-column: 1 / -1; font-size: 13px; color: var(--muted); background: var(--tint); padding: 12px 16px; border-radius: 12px; }

/* ================= Modals ================= */
.modal { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 20px; background: rgba(20, 15, 36, .55); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .35s; }
.modal.open { opacity: 1; pointer-events: auto; }
.modal-card { position: relative; background: var(--surface); border-radius: 28px; padding: 40px; width: 100%; max-height: calc(100vh - 40px); overflow-y: auto; transform: translateY(30px) scale(.96); transition: transform .5s var(--ease); box-shadow: var(--shadow-lg); }
.modal.open .modal-card { transform: none; }
.modal-close { position: absolute; top: 16px; right: 16px; }
.google-slot:empty { display: none; }
.btn-google { width: 100%; background: #fff; border: 1px solid #dadce0; color: #3c4043; border-radius: 999px; padding: 13px 20px; }
.btn-google:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn-google svg { width: 20px; height: 20px; stroke: none; }
.btn-google:hover svg { transform: none; }
.btn-google small { color: var(--muted); font-weight: 600; }
.pricing-card { max-width: 1020px; background: var(--cream); }
.pm-head { text-align: center; margin-bottom: 34px; }
.pm-emoji { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 24px; animation: spin 6s linear infinite; }
.pm-head h3 { font-family: var(--serif); font-size: 34px; margin: 0 0 6px; }
.pm-head p { margin: 0; color: var(--ink-2); }
.plans-modal { padding: 18px 14px 14px; }

.toast { position: fixed; left: 50%; bottom: 30px; z-index: 600; transform: translate(-50%, 30px); opacity: 0; background: var(--deep); color: #fff; padding: 14px 22px; border-radius: 14px; font-weight: 600; box-shadow: var(--shadow-lg); transition: all .4s var(--ease); pointer-events: none; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ================= Responsive ================= */
@media (max-width: 1080px) {
  .style-grid { grid-template-columns: repeat(3, 1fr); }
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
  .studio-body { grid-template-columns: 380px 1fr; }
}
@media (max-width: 900px) {
  .hero { padding-top: 120px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { height: 440px; }
  .steps, .features { grid-template-columns: 1fr; }
  .feature-big { grid-row: auto; }
  .plans { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
  .style-grid { grid-template-columns: repeat(2, 1fr); }
  .studio-body { grid-template-columns: 1fr; overflow-y: auto; }
  .studio-form { overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
  .studio-result { overflow: visible; min-height: 70vh; }
  .materials, .m-summary { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .container, .nav-inner { padding: 0 16px; }
  .hide-sm { display: none; }
  .nav-actions .btn-primary { display: none; }
  .hero-stats { gap: 24px; }
  .hero-visual { height: 360px; }
  .showcase { inset: 20px 10px 30px 10px; }
  .fc-materials, .fc-ai { display: none; }
  .style-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .sc-info { padding: 14px; } .sc-info h3 { font-size: 18px; } .sc-info p { display: none; }
  .section { padding: 80px 0; }
  .materials { grid-template-columns: 1fr; }
  .modal-card { padding: 30px 20px; }
  .splash-word { font-size: 42px; }
  .studio-result { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ================= Язык и кнопка «+» ================= */
.lang-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.lang-switch button { border: 0; background: none; cursor: pointer; padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--muted); transition: background .3s var(--ease), color .3s; }
.lang-switch button:hover { color: var(--ink); }
.lang-switch button.active { background: var(--deep); color: #fff; }
.credits-box { display: inline-flex; align-items: center; gap: 6px; }
.credits-box .credits-chip { cursor: default; }
.plus-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--grad); background-size: 200% 100%; color: #fff;
  font-size: 22px; font-weight: 600; line-height: 1; display: grid; place-items: center;
  box-shadow: 0 8px 20px -8px rgba(255,122,89,.8);
  transition: transform .35s var(--ease), background-position .4s, box-shadow .35s;
}
.plus-btn:hover { transform: rotate(90deg) scale(1.08); background-position: 100% 0; box-shadow: 0 10px 24px -8px rgba(168,123,255,.8); }
@media (max-width: 560px) { .lang-switch button { padding: 6px 8px; } }

/* ================= Окно входа ================= */
.auth-card { position: relative; max-width: 440px; text-align: center; overflow: hidden; isolation: isolate; padding: 44px 40px 30px; }
.auth-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.auth-bg i { position: absolute; border-radius: 50%; filter: blur(50px); opacity: .55; animation: float 9s ease-in-out infinite alternate; }
.auth-bg .ab1 { width: 240px; height: 240px; background: #ffc2ae; top: -90px; left: -70px; }
.auth-bg .ab2 { width: 220px; height: 220px; background: #dccbff; top: -60px; right: -80px; animation-delay: -3s; }
.auth-bg .ab3 { width: 200px; height: 200px; background: #ffe2b5; bottom: -110px; left: 30%; animation-delay: -6s; }
.auth-mark { position: relative; width: 72px; height: 72px; border-radius: 22px; background: var(--grad); background-size: 200% 200%; display: grid; place-items: center; margin: 0 auto 20px; box-shadow: 0 16px 34px -12px rgba(255,122,89,.8); animation: markIn .8s var(--ease) both, gradShift 6s ease-in-out infinite alternate; }
.auth-mark svg { width: 40px; height: 40px; fill: none; stroke: #fff; stroke-width: 5; stroke-linejoin: round; }
.auth-plus { position: absolute; right: -6px; bottom: -6px; width: 26px; height: 26px; border-radius: 50%; background: var(--surface); color: var(--coral); font-size: 13px; display: grid; place-items: center; box-shadow: var(--shadow-sm); animation: spin 6s linear infinite; }
@keyframes markIn { from { transform: scale(.4) rotate(-20deg); opacity: 0; } }
@keyframes gradShift { to { background-position: 100% 100%; } }
.auth-card h3 { font-family: var(--serif); font-size: 30px; line-height: 1.15; margin: 0 0 10px; }
.auth-sub { color: var(--ink-2); line-height: 1.6; margin: 0 0 24px; font-size: 15px; }
.auth-step { animation: stepIn .55s var(--ease) both; }
.auth-step > * { animation: stepIn .6s var(--ease) both; }
.auth-step > *:nth-child(2) { animation-delay: .06s; } .auth-step > *:nth-child(3) { animation-delay: .12s; } .auth-step > *:nth-child(4) { animation-delay: .18s; }
@keyframes stepIn { from { opacity: 0; transform: translateY(16px); } }
.google-wrap { display: flex; justify-content: center; min-height: 44px; }
.google-slot { display: flex; justify-content: center; }
.google-slot:empty { display: none; }
.btn-google { width: 100%; max-width: 340px; background: #fff; border: 1px solid #dadce0; color: #3c4043; border-radius: 999px; padding: 12px 20px; }
.btn-google:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn-google svg { width: 20px; height: 20px; stroke: none; }
.btn-google:hover svg { transform: none; }
.btn-google small { color: var(--muted); font-weight: 600; }
.auth-or { display: flex; align-items: center; gap: 14px; margin: 22px 0 16px; color: var(--muted); font-size: 13px; font-weight: 600; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-form { display: grid; gap: 12px; }
.auth-form input[type="email"] { width: 100%; padding: 15px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass); font: inherit; font-size: 16px; text-align: center; transition: border-color .25s, box-shadow .25s; }
.auth-form input:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 4px rgba(255,122,89,.15); background: var(--surface); }
.code-boxes { display: flex; justify-content: center; gap: 8px; }
.code-boxes input { width: 48px; height: 58px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass); text-align: center; font: 700 24px var(--sans); color: var(--ink); transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.code-boxes input:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 4px rgba(255,122,89,.15); transform: translateY(-2px); }
.code-boxes input.filled { border-color: #f3b49f; background: var(--warm-soft); }
.code-boxes.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.auth-links { display: flex; justify-content: space-between; margin-top: 14px; gap: 10px; flex-wrap: wrap; }
.link-btn { border: 0; background: none; color: var(--ink-2); font-weight: 700; font-size: 13px; cursor: pointer; padding: 4px 0; }
.link-btn:hover:not(:disabled) { color: var(--coral); }
.link-btn:disabled { color: var(--muted); cursor: default; font-weight: 600; }
.auth-error { color: #c0392b; font-weight: 600; font-size: 14px; margin: 14px 0 0; animation: stepIn .3s var(--ease); }
.btn.loading { pointer-events: none; opacity: .85; }
.btn.loading span::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 10px; vertical-align: -2px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.fine { font-size: 12px; color: var(--muted); line-height: 1.55; margin: 22px 0 0; }
@media (max-width: 420px) { .auth-card { padding: 40px 18px 24px; } .code-boxes input { width: 42px; height: 52px; } }

/* ================= Шапка: настройки, купоны, профиль ================= */
.prefs { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--glass); backdrop-filter: blur(8px); }
.prefs .theme-btn { width: 32px; height: 32px; border: 0; background: none; box-shadow: none; }
.prefs .theme-btn:hover { transform: none; background: var(--tint); }
.prefs .lang-switch { border: 0; background: none; padding: 0; backdrop-filter: none; }
.credits-pill { display: inline-flex; align-items: center; gap: 10px; padding: 3px 3px 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--glass); backdrop-filter: blur(8px); white-space: nowrap; }
.credits-pill.bump { animation: bump .6s var(--ease); }
.cp-balance { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.cp-balance b { font-size: 15px; }
.cp-topup { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 6px 12px 6px 6px; background: var(--grad); background-size: 200% 100%; color: #fff; font-weight: 700; font-size: 13px; cursor: pointer; box-shadow: 0 8px 18px -10px rgba(255,122,89,.9); transition: background-position .4s, transform .3s var(--ease); }
.cp-topup:hover { background-position: 100% 0; transform: translateY(-1px); }
.cp-plus { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.28); display: grid; place-items: center; font-size: 17px; line-height: 1; transition: transform .4s var(--ease); }
.cp-topup:hover .cp-plus { transform: rotate(90deg); }
.user-btn { display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px 3px 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--glass); backdrop-filter: blur(8px); cursor: pointer; font-weight: 700; font-size: 14px; color: var(--ink); transition: box-shadow .3s, transform .3s var(--ease); }
.user-btn:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.user-btn-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: rotate .3s var(--ease); color: var(--muted); }
.user-menu.open .chev { rotate: 180deg; }
.ud-balance { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; padding: 12px 14px; background: var(--tint); border-radius: 14px; text-align: left; }
.ud-label { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.ud-balance b { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.ud-balance .btn { padding: 8px 14px; font-size: 13px; }
.ud-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; background: none; border-radius: 12px; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--ink); text-align: left; transition: background .2s; }
.ud-item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ud-logout { color: #e5484d; }
.ud-logout:hover { background: rgba(229, 72, 77, .1); }
@media (max-width: 1080px) { .user-btn-name { display: none; } .user-btn { padding-right: 8px; } }
@media (max-width: 640px) { .cp-topup-text, .cp-word { display: none; } .cp-topup { padding: 6px; } .credits-pill { gap: 6px; padding-left: 8px; } }
@media (max-width: 420px) { .prefs .lang-switch button { padding: 6px 7px; } .nav-actions { gap: 6px; } }

/* ================= FAQ: плавное раскрытие ================= */
.faq details { overflow: hidden; transition: box-shadow .4s, border-color .4s, background-color .4s; }
.faq details:hover { border-color: var(--line-strong); }
.faq details.is-open { border-color: color-mix(in srgb, var(--coral) 35%, var(--line)); box-shadow: var(--shadow); }
.faq summary { transition: color .3s; }
.faq summary:hover { color: var(--coral); }
.faq summary::after { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--tint); line-height: 1; transition: transform .5s var(--ease), background .4s, color .4s; }
.faq details.is-open summary::after { transform: rotate(135deg); background: var(--grad); color: #fff; }
.faq details[open] summary::after { transform: none; }
.faq details.is-open[open] summary::after { transform: rotate(135deg); }
.faq details p { opacity: 0; transform: translateY(-8px); transition: opacity .45s ease .08s, transform .55s var(--ease) .05s; }
.faq details.is-open p { opacity: 1; transform: none; }

.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--coral); }
.fine a { color: var(--coral); }

.footer-company { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 10px; }
