:root {
  --bg: #fff8ee;
  --surface: #ffffff;
  --surface-2: #fff0dc;
  --ink: #2a1e12;
  --ink-2: #7a6a58;
  --line: rgba(42, 30, 18, .09);
  --primary: #ff7a1a;
  --pink: #ffc21a;
  --grad: linear-gradient(120deg, #ff7a1a 0%, #ff9e1a 50%, #ffc21a 100%);
  --wa: #25d366;
  --wa-2: #128c7e;
  --max: linear-gradient(135deg, #2f7bff 0%, #8a3dff 100%);
  --shadow: 0 1px 2px rgba(42, 30, 18, .05), 0 12px 32px -12px rgba(170, 90, 10, .2);
  --shadow-lg: 0 30px 60px -20px rgba(170, 90, 10, .32);
  --r: 22px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Unbounded', var(--font);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 500 16px/1.55 var(--font); overflow-x: hidden;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; letter-spacing: -.01em; margin: 0; }
[hidden] { display: none !important; }

/* фоновые пятна */
.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-blobs i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .45; animation: blob 18s ease-in-out infinite alternate; }
.bg-blobs i:nth-child(1) { width: 480px; height: 480px; background: #ffd08a; top: -160px; left: -120px; }
.bg-blobs i:nth-child(2) { width: 420px; height: 420px; background: #ffe58a; top: 30%; right: -160px; animation-delay: -6s; }
.bg-blobs i:nth-child(3) { width: 360px; height: 360px; background: #ffc6a0; bottom: -140px; left: 20%; animation-delay: -12s; opacity: .3; }
@keyframes blob { to { transform: translate(60px, 40px) scale(1.15); } }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: 620px; }
.muted { color: var(--ink-2); }

/* шапка */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  max-width: 1160px; margin: 0 auto; padding: 14px 16px;
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
}
.logo { display: inline-flex; align-items: center; gap: 10px; font: 800 20px/1 var(--display); letter-spacing: -.02em; }
.logo b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--grad); color: #fff; font-size: 17px; box-shadow: 0 8px 20px -6px rgba(255, 122, 26, .7); }
.logo-sm { font-size: 16px; } .logo-sm .logo-mark { width: 28px; height: 28px; font-size: 14px; }
.topbar-link { font-weight: 700; font-size: 14px; padding: 9px 16px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); }

/* кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border-radius: 16px; font-weight: 800; font-size: 16px; line-height: 1.2;
  transition: transform .15s ease, box-shadow .2s ease, filter .2s; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn-lg { padding: 18px 26px; font-size: 17px; border-radius: 18px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 14px 30px -10px rgba(255, 122, 26, .65); }
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 18px 36px -10px rgba(255, 122, 26, .8); }
.btn-primary span { transition: transform .2s; } .btn-primary:hover span { transform: translateX(4px); }
.btn-ghost { background: var(--surface); box-shadow: var(--shadow); }
.btn-share { color: #fff; position: relative; overflow: hidden; }
.btn-share.m-wa { background: linear-gradient(135deg, var(--wa) 0%, var(--wa-2) 100%); box-shadow: 0 14px 30px -10px rgba(37, 211, 102, .7); }
.btn-share.m-max { background: var(--max); box-shadow: 0 14px 30px -10px rgba(80, 80, 255, .7); }
.btn-share::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-100%); animation: shine 2.6s ease-in-out infinite; }
.btn-share.is-busy { opacity: .7; pointer-events: none; }
.btn-icon { display: inline-grid; width: 26px; height: 26px; } .btn-icon svg { width: 100%; height: 100%; }
.btn-reveal { background: linear-gradient(135deg, #ff7a1a, #ffc21a); color: #fff; animation: pulse 1.6s ease-in-out infinite; box-shadow: 0 14px 30px -10px rgba(255, 122, 26, .8); }
@keyframes shine { 60%, 100% { transform: translateX(100%); } }
@keyframes pulse { 50% { transform: scale(1.03); box-shadow: 0 20px 44px -10px rgba(255, 122, 26, .9); } }
.link-btn { display: block; margin: 14px auto 0; color: var(--ink-2); font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--surface-2); color: var(--ink); }
.chip-glass { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.75); color: #17122b; backdrop-filter: blur(8px); }
.chip-btn { transition: background .2s, color .2s; }
.chip-btn.is-active { background: var(--primary); color: #fff; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-size: 14px; font-weight: 700; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 18px; color: var(--ink-2); margin: 14px 0 0; }

/* главная */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 48px 0 32px; }
.hero h1 { font-size: clamp(36px, 5.5vw, 64px); margin-top: 20px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats { display: flex; gap: 28px; margin-top: 32px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font: 800 24px/1.1 var(--display); }
.hero-stats span { color: var(--ink-2); font-size: 14px; }
.hero-feature { position: relative; display: block; border-radius: 32px; background: var(--surface); box-shadow: var(--shadow-lg); overflow: visible; transition: transform .3s; }
.hero-feature:hover { transform: translateY(-4px) rotate(-.5deg); }
.hero-feature-art { aspect-ratio: 4/3; border-radius: 32px 32px 0 0; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--c) 55%, #fff), var(--c)); }
.hero-feature-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-feature-art span { font-size: 140px; filter: drop-shadow(0 20px 30px rgba(0,0,0,.25)); animation: float 4s ease-in-out infinite; }
.hero-feature-body { padding: 22px 24px 26px; }
.hero-feature-body h2 { font-size: 24px; margin-top: 12px; }
.hero-feature-body p { color: var(--ink-2); margin: 8px 0 0; }
.floating { position: absolute; font-size: 38px; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-lg); animation: float 5s ease-in-out infinite; }
.f1 { top: -18px; right: 30px; transform: rotate(10deg); }
.f2 { top: 42%; left: -28px; animation-delay: -1.5s; }
.f3 { bottom: 90px; right: -22px; animation-delay: -3s; }
@keyframes float { 50% { translate: 0 -12px; } }

.section { padding: 36px 0 24px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section h2 { font-size: 28px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-cover { position: relative; aspect-ratio: 16/11; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--c) 50%, #fff), var(--c)); overflow: hidden; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-cover img { transform: scale(1.06); }
.card-emoji { font-size: 84px; filter: drop-shadow(0 12px 18px rgba(0,0,0,.2)); transition: transform .4s; }
.card:hover .card-emoji { transform: scale(1.12) rotate(-6deg); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-size: 17px; font-weight: 700; }
.card-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: auto; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.empty { color: var(--ink-2); }
.empty a { color: var(--primary); text-decoration: underline; }

/* тест */
.screen { display: none; padding: 20px 0 32px; }
.screen.is-active { display: block; animation: rise .45s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.draft-note { margin-top: 8px; padding: 10px 14px; border-radius: 12px; background: #ffe9a8; color: #5a4300; font-weight: 700; font-size: 14px; text-align: center; }

.friend { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 18px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); border: 2px solid color-mix(in srgb, var(--c) 40%, transparent); }
.friend-emoji { font-size: 38px; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: var(--surface-2); flex: none; }
.friend-label { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.friend-title { font: 700 19px/1.2 var(--display); }

.intro-art { aspect-ratio: 16/10; border-radius: 28px; overflow: hidden; display: grid; place-items: center; margin-bottom: 20px; box-shadow: var(--shadow-lg); background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--c) 50%, #fff), var(--c)); }
.intro-art img { width: 100%; height: 100%; object-fit: cover; }
.intro-art span { font-size: 130px; filter: drop-shadow(0 20px 30px rgba(0,0,0,.25)); animation: float 4s ease-in-out infinite; }
.intro-title { font-size: clamp(28px, 6vw, 40px); margin-top: 14px; }
.intro-desc { color: var(--ink-2); margin: 12px 0 0; }
.intro-meta { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 24px; }
.intro-meta span { padding: 8px 12px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); font-size: 14px; font-weight: 700; }

.progress { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.progress-bar { flex: 1; height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width .45s cubic-bezier(.2,.8,.2,1); }
.progress-text { font-weight: 800; font-size: 14px; color: var(--ink-2); min-width: 48px; text-align: right; }
.q-enter { animation: rise .4s cubic-bezier(.2,.8,.2,1); }
.back-btn { font-weight: 700; font-size: 14px; color: var(--ink-2); margin-bottom: 12px; padding: 4px 0; }
.q-image { border-radius: 24px; overflow: hidden; aspect-ratio: 16/10; margin-bottom: 18px; box-shadow: var(--shadow-lg); }
.q-image img { width: 100%; height: 100%; object-fit: cover; }
.q-emoji { font-size: 72px; text-align: center; margin: 4px 0 10px; animation: float 4s ease-in-out infinite; }
.q-text { font-size: clamp(22px, 5vw, 28px); text-align: center; }
.q-hint { text-align: center; color: var(--ink-2); margin: 8px 0 0; }
.answers { display: grid; gap: 12px; margin-top: 24px; }
.answers-grid { grid-template-columns: 1fr 1fr; }
.answers-messenger { grid-template-columns: 1fr 1fr; }
.answer {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 18px 20px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow);
  font-weight: 700; font-size: 17px; border: 2px solid transparent;
  transition: transform .15s, border-color .2s, background .2s; animation: rise .4s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d);
}
.answer:hover { border-color: color-mix(in srgb, var(--c, var(--primary)) 50%, transparent); transform: translateY(-2px); }
.answer:active { transform: scale(.98); }
.answer.is-picked { border-color: var(--c, var(--primary)); background: color-mix(in srgb, var(--c, var(--primary)) 14%, var(--surface)); transform: scale(1.02); }
.answer-emoji { font-size: 28px; flex: none; }
.answers-grid .answer { flex-direction: column; padding: 10px 10px 14px; text-align: center; gap: 10px; }
.answer-img { display: block; width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; }
.answer-img img { width: 100%; height: 100%; object-fit: cover; }
.answers-messenger .answer { flex-direction: column; justify-content: center; padding: 26px 12px; gap: 12px; font-size: 19px; color: #fff; }
.answers-messenger .m-wa { background: linear-gradient(135deg, var(--wa), var(--wa-2)); }
.answers-messenger .m-max { background: var(--max); }
.answers-messenger .answer-icon { width: 54px; height: 54px; }
.answers-messenger .answer-icon svg { width: 100%; height: 100%; }
.answers-messenger .answer.is-picked { border-color: #fff; box-shadow: 0 0 0 4px var(--c, var(--primary)); }

/* анализ */
.analyze { text-align: center; padding: 30px 0; }
.analyze h2 { font-size: 24px; margin-top: 30px; }
.orb { position: relative; width: 150px; height: 150px; margin: 0 auto; display: grid; place-items: center; }
.orb span { position: absolute; inset: 0; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--primary); border-right-color: var(--pink); animation: spin 1.2s linear infinite; }
.orb span:nth-child(2) { inset: 16px; animation-duration: 1.8s; animation-direction: reverse; border-top-color: #ffc21a; border-right-color: #2ee6a6; }
.orb span:nth-child(3) { inset: 32px; animation-duration: 2.4s; }
.orb b { font-size: 46px; animation: float 2s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.analyze-steps { list-style: none; padding: 0; margin: 22px auto 0; max-width: 320px; text-align: left; display: grid; gap: 10px; }
.analyze-steps li { display: flex; gap: 10px; align-items: center; color: var(--ink-2); font-weight: 600; opacity: .45; transition: opacity .3s; }
.analyze-steps li::before { content: ''; width: 20px; height: 20px; border-radius: 50%; border: 2px solid currentColor; flex: none; }
.analyze-steps li.doing { opacity: 1; color: var(--ink); }
.analyze-steps li.doing::before { border-color: var(--primary); border-top-color: transparent; animation: spin .8s linear infinite; }
.analyze-steps li.done { opacity: 1; color: var(--ink); }
.analyze-steps li.done::before { content: '✓'; display: grid; place-items: center; background: #2ecc71; border-color: #2ecc71; color: #fff; font-size: 12px; font-weight: 800; }

/* поделиться */
[data-screen="share"] { text-align: center; }
.ready-badge { display: inline-block; padding: 8px 16px; border-radius: 999px; background: #e7fbef; color: #127a3d; font-weight: 800; font-size: 15px; }
.locked { position: relative; width: 170px; height: 170px; margin: 22px auto 18px; }
.locked-blur { position: absolute; inset: 0; border-radius: 40px; display: grid; place-items: center; background: var(--grad); box-shadow: var(--shadow-lg); overflow: hidden; }
.locked-blur span { font: 800 90px/1 var(--display); color: rgba(255,255,255,.9); filter: blur(6px); }
.locked-lock { position: absolute; right: -10px; bottom: -10px; width: 64px; height: 64px; display: grid; place-items: center; font-size: 32px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-lg); animation: wiggle 2.4s ease-in-out infinite; }
.locked.is-ready .locked-lock { animation: none; }
.locked.is-ready .locked-lock::before { content: '🔓'; } .locked.is-ready .locked-lock { font-size: 0; } .locked.is-ready .locked-lock::before { font-size: 32px; }
.locked.is-ready .locked-blur span { filter: blur(2px); }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-12deg); } 90% { transform: rotate(10deg); } 95% { transform: rotate(-6deg); } }
.share-title { font-size: clamp(20px, 4.6vw, 24px); }
.share-title b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.share-hint { color: var(--ink-2); margin: 10px 0 22px; }
.share-count { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 8px; }
.share-count b { font-family: var(--display); } .share-count i { font-style: normal; }
.scale { position: relative; height: 22px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-bottom: 22px; box-shadow: inset 0 2px 4px rgba(0,0,0,.06); }
.scale-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, #2ee6a6, #25d366, #ffd23f); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.scale-fill::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.25) 0 10px, transparent 10px 20px); animation: stripes 1s linear infinite; }
@keyframes stripes { to { background-position: 28px 0; } }
.scale-steps { position: absolute; inset: 0; display: flex; }
.scale-steps i { flex: 1; border-right: 2px solid var(--bg); }
.scale-steps i:last-child { border-right: 0; }

/* результат */
.result-card { position: relative; text-align: center; padding: 26px 22px 28px; border-radius: 30px; background: var(--surface); box-shadow: var(--shadow-lg); margin-bottom: 18px; overflow: hidden; }
.result-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 180px; background: radial-gradient(circle at 50% 0, color-mix(in srgb, var(--c) 40%, transparent), transparent 70%); pointer-events: none; }
.result-label { position: relative; display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--grad); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.result-art { position: relative; margin: 20px auto 12px; }
.result-art span { font-size: 120px; display: inline-block; animation: pop .7s cubic-bezier(.2,1.6,.4,1) both, float 4s 1s ease-in-out infinite; }
.result-art img { border-radius: 24px; width: 100%; max-height: 420px; object-fit: cover; animation: pop .7s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
.result-title { position: relative; font-size: clamp(30px, 7vw, 44px); }
.result-text { text-align: left; color: var(--ink); margin-top: 16px; font-size: 17px; }
.result-text p { margin: 0 0 12px; }
[data-screen="result"] .btn + .btn { margin-top: 12px; }

.more h2 { font-size: 22px; margin-bottom: 16px; }
.notfound { text-align: center; padding: 60px 0 20px; }
.notfound-emoji { font-size: 90px; }
.notfound h1 { font-size: 36px; margin-top: 10px; }
.notfound .btn { margin-top: 24px; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 140%); max-width: calc(100% - 32px); padding: 14px 18px; border-radius: 16px; background: #17122b; color: #fff; font-weight: 700; box-shadow: var(--shadow-lg); transition: transform .35s cubic-bezier(.2,.8,.2,1); text-align: center; }
.toast.is-on { transform: translate(-50%, 0); }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }

.footer { max-width: 1160px; margin: 40px auto 0; padding: 30px 16px 40px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
.footer p { margin: 10px 0 0; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 20px; }
  .floating { display: none; }
}
@media (max-width: 520px) {
  .grid, .grid-2 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-body { padding: 12px; } .card-body h3 { font-size: 14px; } .card-emoji { font-size: 56px; }
  .card-meta { font-size: 12px; gap: 8px; }
  .chip-glass { font-size: 11px; padding: 4px 8px; left: 8px; top: 8px; }
  .hero-cta .btn { flex: 1; }
  .answer { padding: 16px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.footer-stats { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-stats span { padding: 6px 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-weight: 600; color: var(--ink); }

/* реклама на экране результата */
.ad { display: block; margin: 0 0 18px; padding: 14px; border-radius: 26px; background: var(--surface); box-shadow: var(--shadow-lg); text-align: center; }
.ad-label { display: block; text-align: left; font-size: 11px; color: var(--ink-2); font-weight: 600; margin: 0 4px 10px; }
.ad-title { display: block; font: 700 18px/1.3 var(--display); margin: 0 4px 12px; }
.ad-video { display: block; width: 100%; max-width: 360px; aspect-ratio: 9/16; margin: 0 auto 14px; border-radius: 18px; object-fit: cover; background: #1a1230; }
.ad-btn { pointer-events: none; }
