/* Пульс семьи — веб-версия. Спокойно и чисто: светлый фон, белые карточки без рамок, цвет — только там, где он что-то значит. */
:root {
  --primary: #2878C0; --paper: #EEF4F8; --top: #E6EFF6; --tile: #EAF1F6; --grad: linear-gradient(#E6EFF6, #EEF4F8);
  --hero: linear-gradient(135deg, #46C2B8, #3F8FD8); --as: linear-gradient(135deg, #2BB3A6, #3F8FD8); --as2: #3F8FD8;
  --ink: #18222B; --muted: #66737E; --line: #E3E9EE; --surface: #fff; --good: #16916A; --warn: #C98A16; --bad: #D25A48;
  --shadow: 0 1px 3px rgba(31, 60, 90, .08), 0 2px 10px rgba(31, 60, 90, .06); --wrap: 720px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15.5px/1.45 -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; -webkit-tap-highlight-color: transparent; }
body.noscroll { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--primary); }
.i { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; display: block; }
.ico { display: inline-flex; }
.wrap { max-width: var(--wrap); margin: 0 auto; }
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--primary); font-size: 20px; font-weight: 600; }
.boot i { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--primary); animation: spin .9s linear infinite; }

/* ─── Шапка ─── */
.appbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 4px; min-height: 58px; padding: 6px 6px 6px 4px; padding-top: max(6px, env(safe-area-inset-top));
  background: var(--surface); border-bottom: 1px solid var(--line); }
.appbar.dawn { background: var(--top); border-bottom-color: transparent; }
.ab-title { flex: 1; min-width: 0; padding: 0 6px; }
.ab-title b { display: block; font-size: 19px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.2px; }
.ab-title small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; flex: none; color: var(--ink); }
.ib:hover { background: rgba(0, 0, 0, .05); }
.ib:disabled { opacity: .35; }
.scr { padding: 10px 12px 110px; min-height: calc(100vh - 58px); }
.scr.dawnbg { background: var(--grad); background-repeat: no-repeat; background-size: 100% 520px; background-color: var(--paper); }
.scr.flat { padding: 0 0 110px; }

/* ─── Карточки, строки ─── */
.card { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); margin: 8px 0; overflow: hidden; }
.card.pad { padding: 16px; }
.card h3 { margin: 0 0 6px; font-size: 16.5px; font-weight: 600; }
.sec { margin: 22px 6px 8px; font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.sec.sm { font-size: 15px; margin-top: 16px; }
.hint { color: var(--muted); font-size: 13.5px; margin: 6px 6px 10px; line-height: 1.4; }
.center { text-align: center; }
.lrow { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 14px 13px 16px; border: 0; background: none; text-align: left; color: var(--ink); min-height: 56px; }
button.lrow:hover { background: rgba(0, 0, 0, .025); }
.lrow + .lrow { border-top: 1px solid var(--line); }
.lrow .lead { color: var(--muted); }
.lrow .lt { flex: 1; min-width: 0; }
.lrow .lt b { display: block; font-weight: 500; font-size: 15.5px; }
.lrow .lt small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; line-height: 1.35; }
.lrow .chev { color: var(--muted); opacity: .7; }
.lrow.danger, .mi.danger { color: var(--bad); }
.itile { position: relative; flex: none; display: grid; place-items: center; border-radius: 30%; background: var(--tile); color: color-mix(in srgb, var(--primary) 45%, var(--ink)); }
.itile .dot { position: absolute; right: -2px; top: -2px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--surface); }
.ticon { flex: none; display: grid; place-items: center; border-radius: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; border: 1px solid var(--line); font-size: 13px; font-weight: 500; background: var(--surface); }
.pill i { width: 7px; height: 7px; border-radius: 50%; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.ava { flex: none; display: grid; place-items: center; border-radius: 50%; font-weight: 600; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 12px; font-weight: 600; }
.badge.p { background: var(--primary); }
.muted { color: var(--muted); }
.good { color: var(--good); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.bar6 { height: 6px; border-radius: 4px; background: color-mix(in srgb, var(--warn) 25%, transparent); overflow: hidden; }
.bar6 i { display: block; height: 100%; background: var(--good); border-radius: 4px; }
.split { display: flex; gap: 2px; height: 5px; border-radius: 3px; overflow: hidden; margin-top: 8px; }
.split i { display: block; height: 100%; }
.empty { text-align: center; color: var(--muted); padding: 50px 20px; }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 8px; }
.empty .btn { margin-top: 16px; }
.spin { width: 30px; height: 30px; margin: 60px auto; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--primary); animation: spin .9s linear infinite; }
.spin.sm { width: 16px; height: 16px; margin: 0; border-width: 2px; display: inline-block; vertical-align: -3px; border-color: rgba(255, 255, 255, .4); border-top-color: currentColor; }
@keyframes spin { to { transform: rotate(360deg); } }
hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

/* ─── Кнопки и поля ─── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; font-size: 15px; color: var(--ink); text-decoration: none; }
.btn.filled { background: var(--primary); border-color: transparent; color: #fff; }
.btn.tonal { background: color-mix(in srgb, var(--primary) 12%, transparent); border-color: transparent; color: var(--primary); }
.btn.text { border-color: transparent; background: none; color: var(--primary); padding: 0 12px; }
.btn.danger { color: var(--bad); }
.btn.big { min-height: 54px; font-size: 16px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.input { width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 16px; color: var(--ink); outline: 0; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
textarea.input { resize: vertical; min-height: 84px; line-height: 1.4; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%2366737E' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 40px; }
.field { display: block; margin: 10px 0; }
.field .fl { display: block; font-size: 13px; color: var(--muted); margin: 0 0 5px 2px; }
.field small { display: block; color: var(--muted); font-size: 12.5px; margin: 5px 2px 0; }
.frow { display: flex; gap: 10px; }
.frow > * { flex: 1; min-width: 0; }
.chk { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; cursor: pointer; line-height: 1.4; }
.chk input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary); flex: none; }
.segs { display: flex; padding: 3px; border-radius: 20px; background: rgba(0, 0, 0, .06); }
.segs button { flex: 1; height: 34px; border: 0; border-radius: 17px; background: transparent; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; padding: 0 8px; }
.segs button.on { background: var(--surface); color: var(--primary); font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; padding: 6px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 500; }
.chip.on { background: color-mix(in srgb, var(--primary) 14%, transparent); border-color: color-mix(in srgb, var(--primary) 40%, transparent); color: color-mix(in srgb, var(--primary) 70%, var(--ink)); }
.fab { position: fixed; z-index: 25; right: max(16px, calc((100vw - var(--wrap)) / 2 + 12px)); bottom: calc(max(16px, env(safe-area-inset-bottom)) + var(--fab-up, 0px)); display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 16px;
  border: 0; border-radius: 28px; background: var(--primary); color: #fff; font-weight: 500; font-size: 15px; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); transition: transform .25s; }
.fab.hide { transform: translateY(140px); }
body.has-nav .fab { --fab-up: 72px; }

/* ─── Нижняя навигация ─── */
.nav { position: fixed; z-index: 24; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.nav .in { display: flex; width: 100%; max-width: var(--wrap); }
.nav button { flex: 1; height: 64px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; color: var(--muted); position: relative; }
.nav button .ind { width: 58px; height: 30px; border-radius: 15px; display: grid; place-items: center; transition: background .2s; }
.nav button.on { color: var(--primary); font-weight: 600; }
.nav button.on .ind { background: color-mix(in srgb, var(--primary) 11%, transparent); }
.nav button .dotb { position: absolute; top: 9px; left: calc(50% + 10px); width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }

/* ─── Шторки и диалоги ─── */
#layers > * { animation: fade .18s; }
#layers > .out { opacity: 0; transition: opacity .15s; }
@keyframes fade { from { opacity: 0; } }
.sh { position: fixed; inset: 0; z-index: 60; background: rgba(10, 20, 30, .42); display: flex; align-items: flex-end; justify-content: center; }
.sh-panel { width: 100%; max-width: 640px; max-height: 92vh; background: var(--surface); border-radius: 22px 22px 0 0; display: flex; flex-direction: column; animation: up .24s cubic-bezier(.2, .8, .2, 1); padding-bottom: env(safe-area-inset-bottom); }
.sh-panel.full { height: 92vh; }
@keyframes up { from { transform: translateY(50px); } }
.sh-grab { width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 10px auto 4px; flex: none; }
.sh-title { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 20px; flex: none; }
.sh-title b { flex: 1; font-size: 18px; font-weight: 600; }
.sh-body { overflow-y: auto; padding: 4px 16px 18px; flex: 1; min-height: 0; }
.menu { margin: 0 -16px; }
.mi { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 54px; padding: 10px 20px; border: 0; background: none; text-align: left; }
.mi:hover { background: rgba(0, 0, 0, .04); }
.mi .ico { color: var(--muted); }
.mi.danger .ico { color: var(--bad); }
.mi b { display: block; font-weight: 500; }
.mi small { display: block; color: var(--muted); font-size: 13px; }
.mi:disabled { opacity: .5; }
.dlg { position: fixed; inset: 0; z-index: 70; background: rgba(10, 20, 30, .42); display: grid; place-items: center; padding: 20px; }
.dlg-box { width: 100%; max-width: 420px; max-height: 86vh; overflow-y: auto; background: var(--surface); border-radius: 22px; padding: 22px 22px 12px; animation: up .2s; }
.dlg-box h3 { margin: 0 0 10px; font-size: 20px; font-weight: 600; }
.dlg-box p { margin: 0 0 12px; color: var(--muted); line-height: 1.5; white-space: pre-line; }
.dlg-btns { display: flex; justify-content: flex-end; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(max(20px, env(safe-area-inset-bottom)) + 80px); transform: translateX(-50%); max-width: calc(100% - 32px); width: max-content; padding: 13px 18px; border-radius: 12px; background: #2A3540; color: #fff; font-size: 14.5px; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }

/* ─── Главная: сцена, семья ─── */
.scene { position: relative; overflow: hidden; color: #173042; }
.scene svg.sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene .sc-in { position: relative; padding: 14px 18px 26px; padding-top: max(14px, env(safe-area-inset-top)); max-width: var(--wrap); margin: 0 auto; }
.scene.night { color: #fff; }
.scene .sc-top { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.scene .sc-top span { flex: 1; opacity: .75; font-size: 14.5px; }
.scene .sc-top .ib { color: inherit; }
.scene h1 { margin: 26px 0 0; font-size: 28px; font-weight: 500; letter-spacing: -.5px; line-height: 1.2; }
.scene .quote { margin-top: 18px; padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, .72); border: 1px solid rgba(255, 255, 255, .9); }
.scene.night .quote { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .18); }
.scene .quote p { margin: 0; font-style: italic; font-size: 15.5px; line-height: 1.38; }
.scene .quote small { display: block; margin-top: 6px; opacity: .7; font-size: 13px; }
.pcard { display: block; width: 100%; padding: 16px; border: 0; text-align: left; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); margin: 8px 0; position: relative; }
.pcard .top { display: flex; align-items: center; gap: 12px; }
.pcard .top .lt { flex: 1; min-width: 0; }
.pcard .top b { display: block; font-size: 17px; font-weight: 600; }
.pcard .top small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.facts { display: flex; gap: 12px; margin: 14px 0 10px; }
.facts > div { flex: 1; }
.facts b { display: block; font-size: 24px; font-weight: 500; }
.facts small { color: var(--muted); font-size: 13px; }

/* ─── Человек: шапка, плитки ─── */
.hero { position: relative; margin: 2px 0 8px; border-radius: 28px; overflow: hidden; padding: 18px; color: #fff; background: var(--hero); box-shadow: 0 8px 24px color-mix(in srgb, var(--primary) 25%, transparent); }
.hero.warm { color: var(--ink); }
.hero.ring { background: #fff; color: var(--ink); box-shadow: 0 8px 24px rgba(31, 110, 80, .1); }
.hero .blob { position: absolute; right: -40px; top: -50px; width: 170px; height: 170px; border-radius: 50%; background: rgba(255, 255, 255, .13); }
.hero > button { position: relative; display: block; width: 100%; border: 0; background: none; color: inherit; text-align: left; padding: 0; }
.hero .hl { display: flex; align-items: center; opacity: .85; font-size: 14.5px; }
.hero .hl span { flex: 1; }
.hero .big { font-size: 64px; font-weight: 300; letter-spacing: -2px; line-height: 1.05; }
.hero .big small { font-size: 22px; letter-spacing: 0; margin-left: 6px; }
.hero .tag { display: inline-block; margin-top: 6px; padding: 6px 12px; border-radius: 20px; background: rgba(255, 255, 255, .22); font-size: 14px; font-weight: 500; }
.hero.warm .tag, .hero.ring .tag { background: none; padding: 0; font-weight: 600; }
.hero .stats { position: relative; display: flex; gap: 10px; margin-top: 14px; }
.hero .stats button { flex: 1; border: 0; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .18); color: inherit; text-align: left; }
.hero.warm .stats button, .hero.ring .stats button { background: var(--tile); }
.hero .stats b { display: block; font-size: 22px; font-weight: 500; }
.hero .stats small { opacity: .85; font-size: 13px; }
.ringrow { display: flex; align-items: center; gap: 16px; }
.ringrow svg { flex: none; }
.qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.qt { display: flex; flex-direction: column; justify-content: space-between; min-height: 112px; padding: 14px 12px 14px 14px; border-radius: 22px; border: 0; text-align: left; color: var(--ink); box-shadow: 0 1px 4px rgba(48, 80, 112, .12); }
.qt .qtop { display: flex; align-items: flex-start; justify-content: space-between; }
.qt b { display: block; font-size: 15px; font-weight: 600; margin-top: 10px; }
.qt small { display: block; font-size: 13px; color: rgba(24, 34, 43, .62); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wtile { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; margin: 0 0 10px; border: 0; border-radius: 22px; color: #fff; text-align: left; }
.wtile .wi { width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, .22); display: grid; place-items: center; flex: none; }
.wtile .lt { flex: 1; min-width: 0; }
.wtile b { display: block; font-size: 15px; font-weight: 600; }
.wtile small { display: block; font-size: 13px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow { display: block; width: 100%; padding: 12px 16px; border: 0; background: none; text-align: left; color: var(--ink); }
.mrow + .mrow { border-top: 1px solid var(--line); }
.mrow .l1 { display: flex; gap: 10px; align-items: flex-start; }
.mrow .l1 .n { flex: 1; font-size: 15.5px; }
.mrow .l1 .v { text-align: right; max-width: 45%; font-weight: 600; font-size: 16.5px; }
.mrow .l1 .v.w { font-size: 14.5px; }
.mrow .l1 .v small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.mrow .l2 { color: var(--muted); font-size: 13px; margin-top: 2px; }
.mrow.out .v { color: var(--bad); }
.cat { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 12px 14px 14px; border: 0; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); margin: 8px 0; text-align: left; color: var(--ink); }
.cat .ct { flex: 1; min-width: 0; }
.cat b { display: block; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.dchg { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.dchg i { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 7px; }
.dchg .lt { flex: 1; }
.dchg small { color: var(--muted); font-size: 13px; display: block; }
.dchg em { font-style: normal; font-size: 13px; font-weight: 600; white-space: nowrap; }

/* ─── Показатель ─── */
.vhero { background: var(--surface); border-radius: 24px; padding: 18px 20px; margin-bottom: 8px; box-shadow: 0 6px 18px rgba(48, 80, 112, .08); }
.vhero .num { font-size: 48px; font-weight: 300; letter-spacing: -1px; line-height: 1.05; }
.vhero .num.w { font-size: 30px; font-weight: 400; }
.vhero .num small { font-size: 17px; color: var(--muted); margin-left: 6px; letter-spacing: 0; font-weight: 500; }
.vhero .st { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.vhero .st span.s { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 20px; font-weight: 600; font-size: 14px; }
.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 16px; margin: 0 0 8px; font-size: 14px; line-height: 1.45; }
.chart { width: 100%; display: block; }
.chart text { font-size: 10px; fill: var(--muted); font-family: inherit; }
.info-part { display: flex; gap: 12px; margin-top: 14px; }
.info-part b { display: block; font-weight: 600; margin-bottom: 2px; }
.info-part p { margin: 0; white-space: pre-line; line-height: 1.45; }

/* ─── Вход, знакомство ─── */
.sky { position: relative; overflow: hidden; }
.sky > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.login-top { height: 300px; padding: 20px 24px; padding-top: max(40px, env(safe-area-inset-top)); color: #173042; position: relative; }
.login-top h1 { position: relative; margin: 40px 0 6px; font-size: 36px; font-weight: 500; letter-spacing: -1px; }
.login-top p { position: relative; margin: 0; font-size: 17px; line-height: 1.35; opacity: .85; }
.login-card { position: relative; margin-top: -28px; background: #fff; border-radius: 28px 28px 0 0; padding: 24px 22px 40px; min-height: calc(100vh - 272px); }
.login-card .in { max-width: 420px; margin: 0 auto; }
.login-card h2 { margin: 0 0 6px; font-size: 22px; font-weight: 600; }
.code { text-align: center; font-size: 26px; letter-spacing: 10px; font-variant-numeric: tabular-nums; }
.onb { min-height: 100vh; display: flex; flex-direction: column; background: #fff; }
.onb .art { flex: 11; min-height: 300px; display: grid; place-items: center; position: relative; }
.onb .art > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.onb .art .obj { position: relative; }
.onb .txt { flex: 9; padding: 24px; padding-bottom: max(24px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; width: 100%; }
.onb h2 { margin: 0 0 10px; font-size: 24px; font-weight: 600; }
.onb p { margin: 0; color: var(--muted); font-size: 16.5px; line-height: 1.45; }
.onb .foot { margin-top: auto; padding-top: 18px; display: flex; align-items: center; gap: 6px; }
.onb .dots { flex: 1; display: flex; gap: 6px; }
.onb .dots i { width: 8px; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--primary) 20%, transparent); transition: width .25s; }
.onb .dots i.on { width: 24px; background: var(--primary); }
.onb .skip { position: absolute; top: max(10px, env(safe-area-inset-top)); right: 10px; z-index: 2; }
.art-card { background: #fff; border-radius: 22px; padding: 16px 18px; box-shadow: 0 10px 24px rgba(0, 0, 0, .13); }
.grad-card { border-radius: 24px; padding: 20px; color: #fff; background: var(--as); margin: 4px 0 12px; box-shadow: 0 8px 20px color-mix(in srgb, var(--as2) 25%, transparent); }
.grad-card h2 { margin: 0 0 8px; font-size: 23px; font-weight: 700; }
.grad-card p { margin: 0; opacity: .92; line-height: 1.45; }

/* ─── Разное ─── */
.irow { display: flex; gap: 14px; align-items: flex-start; }
.irow .lt { flex: 1; min-width: 0; }
.irow b { display: block; font-weight: 600; margin-bottom: 2px; }
.irow p { margin: 0; color: var(--ink); line-height: 1.45; }
.irow p.m { color: var(--muted); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.look-card { display: flex; gap: 16px; width: 100%; padding: 14px; border-radius: 24px; border: 1px solid var(--line); background: var(--surface); text-align: left; margin: 12px 0; }
.look-card.on { border: 2.5px solid var(--lp); }
.mini { width: 108px; height: 190px; flex: none; border-radius: 16px; border: 3px solid #222; overflow: hidden; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.sw { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .12); margin-right: 6px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 18px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; margin: 6px 0; }
.msg.me { margin-left: auto; background: var(--primary); color: #fff; border-bottom-right-radius: 6px; }
.msg.ai { background: var(--surface); box-shadow: var(--shadow); border-bottom-left-radius: 6px; }
.compose { position: fixed; z-index: 24; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.compose .in { max-width: var(--wrap); margin: 0 auto; display: flex; gap: 8px; align-items: flex-end; }
.compose textarea { flex: 1; min-height: 46px; max-height: 140px; resize: none; border-radius: 23px; padding: 12px 16px; }
.round { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none; }
.round.ghost { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
.round.rec { background: var(--bad); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(210, 90, 72, .2); } }
.thumb { display: block; max-width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.crop { display: block; width: 100%; height: 44px; object-fit: cover; object-position: left; border-radius: 6px; background: var(--tile); margin-top: 8px; }
.rrow { padding: 12px 14px; border-top: 1px solid var(--line); }
.rrow:first-child { border-top: 0; }
.rrow.low { background: color-mix(in srgb, var(--warn) 8%, transparent); }
.rrow .rn { display: flex; gap: 8px; align-items: center; }
.rrow .rn b { flex: 1; font-weight: 500; }
.rrow .rv { display: flex; gap: 8px; margin-top: 8px; }
.rrow .rv .input { min-height: 42px; padding: 8px 10px; font-size: 15px; }
.big-num { font-size: 40px; font-weight: 300; letter-spacing: -1px; }
.prog { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal b { text-align: center; font-size: 12px; color: var(--muted); font-weight: 500; padding: 4px 0; }
.cal button { aspect-ratio: 1; border: 0; border-radius: 50%; background: none; font-size: 14px; position: relative; }
.cal button.today { box-shadow: inset 0 0 0 2px var(--primary); }
.cal button:disabled { opacity: .3; }
.tabsbar { display: flex; gap: 4px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.tabsbar::-webkit-scrollbar { display: none; }
.tabsbar button { flex: none; height: 38px; padding: 0 14px; border: 0; border-radius: 19px; background: rgba(0, 0, 0, .05); font-weight: 500; color: var(--muted); }
.tabsbar button.on { background: var(--primary); color: #fff; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--surface); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 24px; font-weight: 500; }
.stat small { color: var(--muted); font-size: 13px; }
.qr { display: block; margin: 10px auto; width: 210px; height: 210px; }
@media (min-width: 760px) { .scr { padding-left: 20px; padding-right: 20px; } .qgrid { grid-template-columns: 1fr 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.chips.nowrap { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips.nowrap::-webkit-scrollbar { display: none; }
.chips.nowrap .chip { flex: none; white-space: nowrap; }
