:root {
  --bg: var(--tg-theme-bg-color, #ffffff);
  --text: var(--tg-theme-text-color, #1b1b1f);
  --hint: var(--tg-theme-hint-color, #8a8a93);
  --card: var(--tg-theme-secondary-bg-color, #f2f2f6);
  --radius: 18px;
  --ok: #22c55e;
  --bad: #ef4444;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

#app {
  --brand: linear-gradient(135deg, #8b5cf6, #e8336d);
  --brand-solid: #a855f7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
#app.theme-love { --brand: linear-gradient(140deg, #ff5a5f, #e5202e 55%, #9b0f1e); --brand-solid: #e5202e; }
#app.theme-friend { --brand: linear-gradient(140deg, #4aa3ff, #1f6fe0 55%, #0f3f9e); --brand-solid: #1f6fe0; }
#app.theme-promo { --brand: linear-gradient(140deg, #ffb703, #fb8500 55%, #e85d04); --brand-solid: #f07800; }
#app.theme-temp { --brand: linear-gradient(140deg, #7c3aed, #c026d3 55%, #f97316); --brand-solid: #a21caf; }
#app.theme-tX { --brand: linear-gradient(140deg, #ff6040, #de2430 55%, #780c24); --brand-solid: #de2430; }
#app.theme-tS { --brand: linear-gradient(140deg, #ffd648, #faa81e 55%, #d67412); --brand-solid: #e08a10; }
#app.theme-tS .btn.primary, #app.theme-tS .hero { text-shadow: 0 1px 3px rgba(120, 60, 0, .55); }
#app.theme-tF { --brand: linear-gradient(140deg, #6ed68c, #20a06e 55%, #0c5c50); --brand-solid: #20a06e; }
#app.theme-tM { --brand: linear-gradient(140deg, #6e96ff, #4054d2 55%, #1e206e); --brand-solid: #4054d2; }

h1, h2, h3, p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

/* --- Hero --- */
.hero {
  background: var(--brand);
  color: #fff;
  text-align: center;
  padding: 34px 22px 30px;
  border-radius: 0 0 30px 30px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,.22) 0 3px, transparent 4px),
    radial-gradient(circle at 85% 30%, rgba(255,255,255,.25) 0 2px, transparent 3px),
    radial-gradient(circle at 75% 80%, rgba(255,255,255,.18) 0 3px, transparent 4px),
    radial-gradient(circle at 25% 75%, rgba(255,255,255,.2) 0 2px, transparent 3px);
  pointer-events: none;
}
.hero.small { padding: 26px 22px 24px; }
.hero h1 { font-size: 24px; font-weight: 800; line-height: 1.22; margin-top: 8px; }
.hero p { margin-top: 10px; opacity: .93; font-size: 15px; }
.hero-emoji { font-size: 46px; line-height: 1; animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }

/* --- Blocks --- */
.block { margin: 16px 16px 0; background: var(--card); border-radius: var(--radius); padding: 16px; }
.block h2 { font-size: 17px; font-weight: 800; margin-bottom: 12px; }
.lead { font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.hint { color: var(--hint); font-size: 13px; }
.center-text { text-align: center; margin: 12px 16px 0; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; padding: 8px 0; }
.steps li::before {
  content: counter(s);
  grid-row: span 2;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.steps b { font-weight: 700; }
.steps span { color: var(--hint); font-size: 13px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--bg); border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 600; }

.checks { list-style: none; margin: 10px 0 0; padding: 0; }
.checks li { padding: 4px 0 4px 26px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 4px; color: var(--brand-solid); font-weight: 800; }
.checks.fix li::before { content: "→"; }
.closing { margin: 12px 0 0; }

.price-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.price-row b { font-size: 18px; font-weight: 800; text-align: right; }

.sample { background: var(--brand); color: #fff; border-radius: 16px; padding: 18px; text-align: center; }
.sample-names { font-weight: 700; }
.sample-pct { font-size: 46px; font-weight: 800; line-height: 1.1; margin: 4px 0; }
.sample-title { font-size: 13px; opacity: .92; }

/* --- Home --- */
.cards { padding: 16px; display: grid; gap: 12px; }
.feature {
  display: flex; align-items: center; gap: 14px; width: 100%;
  border: none; border-radius: var(--radius); padding: 18px 16px;
  color: #fff; text-align: left;
}
.feature.temp { background: linear-gradient(140deg, #7c3aed, #c026d3 60%, #f97316); }
.feature.love { background: linear-gradient(140deg, #ff5a5f, #e5202e 60%, #9b0f1e); }
.feature.friend { background: linear-gradient(140deg, #4aa3ff, #1f6fe0 60%, #0f3f9e); }
.feature.promo { background: linear-gradient(140deg, #ffb703, #fb8500 60%, #e85d04); }
.feature.plain { background: var(--card); color: var(--text); }
.feature-emoji { font-size: 34px; }
.feature-body { flex: 1; display: flex; flex-direction: column; }
.feature-body b { font-size: 17px; font-weight: 800; }
.feature-body small { font-size: 13px; opacity: .9; margin-top: 2px; }
.chev { font-size: 28px; opacity: .8; }

/* --- Buttons --- */
.spacer { flex: 1; min-height: 20px; }
.spacer:last-child { min-height: calc(20px + env(safe-area-inset-bottom)); }
.sticky {
  position: sticky; bottom: 0; margin-top: auto;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, transparent, var(--bg) 28%);
  display: grid; gap: 8px;
}
.btn {
  width: 100%; border: none; border-radius: 15px; padding: 15px 16px;
  font-size: 16px; font-weight: 700; background: var(--card); color: var(--text);
  transition: transform .1s ease, opacity .2s ease;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 8px 22px -10px var(--brand-solid); }
.btn.ghost { background: var(--card); }
.btn.link { background: transparent; color: var(--hint); padding: 10px; font-weight: 600; }
.btn.small { width: auto; padding: 8px 14px; font-size: 14px; border-radius: 10px; background: var(--brand); color: #fff; }
.btn.busy { opacity: .6; pointer-events: none; }
.btn.offer { font-size: 15px; line-height: 1.3; padding: 12px 14px; }
.btn.offer-love { background: linear-gradient(140deg, #ff5a5f, #e5202e 55%, #9b0f1e); color: #fff; box-shadow: 0 8px 22px -10px #e5202e; }
.btn.offer-friend { background: linear-gradient(140deg, #4aa3ff, #1f6fe0 55%, #0f3f9e); color: #fff; box-shadow: 0 8px 22px -10px #1f6fe0; }
.actions { display: grid; gap: 10px; background: transparent; padding: 0; }

/* --- Forms --- */
.form { display: grid; gap: 10px; }
.label { font-weight: 700; font-size: 14px; margin-top: 4px; }
.input {
  width: 100%; border: 2px solid transparent; border-radius: 14px; padding: 14px;
  font: inherit; font-size: 16px; background: var(--bg); color: var(--text); outline: none;
}
.input:focus { border-color: var(--brand-solid); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg-btn { border: 2px solid transparent; border-radius: 14px; padding: 13px; font-size: 15px; font-weight: 700; background: var(--bg); color: var(--text); }
.seg-btn.active { border-color: var(--brand-solid); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--hint); margin-top: 6px; }
.check input { width: 20px; height: 20px; accent-color: var(--brand-solid); flex: none; margin: 0; }
.check a { color: var(--brand-solid); }

/* --- Quiz --- */
.quiz { padding: 18px 16px 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.progress { height: 6px; border-radius: 99px; background: var(--card); overflow: hidden; }
.progress div { height: 100%; background: var(--brand); border-radius: 99px; transition: width .3s ease; }
.quiz-count { color: var(--hint); font-size: 13px; font-weight: 600; }
.question { font-size: 22px; font-weight: 800; line-height: 1.25; }
.options { display: grid; gap: 10px; }
.option {
  border: 2px solid transparent; border-radius: 16px; padding: 16px; text-align: left;
  font-size: 16px; font-weight: 600; background: var(--card); color: var(--text);
  transition: border-color .15s ease, transform .1s ease;
}
.option:active { transform: scale(.99); }
.option.selected { border-color: var(--brand-solid); }
.option.right { border-color: var(--ok); background: rgba(34, 197, 94, .14); }
.option.wrong { border-color: var(--bad); background: rgba(239, 68, 68, .12); }
.swap { align-self: center; width: auto; }
.custom-toggle { color: var(--brand-solid); }
.custom-row { display: grid; gap: 8px; }
.hidden { display: none; }
.date { font-size: 18px; text-align: center; }

/* --- Result --- */
.result-hero { padding-bottom: 34px; }
.names { font-size: 20px; font-weight: 800; }
.heart { display: inline-block; animation: beat 1.2s ease-in-out infinite; }
@keyframes beat { 50% { transform: scale(1.18); } }
.pct { font-size: 76px; font-weight: 800; line-height: 1; margin: 12px 0 6px; text-shadow: 0 6px 24px rgba(0,0,0,.2); }
.result-title { font-weight: 700; font-size: 16px; opacity: .95; }
.result-text { line-height: 1.6; font-size: 15px; }
.result-text b { font-weight: 800; }
.scores { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; position: relative; z-index: 1; }
.scores.one { grid-template-columns: 1fr; }
.score { background: rgba(255,255,255,.18); border-radius: 14px; padding: 10px; }
.score b { display: block; font-size: 26px; font-weight: 800; }
.score span { font-size: 12px; opacity: .9; }

.card-view { padding: 16px; }
.card-img { width: 100%; border-radius: 18px; display: block; box-shadow: 0 12px 30px -16px rgba(0,0,0,.5); background: var(--card); min-height: 200px; }

/* --- Payment --- */
.paylist { display: grid; gap: 10px; background: transparent; padding: 0; }
.pay-btn {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  border: none; border-radius: 16px; padding: 17px 18px; font-size: 16px; font-weight: 700; color: #fff;
}
.pay-btn:disabled { opacity: .45; }
.warn-list { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 6px; }
.offer-box .check { color: var(--text); font-size: 14px; margin-top: 14px; }
.pay-btn.stars { background: linear-gradient(135deg, #f7b500, #f08c00); }
.pay-btn.click { background: linear-gradient(135deg, #1e88e5, #1565c0); }
.pay-btn.payme { background: linear-gradient(135deg, #22c3b5, #0f9d8f); }
.linkbox { display: flex; gap: 10px; align-items: center; background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.linkbox span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--hint); }

/* --- Lists --- */
.list { display: grid; gap: 8px; }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%; border: none; text-align: left;
  background: var(--bg); color: var(--text); border-radius: 14px; padding: 13px 14px; font-size: 15px;
}
.row .row-main { flex: 1; display: flex; flex-direction: column; }
.row .row-main small { color: var(--hint); font-size: 12px; }
.row .row-side { font-weight: 800; }
.row.buy-love { background: linear-gradient(140deg, #ff5a5f, #e5202e 55%, #9b0f1e); color: #fff; }
.row.buy-friend { background: linear-gradient(140deg, #4aa3ff, #1f6fe0 55%, #0f3f9e); color: #fff; }
.row.buy-love .row-main small, .row.buy-friend .row-main small { color: rgba(255, 255, 255, .88); }
.medal { font-size: 22px; width: 28px; text-align: center; }
.empty { text-align: center; color: var(--hint); padding: 10px 0; }
.big-emoji { font-size: 48px; margin-bottom: 10px; }

/* --- States --- */
.center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 30px; min-height: 70vh; }
.prepare-bg { position: fixed; inset: -30px; overflow: hidden; pointer-events: none; background: var(--bg); filter: blur(6px) brightness(.62); }
.prepare-bg .hero { filter: blur(12px); }  /* katta harflar kuchliroq blur bilan ham o'qilmaydi */
.prepare-bg .lead, .prepare-bg h2 { filter: blur(3px); }
.prepare-bg * { animation: none !important; }
.unwritten { visibility: hidden; }
.prepare { flex-direction: column; gap: 26px; text-align: center; position: relative; color: #fff; }
.prepare-title { font: italic 700 30px/1.25 "Playfair Display", Georgia, serif; text-shadow: 0 2px 14px rgba(0, 0, 0, .5); }
.prepare-sub { font-size: 16px; font-weight: 600; }
.ring { position: relative; width: 190px; height: 190px; flex: none; }
.ring svg { width: 100%; height: 100%; display: block; animation: spin 1.4s linear infinite; }
.ring.done svg { animation: none; }
.ring circle { fill: none; stroke-width: 9; }
.ring-track { stroke: rgba(255, 255, 255, .2); }
.ring-fill { stroke: url(#ringGrad); stroke-linecap: round; }
.ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 42px; font-weight: 800; }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 4px solid var(--card); border-top-color: var(--brand-solid); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fade-in { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* --- Temperament --- */
.temp-name { font-size: 54px; }
.tbar { margin-top: 12px; }
.tbar-head { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 6px; }
.tbar-track { height: 10px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.tbar-fill { height: 100%; border-radius: 99px; background: var(--brand); }
.axis-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--hint); margin-top: 4px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 1px; }
input.mono { text-transform: uppercase; }
.promo-code { font: 800 34px/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 4px; margin: 4px 0 14px; }

/* =====================================================================
   Sayt (testmaniya.uz): premium minimalist dizayn. Faqat html.site ga ta'sir
   qiladi, Telegram ichidagi Mini App avvalgidek qoladi.
   ===================================================================== */
html.site {
  --bg: #f7f7fb;
  --surface: #ffffff;
  --card: #f2f2f8;
  --text: #0f1530;
  --hint: #626a85;
  --line: #e7e8f0;
  --accent: linear-gradient(135deg, #7c5cff 0%, #4f7cff 55%, #ec6fae 100%);
  --accent-solid: #6a5cff;
  --shadow-sm: 0 1px 2px rgba(15, 21, 48, .05), 0 2px 8px rgba(15, 21, 48, .04);
  --shadow-md: 0 2px 6px rgba(15, 21, 48, .05), 0 14px 34px -12px rgba(15, 21, 48, .16);
  --shadow-lg: 0 30px 70px -28px rgba(54, 44, 140, .35);
  --radius: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
/* Tungi rejim: saytda qurilma sozlamasiga, Telegram'da Telegram'ning o'z rejimiga qarab */
html.site.tg.dark {
  --bg: #0d1020; --surface: #151a2e; --card: #1b2138; --text: #eef0fa; --hint: #9aa1bd; --line: #262d48;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow-md: 0 14px 34px -14px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 70px -28px rgba(0, 0, 0, .7); color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html.site:not(.tg) {
    --bg: #0d1020;
    --surface: #151a2e;
    --card: #1b2138;
    --text: #eef0fa;
    --hint: #9aa1bd;
    --line: #262d48;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 14px 34px -14px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 70px -28px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

html.site body {
  background:
    radial-gradient(900px 480px at 85% -120px, rgba(124, 92, 255, .10), transparent 70%),
    radial-gradient(700px 420px at -10% 10%, rgba(236, 111, 174, .07), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  font-family: "Manrope", "Montserrat", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --- Ranglar: umumiy aksent binafsha-ko'k-pushti, sevgi qizil, do'stlik ko'k --- */
:where(html.site) #app { --brand: var(--accent); --brand-solid: var(--accent-solid); }  /* temperament ranglari (theme-tX...) ustun turadi */
html.site #app.theme-temp { --brand: var(--accent); --brand-solid: var(--accent-solid); }
html.site #app.theme-love { --brand: linear-gradient(135deg, #ff7a8a 0%, #ec3b55 55%, #c81d4e 100%); --brand-solid: #e5334f; }
html.site #app.theme-friend { --brand: linear-gradient(135deg, #67b2ff 0%, #3b7bfa 55%, #2e56d8 100%); --brand-solid: #3570f0; }
html.site #app.theme-promo { --brand: linear-gradient(135deg, #ffc35a 0%, #f59b2b 60%, #ea7a1c 100%); --brand-solid: #ee8a1e; }

/* --- Sahifa kengligi --- */
html.site #app {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  min-height: calc(100vh - 68px);
  padding: 8px 20px 0;
}
html.site #app.wide { max-width: 1180px; }

/* --- Navbar --- */
html.site .site-bar {
  position: sticky; top: 0; z-index: 20;
  height: auto; padding: 0; display: block; border: 0;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.site-bar-in {
  max-width: 1180px; margin: 0 auto; height: 68px; padding: 0 20px;
  display: flex; align-items: center; gap: 10px;
}
html.site .site-logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); font-weight: 800; font-size: 19px; letter-spacing: -.02em; text-decoration: none;
}
.logo-mark { width: 32px; height: 32px; display: block; flex: none; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
html.site .site-bar button { font-family: inherit; }
html.site .site-bar .nav-icon {
  width: 40px; height: 40px; border-radius: 12px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); background: var(--surface); border: 1px solid var(--line);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
html.site .site-bar .nav-icon[hidden] { display: none; }
html.site .site-bar .nav-icon svg { width: 20px; height: 20px; }
html.site .site-bar .nav-icon:hover { transform: translateX(-2px); }
.lang-switch {
  display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line);
}
html.site .lang-switch button {
  border: 0; background: transparent; color: var(--hint);
  font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
  padding: 7px 10px; border-radius: 9px; transition: color .2s, background .2s;
}
html.site .lang-switch button:hover { color: var(--text); }
html.site .lang-switch button.active { background: var(--text); color: var(--bg); }
html.site .nav-cta {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  padding: 10px 16px; border-radius: 12px; color: #fff; font-size: 14px; font-weight: 700;
  background: var(--accent); box-shadow: 0 8px 20px -10px var(--accent-solid);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
html.site .nav-cta[hidden], html.site .nav-out[hidden] { display: none; }
html.site .nav-cta svg { width: 18px; height: 18px; }
html.site .nav-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -10px var(--accent-solid); }
html.site .nav-out {
  border: 1px solid var(--line); background: var(--surface); color: var(--hint);
  padding: 9px 14px; border-radius: 12px; font-size: 14px; font-weight: 600;
}
html.site .nav-out:hover { color: var(--text); }

/* --- Bosh sahifa: hero --- */
.site-hero {
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px;
  padding: 56px 8px 40px;
}
.site-hero.compact { grid-template-columns: 1fr; padding: 40px 8px 28px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-solid); padding: 6px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent-solid) 10%, transparent);
}
.site-hero h1 {
  margin-top: 18px; font-size: clamp(38px, 5.6vw, 64px); line-height: 1.04; font-weight: 800; letter-spacing: -.035em;
  background: linear-gradient(180deg, var(--text) 30%, color-mix(in srgb, var(--text) 72%, var(--accent-solid)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.site-hero .site-hero-text > p { margin-top: 18px; font-size: clamp(17px, 1.6vw, 20px); color: var(--hint); max-width: 34em; }
.hero-cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }

html.site .btn.tg-btn {
  width: auto; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 17px 26px; border-radius: 16px; font-size: 16.5px;
  background: var(--accent); box-shadow: 0 16px 34px -14px var(--accent-solid);
}
html.site .btn.tg-btn svg { width: 22px; height: 22px; }

/* Hero rasmi: suzib yuruvchi kartochkalar */
.hero-art { position: relative; aspect-ratio: 1; max-width: 520px; width: 100%; justify-self: end; container-type: inline-size; }
.orb { position: absolute; border-radius: 50%; filter: blur(8px); opacity: .9; }
.orb-a { width: 62%; height: 62%; left: 6%; top: 10%; background: radial-gradient(circle at 30% 30%, rgba(124, 92, 255, .38), rgba(124, 92, 255, 0) 70%); }
.orb-b { width: 58%; height: 58%; right: 2%; bottom: 4%; background: radial-gradient(circle at 60% 60%, rgba(236, 111, 174, .32), rgba(236, 111, 174, 0) 70%); }
.art-ring {
  position: absolute; inset: 14%; border-radius: 50%;
  border: 1.5px dashed color-mix(in srgb, var(--accent-solid) 30%, transparent);
  animation: spin 60s linear infinite;
}
.art-core {
  position: absolute; left: 50%; top: 50%; width: 108px; height: 108px; transform: translate(-50%, -50%);
  border-radius: 32px; background: var(--surface); box-shadow: var(--shadow-lg);
  display: flex; align-items: center; justify-content: center;
}
.art-core .logo-mark { width: 64px; height: 64px; }
/* Temperament qahramonlari */
.mascots .art-core { width: 92px; height: 92px; border-radius: 28px; }
.mascots .art-core .logo-mark { width: 54px; height: 54px; }
.mascot {
  --ex: 0px; --ey: 0px;
  position: absolute; width: 33%; display: flex; flex-direction: column; align-items: center; gap: 4px;
  animation: drift 6s var(--ease) infinite;
}
.mascot-fig {
  width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 34%; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.mascot-fig svg { width: 84%; height: 84%; overflow: visible; }
.mascot:hover .mascot-fig { transform: translateY(-6px) rotate(-3deg) scale(1.05); box-shadow: var(--shadow-lg); }
.mascot-name {
  font-size: 13px; font-weight: 800; letter-spacing: .02em; padding: 5px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--text);
}
/* Aylana bo'ylab sekin aylanish. Konteyner aylanmaydi: har bir qahramon o'zi aylana bo'ylab yuradi,
   burchagi bitta transform ichida qaytariladi, shuning uchun qayerda bo'lmasin doim tik turadi */
@property --t { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes orbitT { to { --t: 360deg; } }
.orbit { position: absolute; inset: 0; }
.on-ring {
  --r: 36cqw; position: absolute; left: 50%; top: 50%; width: var(--w, 30%);
  translate: -50% -50%;
  transform: rotate(calc(var(--a) + var(--t))) translateX(var(--r)) rotate(calc(-1 * (var(--a) + var(--t))));
  animation: orbitT 120s linear infinite;
}
/* Kichik doiradagilar (.mini) bundan mustasno: ular o'z doirasida turadi */
.on-ring .mascot:not(.mini) { position: relative; width: 100%; }
.m-S { animation-delay: -1.5s; } .m-F { animation-delay: -3s; } .m-M { animation-delay: -4.5s; }
.hero-art.merged .on-ring { --r: 33cqw; }
.on-clan { --w: 31%; }
.on-buddy { --w: 27%; }
.m-X .mascot-name { color: #de2430; } .m-S .mascot-name { color: #d27c06; }
.m-F .mascot-name { color: #15885f; } .m-M .mascot-name { color: #4054d2; }
@keyframes drift { 50% { transform: translateY(-10px); } }

/* Har birining o'z harakati */
/* Faqat harakatlanadigan guruhlar: rect'lardagi rotate(...) atributlari buzilmasligi uchun */
.mascot :is(.m-body, .m-rays, .m-balloon, .m-eyes, .m-fist, .m-bolt, .m-quill, .m-star, .m-steam, .m-pupils) { transform-box: fill-box; }
.m-pupils { transform: translate(var(--ex), var(--ey)); transition: transform .25s ease-out; }
.m-eyes { transform-origin: center; animation: blink 4.6s infinite; }
.m-S .m-eyes { animation-delay: -1.2s; } .m-M .m-eyes { animation-delay: -2.7s; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
.m-X .m-body { transform-origin: 50% 100%; animation: hop 1.8s var(--ease) infinite; }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0) scale(1, 1); } 70% { transform: translateY(0) scale(1.06, .92); } 82% { transform: translateY(-9px) scale(.96, 1.05); } }
.m-X .m-fist { transform-origin: center; animation: pump 1.8s var(--ease) infinite; }
@keyframes pump { 75% { transform: translate(1px, -3px); } }
.m-X .m-bolt { transform-origin: center; animation: zap 2.4s infinite; }
@keyframes zap { 0%, 100% { opacity: 1; transform: scale(1); } 45% { opacity: .35; transform: scale(.85) rotate(-8deg); } 50% { opacity: 1; transform: scale(1.12); } }
.m-S .m-rays { transform-origin: center; animation: spin 14s linear infinite; }
.m-S .m-body { transform-origin: 50% 100%; animation: sway 3s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.m-S .m-balloon { transform-origin: 0% 100%; animation: sway 2.6s ease-in-out infinite reverse; }
.m-F .m-body { transform-origin: 50% 100%; animation: breathe 4.5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.04, .97); } }
.m-F .m-steam { animation: steam 2.8s ease-in infinite; }
@keyframes steam { 0% { opacity: 0; transform: translateY(6px); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-10px); } }
.m-M .m-body { animation: hover 5s ease-in-out infinite; }
@keyframes hover { 50% { transform: translateY(-5px); } }
.m-M .m-look-up .m-pupils { transform: translate(calc(var(--ex) * .6), calc(var(--ey) * .6 - 2px)); }
.m-M .m-quill { transform-origin: 0% 100%; animation: write 1.6s ease-in-out infinite; }
@keyframes write { 50% { transform: rotate(-9deg); } }
.m-M .m-star { transform-origin: center; animation: twinkle 2.2s ease-in-out infinite; }
.m-M .m-star2 { animation-delay: -1.1s; }
@keyframes twinkle { 50% { opacity: .3; transform: scale(.6) rotate(20deg); } }

/* --- Kartochkalar (testlar) --- */
.tiles-wrap { padding: 8px 8px 0; }
.section-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 12px 0 20px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; padding: 0 8px; }
.tiles-wrap .tiles { padding: 0; }
.tiles.two { grid-template-columns: repeat(2, 1fr); }
.tile {
  --tile: var(--accent-solid);
  --tile-soft: color-mix(in srgb, var(--tile) 11%, transparent);
  position: relative; display: flex; align-items: center; gap: 16px; width: 100%;
  padding: 22px; border-radius: var(--radius); text-align: left; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  overflow: hidden;
}
.tile::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(420px 160px at 0% 0%, var(--tile-soft), transparent 70%);
  transition: opacity .35s var(--ease);
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--tile) 28%, var(--line)); }
.tile:hover::before { opacity: 1; }
.tile:active { transform: translateY(-1px) scale(.995); }
.tile:focus-visible, html.site .btn:focus-visible, html.site .option:focus-visible, html.site .row:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-solid) 40%, transparent); outline-offset: 2px;
}
.tile-temp { --tile: #6a5cff; }
.tile-love { --tile: #e5334f; }
.tile-friend { --tile: #3570f0; }
.tile-cert { --tile: #d68a12; }
.tile-promo { --tile: #ee8a1e; }
.tile-plain { --tile: #626a85; }
.tile-icon {
  flex: none; width: 52px; height: 52px; border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--tile, var(--accent-solid)); background: var(--tile-soft, color-mix(in srgb, var(--accent-solid) 11%, transparent));
}
.tile-icon svg { width: 26px; height: 26px; }
.tile-body { flex: 1; display: flex; flex-direction: column; gap: 4px; position: relative; }
.tile-body b { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.tile-body small { font-size: 14.5px; color: var(--hint); line-height: 1.45; }
.tile-go {
  flex: none; width: 36px; height: 36px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--hint); background: var(--card); transition: transform .35s var(--ease), color .35s, background .35s;
}
.tile-go svg { width: 18px; height: 18px; }
.tile:hover .tile-go { color: #fff; background: var(--tile); transform: translateX(3px); }
.tile-stack { flex-direction: column; align-items: flex-start; gap: 18px; padding: 26px; min-height: 0; }
.tile-stack .tile-go { position: absolute; right: 18px; top: 18px; }

.login-band {
  margin: 40px 8px 0; padding: 26px 28px; border-radius: 26px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.login-band b { font-size: 18px; font-weight: 800; }
.login-band p { color: var(--hint); font-size: 15px; margin-top: 2px; }
.band-icon {
  width: 52px; height: 52px; border-radius: 16px; color: #fff; background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
}
.band-icon svg { width: 26px; height: 26px; }

/* --- Ichki sahifalar: hero kartochka --- */
html.site .hero {
  margin: 16px 0 0; border-radius: 30px; padding: 44px 32px 40px;
  box-shadow: var(--shadow-lg);
}
html.site .hero.small { padding: 34px 28px 30px; }
html.site .hero::after {
  background:
    radial-gradient(520px 220px at 100% 0%, rgba(255, 255, 255, .22), transparent 70%),
    radial-gradient(420px 220px at 0% 100%, rgba(255, 255, 255, .12), transparent 70%);
}
html.site .hero h1 { font-size: clamp(26px, 3.6vw, 38px); letter-spacing: -.025em; line-height: 1.15; margin-top: 14px; }
html.site .hero p { font-size: 17px; max-width: 36em; margin: 12px auto 0; opacity: .92; }
html.site .hero-emoji {
  width: 68px; height: 68px; margin: 0 auto; border-radius: 22px; font-size: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
  animation: none;
}

/* --- Bloklar --- */
html.site .block {
  margin: 16px 0 0; padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
html.site .block h2 { font-size: 19px; letter-spacing: -.01em; margin-bottom: 14px; }
html.site .block.actions, html.site .block.paylist { background: transparent; border: 0; box-shadow: none; padding: 0; }
html.site .lead { font-size: 17px; }
html.site .checks li { padding: 7px 0 7px 32px; }
html.site .checks li::before {
  content: ""; left: 2px; top: 10px; width: 18px; height: 18px; border-radius: 6px;
  background: color-mix(in srgb, var(--brand-solid) 14%, transparent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a5cff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
html.site #app.theme-love .checks li::before { filter: hue-rotate(110deg) saturate(1.4); }
html.site #app.theme-friend .checks li::before { filter: hue-rotate(-30deg); }
html.site .checks.fix li::before { content: "→"; background: none; color: var(--brand-solid); top: 7px; width: auto; height: auto; }
html.site .center-text { margin: 16px 0 0; }
html.site .price-row b { font-size: 20px; }

/* --- Tugmalar --- */
html.site .btn {
  border-radius: 16px; padding: 16px 20px; font-size: 16px; font-weight: 700;
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s, opacity .2s;
}
html.site .btn:hover { transform: translateY(-1px); }
html.site .btn.primary { border: 0; background: var(--brand); color: #fff; box-shadow: 0 14px 30px -14px var(--brand-solid); }
html.site .btn.primary:hover { box-shadow: 0 18px 36px -14px var(--brand-solid); }
html.site .btn.ghost { background: var(--surface); }
html.site .btn.link { border: 0; background: transparent; color: var(--hint); }
html.site .btn.link:hover { color: var(--text); transform: none; }
html.site .btn.small { border: 0; padding: 9px 16px; border-radius: 11px; }
html.site .btn.offer { padding: 16px 18px; }
html.site .btn.offer-love, html.site .btn.offer-friend { border: 0; }
html.site .sticky {
  position: static; margin-top: 24px; padding: 0 0 calc(28px + env(safe-area-inset-bottom));
  background: none; max-width: 520px; width: 100%; margin-left: auto; margin-right: auto;
}
html.site .spacer { min-height: 28px; }

/* --- Forma --- */
html.site .input {
  border: 1.5px solid var(--line); background: var(--bg); border-radius: 14px; padding: 15px 16px;
  transition: border-color .2s, box-shadow .2s;
}
html.site .input:focus { border-color: var(--brand-solid); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-solid) 14%, transparent); }
html.site .seg-btn { border: 1.5px solid var(--line); background: var(--surface); transition: border-color .2s, background .2s; }
html.site .seg-btn:hover { border-color: color-mix(in srgb, var(--brand-solid) 40%, var(--line)); }
html.site .seg-btn.active { border-color: var(--brand-solid); background: color-mix(in srgb, var(--brand-solid) 8%, var(--surface)); }

/* --- Test savollari --- */
html.site .quiz { max-width: 680px; width: 100%; margin: 0 auto; padding: 40px 0 32px; gap: 18px; }
html.site .progress { height: 8px; background: color-mix(in srgb, var(--brand-solid) 12%, var(--card)); }
html.site .progress div { transition: width .5s var(--ease); }
html.site .quiz-count { text-align: center; font-size: 13px; letter-spacing: .08em; font-weight: 700; color: var(--brand-solid); }
html.site .question {
  text-align: center; font-size: clamp(24px, 3.2vw, 32px); line-height: 1.25; letter-spacing: -.02em;
  margin: 6px 0 10px; text-wrap: balance;
}
html.site .quiz > .hint { text-align: center; }
html.site .options { gap: 12px; }
html.site .option {
  position: relative; padding: 18px 56px 18px 20px; border-radius: 18px; font-size: 16.5px; font-weight: 600;
  background: var(--surface); border: 1.5px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s;
}
html.site .option::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 22px; height: 22px; margin-top: -11px;
  border-radius: 50%; border: 1.5px solid var(--line); transition: all .25s var(--ease);
}
html.site .option:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand-solid) 45%, var(--line)); box-shadow: var(--shadow-md); }
html.site .option.selected {
  border-color: var(--brand-solid);
  background: color-mix(in srgb, var(--brand-solid) 7%, var(--surface));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-solid) 12%, transparent);
}
html.site .option.selected::after {
  border-color: var(--brand-solid);
  background: var(--brand-solid) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
}
html.site .option.right { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
html.site .option.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 9%, var(--surface)); }
html.site .option.custom-toggle { color: var(--brand-solid); }
html.site .quiz .btn.primary { margin-top: 4px; }
html.site .date { font-size: 18px; }

/* Savollar orasidagi o'tish */
html.site .fade-in { animation: siteIn .45s var(--ease); }
@keyframes siteIn { from { opacity: 0; transform: translateY(14px); } }
html.site .quiz .options > * { animation: siteIn .45s var(--ease) both; }
html.site .quiz .options > *:nth-child(2) { animation-delay: .04s; }
html.site .quiz .options > *:nth-child(3) { animation-delay: .08s; }
html.site .quiz .options > *:nth-child(4) { animation-delay: .12s; }
html.site .quiz .options > *:nth-child(5) { animation-delay: .16s; }

/* --- Natijalar --- */
html.site .result-hero { padding: 44px 28px 38px; }
html.site .names { font-size: 21px; letter-spacing: -.01em; }
html.site .pct { font-size: clamp(64px, 9vw, 92px); letter-spacing: -.04em; text-shadow: none; }
/* Foiz bor joyda aylana diagramma */
@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }
html.site .pct[style] {
  width: 220px; height: 220px; margin: 22px auto 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 60px; position: relative;
  animation: ringIn 1.2s var(--ease) both;
}
html.site .pct[style]::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255, 255, 255, .22) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 13px), #000 calc(100% - 12px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 13px), #000 calc(100% - 12px));
}
html.site .pct[style]::after {
  content: ""; position: absolute; inset: 22px; border-radius: 50%;
  background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}
@keyframes ringIn { from { --p: 0; } }
html.site .result-title { font-size: 18px; }
html.site .scores { max-width: 460px; margin: 22px auto 0; gap: 12px; }
html.site .score { border-radius: 18px; padding: 14px; background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
html.site .result-text { font-size: 16.5px; line-height: 1.75; }
html.site .tbar { margin-top: 16px; }
html.site .tbar-head { font-size: 15px; }
html.site .tbar-track { height: 10px; background: var(--card); }
html.site .tbar-fill { animation: barIn 1s var(--ease) both; transform-origin: left; }
@keyframes barIn { from { transform: scaleX(0); } }
html.site .axis-ends { font-size: 13px; }
html.site .card-view { padding: 24px 0 0; max-width: 460px; margin: 0 auto; }
html.site .card-img { border-radius: 24px; box-shadow: var(--shadow-lg); }

/* --- To'lov va ro'yxatlar --- */
html.site .pay-btn { border-radius: 18px; padding: 19px 22px; transition: transform .25s var(--ease), box-shadow .25s; }
html.site .pay-btn:not(:disabled):hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
html.site .linkbox { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 10px 10px 10px 14px; }
html.site .row {
  background: var(--bg); border: 1px solid transparent; border-radius: 16px; padding: 15px 16px;
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
html.site button.row:hover { border-color: var(--line); background: var(--surface); transform: translateX(2px); }
html.site .row.buy-love, html.site .row.buy-friend { border: 0; }
html.site .spinner { border-color: var(--card); border-top-color: var(--brand-solid); }

/* --- Planshet --- */
@media (max-width: 1024px) {
  .site-hero { gap: 28px; }
}
/* --- Telefon --- */
@media (max-width: 760px) {
  html.site #app { padding: 4px 16px 0; min-height: calc(100vh - 60px); }
  .site-bar-in { height: 60px; padding: 0 16px; gap: 8px; }
  html.site .site-logo { font-size: 17px; }
  .logo-mark { width: 28px; height: 28px; }
  html.site .nav-cta span { display: none; }
  html.site .nav-cta { padding: 10px; }
  html.site .lang-switch button { padding: 6px 8px; font-size: 12px; }
  .site-hero { grid-template-columns: 1fr; padding: 28px 0 8px; gap: 8px; text-align: left; }
  .site-hero.compact { padding: 24px 0 12px; }
  .hero-art.mascots { order: 2; aspect-ratio: auto; max-width: none; justify-self: stretch; margin-top: 22px; }
  .hero-art.mascots .orbit { position: static; animation: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .hero-art.mascots .on-ring { position: static; width: auto; translate: none; transform: none; }
  .hero-art.mascots .on-ring { animation: none; }
  .hero-art.mascots .orb, .hero-art.mascots .art-ring, .hero-art.mascots .art-core { display: none; }
  .mascot-fig { border-radius: 30%; }
  .mascot-name { font-size: 10.5px; padding: 4px 8px; }
  .hero-cta .tg-btn { width: 100%; }
  .tiles, .tiles.two { grid-template-columns: 1fr; padding: 0; gap: 12px; }
  .tiles-wrap { padding: 8px 0 0; }
  .section-title { font-size: 22px; margin: 20px 0 14px; }
  .tile { padding: 18px; }
  .tile-stack { flex-direction: row; align-items: center; min-height: 0; padding: 18px; gap: 16px; }
  .tile-stack .tile-go { position: static; }
  .login-band { grid-template-columns: 1fr; margin: 28px 0 0; padding: 22px; text-align: left; }
  .login-band .tg-btn { width: 100%; }
  html.site .hero { border-radius: 26px; padding: 32px 20px 30px; }
  html.site .block { padding: 20px; }
  html.site .quiz { padding: 24px 0 24px; }
  html.site .option { padding: 16px 52px 16px 16px; font-size: 16px; }
  html.site .pct[style] { width: 180px; height: 180px; font-size: 50px; }
  html.site .sticky {
    position: sticky; bottom: 0; margin: 20px -16px 0; max-width: none; width: auto;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    background: linear-gradient(to bottom, transparent, var(--bg) 30%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html.site *, html.site *::before, html.site *::after { animation: none !important; transition: none !important; }
}

/* --- Qahramonlarning qiliqlari: sichqoncha borganda (telefonda bosganda) --- */
.mascot :is(.m-puffs, .m-mouth-alt, .m-happy, .m-confetti, .m-zzz, .m-sleep, .m-rain, .m-tear) { opacity: 0; transition: opacity .25s; }
.mascot :is(.m-mouth, .m-eyes, .m-calm, .m-steam) { transition: opacity .2s; }
.mascot :is(.m-puffs, .m-confetti, .m-zzz, .m-rain, .m-tear, .m-brows, .l-wing, .l-heart, .l-mini, .d-left, .d-right, .d-spark) { transform-box: fill-box; }
.mascot:is(:hover, .act) .m-mouth { opacity: 0; }
.mascot:is(:hover, .act) .m-mouth-alt { opacity: 1; }

/* Xolerik: jahli chiqadi */
.m-X:is(:hover, .act) .m-body { animation: rage .14s linear infinite; }
@keyframes rage { 0%, 100% { transform: translate(-1.5px, 0) rotate(-1.5deg); } 50% { transform: translate(1.5px, -1px) rotate(1.5deg); } }
.m-X:is(:hover, .act) .m-brows { transform: translateY(2.5px); transition: transform .2s; }
.m-X:is(:hover, .act) .m-puffs { opacity: 1; animation: puff .9s ease-out infinite; }
@keyframes puff { 0% { transform: translateY(6px) scale(.6); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-10px) scale(1.15); opacity: 0; } }
.m-X:is(:hover, .act) .m-bolt { animation-duration: .5s; }

/* Sangvinik: qah-qah kuladi */
.m-S:is(:hover, .act) .m-eyes { opacity: 0; }
.m-S:is(:hover, .act) .m-happy { opacity: 1; }
.m-S:is(:hover, .act) .m-mouth { opacity: 1; }
.m-S:is(:hover, .act) .m-body { animation: laugh .32s ease-in-out infinite; }
@keyframes laugh { 50% { transform: translateY(-5px) scale(1.03, .97); } }
.m-S:is(:hover, .act) .m-rays { animation-duration: 1.6s; }
.m-S:is(:hover, .act) .m-confetti { opacity: 1; transform-origin: center; animation: pop 1s ease-out infinite; }
@keyframes pop { 0% { transform: scale(.4) rotate(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1.25) rotate(25deg); opacity: 0; } }
.m-S:is(:hover, .act) .m-balloon { animation: rise 1.4s ease-in-out infinite alternate; }
@keyframes rise { to { transform: translateY(-8px) rotate(6deg); } }

/* Flegmatik: mudrab uxlab qoladi */
.m-F:is(:hover, .act) .m-calm, .m-F:is(:hover, .act) .m-steam { opacity: 0; }
.m-F:is(:hover, .act) .m-sleep { opacity: 1; }
.m-F:is(:hover, .act) .m-body { animation: doze 2.4s ease-in-out infinite; }
@keyframes doze { 50% { transform: rotate(7deg) translateY(2px); } }
.m-F:is(:hover, .act) .m-zzz { opacity: 1; }
.m-zzz text { animation: zfloat 2.1s ease-in-out infinite; opacity: 0; }
.m-zzz .z2 { animation-delay: .35s; } .m-zzz .z3 { animation-delay: .7s; }
@keyframes zfloat { 0% { opacity: 0; transform: translate(0, 6px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(4px, -8px); } }

/* Melanxolik: ko'zidan yosh, ustida yomg'ir buluti */
.m-M:is(:hover, .act) .m-rain { opacity: 1; animation: cloudIn .4s ease-out both; }
@keyframes cloudIn { from { transform: translateY(-6px); } }
.m-rain path { animation: drop .8s linear infinite; }
.m-rain .d2 { animation-delay: .27s; } .m-rain .d3 { animation-delay: .54s; }
@keyframes drop { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(16px); opacity: 0; } }
.m-M:is(:hover, .act) .m-tear { opacity: 1; animation: tear 1.6s ease-in infinite; }
@keyframes tear { 0% { transform: translateY(-2px) scale(.6); } 60% { transform: translateY(6px) scale(1); opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
.m-M:is(:hover, .act) .m-body { animation: sigh 3s ease-in-out infinite; }
@keyframes sigh { 50% { transform: translateY(3px) scale(1.02, .97); } }
.m-M:is(:hover, .act) .m-quill { animation-play-state: paused; }

/* Temperament natijasining tepasidagi qahramon */
.mascot.hero-mascot {
  position: relative; left: auto; right: auto; top: auto; bottom: auto;
  width: 132px; margin: 0 auto; display: block; animation: drift 6s var(--ease) infinite;
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, .22));
}
.hero-mascot svg { width: 100%; height: auto; display: block; overflow: visible; }

/* --- Temperamentdan keyin: birlashgan sahna --- */
.hero-art.merged .art-ring { inset: 17%; }
.clan { position: relative; width: 100%; aspect-ratio: 1; }
.clan::before {
  content: ""; position: absolute; inset: 14%; border-radius: 50%;
  border: 1.5px dashed color-mix(in srgb, var(--accent-solid) 35%, transparent);
}
.mascot.mini {
  left: 50%; top: 50%; right: auto; bottom: auto; width: 46%; margin: -23% 0 0 -23%;
  /* markazi kichik doira chizig'ida; kichik doira bo'ylab ham o'zi yuradi, tik turadi */
  transform: rotate(calc(var(--i) * 90deg + var(--t))) translateY(-78%) rotate(calc(-1 * (var(--i) * 90deg + var(--t))));
  animation: gather 1.3s var(--ease) both calc(var(--i) * .12s), orbitT 40s linear infinite;
}
.mini .mascot-fig { border-radius: 50%; padding: 4%; }
.mini:hover .mascot-fig { transform: scale(1.15); }
@keyframes gather { from { opacity: 0; scale: 1.8; translate: var(--gx, 0) var(--gy, 0); } }
.mini:nth-child(1) { --gx: 160%; --gy: -120%; }
.mini:nth-child(2) { --gx: 260%; --gy: -40%; }
.mini:nth-child(3) { --gx: 140%; --gy: 140%; }
.mini:nth-child(4) { --gx: 280%; --gy: 90%; }

.buddy {
  position: relative; width: 100%; border: 0; background: none; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; color: var(--text); font: inherit;
  animation: buddyIn .9s var(--ease) both .5s;
}
@keyframes buddyIn { from { opacity: 0; scale: .6; } }
.buddy-friend { animation-delay: .7s; }
.buddy-fig { width: 100%; display: block; filter: drop-shadow(0 16px 18px rgba(30, 20, 80, .18)); transition: transform .4s var(--ease); }
.buddy-fig svg { width: 100%; height: auto; display: block; overflow: visible; }
.buddy .mascot-name { transition: transform .3s var(--ease), box-shadow .3s; }
.buddy-love .mascot-name { color: #e5334f; }
.buddy-friend .mascot-name { color: #3570f0; }
.buddy:hover .buddy-fig, .buddy.act .buddy-fig { transform: translateY(-6px) scale(1.06); }
.buddy:hover .mascot-name { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.buddy:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent-solid) 40%, transparent); outline-offset: 6px; border-radius: 20px; }
.buddy :is(.l-heart, .l-mini path, .d-spark, .f-a, .f-b) { transform-box: fill-box; }

/* Sevgi: barmoq izlari sekin oqadi, yurak uradi; sichqoncha borganda kuchli uradi va yurakchalar uchadi */
.l-heart { transform-origin: center; animation: beat 1.8s ease-in-out infinite; }
.l-print ellipse { animation: ridge 14s linear infinite; }
.l-print2 ellipse { animation-direction: reverse; }
@keyframes ridge { to { stroke-dashoffset: -260; } }
.l-mini path { opacity: 0; }
.buddy-love:is(:hover, .act) .l-heart { animation: thump .6s ease-in-out infinite; }
.buddy-love:is(:hover, .act) .l-print ellipse { animation-duration: 3s; }
@keyframes thump { 0%, 100% { transform: scale(1); } 20% { transform: scale(1.12); } 40% { transform: scale(.98); } 60% { transform: scale(1.08); } }
.buddy-love:is(:hover, .act) .l-mini path { animation: floatUp 1.5s ease-out infinite; }
.l-mini .h2 { animation-delay: .5s !important; } .l-mini .h3 { animation-delay: 1s !important; }
@keyframes floatUp { 0% { opacity: 0; transform: translateY(14px) scale(.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px) scale(1.1); } }

/* Do'stlik: avval oddiy turishadi, keyin bir-birining yelkasiga qo'l qo'yishadi */
.f-arm { transform-box: view-box; }
.f-arm-a { animation: armA 7s var(--ease) infinite; }
.f-arm-b { animation: armB 7s var(--ease) infinite; }
/* Boshida qo'llar pastda, gavda ortida ko'rinmaydi: oddiy turishadi. Keyin qo'l ko'tarilib yelkaga tushadi */
@keyframes armA { 0%, 14% { transform: rotate(70deg); opacity: 0; } 20% { opacity: 1; } 28%, 86% { transform: rotate(0deg); opacity: 1; } 94% { opacity: 1; } 100% { transform: rotate(70deg); opacity: 0; } }
@keyframes armB { 0%, 30% { transform: rotate(-70deg); opacity: 0; } 36% { opacity: 1; } 44%, 86% { transform: rotate(0deg); opacity: 1; } 94% { opacity: 1; } 100% { transform: rotate(-70deg); opacity: 0; } }
.f-a { transform-origin: 50% 100%; animation: leanA 7s var(--ease) infinite; }
.f-b { transform-origin: 50% 100%; animation: leanB 7s var(--ease) infinite; }
@keyframes leanA { 0%, 14% { transform: rotate(0); } 30%, 86% { transform: rotate(4deg) translateX(2px); } 100% { transform: rotate(0); } }
@keyframes leanB { 0%, 28% { transform: rotate(0); } 44%, 86% { transform: rotate(-4deg) translateX(-2px); } 100% { transform: rotate(0); } }
.d-spark { opacity: 0; transform-origin: center; }
.buddy-friend:is(:hover, .act) :is(.f-a, .f-b) { animation: laugh .4s ease-in-out infinite; }
.buddy-friend:is(:hover, .act) .f-b { animation-delay: .2s; }
.buddy-friend:is(:hover, .act) .f-arm { animation: none; transform: rotate(0deg); }
.buddy-friend:is(:hover, .act) .d-spark { animation: twinkle .9s ease-in-out infinite alternate; opacity: 1; }

/* --- Stikerlar: oq chegarali, biroz qiyshiq; sarlavhalarda rangli plashka ustida --- */
html.site .stk {
  display: inline-block; line-height: 1; margin: 0 .14em; vertical-align: -.08em;
  transform: rotate(var(--tilt, 0deg)); transition: transform .35s var(--ease);
}
html.site .stk i {
  font-style: normal; display: inline-block;
  filter: drop-shadow(1.6px 0 0 #fff) drop-shadow(-1.6px 0 0 #fff) drop-shadow(0 1.6px 0 #fff) drop-shadow(0 -1.6px 0 #fff)
    drop-shadow(0 3px 3px rgba(15, 21, 48, .25));
}
html.site .stk:hover { transform: rotate(0deg) scale(1.25); }
html.site :is(.block h2, .tbar-head, .row-main, .question, .lead) .stk {
  display: inline-grid; place-items: center; width: 1.85em; height: 1.85em; margin: 0 .45em 0 0; vertical-align: middle;
  border-radius: .62em; background: linear-gradient(140deg, color-mix(in srgb, var(--brand-solid) 22%, #fff), color-mix(in srgb, var(--brand-solid) 9%, #fff));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand-solid) 18%, transparent), 0 4px 10px -6px var(--brand-solid);
}
html.site .question .stk { font-size: .8em; }
html.site .hero .stk i { filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(0 4px 6px rgba(0, 0, 0, .25)); }
html.site .hero-emoji .stk { font-size: 34px; margin: 0; }
html.site :is(.btn, .option) .stk i { filter: drop-shadow(1.2px 0 0 #fff) drop-shadow(-1.2px 0 0 #fff) drop-shadow(0 1.2px 0 #fff) drop-shadow(0 -1.2px 0 #fff); }

/* --- Telefon: birlashgan sahna kichrayadi --- */
@media (max-width: 760px) {
  .home-hero .hero-art { margin-top: 18px; }
  .hero-art.merged { display: block; order: 2; width: 100%; max-width: 330px; justify-self: center; margin: 12px auto 0; }
  .hero-art.merged .on-ring { --r: 30cqw; }
  .hero-art.merged .on-clan { --w: 28%; }
  .hero-art.merged .on-buddy { --w: 26%; }
  .hero-art.merged .mascot-name { font-size: 10.5px; padding: 4px 9px; }
  .mascot.hero-mascot { width: 104px; }
}

/* =====================================================================
   Temperament natijasi (faqat sayt). Rang temperamentga mos (theme-tX ...)
   ===================================================================== */
.tr-hero {
  position: relative; overflow: hidden; isolation: isolate;
  margin: 16px 0 0; padding: 30px 22px 26px; border-radius: 32px; text-align: center; color: #fff;
  background: var(--brand); box-shadow: 0 30px 60px -30px var(--brand-solid);
}
.tr-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(420px 260px at 85% -10%, rgba(255, 255, 255, .28), transparent 70%),
    radial-gradient(360px 240px at 0% 110%, rgba(255, 255, 255, .16), transparent 70%);
}
.tr-hero::after {
  content: ""; position: absolute; width: 340px; height: 340px; left: 50%; top: 18px; margin-left: -170px; z-index: -1;
  border-radius: 50%; border: 1.5px dashed rgba(255, 255, 255, .28); animation: spin 70s linear infinite;
}
.mascot.tr-mascot { width: 118px; animation: drift 6s var(--ease) infinite; }
.tr-label {
  margin-top: 6px; font-size: 12.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .9;
}
.tr-name {
  display: inline-block; margin: 12px auto 0; padding: 10px 28px 12px; border-radius: 24px;
  font-size: clamp(42px, 11vw, 68px); line-height: 1.02; font-weight: 800; letter-spacing: -.035em;
  background: rgba(255, 255, 255, .16);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45), 0 18px 40px -18px rgba(0, 0, 0, .45);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  text-shadow: 0 4px 18px rgba(0, 0, 0, .18);
  animation: nameIn .9s var(--ease) both .15s;
}
@keyframes nameIn { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.tr-tagline { margin: 14px auto 0; max-width: 30em; font-size: 17px; font-weight: 700; opacity: .95; }
.tr-mix { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.tr-chip {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.tr-chip b { font-size: 14px; font-weight: 800; }
.tr-chip:first-child { background: rgba(255, 255, 255, .92); color: var(--brand-solid); box-shadow: none; }

/* --- Bo'limlar: sarlavha, izoh --- */
.tr-section { margin-top: 36px; }
.tr-head { margin-bottom: 16px; }
.tr-kicker {
  display: inline-block; margin-bottom: 10px; padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-solid); background: color-mix(in srgb, var(--accent-solid) 10%, transparent);
}
.tr-head h2 { font-size: clamp(23px, 4vw, 30px); line-height: 1.18; font-weight: 800; letter-spacing: -.025em; }
.tr-head p { margin-top: 10px; color: var(--hint); font-size: 16px; max-width: 36em; }

/* --- Tavsiya etilgan testlar --- */
.rec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rec-card {
  position: relative; display: flex; flex-direction: column; width: 100%; padding: 0; overflow: hidden; text-align: left;
  border-radius: 26px; border: 1px solid var(--line); background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
.rec-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.rec-art {
  display: flex; align-items: center; justify-content: center; height: 176px; padding: 18px;
  transition: transform .5s var(--ease);
}
.rec-art svg { height: 100%; width: auto; max-width: 100%; overflow: visible; filter: drop-shadow(0 14px 16px rgba(30, 20, 80, .16)); }
.rec-card:hover .rec-art { transform: scale(1.04); }
.rec-love .rec-art { background: radial-gradient(240px 150px at 50% 60%, #ffe3ea, transparent 70%), linear-gradient(160deg, #fff5f7, #ffe8ee); }
.rec-friend .rec-art { background: radial-gradient(240px 150px at 50% 60%, #dfeaff, transparent 70%), linear-gradient(160deg, #f4f8ff, #e6efff); }
.rec-love:hover { border-color: #f6b8c5; }
.rec-friend:hover { border-color: #b8ccf8; }
.rec-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; flex: 1; }
.rec-body b { font-size: 20px; font-weight: 800; letter-spacing: -.015em; }
.rec-sub { color: var(--hint); font-size: 15px; line-height: 1.5; }
.rec-sub { margin-bottom: 12px; }
.rec-cta {
  display: inline-flex; align-items: center; align-self: flex-start; gap: 8px; min-height: 48px; margin-top: auto; padding: 0 18px;
  border-radius: 14px; color: #fff; font-size: 15px; font-weight: 800;
  transition: gap .3s var(--ease), box-shadow .3s;
}
.rec-cta svg { width: 18px; height: 18px; }
.rec-card:hover .rec-cta { gap: 12px; }
.rec-love .rec-cta { background: linear-gradient(135deg, #ff7a8a, #e5334f 60%, #c81d4e); box-shadow: 0 12px 24px -12px #e5334f; }
.rec-friend .rec-cta { background: linear-gradient(135deg, #67b2ff, #3570f0 60%, #2e56d8); box-shadow: 0 12px 24px -12px #3570f0; }
.rec-art :is(.l-heart, .l-mini path, .d-spark, .f-a, .f-b) { transform-box: fill-box; }

/* --- Ulashish --- */
.share-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.share-tile {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 14px 16px; text-align: left;
  border-radius: 20px; border: 1px solid var(--line); background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.share-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent-solid) 30%, var(--line)); }
.share-tile.busy { opacity: .6; pointer-events: none; }
.share-ic {
  flex: none; width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: var(--accent); box-shadow: 0 10px 20px -12px var(--accent-solid);
}
.share-ic svg { width: 22px; height: 22px; }
.share-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.share-txt b { font-size: 15.5px; font-weight: 800; }
.share-txt small { color: var(--hint); font-size: 13px; line-height: 1.4; }
.share-go { flex: none; color: var(--hint); display: inline-flex; transition: transform .3s var(--ease), color .3s; }
.share-go svg { width: 18px; height: 18px; }
.share-tile:hover .share-go { transform: translateX(3px); color: var(--accent-solid); }

/* --- Qayta topshirish: eng pastda, alohida --- */
.tr-retake {
  margin-top: 40px; padding-top: 22px; border-top: 1px dashed var(--line);
  display: flex; justify-content: center;
}
.retake-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px;
  border: 1.5px solid var(--line); background: transparent; color: var(--hint); font-size: 15px; font-weight: 700;
  transition: color .3s, border-color .3s, background .3s;
}
.retake-btn svg { width: 18px; height: 18px; transition: transform .5s var(--ease); }
.retake-btn:hover { color: var(--text); border-color: color-mix(in srgb, var(--text) 25%, var(--line)); background: var(--surface); }
.retake-btn:hover svg { transform: rotate(-200deg); }

/* --- Telefon (375-430 px) --- */
@media (max-width: 760px) {
  .tr-hero { margin-top: 10px; padding: 22px 16px 20px; border-radius: 26px; }
  .tr-hero::after { width: 260px; height: 260px; margin-left: -130px; top: 8px; }
  .mascot.tr-mascot { width: 96px; }
  .tr-name { padding: 8px 20px 10px; border-radius: 20px; }
  .tr-tagline { font-size: 15.5px; margin-top: 12px; }
  .tr-mix { gap: 6px; margin-top: 14px; }
  .tr-chip { padding: 6px 10px; font-size: 12px; }
  .tr-chip b { font-size: 13px; }
  .tr-section { margin-top: 28px; }
  .tr-head { margin-bottom: 14px; }
  .tr-head p { font-size: 15px; }
  .rec-grid { grid-template-columns: 1fr; gap: 12px; }
  .rec-card { flex-direction: row; align-items: stretch; border-radius: 22px; }
  .rec-art { width: 38%; height: auto; min-height: 150px; padding: 12px; flex: none; }
  .rec-art svg { width: 100%; height: auto; }
  .rec-body { padding: 16px 14px 16px 6px; gap: 4px; }
  .rec-body b { font-size: 17.5px; }
  .rec-sub { font-size: 14px; }
  .rec-sub { margin-bottom: 10px; }
  .rec-cta { width: 100%; justify-content: center; padding: 0 12px; font-size: 14px; }
  .share-grid { grid-template-columns: 1fr; gap: 10px; }
  .share-tile { min-height: 64px; padding: 12px 14px; border-radius: 18px; }
  .share-ic { width: 42px; height: 42px; border-radius: 13px; }
  .tr-retake { margin-top: 30px; padding-top: 18px; }
  .retake-btn { width: 100%; justify-content: center; }
}
@media (max-width: 420px) {
  .rec-art { width: 32%; padding: 10px 6px; }
  .rec-cta { gap: 6px; padding: 0 10px; font-size: 13.5px; white-space: nowrap; }
  .rec-cta svg { width: 16px; height: 16px; }
}

/* --- Bosh sahifa: sarlavha, ostida animatsiya, keyin tavsif va tugma --- */
.site-hero.stacked {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0;
  padding: 28px 8px 24px;
}
.site-hero.stacked h1 {
  margin-top: 16px; font-size: clamp(36px, 5.2vw, 60px); line-height: 1.06; font-weight: 800; letter-spacing: -.035em;
  background: linear-gradient(180deg, var(--text) 30%, color-mix(in srgb, var(--text) 72%, var(--accent-solid)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.site-hero.stacked .hero-art { order: 0; justify-self: auto; width: 100%; max-width: min(420px, 46vh); margin: 10px auto 2px; }
.site-hero.stacked .hero-sub { margin-top: 10px; max-width: 34em; font-size: clamp(16px, 1.6vw, 19px); color: var(--hint); }
.site-hero.stacked .hero-cta { justify-content: center; margin-top: 24px; }
@media (max-width: 760px) {
  .site-hero.stacked { padding: 24px 0 8px; }
  .site-hero.stacked .hero-art.mascots { margin: 20px 0 6px; }
  .site-hero.stacked .hero-art.merged { max-width: 330px; margin: 10px auto 0; }
  .site-hero.stacked .hero-sub { font-size: 15.5px; }
  .site-hero.stacked .hero-cta { width: 100%; margin-top: 20px; }
}

/* --- Telegram Mini App: navbar yo'q, ekran to'liq telefon uchun --- */
html.site.tg #app { min-height: 100vh; padding-top: 4px; }
html.site.tg .site-hero.stacked { padding-top: 20px; }

/* =====================================================================
   Temperament natijasi: shaxsiyat profili (sayt va Mini App)
   ===================================================================== */
/* ---------------------------------------------------------------------
   Dinamik temperament rangi: yagona konfiguratsiya. Faqat .tp-theme ichida
   (profil va ochish ekrani) ishlaydi; pastdagi tavsiyalar va ulashish bo'limlariga ta'sir qilmaydi.
   --------------------------------------------------------------------- */
:root { --temp-X: #e5484d; --temp-S: #e8930c; --temp-F: #1f9d6b; --temp-M: #4f5bd5; }
.tp-theme { --temperament-primary: #6a5cff; }
.tp-theme[data-temp="X"] { --temperament-primary: var(--temp-X); }
.tp-theme[data-temp="S"] { --temperament-primary: var(--temp-S); }
.tp-theme[data-temp="F"] { --temperament-primary: var(--temp-F); }
.tp-theme[data-temp="M"] { --temperament-primary: var(--temp-M); }
.tp-theme {
  --temperament-soft: color-mix(in srgb, var(--temperament-primary) 9%, var(--surface));
  --temperament-border: color-mix(in srgb, var(--temperament-primary) 22%, var(--line));
  --temperament-gradient: linear-gradient(135deg, color-mix(in srgb, var(--temperament-primary) 72%, #fff),
    var(--temperament-primary) 55%, color-mix(in srgb, var(--temperament-primary) 82%, #000));
  /* eski nomlar (profil kodida ishlatiladi) */
  --tc: var(--temperament-primary);
  --tc-soft: var(--temperament-soft);
}

.tp-card {
  position: relative; overflow: hidden; margin-top: 14px; padding: 22px 20px 20px; border-radius: 28px;
  background:
    radial-gradient(440px 220px at 100% 0%, color-mix(in srgb, var(--temperament-primary) 16%, transparent), transparent 70%),
    radial-gradient(360px 200px at 0% 0%, color-mix(in srgb, var(--temperament-primary) 7%, transparent), transparent 70%),
    var(--surface);
  border: 1px solid var(--temperament-border); box-shadow: var(--shadow-md);
  animation: tpIn .6s var(--ease) both;
}
@keyframes tpIn { from { opacity: 0; transform: translateY(12px); } }
.tp-top { display: flex; align-items: center; gap: 16px; }
.mascot.tp-avatar {
  position: relative; left: auto; top: auto; right: auto; bottom: auto; flex: none;
  width: 92px; height: 92px; padding: 8px; border-radius: 28px; display: flex; align-items: center; justify-content: center;
  background: var(--tc-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 18%, transparent);
  animation: none; filter: none;
}
.tp-avatar svg { width: 100%; height: auto; display: block; overflow: visible; }
.tp-id { min-width: 0; display: flex; flex-direction: column; }
.tp-label { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--hint); }
.tp-name {
  margin-top: 4px; font-size: clamp(30px, 8.4vw, 44px); line-height: 1.04; font-weight: 800; letter-spacing: -.03em; color: var(--tc);
  overflow-wrap: anywhere;
}
.tp-tagline { margin-top: 6px; font-size: 15px; font-weight: 700; color: var(--text); }
.tp-lead { margin-top: 16px; font-size: 16px; line-height: 1.55; color: var(--text); }
.tp-traits { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tp-traits li {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 8px; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; background: var(--tc-soft); color: var(--text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 16%, transparent);
}
.tp-traits li span { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--tc); color: #fff; flex: none; }
.tp-traits li svg { width: 12px; height: 12px; stroke-width: 3; }

/* Bitta ulush diagrammasi: segmentli chiziq va izoh */
.tp-mix { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--temperament-border); }
.tp-mix-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 14px; }
.tp-stack { display: flex; gap: 3px; height: 12px; border-radius: 99px; overflow: hidden; background: var(--card); }
.tp-stack i { width: var(--w); background: var(--c); border-radius: 99px; transform-origin: left; animation: barIn 1s var(--ease) both; }
.tp-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 12px; }
.tp-legend span { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--hint); min-width: 0; }
.tp-legend span i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); flex: none; }
.tp-legend span b { margin-left: auto; color: var(--text); font-weight: 800; }
.tp-legend span.on { color: var(--text); font-weight: 700; }
.tp-mixed { margin-top: 12px; font-size: 14px; color: var(--hint); }

/* Oddiy bloklar: siz haqingizda, o'lchovlar */
.tp-block { margin-top: 14px; padding: 18px 20px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.tp-block h2, .tp-analysis-head h2 { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.tp-clamp { margin-top: 8px; font-size: 15.5px; line-height: 1.6; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tp-clamp.open { -webkit-line-clamp: unset; display: block; }
.tp-more { margin-top: 6px; padding: 6px 0; border: 0; background: none; color: var(--temperament-primary); font-weight: 800; font-size: 14px; }
.axis { margin-top: 14px; }
.axis-top { display: flex; justify-content: space-between; font-size: 14.5px; font-weight: 700; }
.axis-top b { color: var(--temperament-primary); }
.axis-track { position: relative; height: 8px; margin: 10px 0 6px; border-radius: 99px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--temperament-primary) 12%, var(--card)), color-mix(in srgb, var(--temperament-primary) 42%, var(--card))); }
.axis-track i {
  position: absolute; top: 50%; left: var(--ax); width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  background: var(--surface); box-shadow: 0 0 0 4px var(--temperament-primary), 0 4px 10px -2px rgba(15, 21, 48, .3);
  animation: knob 1s var(--ease) both;
}
@keyframes knob { from { left: 50%; opacity: 0; } }
.tp-axes .axis-ends { font-size: 12.5px; color: var(--hint); }

/* Ochilib-yopiladigan bo'limlar */
.tp-analysis { margin-top: 26px; }
.tp-analysis-head { margin-bottom: 12px; }
.tp-analysis-head p { margin-top: 4px; font-size: 13.5px; color: var(--hint); }
.acc { margin-top: 10px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; transition: box-shadow .3s; }
.acc.open { box-shadow: var(--shadow-md); }
.acc-head {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 14px; border: 0; background: none;
  text-align: left; color: var(--text); font: inherit; cursor: pointer;
}
.acc-ic {
  flex: none; width: 40px; height: 40px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--temperament-primary); background: var(--temperament-soft); transition: background .3s, color .3s;
}
.acc-ic svg { width: 21px; height: 21px; }
.acc-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.acc-titles b { font-size: 15.5px; font-weight: 800; }
.acc-titles small { font-size: 13px; color: var(--hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .25s; }
.acc.open .acc-titles small { opacity: 0; }
.acc-count { flex: none; min-width: 26px; height: 24px; padding: 0 8px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 800; color: var(--hint); background: var(--card); }
.acc-chev { flex: none; color: var(--hint); display: inline-flex; transition: transform .35s var(--ease); }
.acc-chev svg { width: 20px; height: 20px; }
.acc.open .acc-chev { transform: rotate(180deg); }
.acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.acc.open .acc-body { grid-template-rows: 1fr; }
.acc-inner { overflow: hidden; padding: 0 16px; }
.acc.open .acc-inner { padding-bottom: 16px; }
.acc-inner p { font-size: 15px; line-height: 1.6; }
.acc-sub { font-weight: 700; margin-bottom: 4px; }
.acc-note { margin-top: 10px; font-size: 14px; color: var(--hint); }
.acc-note b { color: var(--text); }
.acc-list { list-style: none; margin: 0; padding: 0; }
.acc-list li { position: relative; padding: 9px 0 9px 22px; font-size: 15px; line-height: 1.55; border-top: 1px solid var(--line); }
.acc-list li:first-child { border-top: 0; }
.acc-list li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 7px; height: 7px; border-radius: 50%; background: var(--temperament-primary); opacity: .75; }
.tp-disclaimer { margin: 16px 4px 0; font-size: 12.5px; color: var(--hint); text-align: center; }

/* Natijani ochish ekrani */
.reveal { flex: 1; min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.reveal-dots { position: relative; width: 84px; height: 84px; animation: spin 2.4s linear infinite; }
.reveal-dots i {
  position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px; border-radius: 50%; background: var(--c);
  transform: rotate(calc(var(--i) * 90deg)) translateY(-28px);
  animation: dotPulse 1.2s ease-in-out infinite; animation-delay: calc(var(--i) * .15s);
}
@keyframes dotPulse { 50% { scale: .6; opacity: .6; } }
.reveal-wait { margin-top: 26px; font-size: 16px; font-weight: 700; color: var(--hint); }
.reveal-done { display: flex; flex-direction: column; align-items: center; max-width: 360px; animation: tpIn .5s var(--ease) both; }
.reveal-check {
  width: 76px; height: 76px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff;
  background: var(--temperament-gradient); box-shadow: 0 18px 36px -16px var(--temperament-primary); animation: pop 1s var(--ease) both;
}
@keyframes pop { 0% { scale: .4; opacity: 0; } 60% { scale: 1.08; opacity: 1; } 100% { scale: 1; } }
.reveal-check svg { width: 36px; height: 36px; stroke-width: 2.6; }
.reveal-done h1 { margin-top: 22px; font-size: clamp(24px, 6.4vw, 32px); line-height: 1.2; font-weight: 800; letter-spacing: -.025em; }
.reveal-done p { margin-top: 8px; color: var(--hint); font-size: 15.5px; }
.reveal-done .btn { margin-top: 26px; width: 100%; max-width: 320px; min-height: 52px;
  background: var(--temperament-gradient); box-shadow: 0 14px 30px -14px var(--temperament-primary); }

@media (max-width: 760px) {
  .tp-card { padding: 18px 16px 18px; border-radius: 24px; }
  .tp-top { gap: 12px; }
  .mascot.tp-avatar { width: 76px; height: 76px; border-radius: 22px; padding: 6px; }
  .tp-lead { font-size: 15.5px; margin-top: 14px; }
  .tp-block { padding: 16px; }
  .acc-head { padding: 12px; gap: 10px; }
}
@media (max-width: 360px) {
  .tp-legend { grid-template-columns: 1fr; }
  .tp-traits li { font-size: 13px; }
  .acc-count { display: none; }
}
.tp-more { min-height: 44px; }
/* Faqat 320-340 px ekranlar: tavsiya kartochkasi tugmasi sig'ishi uchun (kengroq ekranlarda o'zgarishsiz) */
@media (max-width: 340px) {
  .rec-body { min-width: 0; }
  .rec-cta { white-space: normal; font-size: 12.5px; line-height: 1.2; text-align: center; }
}

/* Dinamik rang: dekorativ chiziq, ochiladigan bo'limlarning aktiv holati */
.tp-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--temperament-gradient); opacity: .85;
}
.tp-analysis-head h2, .tp-block h2 { display: flex; align-items: center; gap: 10px; }
.tp-analysis-head h2::before, .tp-block h2::before {
  content: ""; width: 4px; height: 18px; border-radius: 4px; background: var(--temperament-primary); flex: none;
}
.acc { transition: box-shadow .3s, border-color .3s; }
.acc-head:hover .acc-ic { background: color-mix(in srgb, var(--temperament-primary) 16%, var(--surface)); }
.acc.open { border-color: var(--temperament-border); }
.acc.open .acc-ic { background: var(--temperament-gradient); color: #fff; }
.acc.open .acc-chev { color: var(--temperament-primary); }
.acc.open .acc-count { color: var(--temperament-primary); background: var(--temperament-soft); }
.acc-head:focus-visible, .tp-more:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--temperament-primary) 40%, transparent); outline-offset: 2px; border-radius: 12px;
}
.tp-legend span.on b { color: var(--temperament-primary); }

/* =====================================================================
   Test oldidan sahifalar: Joyful Premium. Uchala sahifa bitta tizim,
   ranglar o'zgaruvchilarda. Oq matnli tugmalar AA uchun ranglarning to'qroq tusida.
   ===================================================================== */
.intro {
  --ink: #0f1530;
  display: flex; flex-direction: column; flex: 1; color: var(--ink);
}
.intro-temp {
  --i1: #7856FF; --i2: #B75CFF; --i3: #FF83C4; --ibg: #FFF0FA; --iink: #5B3BE0;
  --ibtn: linear-gradient(135deg, #7856FF, color-mix(in srgb, #B75CFF 80%, #000));
}
.intro-love {
  --i1: #FF7849; --i2: #FF4C8C; --i3: #FFB55B; --ibg: #FFF2E8; --iink: #C2185B;
  --ibtn: linear-gradient(135deg, color-mix(in srgb, #FF7849 86%, #000), color-mix(in srgb, #FF4C8C 86%, #000));
}
.intro-friend {
  --i1: #2487FF; --i2: #12C6E8; --i3: #54DB9A; --ibg: #E8FFF4; --iink: #0B63CE;
  --ibtn: linear-gradient(135deg, #2487FF, color-mix(in srgb, #2487FF 78%, #000));
}
.intro { --ink: var(--text); }

/* Hero */
.intro-hero {
  position: relative; overflow: hidden; isolation: isolate; margin-top: 12px; padding: 18px 20px 22px; border-radius: 30px;
  display: grid; grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 4px;
  background:
    radial-gradient(260px 180px at 12% 8%, color-mix(in srgb, var(--i3) 30%, transparent), transparent 70%),
    radial-gradient(300px 220px at 92% 0%, color-mix(in srgb, var(--i2) 26%, transparent), transparent 70%),
    radial-gradient(280px 200px at 50% 110%, color-mix(in srgb, var(--i1) 18%, transparent), transparent 70%),
    var(--ibg);
  border: 1px solid color-mix(in srgb, var(--i1) 16%, transparent);
  box-shadow: 0 24px 50px -30px color-mix(in srgb, var(--i1) 60%, transparent);
  animation: introIn .4s var(--ease) both;
}
.intro-art { width: auto; }
.intro-copy { max-width: 32em; }
.intro-kicker {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--iink); background: color-mix(in srgb, var(--i1) 12%, #fff);
}
.intro-kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, var(--i1), var(--i2)); }
.intro-hero h1 { margin-top: 10px; font-size: clamp(25px, 6.8vw, 36px); line-height: 1.15; font-weight: 800; letter-spacing: -.025em; color: #0f1530; }
.intro-hero p { margin-top: 8px; font-size: 15.5px; line-height: 1.5; color: #3d4466; }

/* Bo'limlar */
.intro-sec { margin-top: 22px; animation: introIn .4s var(--ease) both; animation-delay: calc(var(--d, 0) * 80ms); }
.intro-sec h2 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 12px; color: var(--ink); }

/* Nima qilasiz: bosqichlar, raqamlar chiziq bilan bog'langan */
.intro-steps { list-style: none; margin: 0; padding: 0; position: relative; }
.intro-steps::before {
  content: ""; position: absolute; left: 19px; top: 22px; bottom: 22px; width: 2px; border-radius: 2px;
  background: linear-gradient(var(--i1), var(--i2), var(--i3)); opacity: .45;
}
.intro-steps li { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 8px 0; }
.step-n {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: #0f1530; background: #fff;
  box-shadow: inset 0 0 0 2.5px transparent, 0 6px 14px -8px var(--i1);
  border: 2.5px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, var(--i1), var(--i2), var(--i3)) border-box;
}
.step-t {
  flex: 1; padding: 11px 14px; border-radius: 16px; font-size: 15px; line-height: 1.45; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}

/* Natijada nima olasiz: benefit kartochkalar */
.intro-benefits { display: grid; gap: 10px; }
.benefit {
  display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.benefit p { font-size: 15px; line-height: 1.45; font-weight: 600; color: var(--ink); }
.benefit-ic {
  flex: none; width: 46px; height: 46px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: var(--ibtn);  /* oq belgi uchun yetarli kontrast */
  box-shadow: 0 10px 18px -10px var(--i1), inset 0 0 0 2px color-mix(in srgb, var(--i3) 45%, transparent);
}
.benefit-ic svg { width: 23px; height: 23px; stroke-width: 2; }

/* Narx, oxirgi natija, eslatma */
.intro-price .block { margin-top: 18px; border-color: color-mix(in srgb, var(--i1) 22%, var(--line)); background: var(--surface); }
.intro-price .price-row b { color: var(--iink); }
.intro-price .checks li::before { filter: none; }
.intro-last {
  margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px;
  border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.intro-last div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.intro-last span { font-size: 13px; color: var(--hint); }
.intro-last b { font-size: 16px; color: var(--ink); }
.intro-last small { font-size: 12.5px; color: var(--hint); }
.intro-ghost {
  flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; font-weight: 800; font-size: 14px;
  color: var(--iink); background: color-mix(in srgb, var(--i1) 10%, #fff); border: 1.5px solid color-mix(in srgb, var(--i1) 30%, transparent);
  transition: transform .2s var(--ease);
}
.intro-note { margin-top: 14px; padding: 12px 14px; border-radius: 16px; font-weight: 700; background: color-mix(in srgb, var(--i1) 10%, #fff); color: var(--iink); }

/* Tugmalar: yirik, yumaloq; matn 18px qalin (AA katta matn) */
.intro-actions { display: grid; gap: 6px; }
.intro-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 58px; padding: 0 24px;
  border: 0; border-radius: 999px; color: #fff; font: inherit; font-size: 18px; font-weight: 800; letter-spacing: -.005em;
  background: var(--ibtn); box-shadow: 0 16px 30px -14px var(--i1), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .2s var(--ease), box-shadow .3s var(--ease); cursor: pointer;
}
.intro-btn svg { width: 20px; height: 20px; transition: transform .3s var(--ease); }
.intro-link {
  min-height: 44px; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 700; color: var(--iink); cursor: pointer;
}
.intro-btn:active, .intro-ghost:active, .intro-link:active { transform: scale(.97); }
@media (hover: hover) {
  .intro-btn:hover { transform: translateY(-2px); box-shadow: 0 20px 36px -14px var(--i1), inset 0 1px 0 rgba(255, 255, 255, .25); }
  .intro-btn:hover svg { transform: translateX(3px); }
  .benefit:hover, .step-t:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
  .step-t { transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
}
.intro-btn:focus-visible, .intro-ghost:focus-visible, .intro-link:focus-visible { outline: 3px solid color-mix(in srgb, var(--i1) 45%, transparent); outline-offset: 3px; }

@keyframes introIn { from { opacity: 0; transform: translateY(10px); } }

/* Rasm: bosh sahifadagi qahramonlar */
.intro-art { display: flex; align-items: center; justify-content: center; }
.intro-clan { width: min(190px, 56vw); margin: 4px auto 6px; }
.intro-clan::before { border-color: color-mix(in srgb, var(--i1) 40%, transparent); }
.intro-buddy { width: min(190px, 56vw); cursor: default; animation: buddyIn .5s var(--ease) both; }
.intro-buddy .buddy-fig { animation: drift 6s var(--ease) infinite; }
.intro-buddy :is(.l-heart, .l-mini path, .d-spark, .f-a, .f-b) { transform-box: fill-box; }

/* Desktop: rasm chapda, matn o'ngda */
@media (min-width: 761px) {
  .intro-hero { grid-template-columns: 240px 1fr; justify-items: start; text-align: left; align-items: center; gap: 24px; padding: 26px 30px; }
  .intro-art { width: 240px; }
  .intro-clan, .intro-buddy { width: 220px; }
  .intro-benefits { grid-template-columns: repeat(3, 1fr); }
  .benefit { flex-direction: column; align-items: flex-start; }
  .intro-actions { max-width: 420px; margin-left: auto; margin-right: auto; width: 100%; }
}
@media (max-width: 360px) {
  .intro-hero { padding: 14px 14px 18px; border-radius: 24px; }
  .intro-clan, .intro-buddy { width: min(160px, 52vw); }
  .step-t, .benefit p { font-size: 14.5px; }
  .intro-btn { min-height: 54px; font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .intro *, .intro *::before, .intro { animation: none !important; transition: none !important; }
}

/* Mini App: yuqori panel (bosh sahifa va til) */
html.tg .tg-bar .site-bar-in { height: 54px; padding: 0 14px; }
html.tg .tg-bar .site-logo { border: 0; background: none; padding: 0; cursor: pointer; font-size: 17px; }
html.tg .tg-bar .logo-mark { width: 28px; height: 28px; }
html.tg .tg-bar .lang-switch button { padding: 6px 9px; font-size: 12px; }

/* Saytga kirish: kompyuterda QR kod va Telegram Desktop tugmasi */
.login-desktop { display: block; margin-top: 10px; text-decoration: none; box-sizing: border-box; }
.login-start { margin-top: 6px; font-weight: 600; }
.login-qr { margin: 18px auto 0; padding-top: 16px; border-top: 1px solid var(--line); }
.login-qr-img { width: 184px; height: 184px; margin: 0 auto; padding: 8px; border-radius: 16px; background: #fff;
  box-shadow: 0 8px 24px -12px rgba(15, 21, 48, .35); }
.login-qr-img svg { width: 100%; height: 100%; display: block; }
.login-qr p { margin: 10px 0 0; font-size: 13px; color: var(--hint); }

/* --- Sevgi natijasi: minimalistik karta, eng muhimi va bo'limlar --- */
.tp-theme[data-temp="L"] { --temperament-primary: #e0457b; }
.lstk { display: inline-flex; flex: none; transform: rotate(var(--tilt, -6deg)); filter: drop-shadow(0 4px 6px rgba(42, 27, 61, .2));
  transition: transform .35s var(--ease); }
.lstk svg { width: 100%; height: 100%; overflow: visible; display: block; }
.acc-head:hover .lstk, .lr-key-row:hover .lstk { transform: rotate(0deg) scale(1.08); }
.lr .acc-ic.lstk { width: 42px; height: 42px; background: none; border-radius: 0; }
.lr .acc:nth-of-type(2n) .lstk { --tilt: 7deg; }
.lr-top { display: flex; align-items: center; gap: 14px; }
.lstk.lr-hero-stk { width: 76px; height: 76px; --tilt: -8deg; animation: lrFloat 5s var(--ease) infinite; }
@keyframes lrFloat { 50% { transform: rotate(4deg) translateY(-3px); } }
.lr-names { margin-top: 4px; font-size: clamp(24px, 6.6vw, 34px); line-height: 1.1; font-weight: 800; letter-spacing: -.025em; overflow-wrap: anywhere; }
.lr-names i { font-style: normal; color: var(--temperament-primary); font-weight: 700; }
.lr-score { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.lr-score b { font-size: clamp(48px, 14vw, 64px); line-height: 1; font-weight: 800; letter-spacing: -.04em; color: var(--temperament-primary); }
.lr-score span { font-size: 15.5px; font-weight: 700; color: var(--text); }
.lr-meter { height: 8px; margin-top: 12px; border-radius: 99px; background: var(--card); overflow: hidden; }
.lr-meter i { display: block; width: var(--lw); height: 100%; border-radius: 99px; background: var(--temperament-gradient);
  transform-origin: left; animation: barIn 1.1s var(--ease) both; }
.lr-know { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.lr-know.one { grid-template-columns: 1fr; }
.lr-know div { padding: 12px 14px; border-radius: 16px; background: var(--temperament-soft); display: flex; flex-direction: column; gap: 2px; }
.lr-know b { font-size: 22px; font-weight: 800; color: var(--temperament-primary); }
.lr-know span { font-size: 13px; color: var(--hint); }
.lr-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.lr-bar { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 8px; font-size: 13.5px; min-width: 0; }
.lr-bar span { color: var(--hint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-bar b { font-weight: 800; }
.lr-track { grid-column: 1 / -1; height: 5px; border-radius: 99px; background: var(--card); overflow: hidden; }
.lr-track i { display: block; width: var(--lw); height: 100%; border-radius: 99px; background: var(--temperament-primary); opacity: .8;
  transform-origin: left; animation: barIn 1s var(--ease) both; }
.lr-key h2 { margin-bottom: 4px; }
.lr-key-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.lr-key-row:first-of-type { border-top: 0; }
.lr-key-row .lstk { width: 40px; height: 40px; margin-top: 2px; }
.lr-key-row:nth-of-type(2) .lstk { --tilt: 7deg; }
.lr-key-row small { display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px;
  border-radius: 99px; color: var(--kc); background: color-mix(in srgb, var(--kc) 12%, transparent); }
.lr-key-row p { margin-top: 6px; font-size: 15.5px; line-height: 1.5; font-weight: 600; color: var(--text); }
.lr-strength { --kc: #149a6c; }
.lr-caution { --kc: #c27c00; }
.lr-advice { --kc: #6a5cff; }
.lr-item { padding: 12px 0; border-top: 1px solid var(--line); }
.acc-sub + .lr-item, .lr-item:first-child { border-top: 0; padding-top: 2px; }
.lr-item p { font-size: 15px; line-height: 1.6; }
.lr-item p + p { margin-top: 6px; }
.lr-fact { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; font-weight: 700; font-size: 15px; }
.lr-fact b { flex: none; padding: 3px 10px; border-radius: 99px; font-size: 13px; color: var(--temperament-primary); background: var(--temperament-soft); }
.lr-plain { font-size: 15px; line-height: 1.6; }
@media (prefers-reduced-motion: reduce) { .lstk.lr-hero-stk { animation: none; } }

/* --- Yopiq natija (to'lov natijadan keyin): xira namuna va ochish kartasi --- */
.lock-wrap { position: relative; margin-top: 14px; }
.lock-blur { filter: blur(9px) saturate(.9); opacity: .75; pointer-events: none; user-select: none; }
.lock-card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(360px, calc(100% - 24px));
  padding: 24px 20px 20px; border-radius: 24px; text-align: center; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg, 0 24px 60px -20px rgba(15, 21, 48, .45));
  animation: tpIn .5s var(--ease) both;
}
.lock-ic { width: 54px; height: 54px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: var(--temperament-gradient, linear-gradient(135deg, #7c5cff, #4f7cff)); }
.lock-ic svg { width: 26px; height: 26px; }
.lock-card h2 { margin-top: 14px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.lock-card p { margin-top: 8px; font-size: 15px; line-height: 1.55; color: var(--hint); }
.lock-card p b { color: var(--text); }
.lock-card .btn { margin-top: 14px; width: 100%; }
.price-tag { display: inline-flex; align-items: baseline; flex-wrap: wrap; justify-content: center; gap: 4px 10px; margin-top: 14px; }
.price-tag s { color: #e5484d; text-decoration: line-through; text-decoration-color: #e5484d; text-decoration-thickness: 2px;
  font-size: 15px; font-weight: 700; opacity: .9; }
.price-tag b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.price-off { padding: 3px 8px; border-radius: 99px; font-size: 12px; font-weight: 800; color: #fff; background: #e5484d; }
.price-row .price-tag { margin-top: 0; justify-content: flex-end; }
.price-row .price-tag b { font-size: 18px; }
.pay-btn.soon { opacity: .55; }
.pay-btn.soon b { font-size: 13px; font-weight: 700; }
.option.picked { border-color: var(--brand-solid, #6a5cff); background: rgba(106, 92, 255, .12); }
.row-unlock { border: 1px dashed var(--line); }
.lock-friend .lock-ic { background: linear-gradient(135deg, #5aa8ff, #2f6bff); }

/* Test: "Orqaga" va "Keyingisi / Tasdiqlayman" bir qatorda */
.quiz-nav { display: flex; gap: 10px; margin-top: 6px; }
.quiz-nav .btn { flex: 1; }
.quiz-nav .btn.ghost { flex: 0 0 38%; }
.quiz-nav .btn:disabled { opacity: .45; pointer-events: none; box-shadow: none; }

/* O'zingiz test yarating */
.tile-custom { --tile: #7c4dff; }
.feature.custom { background: linear-gradient(140deg, #8b5cf6, #6d28d9 60%, #4c1d95); }
.custom-hero .custom-who { font-size: clamp(40px, 11vw, 64px); letter-spacing: .06em; text-transform: uppercase; line-height: 1; }
.custom-hero.small h1 { font-size: 26px; }
.custom-tiles .tile b { font-size: 18px; }
.cq { display: flex; flex-direction: column; gap: 10px; }
.cq-head { display: flex; align-items: center; justify-content: space-between; }
.cq-head .btn.link { width: auto; padding: 4px 8px; font-size: 13px; }
.cq-q { resize: vertical; min-height: 58px; font: inherit; }
.cq-opt { display: flex; align-items: center; gap: 10px; }
.cq-opt .input { flex: 1; margin: 0; }
.cq-a { width: 22px; height: 22px; flex: 0 0 22px; accent-color: var(--brand-solid, #7c4dff); }
.cq-x { flex: 0 0 34px; height: 34px; border: 0; border-radius: 10px; background: var(--card); color: var(--hint); font-size: 15px; cursor: pointer; }
.cq-addo { align-self: flex-start; width: auto; padding: 6px 4px; }
.cq-count { text-align: center; color: var(--hint); font-size: 14px; margin: 4px 0; }
#app.theme-custom { --brand: linear-gradient(140deg, #8b5cf6, #6d28d9 55%, #4c1d95); --brand-solid: #6d28d9; }

/* --- Sovg'alar do'koni --- */
#app.theme-shop { --brand: linear-gradient(140deg, #ff7a59, #f0447a 55%, #b12a8c); --brand-solid: #e83f74; }
.tile-shop { --tile: #f0447a; }
.feature.shop { background: linear-gradient(140deg, #ff7a59, #f0447a 60%, #b12a8c); }
body.modal-open { overflow: hidden; }
.shop-head { display: flex; flex-direction: column; gap: 10px; padding: 18px 16px 6px; }
.shop-head h1 { margin: 0; font-size: 24px; line-height: 1.15; text-wrap: balance; }
.shop-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.shop-cart-btn { position: relative; border: 0; border-radius: 14px; width: 48px; height: 48px; display: grid; place-items: center;
  background: var(--surface, var(--card)); color: var(--text); cursor: pointer; box-shadow: var(--shadow-sm, none); }
.shop-cart-btn svg { width: 24px; height: 24px; }
.shop-cart-btn .cnt { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--brand-solid); color: #fff; font-size: 12px; font-weight: 800; line-height: 20px; text-align: center; }
.shop-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.shop-tools .input { margin: 0; }
.shop-cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.shop-cats .chip { border: 1px solid var(--line, transparent); background: var(--surface, var(--card)); color: var(--text); white-space: nowrap; cursor: pointer; }
.shop-cats .chip.on { background: var(--brand-solid); color: #fff; border-color: transparent; }
.sp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; padding: 10px 16px; }
@media (min-width: 640px) { .sp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .sp-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px 16px; } }
.sp-card { display: flex; flex-direction: column; gap: 4px; min-width: 0; cursor: pointer; }
.sp-card.out { opacity: .6; }
.sp-img { position: relative; aspect-ratio: 3 / 4; max-width: 100%; border-radius: 14px; overflow: hidden; background: var(--card); }
.sp-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.sp-card:hover .sp-img img { transform: scale(1.03); }
.sp-badge { position: absolute; left: 6px; bottom: 6px; background: rgba(255, 255, 255, .94); color: #1b1b1f; border-radius: 6px;
  padding: 2px 6px; font-size: 10px; font-weight: 800; letter-spacing: .02em; }
.sp-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.sp-price b { font-size: 16px; }
.sp-price s { color: var(--hint); font-size: 12px; }
.sp-price.big b { font-size: 26px; }
.sp-price.big s { font-size: 15px; }
.sp-off { background: #fde2ea; color: #c2185b; border-radius: 6px; padding: 1px 6px; font-size: 13px; font-weight: 800; }
.sp-sale { color: #e8590c; font-size: 12px; font-weight: 700; }
.sp-title { margin: 0; font-size: 13.5px; font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.sp-out { font-size: 12px; color: var(--hint); font-weight: 700; margin-top: auto; padding: 9px 0; }
.sp-add { margin-top: auto; border: 0; border-radius: 10px; padding: 9px 8px; background: var(--brand); color: #fff;
  font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.sp-qty { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; margin-top: auto; border-radius: 10px;
  background: var(--card); text-align: center; font-variant-numeric: tabular-nums; }
.sp-qty button { border: 0; background: none; color: var(--text); font-size: 20px; height: 38px; cursor: pointer; }
.sp-qty button:disabled { opacity: .35; }
.sp-qty.big { max-width: 220px; }
.sp-warn { color: #e8590c; font-size: 13px; font-weight: 600; margin: 0; }
/* Mahsulot oynasi */
.sp-modal { position: fixed; inset: 0; z-index: 50; background: rgba(10, 12, 30, .55); display: flex; align-items: flex-end;
  justify-content: center; padding-top: env(safe-area-inset-top, 0px); }
.sp-sheet { position: relative; width: 100%; max-width: 980px; max-height: 92vh; overflow-y: auto; background: var(--surface, var(--bg));
  color: var(--text); border-radius: 22px 22px 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px;
  padding: 16px max(16px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
@media (min-width: 760px) {
  .sp-modal { align-items: center; padding: 24px; }
  .sp-sheet { border-radius: 22px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 24px; }
  .sp-related { grid-column: 1 / -1; }
}
.sp-sheet .btn { width: 100%; }
.sp-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: var(--card); color: var(--text); font-size: 16px; cursor: pointer; }
.sp-gallery { position: relative; }
.sp-gallery img { width: 100%; aspect-ratio: 3 / 4; max-width: 100%; max-height: 62vh; margin: 0 auto; object-fit: cover; border-radius: 16px; display: block; background: var(--card); }
.sp-dots { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.sp-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: var(--line, #ccc); cursor: pointer; padding: 0; }
.sp-dots button.on { background: #e83f74; }
.sp-info { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sp-info h2 { margin: 0; font-size: 20px; line-height: 1.3; padding-right: 40px; }
.sp-info h3, .sp-related h3 { margin: 8px 0 0; font-size: 15px; }
.sp-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-badges span { background: var(--card); border-radius: 6px; padding: 2px 8px; font-size: 11px; font-weight: 800; }
.sp-delivery { background: var(--card); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.sp-delivery small { color: var(--hint); }
.sp-desc { white-space: pre-line; margin: 0; }
.sp-specs { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 14px; }
.sp-specs dt { color: var(--hint); }
.sp-specs dd { margin: 0; }
.sp-row { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 12px; overflow-x: auto; padding: 8px 0; }
.sp-modal .sp-add { background: linear-gradient(140deg, #ff7a59, #f0447a 55%, #b12a8c); }
.sp-modal .btn.primary { background: linear-gradient(140deg, #ff7a59, #f0447a 55%, #b12a8c); color: #fff; }
/* Savat va rasmiylashtirish */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 0 16px; }
@media (min-width: 900px) { .cart-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .cart-total { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 80px); } }
.cart-layout > .block, .co-main > .block { margin: 0; }
.co-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.co-main h2, .cart-total h2 { margin: 0 0 8px; font-size: 17px; }
.cart-list { display: flex; flex-direction: column; gap: 12px; }
.cart-row { display: grid; grid-template-columns: 22px 72px minmax(0, 1fr) auto; gap: 12px; align-items: start;
  padding-top: 12px; border-top: 1px solid var(--line, var(--card)); }
.cart-row input { width: 20px; height: 20px; accent-color: var(--brand-solid); margin: 26px 0 0; }
.cart-row img { width: 72px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; cursor: pointer; background: var(--card); }
.cart-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cart-t { font-weight: 600; font-size: 14px; }
.cart-main .sp-qty { width: 128px; margin: 0; }
.cart-sum { display: flex; flex-direction: column; align-items: flex-end; text-align: right; font-variant-numeric: tabular-nums; }
.cart-sum s { color: var(--hint); font-size: 12px; }
.cart-sum .btn.link { width: auto; padding: 6px 0; font-size: 13px; }
@media (max-width: 520px) { .cart-row { grid-template-columns: 22px 64px minmax(0, 1fr); } .cart-sum { grid-column: 3; align-items: flex-start; text-align: left; } }
.cart-total { display: flex; flex-direction: column; gap: 10px; }
.free-hint { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--card); font-size: 13px; }
.tot-row { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.tot-row.disc span:last-child { color: #e11d74; }
.tot-row.total { border-top: 1px solid var(--line, var(--card)); padding-top: 10px; font-size: 17px; }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; padding: 4px; border-radius: 14px; background: var(--card); }
.seg button { border: 0; border-radius: 11px; padding: 10px; background: none; color: var(--text); font: inherit; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px; }
.seg button small { color: var(--hint); }
.seg button.on { background: var(--surface, var(--bg)); box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, .12)); }
.co-map { height: 300px; border-radius: 14px; overflow: hidden; background: var(--card); display: grid; place-items: center; margin: 8px 0; }
.fl { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; font-size: 13px; color: var(--hint); }
.fl .input { margin: 0; color: var(--text); font: inherit; font-size: 15px; }
textarea.input { resize: vertical; }
.co-items { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.co-items img { width: 56px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; background: var(--card); }
.co-pay { display: flex; flex-direction: column; gap: 6px; }
.co-pay .check { font-size: 15px; color: var(--text); }
.check.muted { opacity: .5; }
.order-card { display: flex; flex-direction: column; gap: 8px; margin: 0 16px 12px; }
.order-card.fresh { outline: 2px solid var(--brand-solid); }
.order-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.st { border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; background: var(--card); white-space: nowrap; }
.st-paid, .st-packing { background: #e7f0ff; color: #1d4ed8; }
.st-shipping { background: #fff3d6; color: #a15c00; }
.st-delivered { background: #dcf7e7; color: #0f7a40; }
.st-cancelled, .st-refunded { background: #fde2e2; color: #b91c1c; }

/* Do'kon hali yopiq: xira tugma va "Tez orada" belgisi */
.tile.soon, .feature.soon { opacity: .55; filter: grayscale(.45); }
.tile.soon .tile-body, .feature.soon .feature-body { position: relative; }
.soon-tag { display: inline-block; align-self: flex-start; width: max-content; background: #f0447a; color: #fff; border-radius: 999px;
  padding: 2px 10px; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 4px; }
.shop-soon { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.shop-soon .soon-tag { align-self: center; }
