:root {
  --cream: #F7F1EA;
  --paper: #FFFCF8;
  --ink: #2B1A2A;
  --ink-2: #6B5A68;
  --ink-3: #9C8D99;
  --plum: #4A2545;
  --plum-2: #6E3B63;
  --plum-soft: #EFE3EC;
  --gold: #B8862B;
  --gold-soft: #F4E8CF;
  --sage: #7E9A78;
  --sage-soft: #E5EDE1;
  --rose: #C8657A;
  --line: rgba(74, 37, 69, .10);
  --shadow: 0 1px 2px rgba(43, 26, 42, .04), 0 8px 24px rgba(43, 26, 42, .06);
  --r: 20px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", -apple-system, system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.45; }
body { min-height: 100vh; overscroll-behavior-y: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
a { color: var(--plum-2); }
[hidden] { display: none !important; }

#app { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(96px + var(--safe-b)); }

/* ---------- logo ---------- */
.logo-mark { width: 34px; height: 34px; flex: none; background: url("logo.svg") center / contain no-repeat; }
.logo-mark.big { width: 72px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 26px; letter-spacing: .12em; color: var(--plum); }
.brand-sub { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-top: -3px; }

.splash { min-height: 80vh; display: grid; place-content: center; justify-items: center; gap: 14px; }
.splash .logo-mark { animation: spin 6s linear infinite; }
.splash-name { font-family: var(--serif); font-weight: 700; font-size: 30px; letter-spacing: .3em; color: var(--plum); padding-left: .3em; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- layout ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.chip.ok { background: var(--sage-soft); color: #4E6B49; }
.chip.warn { background: var(--gold-soft); color: #8A6216; }
.chip.off { background: var(--plum-soft); color: var(--plum); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

h1, h2, h3 { margin: 0; font-weight: 600; }
.h-serif { font-family: var(--serif); font-weight: 600; letter-spacing: .01em; }
.page-title { font-family: var(--serif); font-size: 34px; font-weight: 600; color: var(--plum); line-height: 1.05; margin: 6px 2px 4px; }
.page-sub { color: var(--ink-2); margin: 0 2px 18px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 26px 2px 12px; }
.section-head h3 { font-family: var(--serif); font-size: 23px; color: var(--plum); }
.section-head .more { font-size: 13px; font-weight: 600; color: var(--plum-2); }

.card { background: var(--paper); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.card + .card { margin-top: 12px; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; color: var(--ink-3); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: clip; color: #fff; border-radius: 26px; padding: 22px 20px 20px;
  background: radial-gradient(120% 90% at 100% 0%, #8C4A7E 0%, transparent 55%), linear-gradient(160deg, #5A2D54 0%, #3A1C37 100%);
  box-shadow: 0 16px 40px rgba(58, 28, 55, .28); }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12); box-shadow: 0 0 0 26px rgba(255,255,255,.03), 0 0 0 54px rgba(255,255,255,.025); }
.hero .greet { font-size: 13px; opacity: .75; letter-spacing: .02em; }
.hero .name { font-family: var(--serif); font-size: 34px; font-weight: 600; line-height: 1.05; margin: 2px 0 14px; }
.hero .status-row { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.ring { --p: 50; width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(#E9C77F calc(var(--p) * 1%), rgba(255,255,255,.14) 0); }
.ring > div { width: 52px; height: 52px; border-radius: 50%; background: #45213F; display: grid; place-items: center; text-align: center; line-height: 1; }
.ring b { font-size: 17px; } .ring small { font-size: 9.5px; opacity: .7; display: block; margin-top: 2px; }
.hero .status-text b { display: block; font-size: 15px; }
.hero .status-text span { font-size: 13px; opacity: .78; }
.hero .actions { display: flex; gap: 8px; margin-top: 16px; position: relative; z-index: 1; }
.hero .actions .btn { white-space: nowrap; font-size: 14px; padding: 0 10px; min-width: 0; }
.hero .actions .btn.gold { flex: 1.35; }
.hero .actions .btn.ghost { flex: 1; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 18px;
  border-radius: 14px; font-weight: 700; font-size: 15px; transition: transform .12s ease, opacity .12s; width: 100%; }
.btn:active { transform: scale(.98); }
.btn.gold { background: linear-gradient(180deg, #D3A548, #B8862B); color: #fff; box-shadow: 0 6px 16px rgba(184,134,43,.35); }
.btn.plum { background: var(--plum); color: #fff; }
.btn.ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.22); }
.btn.soft { background: var(--plum-soft); color: var(--plum); }
.btn.line { background: transparent; color: var(--plum); border: 1.5px solid var(--line); }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- next event ---------- */
.event-next { display: flex; gap: 14px; align-items: center; }
.date-block { width: 58px; flex: none; text-align: center; border-radius: 14px; padding: 8px 0 7px; background: var(--gold-soft); color: #7A5413; }
.date-block b { display: block; font-family: var(--serif); font-size: 28px; line-height: 1; }
.date-block span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.date-block.t { background: var(--plum-soft); color: var(--plum); }
.event-next .title { font-weight: 700; }
.countdown { margin-top: 12px; display: flex; gap: 6px; }
.countdown div { flex: 1; background: var(--cream); border-radius: 12px; text-align: center; padding: 8px 0 6px; }
.countdown b { font-family: var(--serif); font-size: 24px; color: var(--plum); line-height: 1; display: block; }
.countdown span { font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); min-height: 104px; display: flex; flex-direction: column; justify-content: space-between; }
.tile .em { font-size: 24px; }
.tile b { font-size: 14.5px; }
.tile span { font-size: 12px; color: var(--ink-3); }

/* ---------- values ---------- */
.hscroll { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.value { scroll-snap-align: start; flex: 0 0 62%; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.value .em { font-size: 26px; }
.value b { display: block; font-family: var(--serif); font-size: 21px; color: var(--plum); margin: 6px 0 2px; }

/* ---------- lists ---------- */
.list-item { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; padding-bottom: 2px; }
.list-item:first-child { padding-top: 2px; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 700; }
.month-label { font-family: var(--serif); font-size: 20px; color: var(--ink-2); margin: 20px 4px 8px; text-transform: capitalize; }

.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; padding: 8px 14px; border-radius: 99px; background: var(--paper); border: 1px solid var(--line); font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.chips button.on { background: var(--plum); color: #fff; border-color: var(--plum); }

.rec { display: flex; gap: 14px; align-items: center; }
.rec + .rec { margin-top: 10px; }
.rec .thumb { width: 64px; height: 64px; border-radius: 16px; flex: none; display: grid; place-items: center; font-size: 26px; position: relative;
  background: linear-gradient(145deg, var(--plum-soft), var(--gold-soft)); }
.rec .thumb .play { position: absolute; right: -4px; bottom: -4px; width: 26px; height: 26px; border-radius: 50%; background: var(--plum); display: grid; place-items: center; box-shadow: 0 3px 8px rgba(74,37,69,.3); }
.rec .thumb .play svg { width: 11px; height: 11px; fill: #fff; margin-left: 2px; }
.rec.locked { opacity: .55; }
.rec .meta { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.badge-demo { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); margin-left: 6px; }

/* ---------- club ---------- */
.host { display: flex; gap: 14px; align-items: center; }
.avatar { width: 54px; height: 54px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--serif); font-size: 24px; font-weight: 700; color: #fff; }
.avatar.n { background: linear-gradient(145deg, #C8657A, #8C4A7E); }
.avatar.a { background: linear-gradient(145deg, #6E6FB0, #4A2545); }
.bullets { margin: 0; padding: 0; list-style: none; }
.bullets li { position: relative; padding: 7px 0 7px 26px; }
.bullets li::before { content: ""; position: absolute; left: 4px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.bullets.num { counter-reset: n; }
.bullets.num li::before { counter-increment: n; content: counter(n); width: 18px; height: 18px; left: 0; top: 9px; font-size: 11px; font-weight: 700; color: var(--plum); background: var(--plum-soft); display: grid; place-items: center; }

.soon { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--gold-soft); color: #8A6216; padding: 4px 9px; border-radius: 99px; }
.metric { padding: 12px 0; border-bottom: 1px solid var(--line); }
.metric:last-child { border-bottom: 0; padding-bottom: 0; }
.metric-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.metric-top b { font-size: 14px; }
.metric-top .delta { font-weight: 700; font-size: 13px; color: #4E6B49; white-space: nowrap; }
.bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; align-items: end; height: 58px; }
.bars div { border-radius: 8px 8px 4px 4px; position: relative; min-height: 6px; background: var(--plum-soft); transition: height .8s cubic-bezier(.2,.8,.2,1); }
.bars div:nth-child(2) { background: #D8B6CE; }
.bars div:nth-child(3) { background: linear-gradient(180deg, #8C4A7E, var(--plum)); }
.bars div span { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: 10.5px; color: var(--ink-3); text-align: center; margin-top: 12px; }

/* ---------- profile ---------- */
.sub-card { background: linear-gradient(160deg, #FFFCF8, #F3E9DE); }
.kv { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); gap: 12px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--ink-2); }
.kv b { text-align: right; }
.row-link { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 600; width: 100%; text-align: left; }
.row-link:last-child { border-bottom: 0; padding-bottom: 2px; }
.row-link:first-child { padding-top: 2px; }
.row-link .chev { color: var(--ink-3); }
textarea, input[type=email] { width: 100%; font: inherit; border: 1.5px solid var(--line); background: var(--cream); border-radius: 14px; padding: 12px 14px; color: var(--ink); outline: none; }
textarea:focus, input:focus { border-color: var(--plum-2); }
textarea { min-height: 96px; resize: none; }

.credit { text-align: center; margin: 28px 0 4px; font-size: 12px; color: var(--ink-3); }
.credit b { color: var(--ink-2); }

.cta-card { text-align: center; padding: 22px 18px; }
.cta-card .price { font-family: var(--serif); font-size: 40px; font-weight: 700; color: var(--plum); line-height: 1; }
.cta-card .price small { font-family: var(--sans); font-size: 14px; color: var(--ink-3); font-weight: 500; }

/* ---------- tabbar ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around;
  padding: 8px 6px calc(8px + var(--safe-b)); background: rgba(255, 252, 248, .9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--ink-3); padding: 4px 0; }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button.active { color: var(--plum); }
.tabbar button.active svg { stroke-width: 2.1; }

/* ---------- sheet & toast ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(43,26,42,.35); z-index: 30; animation: fade .2s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; max-width: 560px; margin: 0 auto; background: var(--paper);
  border-radius: 26px 26px 0 0; padding: 10px 18px calc(20px + var(--safe-b)); animation: up .28s cubic-bezier(.2,.8,.2,1); }
.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 16px; }
.sheet h3 { font-family: var(--serif); font-size: 26px; color: var(--plum); margin-bottom: 6px; }
.toast { position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translateX(-50%); z-index: 40; background: var(--ink); color: #fff;
  padding: 11px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; max-width: 90vw; text-align: center; animation: up .25s; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translate(var(--tx, 0), 30px); opacity: 0; } }
.toast { --tx: -50%; }

.fade-in { animation: fadein .35s ease both; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 8px; }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }

/* ---------- замеры: общий показатель и чакры ---------- */
.overall { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 2px; }
.overall div { text-align: center; }
.overall b { display: block; font-family: var(--serif); font-size: 34px; line-height: 1; color: var(--ink-3); }
.overall .last b { font-size: 46px; color: var(--plum); }
.overall span { font-size: 11px; color: var(--ink-3); }
.overall + .tiny { margin-bottom: 4px; }
.overall .arrow { color: var(--ink-3); font-size: 16px; }
.chakras { margin-top: 12px; }
.chakra-row { display: grid; grid-template-columns: 10px 96px 1fr 50px; align-items: center; gap: 8px; padding: 5px 0; }
.chakra-dot { width: 10px; height: 10px; border-radius: 50%; }
.chakra-name { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.chakra-row b { font-size: 12px; text-align: right; white-space: nowrap; }
.chakra-bars { display: grid; gap: 2px; }
.chakra-bars i, .chakra-legend i { display: block; height: 4px; border-radius: 4px; background: var(--c, var(--plum)); }
.chakra-bars i.c0, .chakra-legend i.c0 { opacity: .25; }
.chakra-bars i.c1, .chakra-legend i.c1 { opacity: .55; }
.chakra-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: 10.5px; color: var(--ink-3); margin-top: 10px; }
.chakra-legend i { width: 18px; margin-bottom: 4px; }

/* ---------- обучение ---------- */
.tariffs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tariffs div { background: var(--cream); border-radius: 14px; padding: 10px 8px; min-width: 0; overflow-wrap: anywhere; }
.tariffs b { display: block; font-family: var(--serif); font-size: 19px; color: var(--plum); }
.tariffs span { font-size: 11.5px; color: var(--ink-2); line-height: 1.3; display: block; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::after { content: "+"; float: right; color: var(--ink-3); }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 8px 0 0; }
.sheet { max-height: 88vh; overflow-y: auto; }

/* ---------- фото ведущих ---------- */
.avatar.photo { background: center 20% / cover no-repeat var(--plum-soft); box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--gold-soft); }
.avatar.sm { width: 44px; height: 44px; }
.hosts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.host-card { position: relative; aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; text-align: left; color: #fff;
  background: center 20% / cover no-repeat var(--plum-soft); box-shadow: var(--shadow); }
.host-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(58, 28, 55, .85)); }
.host-card div { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 1; }
.host-card b { display: block; font-family: var(--serif); font-size: 24px; line-height: 1.05; }
.host-card span { font-size: 12px; opacity: .85; }

/* ---------- демо-оплата в шторке ---------- */
.testbar { background: var(--gold-soft); color: #7A5413; font-size: 12.5px; font-weight: 600; text-align: center; padding: 9px 12px; border-radius: 12px; margin-bottom: 14px; }
.merchant { display: flex; align-items: center; gap: 12px; }
.merchant .logo-mark { width: 40px; height: 40px; }
.amount { font-family: var(--serif); font-size: 40px; font-weight: 700; color: var(--plum); margin: 14px 0 0; line-height: 1; }
.methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
.methods button { border: 1.5px solid var(--line); background: var(--paper); border-radius: 14px; padding: 12px 6px; font-weight: 700; font-size: 13px; }
.methods button.on { border-color: var(--plum-2); box-shadow: 0 0 0 3px var(--plum-soft); }
.methods small { display: block; font-weight: 500; color: var(--ink-3); font-size: 11px; margin-top: 2px; }
button:focus-visible, .btn:focus-visible { outline: 2px solid var(--plum-2); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- ровные поля 16px у горизонтальных лент ---------- */
.hscroll, .chips { scroll-padding-inline: 16px; }
.hscroll::after, .chips::after { content: ""; flex: 0 0 6px; }  /* правое поле: 10px gap + 6px = 16px */
.chips::after { flex-basis: 8px; }                                /* 8px gap + 8px = 16px */
.chip { white-space: nowrap; }
@media (max-width: 374px) {
  .hero .actions { flex-direction: column; }
  .hero .actions .btn.gold, .hero .actions .btn.ghost { flex: 0 0 auto; }
  .brand-sub { letter-spacing: .08em; white-space: nowrap; }
}
.host-card span { display: block; min-height: 2.7em; }  /* имена на одной линии при подписи в 1–2 строки */

/* ---------- сканирование и работа с ведущими ---------- */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pair > * { background: var(--cream); border: 1.5px solid transparent; border-radius: 14px; padding: 10px 12px; text-align: left; }
.pair > .on { border-color: var(--gold); background: var(--gold-soft); }
.pair b { display: block; font-size: 14px; }
.pair span { font-size: 12px; color: var(--ink-2); }
.pair.choice > * { cursor: pointer; }
.offer-top { display: flex; align-items: center; gap: 12px; }
.offer-title { font-size: 21px; color: var(--plum); display: block; line-height: 1.15; }
.duo { display: flex; flex: none; }
.duo .avatar + .avatar { margin-left: -12px; }
.row-link { gap: 8px; }
.row-link .chev { overflow-wrap: anywhere; text-align: right; font-weight: 500; font-size: 13px; }

/* ---------- пустой раздел «Записи» ---------- */
.empty-card { text-align: center; padding: 28px 20px; }
.empty-mark { width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; background: linear-gradient(145deg, var(--plum-soft), var(--gold-soft)); }
