/* EzzWrapped — тёмная тема в духе Telegram.
   Спокойная графитовая основа, один акцент (голубой Telegram), цвет — только в «моментах»:
   главный график, персонаж, эмодзи пользователя. Фирменная деталь — пузыри сообщений с временем и ✓✓. */
:root {
  --bg-0: #0f0f10;
  --bg: #141415;
  --card: #19191b;
  --raised: #232325;
  --line: rgba(237, 237, 237, .08);
  --line-2: rgba(237, 237, 237, .12);
  --text: #ededed;
  --muted: #a1a1a6;
  --faint: #85858b;
  --accent: #6ab3f3;
  --accent-ink: #0b1a29;
  --pos: #4cc38a;
  --bubble-in: #212d3b;
  --bubble-out: #2b5278;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --top: max(var(--tg-content-safe-area-inset-top, 0px) + var(--tg-safe-area-inset-top, 0px), env(safe-area-inset-top, 0px));
  --bottom: max(var(--tg-safe-area-inset-bottom, 0px), env(safe-area-inset-bottom, 0px));
  --sans: 'Geist', -apple-system, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --display: var(--sans);
  --body: var(--sans);
  --gold: var(--accent);
  --edge: var(--line);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--bg); color: var(--text); font-family: var(--sans); overflow: hidden; }
body { -webkit-font-smoothing: antialiased; font-size: 15px; line-height: 1.4; user-select: none; -webkit-user-select: none; font-feature-settings: 'tnum' 1; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, textarea { user-select: text; -webkit-user-select: text; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
.bg { position: fixed; inset: 0; background: var(--bg); z-index: 0; }
main { position: relative; z-index: 1; height: 100%; }

/* премиум-эмодзи: однотонные иконки Telegram iOS — как набор иконок (приглушённые, один размер) */
.tge { display: inline-block; width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.tge svg, .tge img { width: 100% !important; height: 100% !important; display: block; }

/* поверхности */
.glass, .card, .kpi, .row, .prow, .tile, .emo, .who, .hero, .versus, .chart { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }

/* кнопки */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 0 20px; border-radius: 12px; font-weight: 500; font-size: 15px; transition: transform .14s var(--ease), background-color .14s var(--ease), opacity .14s; }
.btn:active { transform: scale(.98); }
.btn--main { background: #ededed; color: #141415; }
.btn--gold { background: var(--accent); color: var(--accent-ink); }
.btn--glass { background: var(--raised); border: 1px solid var(--line); }
.btn--big { min-height: 52px; font-size: 16px; }
.btn--quiet { min-height: 40px; font-size: 14px; color: var(--muted); }
.btn .tge { width: 20px; height: 20px; }
.btn--main .tge, .btn--gold .tge { filter: brightness(0); opacity: .7; }
.btn--glass .tge { opacity: .7; }

/* главный экран */
.home { height: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; max-width: 520px; margin: 0 auto; padding: calc(var(--top) + 20px) 20px calc(var(--bottom) + 24px); display: flex; flex-direction: column; gap: 16px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.brand__mark { width: 22px; height: 22px; border-radius: 6px; background: var(--text); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.hero-home { padding-top: 24px; }
.hero-home h1 { font-weight: 500; font-size: 36px; line-height: 1.06; letter-spacing: -.03em; }
.hero-home p { margin-top: 12px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.preview-app { padding: 20px; border-radius: var(--r-xl); background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.preview-app__label { font-size: 13px; color: var(--muted); }
.preview-app__num { font-weight: 500; font-size: 44px; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.preview-app__row { font-size: 13px; color: var(--muted); }
.preview-app__row b { color: var(--pos); font-weight: 500; }
.preview-app .bars { height: 72px; margin: 16px 0 4px; }
.preview-app .bubbles { margin-top: 12px; }
.howto { padding: 16px; display: flex; flex-direction: column; }
.howto summary { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15px; cursor: pointer; list-style: none; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::after { content: '+'; margin-left: auto; color: var(--faint); font-size: 20px; line-height: 1; }
.howto[open] summary::after { content: '\2212'; }
.howto[open] > .seg, .howto[open] > .steps { margin-top: 16px; }
.steps { display: flex; flex-direction: column; gap: 12px; counter-reset: s; }
.step { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--muted); }
.step b { color: var(--text); font-weight: 500; }
.step::before { counter-increment: s; content: counter(s); flex: none; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; color: var(--text); background: var(--raised); }
.seg { display: flex; padding: 3px; border-radius: 10px; background: var(--bg-0); border: 1px solid var(--line); }
.seg button { flex: 1; padding: 8px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--muted); transition: background-color .14s var(--ease), color .14s var(--ease); }
.seg button.on { background: var(--raised); color: var(--text); }
.note { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--faint); padding: 0 4px; }
.note .tge { width: 16px; height: 16px; opacity: .6; margin-top: 1px; }
.hint { font-size: 13px; color: var(--muted); line-height: 1.45; padding: 12px 16px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); }
.hint b { color: var(--text); font-weight: 500; }

/* пузырь сообщения — фирменная деталь */
.bubbles { display: flex; flex-direction: column; gap: 4px; }
.bubble { position: relative; align-self: flex-start; max-width: 88%; padding: 8px 12px 6px; border-radius: 16px 16px 16px 4px; background: var(--bubble-in); font-size: 14px; line-height: 1.4; }
.bubble b { font-weight: 600; }
.bubble__time { float: right; margin: 6px 0 0 10px; font-family: var(--mono); font-size: 11px; color: rgba(237, 237, 237, .45); }
.bubble--out { align-self: flex-end; background: var(--bubble-out); border-radius: 16px 16px 4px 16px; }
.bubble--out .bubble__time { color: rgba(237, 237, 237, .6); }
.bubble--out .bubble__time::after { content: ' \2713\2713'; color: #9fd2ff; }

/* загрузка / выбор себя */
.loading { height: 100%; display: grid; place-items: center; text-align: center; padding: 24px; }
.loading__box { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.loading__text { font-weight: 500; font-size: 18px; }
.loading__sub { color: var(--faint); font-size: 13px; max-width: 280px; line-height: 1.45; }
.bar { width: 200px; height: 3px; border-radius: 2px; background: var(--raised); overflow: hidden; }
.bar i { display: block; height: 100%; width: 40%; background: var(--accent); animation: slide 1.1s var(--ease) infinite; }
@keyframes slide { from { transform: translateX(-110%); } to { transform: translateX(260%); } }
.pick { height: 100%; overflow-y: auto; overflow-x: hidden; max-width: 520px; margin: 0 auto; padding: calc(var(--top) + 32px) 20px calc(var(--bottom) + 24px); display: flex; flex-direction: column; gap: 8px; }
.pick h2 { font-size: 26px; font-weight: 500; letter-spacing: -.02em; }
.pick p { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.who { display: flex; align-items: center; justify-content: space-between; gap: 12px; overflow-wrap: anywhere; padding: 8px 16px; min-height: 52px; border-radius: var(--r-md); text-align: left; font-weight: 500; }
.who span { flex: none; color: var(--faint); font-family: var(--mono); font-size: 12px; font-weight: 400; }

/* оболочка приложения */
.appview { height: 100%; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; }
.topnav { flex: none; padding: calc(var(--top) + 12px) 16px 8px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--line); }
.topnav__row { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.topnav__row .brand { flex: 1; }
.get-pro { font-size: 14px; font-weight: 500; color: var(--accent); }
.tag { display: inline-block; padding: 2px 6px; border-radius: 4px; font-family: var(--mono); font-size: 11px; font-weight: 400; background: var(--raised); color: var(--muted); margin-left: 6px; vertical-align: 2px; }
.periods { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.periods::-webkit-scrollbar { display: none; }
.period { flex: none; display: flex; flex-direction: column; align-items: flex-start; padding: 6px 12px; border-radius: 10px; transition: background-color .14s var(--ease); }
.period b { font-size: 14px; font-weight: 500; color: var(--muted); }
.period small { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.period.on { background: var(--raised); }
.period.on b { color: var(--text); }
.period.on small { color: var(--accent); }
.period--add { flex-direction: row; align-items: center; gap: 6px; }
.period--add .tge { width: 16px; height: 16px; opacity: .6; }
.tabview { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; transition: opacity .2s var(--ease); padding: 16px 16px calc(var(--bottom) + 104px); }
.view { display: flex; flex-direction: column; gap: 32px; animation: fadein .36s var(--ease) both; }
.tabbar { position: fixed; z-index: 10; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottom) + 12px); width: min(calc(100% - 24px), 520px); display: flex; padding: 4px; border-radius: 20px; background: rgba(28, 28, 30, .78); border: 1px solid var(--line-2); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 16px; font-size: 11px; font-weight: 500; color: var(--faint); transition: background-color .14s var(--ease), color .14s var(--ease); }
.tab .tge { width: 24px; height: 24px; opacity: .5; transition: opacity .14s var(--ease); }
.tab.on { background: rgba(255, 255, 255, .08); color: var(--text); }
.tab.on .tge { opacity: 1; }

/* главный блок вкладки */
.hero { position: relative; overflow-wrap: anywhere; padding: 20px; border-radius: var(--r-xl); display: flex; flex-direction: column; gap: 4px; }
.hero__label { font-size: 14px; color: var(--muted); }
.hero__label em { font-style: normal; color: var(--text); }
.hero__num { font-weight: 500; font-size: clamp(44px, 16vw, 64px); line-height: 1; letter-spacing: -.04em; margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
.hero__title { font-weight: 500; font-size: 28px; line-height: 1.15; letter-spacing: -.02em; margin-top: 4px; }
.hero__word { font-weight: 500; font-size: 44px; line-height: 1.1; letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }
.hero__sub { color: var(--muted); font-size: 14px; line-height: 1.45; }
.hero__row { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; }
.hero .btn { margin-top: 16px; }
.hero--person { cursor: pointer; width: 100%; text-align: left; }
.hero__person { display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; }
.hero__person .ava { width: 48px; height: 48px; font-size: 17px; }
.hero__person b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; font-size: 26px; letter-spacing: -.02em; }
.pill { font-size: 14px; color: var(--muted); }
.pill small { font-size: 14px; }
.pill--up { color: var(--pos); }
.pill--up small { color: var(--muted); }

/* секции и цифры */
.sec { display: flex; flex-direction: column; gap: 12px; }
.sec__h { font-size: 15px; font-weight: 500; padding: 0 4px; }
.card { padding: 16px; }
.card__foot { margin-top: 12px; font-size: 13px; color: var(--muted); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpi { min-width: 0; overflow-wrap: anywhere; padding: 16px; display: flex; flex-direction: column; gap: 4px; min-height: 88px; }
.kpi b { font-weight: 500; font-size: 24px; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 13px; color: var(--muted); line-height: 1.3; }
.row-card { display: flex; align-items: center; gap: 16px; }
.row-card b { display: block; font-weight: 500; font-size: 18px; }
.row-card span { font-size: 13px; color: var(--muted); }
.big-ico { width: 28px !important; height: 28px !important; opacity: .62; }
.persona-card { display: flex; gap: 16px; align-items: center; padding: 20px; overflow-wrap: anywhere; }
.persona-card > div { min-width: 0; }
.persona-card__emoji { width: 88px !important; height: 88px !important; }
.persona-card b { display: block; font-weight: 500; font-size: 22px; letter-spacing: -.02em; }
.persona-card span { display: block; font-size: 13px; color: var(--muted); line-height: 1.45; margin-top: 4px; }
.persona-card .chips { margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { max-width: 100%; overflow-wrap: anywhere; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; font-size: 13px; background: var(--raised); border: 1px solid var(--line); }
.chip .tge { width: 16px; height: 16px; }
.chip span { color: var(--faint); font-family: var(--mono); font-size: 12px; }
.chips__h { font-size: 13px; color: var(--muted); align-self: center; margin-right: 4px; }

/* графики: нейтральные столбцы, акцент — только на главном значении */
.chart { padding: 16px 16px 12px; }
.card > .chart { padding: 0; border: 0; background: none; border-radius: 0; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 160px; }
.bars i { flex: 1; min-width: 2px; border-radius: 3px 3px 1px 1px; background: #3a3a3d; transform-origin: bottom; animation: grow .5s var(--ease) both; }
.bars i.peak { background: var(--accent); }
.bars i.hl { background: #56565a; }
.bars--hours { height: 120px; gap: 2px; }
.bars--dense { gap: 2px; }
.bars--two { height: 140px; gap: 24px; padding: 0 32px; }
.axis { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.axis--two span { flex: 1; text-align: center; }
@keyframes grow { from { transform: scaleY(0); } }
.hm { display: flex; flex-direction: column; gap: 3px; }
.hm__row { display: flex; align-items: center; gap: 8px; }
.hm__m { width: 28px; flex: none; font-family: var(--mono); font-size: 10px; color: var(--faint); }
.hm__cells { flex: 1; display: grid; grid-template-columns: repeat(31, 1fr); gap: 2px; }
.hm__c, .hm__x { aspect-ratio: 1; border-radius: 2px; }
.hm__c { background: #232325; }
.hm__c.l1 { background: #26394d; }
.hm__c.l2 { background: #2f5579; }
.hm__c.l3 { background: #4682b8; }
.hm__c.l4 { background: var(--accent); }
.hm__legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 8px; font-family: var(--mono); font-size: 10px; color: var(--faint); }
.hm__legend .hm__c { width: 10px; }

.list { display: flex; flex-direction: column; gap: 4px; }
.row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 16px; border-radius: var(--r-md); position: relative; overflow: hidden; text-align: left; width: 100%; }
.row .tge { width: 18px; height: 18px; opacity: .62; }
.row__fill { position: absolute; inset: 0; background: rgba(106, 179, 243, .08); transform-origin: left; animation: fill .6s var(--ease) both; }
.row > *:not(.row__fill) { position: relative; }
.row__n { font-family: var(--mono); font-size: 12px; color: var(--faint); width: 18px; }
.row__name { flex: 1; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__name.wrap { white-space: normal; font-size: 14px; line-height: 1.4; }
.row__v { flex: none; white-space: nowrap; font-family: var(--mono); font-size: 13px; color: var(--muted); }
@keyframes fill { from { transform: scaleX(0); } }
.emoji-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.emo { aspect-ratio: 1; border-radius: var(--r-md); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.emo__e { font-size: 30px; line-height: 1; }
.emo b { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--faint); }
.emo--top { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.emo--top .emo__e { font-size: 72px; }
.emo--top b { font-size: 14px; color: var(--text); }
.promo { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.promo > b { font-weight: 500; font-size: 20px; }
.promo ul, .promo-sheet ul { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.promo li, .promo-sheet li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.promo li .tge, .promo-sheet li .tge { width: 16px; height: 16px; opacity: .6; }
.empty { text-align: center; color: var(--faint); padding: 32px 12px; }
.dots { display: flex; justify-content: center; gap: 6px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--raised); }
.dots i.on { background: var(--accent); }

/* люди */
.search { width: 100%; height: 44px; padding: 0 16px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); font: inherit; color: var(--text); outline: none; transition: border-color .14s var(--ease); }
.search:focus { border-color: rgba(106, 179, 243, .5); }
.search::placeholder { color: var(--faint); }
.legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); padding: 0 4px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; background: #ededed; }
.legend i.them { background: var(--accent); margin-left: 12px; }
.plist { display: flex; flex-direction: column; gap: 4px; }
.prow { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 12px; min-height: 60px; border-radius: var(--r-md); text-align: left; width: 100%; transition: background-color .14s var(--ease), transform .14s var(--ease); }
.prow:active { transform: scale(.98); background: var(--raised); }
.prow__n { width: 18px; font-family: var(--mono); font-size: 12px; color: var(--faint); flex: none; text-align: center; }
.prow__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.prow__name { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow__bar { display: flex; height: 3px; border-radius: 2px; overflow: hidden; background: var(--raised); }
.prow__bar i { display: block; height: 100%; background: #ededed; animation: fill .6s var(--ease) both; transform-origin: left; }
.prow__bar i.them { background: var(--accent); }
.prow__v { flex: none; white-space: nowrap; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.ava { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 500; font-size: 13px; color: #fff; }
.person { display: flex; flex-direction: column; gap: 16px; }
.person__head { display: flex; align-items: center; gap: 12px; }
.person__head .ava, .person__head > .tge { width: 52px; height: 52px; font-size: 18px; }
.person__head > div { min-width: 0; }
.person__head b { display: block; overflow-wrap: anywhere; font-weight: 500; font-size: 22px; letter-spacing: -.02em; }
.person__head span { font-size: 13px; color: var(--muted); }
.versus { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.person .versus { padding: 0; border: 0; background: none; }
.versus__bar { display: flex; height: 36px; border-radius: 10px; overflow: hidden; font-family: var(--mono); font-size: 13px; }
.versus__bar div { display: flex; align-items: center; padding: 0 12px; min-width: 56px; }
.versus__bar .me { background: #ededed; color: #141415; }
.versus__bar .them { background: var(--bubble-out); justify-content: flex-end; flex: 1; }
.versus__names { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }

/* замок */
.locked-box { position: relative; border-radius: var(--r-lg); overflow: hidden; }
.locked-box__inner { filter: blur(8px); opacity: .45; pointer-events: none; user-select: none; }
.unlock { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px; height: 44px; max-width: calc(100% - 24px); padding: 0 16px; border-radius: 10px; background: var(--raised); border: 1px solid var(--line-2); font-weight: 500; font-size: 14px; white-space: nowrap; }
.unlock .tge { width: 16px; height: 16px; opacity: .7; }

/* шторка */
.sheet { position: fixed; inset: 0; z-index: 30; }
.sheet__bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .3s var(--ease); }
.sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: calc(100% - var(--top) - 16px); overflow-y: auto; overscroll-behavior: contain; padding: 8px 20px calc(var(--bottom) + 24px); border-radius: 20px 20px 0 0; background: #1c1c1e; border: 1px solid var(--line); border-bottom: 0; transform: translateY(100%); transition: transform .4s var(--ease); }
.sheet.on .sheet__bg { opacity: 1; }
.sheet.on .sheet__panel { transform: none; }
.sheet__grip { width: 36px; height: 4px; border-radius: 2px; background: #3a3a3d; margin: 0 auto 16px; }
.promo-sheet__emoji { width: 64px !important; height: 64px !important; }
.promo-sheet h3 { font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.field { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.date { flex: 1; height: 44px; padding: 0 12px; border-radius: var(--r-md); background: var(--raised); border: 1px solid var(--line); font: inherit; color: var(--text); color-scheme: dark; }

/* сторис */
.stories { position: fixed; inset: 0; display: flex; flex-direction: column; max-width: 480px; margin: 0 auto; background: var(--bg); }
.progress { position: absolute; z-index: 5; top: calc(var(--top) + 8px); left: 12px; right: 12px; display: flex; gap: 3px; }
.progress i { flex: 1; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, .18); overflow: hidden; position: relative; }
.progress i b { position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
.progress i.done b { transform: scaleX(1); }
.progress i.run b { animation: progress var(--dur, 7s) linear forwards; }
.stories.paused .progress i.run b { animation-play-state: paused; }
.progress i.lock { background: rgba(106, 179, 243, .25); }
@keyframes progress { to { transform: scaleX(1); } }
.topbar { position: absolute; z-index: 5; top: calc(var(--top) + 20px); left: 16px; right: 56px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--faint); pointer-events: none; }
.close-st { position: absolute; z-index: 6; top: calc(var(--top) + 8px); right: 6px; width: 44px; height: 44px; padding: 6px; background-clip: content-box !important; border-radius: 50%; display: grid; place-items: center; font-size: 13px; color: var(--muted); background: var(--raised); }
.slides { position: relative; flex: 1; }
.slide { position: absolute; inset: 0; padding: calc(var(--top) + 56px) 20px calc(var(--bottom) + 24px); display: flex; flex-direction: column; gap: 16px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .36s var(--ease), transform .4s var(--ease); }
.slide.on { opacity: 1; transform: none; pointer-events: auto; }
.slide.prev { transform: translateY(-6px); }
.tap { position: absolute; top: 0; bottom: 0; z-index: 3; }
.tap--l { left: 0; width: 30%; }
.tap--r { right: 0; width: 70%; }
.slide > *:not(.ghost):not(.tap):not(.lockbox) { position: relative; z-index: 1; }
.slide .actions, .slide .editor { position: relative; z-index: 4; }
.kicker { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.kicker .tge { width: 18px; height: 18px; opacity: .62; }
.title { font-weight: 500; font-size: 32px; line-height: 1.12; letter-spacing: -.025em; }
.title em { font-style: normal; color: var(--accent); }
.lead { color: var(--muted); font-size: 15px; line-height: 1.5; }
.big { overflow-wrap: anywhere; font-weight: 500; font-size: clamp(56px, 21vw, 112px); line-height: .95; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.big small { display: block; font-size: 15px; letter-spacing: 0; color: var(--muted); margin-top: 12px; }
.spacer { flex: 1; }
.word { font-weight: 500; font-size: clamp(44px, 14vw, 72px); line-height: 1; letter-spacing: -.04em; word-break: break-word; }
.word small { display: block; font-size: 15px; color: var(--muted); letter-spacing: 0; margin-top: 12px; }
.emoji-big { font-size: 104px; line-height: 1; }
.emoji-row { display: flex; gap: 6px; flex-wrap: wrap; }
.emoji-row .chip { font-size: 20px; padding: 6px 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { padding: 16px; display: flex; flex-direction: column; gap: 4px; min-height: 96px; }
.tile > .tge, .tile__glyph { display: none !important; }
.tile b { font-weight: 500; font-size: 26px; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: 13px; line-height: 1.3; }
.persona__emoji { width: 152px; height: 152px; margin: 0 auto; }
.fact--row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); }
.fact--row .tge { width: 18px; height: 18px; opacity: .62; }
.fact--row b { display: block; font-weight: 500; font-size: 16px; }
.fact--row span { font-size: 13px; color: var(--muted); }
.locked .stagger > *:not(.kicker) { filter: blur(10px); opacity: .4; pointer-events: none; }
.lockbox { position: absolute !important; z-index: 4; left: 16px; right: 16px; bottom: calc(var(--bottom) + 16px); max-height: calc(100% - var(--top) - 72px - var(--bottom)); overflow-y: auto; overscroll-behavior: contain; padding: 20px; display: flex; flex-direction: column; gap: 12px; background: #1c1c1e; border: 1px solid var(--line-2); border-radius: var(--r-xl); }
.lockbox h3 { font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
.lockbox p { color: var(--muted); font-size: 14px; line-height: 1.45; }
.preview { width: 60%; max-width: 260px; margin: 0 auto; aspect-ratio: 9 / 16; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line-2); background: var(--card); }
.preview img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .2s var(--ease); }
.editor { display: flex; flex-direction: column; gap: 16px; }
.actions { display: flex; flex-direction: column; gap: 8px; }
.actions .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.theme-pick { display: flex; justify-content: center; gap: 12px; }
.theme-pick { gap: 16px; }
.theme-pick button { width: 32px; height: 32px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line-2); transition: box-shadow .14s var(--ease); }
.theme-pick button.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.toggle { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; color: var(--muted); }
.toggle i { width: 36px; height: 22px; border-radius: 11px; background: var(--raised); position: relative; transition: background-color .14s var(--ease); }
.toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #ededed; transition: transform .18s var(--ease); }
.toggle.on i { background: var(--accent); }
.toggle.on i::after { transform: translateX(14px); }
.toast { position: fixed; z-index: 40; left: 16px; right: 16px; width: fit-content; margin: 0 auto; bottom: calc(var(--bottom) + 96px); transform: translateY(8px); opacity: 0; padding: 10px 16px; border-radius: 10px; background: #2c2c2e; border: 1px solid var(--line-2); font-size: 14px; transition: opacity .2s var(--ease), transform .2s var(--ease); pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.on { opacity: 1; transform: none; }
.fade-in { animation: fadein .36s var(--ease) both; }
.slide.on .stagger > * { animation: fadein .4s var(--ease) both; }
.slide.on .stagger > *:nth-child(2) { animation-delay: .05s; }
.slide.on .stagger > *:nth-child(3) { animation-delay: .1s; }
.slide.on .stagger > *:nth-child(4) { animation-delay: .15s; }
.slide.on .stagger > *:nth-child(5) { animation-delay: .2s; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  /* без анимации линия графика и заливка остались бы невидимыми */
  .area__line { stroke-dashoffset: 0; }
  .area__fill { opacity: 1; }
  /* полоска сторис — таймер, а не движение: без неё слайды не листаются сами */
  .progress i.run b { animation: progress var(--dur, 7s) linear forwards !important; }
}
