/* ───────────── «Чипок» · Liquid Glass ───────────── */
:root {
  --spring: linear(0, 0.007, 0.029 2.2%, 0.118 4.7%, 0.625 14.4%, 0.826 19%, 0.902, 0.962, 1.003 30.2%, 1.017, 1.025 37.1%, 1.026 40.9%, 1.019 47.9%, 1.001 64.1%, 0.997 72.1%, 1);
  --ios: cubic-bezier(.32, .72, 0, 1);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --r-xl: 30px; --r-lg: 24px; --r-md: 16px; --r-sm: 12px;
  --tab-h: 66px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --accent: #0A84FF; --accent-ink: #fff;
  --green: #28A745; --red: #E5484D; --orange: #E8820C; --purple: #8E4EC6;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f2f7; --card: #fff; --bar: rgba(249, 249, 251, .8); --thumb: #fff;
  --text: #0b0c10; --text-2: rgba(28, 30, 38, .62); --text-3: rgba(28, 30, 38, .42);
  --glass: rgba(255, 255, 255, .56); --glass-strong: rgba(255, 255, 255, .78); --sheet: rgba(248, 248, 251, .965); --glass-hover: rgba(255, 255, 255, .72);
  --stroke: rgba(255, 255, 255, .85); --stroke-2: rgba(15, 20, 40, .07);
  --hl: rgba(255, 255, 255, .95); --sep: rgba(20, 25, 45, .08);
  --shadow: 0 1px 2px rgba(20, 30, 60, .04), 0 6px 20px -10px rgba(30, 40, 80, .12);
  --shadow-lg: 0 20px 60px -12px rgba(30, 40, 80, .28);
  --fill: rgba(118, 118, 128, .12); --fill-2: rgba(118, 118, 128, .2);
  --red-soft: rgba(229, 72, 77, .12); --green-soft: rgba(40, 167, 69, .13); --accent-soft: rgba(10, 132, 255, .12); --orange-soft: rgba(232, 130, 12, .13);
  --b1: #9cc3ff; --b2: #ffbfdc; --b3: #b8f0cf; --b4: #ffe1a8;
  --scrim: rgba(20, 25, 40, .22);
  --ink: rgba(28, 28, 30, .78); --shine: rgba(255, 255, 255, .65);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000; --card: #1c1c1e; --bar: rgba(28, 28, 30, .78); --thumb: #636366;
  --text: #f5f6fa; --text-2: rgba(235, 238, 255, .62); --text-3: rgba(235, 238, 255, .38);
  --glass: rgba(34, 36, 46, .46); --glass-strong: rgba(44, 44, 46, .82); --sheet: rgba(30, 30, 33, .965); --glass-hover: rgba(52, 55, 70, .6);
  --stroke: rgba(255, 255, 255, .14); --stroke-2: rgba(255, 255, 255, .06);
  --hl: rgba(255, 255, 255, .28); --sep: rgba(255, 255, 255, .08);
  --shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 12px 34px -10px rgba(0, 0, 0, .6);
  --shadow-lg: 0 24px 70px -12px rgba(0, 0, 0, .75);
  --fill: rgba(118, 118, 128, .24); --fill-2: rgba(118, 118, 128, .34);
  --accent: #3D9BFF; --green: #3DD17A; --red: #FF6369; --orange: #FFA23A;
  --red-soft: rgba(255, 99, 105, .16); --green-soft: rgba(61, 209, 122, .15); --accent-soft: rgba(61, 155, 255, .16); --orange-soft: rgba(255, 162, 58, .15);
  --b1: #1d4ed8; --b2: #9d174d; --b3: #047857; --b4: #7c3aed;
  --scrim: rgba(0, 0, 0, .5);
  --ink: rgba(235, 235, 245, .82); --shine: rgba(255, 255, 255, .07);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* Без выделения и системного меню при долгом нажатии */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, .selectable { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img, svg { -webkit-user-drag: none; user-drag: none; }
svg { pointer-events: none; }
html { overflow-anchor: none; }
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); }
body { font-size: 17px; line-height: 1.4; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; transition: background-color .5s var(--ease), color .5s var(--ease); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
input::placeholder { color: var(--text-3); }
:focus { outline: none; }
@media (hover: hover) and (pointer: fine) { :focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ───── Живой фон, чтобы стеклу было что преломлять ───── */
.bg { position: fixed; inset: -20%; z-index: 0; pointer-events: none; overflow: hidden; filter: blur(60px) saturate(140%); }
.bg i { position: absolute; border-radius: 50%; opacity: .75; will-change: transform; }
html[data-theme="dark"] .bg i { opacity: .55; }
.bg .b1 { width: 60vmax; height: 60vmax; left: -10%; top: -5%; background: var(--b1); animation: drift1 26s ease-in-out infinite alternate; }
.bg .b2 { width: 50vmax; height: 50vmax; right: -15%; top: 20%; background: var(--b2); animation: drift2 30s ease-in-out infinite alternate; }
.bg .b3 { width: 55vmax; height: 55vmax; left: 10%; bottom: -20%; background: var(--b3); animation: drift3 34s ease-in-out infinite alternate; }
.bg .b4 { width: 35vmax; height: 35vmax; right: 10%; bottom: 10%; background: var(--b4); animation: drift1 22s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(12vw, 10vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-14vw, 14vh) scale(.9); } }
@keyframes drift3 { to { transform: translate(10vw, -12vh) scale(1.1); } }

/* ───── Карточки и стекло ─────
   Карточки в потоке – сплошные, как в настройках iOS (никакого размытия → никакого мерцания).
   Матовое стекло – только у плавающих элементов: таб-бар, шапка, шторки, тосты, меню. */
.bg { display: none; }
.glass { position: relative; background: var(--card); }
.frost, .tabbar.glass, .offline-bar.glass {
  background: var(--bar);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
}
.glass-strong { background: var(--glass-strong); }

#app { position: relative; z-index: 1; min-height: 100dvh; }
.splash { min-height: 100dvh; display: grid; place-items: center; }
@keyframes pulse { 50% { transform: scale(.94); opacity: .8; } }

/* ───── Каркас ───── */
.shell { max-width: 560px; margin: 0 auto; padding: calc(var(--safe-t) + 8px) 16px calc(var(--tab-h) + var(--safe-b) + 36px); }
.safe-top { position: fixed; z-index: 35; top: 0; left: 0; right: 0; height: calc(var(--safe-t) + min(var(--safe-t), 10px)); pointer-events: none;
  background: linear-gradient(to bottom, var(--bg) 0, var(--bg) var(--safe-t), color-mix(in srgb, var(--bg) 0%, transparent)); }

.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 18px 4px 14px; }
.hero h1 { margin: 0; font-size: 34px; line-height: 1.08; font-weight: 750; letter-spacing: -.8px; }
.hero p { margin: 4px 0 0; color: var(--text-2); font-size: 15px; font-weight: 500; }
.hero-actions { display: flex; gap: 8px; }

.view { animation: viewIn .42s var(--ios) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }

/* ───── Кнопки ───── */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px;
  border-radius: 999px; font-weight: 650; font-size: 17px; letter-spacing: -.2px; user-select: none;
  transition: transform .45s var(--spring), background-color .25s, opacity .2s, box-shadow .3s;
}
.btn:active, .icon-btn:active, .chip:active { transform: scale(.95); transition-duration: .15s; }
.row.tap:active, .row.pressed { background-color: var(--fill); }
.tint-red .row.tap:active, .tint-red .row.pressed { background-color: color-mix(in srgb, var(--red) 11%, transparent); }
.tab:active { transform: scale(.94); transition-duration: .15s; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--accent) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--green) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-glass { background: var(--fill); color: var(--text); }
.btn-tinted { background: var(--accent-soft); color: var(--accent); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  transition: transform .45s var(--spring), background-color .2s; color: var(--text);
}
.icon-btn.glass { background: var(--card); }
.row .icon-btn.glass { background: var(--fill); box-shadow: none; }
.search.glass { box-shadow: none; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.sm { width: 36px; height: 36px; }
.icon-btn.sm svg { width: 18px; height: 18px; }
.icon-btn.plain { color: var(--text-3); }

/* ───── Группы-списки (inset grouped) ───── */
.section { margin: 22px 0 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 8px; }
.section-head h2 { margin: 0; font-size: 13px; font-weight: 650; letter-spacing: .4px; text-transform: uppercase; color: var(--text-2); display: flex; gap: 6px; align-items: center; }
.section-head .link { font-size: 15px; font-weight: 600; color: var(--accent); padding: 6px 4px; }
.group { border-radius: var(--r-lg); overflow: hidden; }
.group.tint-red { background: color-mix(in srgb, var(--red) 7%, var(--card)); }
.list { list-style: none; margin: 0; padding: 4px 0; }
.row {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 12px 8px 14px;
  transition: background-color .25s var(--ease);
}
.row + .row::after { content: ""; position: absolute; top: 0; left: 58px; right: 0; height: .5px; background: var(--sep); }
.row.chk + .row::after { left: 100px; }
.row.av + .row::after { left: 64px; }
.row.tap { cursor: pointer; }
@media (hover: hover) { .row.tap:hover { background: var(--fill); } .tint-red .row.tap:hover { background: color-mix(in srgb, var(--red) 8%, transparent); } }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-title { font-size: 17px; font-weight: 550; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 13.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub .who { font-weight: 600; }
.row.done .row-title { text-decoration: line-through; color: var(--text-3); }
.row.done .tile { opacity: .4; }

.pill { flex: none; font-size: 13px; font-weight: 650; padding: 6px 11px; border-radius: 999px; letter-spacing: -.1px; transition: background-color .3s, color .3s; }
.pill-ok { background: var(--green-soft); color: var(--green); }
.pill-out { background: var(--red-soft); color: var(--red); }
.pill-claim { background: var(--accent-soft); color: var(--accent); }
.pill-oneoff { background: var(--orange-soft); color: var(--orange); }

/* Чекбокс «купил» */
.check {
  width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; position: relative;
  border: 2px solid var(--text-3); transition: border-color .2s, background-color .3s var(--ease), transform .45s var(--spring);
}
.check .ic { width: 17px; height: 17px; color: #fff; opacity: 0; transform: scale(.5); transition: transform .5s var(--spring), opacity .15s; }
.check .ic path { stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset .35s .06s var(--ease); }
.check:active { transform: scale(.85); }
.check.on { background: var(--green); border-color: var(--green); }
.check.on .ic { opacity: 1; transform: none; }
.check.on .ic path { stroke-dashoffset: 0; }
.check-hit { padding: 7px; margin: -7px; border-radius: 50%; }

/* Анимации появления / исчезновения строк */
.enter { animation: rowIn .5s var(--ios) both; animation-delay: calc(var(--i, 0) * 22ms); }
@keyframes rowIn { from { opacity: 0; transform: translateY(8px); } }
.leaving { animation: rowOut .42s var(--ease) forwards; pointer-events: none; }
@keyframes rowOut { 40% { opacity: .6; transform: translateX(18px) scale(.98); } to { opacity: 0; transform: translateX(60px) scale(.96); min-height: 0; height: 0; padding-top: 0; padding-bottom: 0; } }
.flash { animation: flash 1.2s var(--ease); }
@keyframes flash { 0% { background: var(--accent-soft); } 100% { background: transparent; } }

/* ───── Поиск / поля ───── */
.search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 14px; background: var(--fill); }
.search svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.search input { flex: 1; border: 0; background: none; outline: none; font-size: 17px; min-width: 0; height: 100%; }
.field { display: block; width: 100%; height: 52px; border-radius: 16px; border: 0; outline: none; padding: 0 16px; font-size: 17px; background: var(--fill); transition: box-shadow .2s, background-color .2s; }
.field:focus { box-shadow: 0 0 0 3px var(--accent-soft), inset 0 0 0 1.5px var(--accent); background: var(--glass-strong); }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin: 16px 6px 6px; text-transform: uppercase; letter-spacing: .4px; }
.hint { font-size: 14px; color: var(--text-2); margin: 8px 6px 0; }
.error { color: var(--red); font-size: 14px; font-weight: 550; margin: 10px 6px 0; min-height: 1em; }

/* Сегменты */
.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; border-radius: 14px; background: var(--fill); }
.seg button { position: relative; z-index: 1; height: 38px; border-radius: 11px; font-size: 15px; font-weight: 600; color: var(--text-2); transition: color .25s; }
.seg button[aria-pressed="true"] { color: var(--text); }
.seg .thumb { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; border-radius: 11px; background: var(--thumb); box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); transition: transform .45s var(--ios); }

/* Чипы */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: 0 -2px; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--fill); font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; transition: transform .45s var(--spring), background-color .2s, color .2s; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* ───── Добавление в корзину ───── */
.composer { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px; border-radius: 999px; }
.composer input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 17px; height: 44px; }
.composer .to { flex: none; font-size: 13px; font-weight: 700; padding: 0 12px; height: 32px; border-radius: 999px; background: var(--fill); color: var(--text-2); transition: background-color .25s, color .25s, transform .45s var(--spring); }
.composer .to.all { background: var(--orange-soft); color: var(--orange); }
.composer .send { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; transition: transform .45s var(--spring), opacity .2s; }
.composer .send svg { width: 20px; height: 20px; }
.composer .send:disabled { opacity: .35; }

/* Прогресс корзины */
.progress { height: 6px; border-radius: 99px; background: var(--fill); overflow: hidden; margin: 12px 4px 0; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--green)); transition: width .6s var(--ios); }

/* Пустые состояния */
.empty { text-align: center; padding: 34px 24px; border-radius: var(--r-lg); }
.empty h3 { margin: 12px 0 4px; font-size: 20px; letter-spacing: -.3px; }
.empty p { margin: 0; color: var(--text-2); font-size: 15px; }
@keyframes float { 50% { transform: translateY(-4px); } }

/* ───── Таб-бар ───── */
.tabbar {
  position: fixed; isolation: isolate; z-index: 40; left: 50%; bottom: calc(var(--safe-b) + 12px); transform: translateX(-50%);
  width: min(calc(100% - 32px), 420px); height: var(--tab-h); border-radius: 999px; padding: 6px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  box-shadow: var(--shadow-lg), inset 0 1px 0 var(--hl);
}
.tab-indicator {
  position: absolute; z-index: 0; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / 4); border-radius: 999px;
  background: var(--fill); box-shadow: inset 0 1px 0 var(--hl), inset 0 -1px 0 var(--stroke-2);
  transition: transform .5s var(--ios), scale .35s var(--ios), background-color .25s, box-shadow .25s;
}
.tabbar { touch-action: none; }
.tabbar.dragging .tab-indicator {
  transition: scale .3s var(--ios), background-color .25s, box-shadow .25s;
  background: color-mix(in srgb, var(--accent) 9%, var(--glass-strong));
  box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .3), inset 0 1px 0 var(--hl), inset 0 0 0 .5px var(--stroke-2);
}
.tabbar.dragging .tab:active { transform: none; }
.tabbar.dragging .tab::after { opacity: 0 !important; }
.tabbar.dragging .tab[aria-selected="true"]:not(.hot) { color: var(--text-2); }
.tabbar.dragging .tab[aria-selected="true"]:not(.hot) svg { transform: none; }
.tab.hot { color: var(--accent); }
.tab.hot svg { transform: scale(1.14); }
.tab { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 999px; color: var(--text-2); font-size: 11px; font-weight: 650; transition: color .25s, transform .45s var(--spring); }
.tab svg { width: 25px; height: 25px; transition: transform .4s var(--ios); }
.tab[aria-selected="true"] { color: var(--accent); }
.tab[aria-selected="true"] svg { transform: scale(1.05); }
.badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--glass-strong); animation: pop .4s var(--ios); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

[hidden] { display: none !important; }

/* ───── Нижние шторки ───── */
.scrim { position: fixed; inset: 0; z-index: 60; background: var(--scrim); opacity: 0; transition: opacity .35s var(--ease); }
.scrim.open { opacity: 1; }
.sheet {
  position: fixed; z-index: 61; left: 50%; bottom: 0; width: min(100%, 560px); max-height: calc(100dvh - var(--safe-t) - 24px);
  transform: translate(-50%, 105%); border-radius: 34px 34px 0 0; padding: 8px 20px calc(var(--safe-b) + 22px);
  display: flex; flex-direction: column; background: var(--sheet);
  -webkit-backdrop-filter: blur(40px) saturate(200%); backdrop-filter: blur(40px) saturate(200%);
  box-shadow: var(--shadow-lg), inset 0 1px 0 var(--hl);
  transition: transform .5s var(--ios);
}
.sheet.open { transform: translate(-50%, 0); }
.sheet.dragging { transition: none; }
.grabber { width: 38px; height: 5px; border-radius: 9px; background: var(--fill-2); margin: 2px auto 10px; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 4px 0 8px; }
.sheet-head h3 { margin: 0; flex: 1; font-size: 22px; font-weight: 750; letter-spacing: -.4px; }
.sheet-head .sub { color: var(--text-2); font-size: 14px; margin-top: 2px; font-weight: 500; }
.sheet-body { overflow-y: auto; margin: 0 -20px; padding: 0 20px 4px; -webkit-overflow-scrolling: touch; }
.sheet-actions { display: grid; gap: 10px; margin-top: 18px; }
.action-list { border-radius: 20px; overflow: hidden; background: var(--fill); margin-top: 12px; }
.action-list button { width: 100%; display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 16px; font-size: 17px; font-weight: 550; text-align: left; position: relative; transition: background-color .15s; }
.action-list button:active { background: var(--fill-2); }
.action-list button + button::before { content: ""; position: absolute; top: 0; left: 54px; right: 0; height: .5px; background: var(--sep); }
.action-list .ai { width: 26px; text-align: center; font-size: 20px; }
.action-list .danger { color: var(--red); }
.action-list small { margin-left: auto; color: var(--text-3); font-size: 14px; font-weight: 500; }


.switch-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--fill); margin-top: 10px; }
.switch-row > span:not(.tile) { flex: 1; font-weight: 550; }
.switch-row > .ic { color: var(--text-3); }
.switch-row small { display: block; color: var(--text-2); font-weight: 450; font-size: 13.5px; }
.switch { position: relative; width: 52px; height: 32px; flex: none; border-radius: 99px; background: var(--fill-2); transition: background-color .3s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 28px; height: 28px; border-radius: 99px; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .2); transition: transform .4s var(--ios), width .28s var(--ios); }
.switch:active::after { width: 34px; }
.switch[aria-checked="true"]:active::after { transform: translateX(14px); }
.switch[aria-checked="true"] { background: var(--green); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

/* ───── Уведомления-тосты (как Dynamic Island) ───── */
#toasts { position: fixed; z-index: 80; top: calc(var(--safe-t) + 8px); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast {
  pointer-events: auto; max-width: min(100%, 420px); min-width: 170px; display: flex; align-items: center; padding: 8px 8px 8px 11px; border-radius: 24px; color: var(--text);
  background: rgba(252, 252, 254, .86); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 12px 36px -10px rgba(20, 30, 60, .26), 0 1px 3px rgba(20, 30, 60, .06), inset 0 0 0 .5px rgba(15, 20, 40, .08);
  transform-origin: 50% 0; will-change: transform, opacity;
}
html[data-theme="dark"] .toast { color: #fff; background: rgba(28, 28, 32, .92); box-shadow: 0 14px 40px -12px rgba(0, 0, 0, .8), inset 0 0 0 .5px rgba(255, 255, 255, .13); }
.toast.out { pointer-events: none; }
.toast .t-in { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.toast .t-ico { flex: none; display: grid; place-items: center; }
.toast .tile { width: 28px; height: 28px; color: var(--ink); }
.toast .tile.u { color: var(--c); }
html[data-theme="dark"] .toast .tile { color: rgba(255, 255, 255, .92); }
html[data-theme="dark"] .toast .tile.u { color: color-mix(in srgb, var(--c) 72%, #fff); }
.toast .tile .ic { width: 23px; height: 23px; }
.toast .t-text { flex: 1; min-width: 0; padding: 1px 4px 1px 0; }
.toast .t-text b { display: block; font-size: 14.5px; font-weight: 650; letter-spacing: -.1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast .t-text span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.3; color: var(--text-2); }
.toast .t-act { flex: none; height: 30px; padding: 0 13px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 650; font-size: 13.5px; }
html[data-theme="dark"] .toast .t-text span { color: rgba(255, 255, 255, .6); }
html[data-theme="dark"] .toast .t-act { background: rgba(255, 255, 255, .16); color: #fff; }

/* ───── Аватары / семья ───── */
.avatar { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 16px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 2px 8px -2px rgba(0, 0, 0, .25); }
.avatar.xs { width: 22px; height: 22px; font-size: 11px; }
.avatars { display: flex; }
.avatars .avatar { width: 30px; height: 30px; font-size: 13px; margin-left: -8px; box-shadow: 0 0 0 2.5px var(--card); }
.avatars .avatar:first-child { margin-left: 0; }
.invite { padding: 20px; border-radius: var(--r-xl); text-align: center; }
.invite .code { font-size: 38px; font-weight: 800; letter-spacing: 8px; margin: 6px 0 2px; font-variant-numeric: tabular-nums; font-family: ui-rounded, var(--font); padding-left: 8px; }
.invite .row-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.invite .row-btns .btn { padding: 0 10px; font-size: 16px; min-width: 0; }
.family-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-lg); }
.family-card .fi { width: 56px; height: 56px; border-radius: 18px; flex: none; display: grid; place-items: center; overflow: hidden; color: var(--ink); background: var(--fill); }
.family-card .fi img { width: 100%; height: 100%; object-fit: cover; display: block; }
.family-card .fi .ic { width: 30px; height: 30px; }
.family-card h2 { margin: 0; font-size: 21px; letter-spacing: -.3px; }
.family-card p { margin: 2px 0 0; color: var(--text-2); font-size: 14px; }
.colors { display: flex; gap: 10px; flex-wrap: wrap; }
.colors button { width: 36px; height: 36px; border-radius: 50%; transition: transform .45s var(--spring); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }
.colors button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5.5px currentColor; transform: scale(.92); }

/* Лента */
.day { font-size: 13px; font-weight: 650; color: var(--text-2); text-transform: uppercase; letter-spacing: .4px; margin: 22px 8px 8px; }
.ev-text { font-size: 15px; white-space: normal; line-height: 1.35; }
.ev-text b { font-weight: 650; }
.ev-time { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.row.ev { align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
.row.ev .avatar { margin-top: 1px; }
.row.ev + .row.ev::after { left: 64px; }

/* ───── Вход ───── */
.auth { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--safe-t) + 24px) 20px calc(var(--safe-b) + 24px); max-width: 460px; margin: 0 auto; }
.auth-hero { text-align: center; margin-bottom: 26px; animation: viewIn .8s var(--ease) both; }
.auth-hero img { width: 92px; height: 92px; border-radius: 22px; box-shadow: 0 16px 40px -14px rgba(60, 70, 220, .45); animation: float 4s ease-in-out infinite; }
.auth-hero h1 { margin: 18px 0 6px; font-size: 34px; letter-spacing: -.8px; }
.auth-hero p { margin: 0; color: var(--text-2); font-size: 16px; }
.auth-card { padding: 18px; border-radius: var(--r-xl); animation: viewIn .8s .08s var(--ease) both; }
.auth-card .field + .field { margin-top: 10px; }
.features { display: grid; gap: 10px; margin: 0 0 20px; }
.feature { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; font-size: 15px; animation: viewIn .7s var(--ease) both; animation-delay: calc(var(--i) * 70ms + 120ms); }


.footer-note { text-align: center; color: var(--text-3); font-size: 13px; margin-top: 26px; }
.offline-bar { position: fixed; z-index: 70; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + var(--tab-h) + 22px); padding: 8px 14px; border-radius: 99px; font-size: 13px; font-weight: 650; color: var(--orange); }

@media (min-width: 700px) {
  .shell { padding-top: 28px; }
  .hero h1 { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ───── Иконки ───── */
.ic { width: 22px; height: 22px; flex: none; display: block; }
.ic.xs { width: 16px; height: 16px; }
.ic.bold { stroke-width: 3; }
.tile {
  --c: var(--accent);
  width: 32px; height: 32px; flex: none; display: grid; place-items: center; position: relative; color: var(--ink);
  transition: opacity .3s var(--ease);
}
.tile > .ic { margin: auto; }
.tile .ic { width: 26px; height: 26px; stroke-width: 1.65; }
.tile.sm { width: 26px; height: 26px; }
.tile.sm .ic { width: 22px; height: 22px; }
.tile.lg { width: 50px; height: 50px; border-radius: 16px; background: var(--fill); }
.tile.lg .ic { width: 28px; height: 28px; }
.tile.xl { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto; background: var(--fill); }
.tile.xl .ic { width: 38px; height: 38px; }
/* Цвет – только у статусов: уведомления, опасные действия, подтверждения, графики */
.confirm .tile.u, .push-row .tile.u, .stat .tile.u { color: var(--c); }
.confirm .tile.u.xl { background: color-mix(in srgb, var(--c) 13%, transparent); }
.danger .tile, .danger > .tile { color: var(--red); }
.tile-btn { border-radius: 16px; transition: transform .35s var(--spring); }
.tile-btn:active { transform: scale(.9); }
.float { animation: float 3.4s ease-in-out infinite; }
.pop { animation: popIn .5s var(--spring) both; }
@keyframes popIn { from { transform: scale(.6); opacity: 0; } }
.ring { animation: ring .7s var(--ease); transform-origin: 50% 15%; }
@keyframes ring { 20% { transform: rotate(10deg); } 45% { transform: rotate(-7deg); } 70% { transform: rotate(3deg); } }
.tap-anim .ic { animation: tapIt 2.4s var(--ease) infinite; }
@keyframes tapIt { 0%, 60%, 100% { transform: none; } 70% { transform: scale(.9); } 80% { transform: none; } }


.section-head h2 .cat-ic { display: inline-grid; color: var(--text-2); }
.section-head h2 .cat-ic .ic, .section-head h2 .h-ic .ic { width: 15px; height: 15px; }
.section-head h2 .h-ic { display: inline-grid; color: var(--text-2); }
.section-head .link { display: inline-flex; align-items: center; gap: 2px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); animation: blink 2s ease-in-out infinite; }
@keyframes blink { 50% { box-shadow: 0 0 0 6px transparent; } }
.tip { padding: 14px 12px 14px 14px; display: flex; gap: 12px; align-items: center; }
.tip > span:not(.tile) { flex: 1; font-size: 15px; }
.card-title { display: flex; align-items: center; gap: 10px; margin: 2px 2px 6px; }
.card-title h3 { margin: 0; font-size: 20px; letter-spacing: -.3px; }
.card-title .tile { width: 28px; height: 28px; }
.card-title .tile .ic { width: 24px; height: 24px; }
.pill { display: inline-flex; align-items: center; gap: 4px; }
.pill .ic { width: 14px; height: 14px; }
.claim-txt { color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; vertical-align: bottom; }
.claim-txt .ic { width: 14px; height: 14px; }
.note-box { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 16px; background: var(--fill); font-weight: 550; margin-top: 6px; }
.note-box.accent { background: var(--accent-soft); color: var(--accent); }
.notif-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 66px; text-align: left; cursor: pointer; transition: background-color .2s; }
.notif-head:active { background: var(--fill); }
.notif-head .chev { width: 16px; height: 16px; flex: none; color: var(--text-3); stroke-width: 2.4; transition: transform .5s var(--ios); }
.notif.open .notif-head .chev { transform: rotate(90deg); }
.notif-head .row-sub { white-space: normal; }
.notif-body { padding: 2px 16px 16px; }
.push-row { display: flex; align-items: flex-start; gap: 12px; }
.push-row > span:last-child { flex: 1; min-width: 0; }
.push-row .row-sub { display: block; white-space: normal; margin-top: 2px; }
.av-wrap { position: relative; flex: none; }
.ev-badge { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; box-shadow: 0 0 0 2px var(--card); }
.ev-badge .ic { width: 12px; height: 12px; stroke-width: 2.6; }
.row.ev .tile.sm { margin-top: 2px; }
.confirm { text-align: center; padding: 8px 6px 0; }
.confirm h3 { margin: 14px 0 6px; font-size: 22px; letter-spacing: -.3px; }
.confirm .hint { margin: 0; }
.icon-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.icon-grid button { aspect-ratio: 1; border-radius: 13px; display: grid; place-items: center; color: var(--ink); background: var(--fill); transition: transform .4s var(--spring), background-color .2s, color .2s, box-shadow .2s; }
.icon-grid button .ic { width: 24px; height: 24px; stroke-width: 1.65; }
.icon-grid button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.icon-grid button:active { transform: scale(.85); }
.chip .ic { width: 16px; height: 16px; }
.invite-label { color: var(--text-2); font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .5px; }
.invite .btn .ic { width: 20px; height: 20px; }
.action-list button > .tile { margin-left: -2px; }
.action-list button > span:not(.tile) { flex: 1; }
.action-list button + button::before { left: 56px; }
.action-list.flat { background: none; margin: 0; }
.action-list .danger { color: var(--red); }
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.composer .to { display: inline-flex; align-items: center; gap: 5px; }
.offline-bar { display: inline-flex; align-items: center; gap: 6px; }
.feature .tile { width: 30px; height: 30px; }
.avatar.lg { width: 50px; height: 50px; font-size: 21px; }
.btn .ic { width: 20px; height: 20px; }

/* ───── Плавные обновления ───── */
.ghost { position: absolute; z-index: 5; pointer-events: none; margin: 0 !important; list-style: none; }
.fly { position: absolute; z-index: 6; pointer-events: none; margin: 0; padding: 0; list-style: none; border-radius: 16px; overflow: hidden; will-change: transform; }
.fly .row { background: transparent !important; }
.fly { border-radius: 18px; }
.fly-old { position: absolute; inset: 0; z-index: 1; margin: 0; padding: 0; list-style: none; border-radius: inherit; }
.fly-old .row { background: transparent !important; }
.swap { display: inline-grid; vertical-align: top; }
.swap > * { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 5px; transition: opacity .3s var(--ease), transform .4s var(--ios), filter .3s var(--ease); }
.swap > :not(.on) { opacity: 0; transform: translateY(6px); filter: blur(2px); pointer-events: none; }
.swap.block { display: grid; }
.swap.block > * { display: block; }
.input-wrap { position: relative; flex: 1; min-width: 0; display: grid; align-items: center; }
.input-wrap > * { grid-area: 1 / 1; }
.input-wrap .ph { pointer-events: none; color: var(--text-3); font-size: 17px; white-space: nowrap; overflow: hidden; }
.input-wrap input:not(:placeholder-shown) ~ .ph { opacity: 0; }
.input-wrap input:not(:placeholder-shown) ~ .ph > * { transition: none; }
.composer .to { transition: background-color .35s var(--ease), color .35s var(--ease), transform .35s var(--spring); }
.composer .send { transition: transform .35s var(--spring), opacity .25s var(--ease), background-color .3s; }
.composer.all .send { background: var(--orange); }
.check, .check .ic { transition-timing-function: var(--ios); }

/* Количество */
.qty-pill { flex: none; font-size: 13px; font-weight: 700; padding: 3px 8px; border-radius: 8px; background: var(--fill); color: var(--text-2); font-variant-numeric: tabular-nums; }
.row-title .qty-pill { margin-left: 6px; vertical-align: 1px; }
.stepper { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 18px; background: var(--fill); }
.stepper .icon-btn { background: var(--thumb); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.stepper output { flex: 1; text-align: center; font-size: 22px; font-weight: 750; letter-spacing: -.3px; font-variant-numeric: tabular-nums; transition: opacity .2s; }
.stepper output.none { color: var(--text-3); font-size: 17px; font-weight: 600; }
.stepper.off .icon-btn:first-child { opacity: .4; }

/* Настройки уведомлений */
.pref-list { margin-top: 14px; border-radius: 18px; background: var(--fill); overflow: hidden; }
.pref { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 54px; position: relative; width: 100%; text-align: left; }
.pref + .pref::before { content: ""; position: absolute; top: 0; left: 52px; right: 0; height: .5px; background: var(--sep); }
.pref > span:not(.tile) { flex: 1; font-weight: 550; font-size: 16px; }
.pref small { display: block; color: var(--text-2); font-weight: 450; font-size: 13px; }
.quiet-times { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; overflow: hidden; transition: grid-template-rows .4s var(--ios), opacity .3s, margin .4s var(--ios); }
.collapse { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .45s var(--ios), opacity .3s var(--ease); }
.collapse > div { overflow: hidden; min-height: 0; }
.collapse.closed { grid-template-rows: 0fr; opacity: 0; }
.time-field { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; border-radius: 14px; background: var(--glass-strong); }
.time-field small { color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.time-field input { border: 0; outline: none; background: none; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 0; min-width: 0; width: 100%; }

/* Статистика */
.seg.top-seg { margin: 0 0 4px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { padding: 14px; border-radius: 20px; display: flex; flex-direction: column; gap: 8px; }
.stat b { font-size: 28px; font-weight: 780; letter-spacing: -.6px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13.5px; color: var(--text-2); font-weight: 550; }
.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; align-items: end; height: 110px; padding: 6px 2px 0; }
.bars i { display: block; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 55%, transparent)); min-height: 4px; transform-origin: bottom; animation: barIn .7s var(--ios) both; animation-delay: calc(var(--i) * 25ms); }
.bars i.today { background: linear-gradient(180deg, var(--green), color-mix(in srgb, var(--green) 55%, transparent)); }
.bars i.zero { background: var(--fill-2); }
@keyframes barIn { from { transform: scaleY(0); } }
.bar-labels { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; margin-top: 6px; font-size: 10.5px; color: var(--text-3); text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.meter { height: 8px; border-radius: 99px; background: var(--fill); overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--c, var(--accent)); transform-origin: left; animation: meterIn .8s var(--ios) both; }
@keyframes meterIn { from { transform: scaleX(0); } }
.stat-card { padding: 16px; border-radius: var(--r-lg); }
.stat-card h3 { margin: 0 0 10px; font-size: 17px; letter-spacing: -.2px; display: flex; align-items: center; gap: 8px; }
.stat-card h3 .ic { width: 18px; height: 18px; color: var(--text-2); }
.stat-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.stat-row + .stat-row { border-top: .5px solid var(--sep); }
.stat-row .grow { flex: 1; min-width: 0; }
.stat-row .grow b { font-weight: 600; font-size: 16px; }
.stat-row .num { font-weight: 750; font-variant-numeric: tabular-nums; color: var(--text-2); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.week div { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); font-weight: 650; }
.week i { width: 100%; aspect-ratio: 1; border-radius: 10px; background: color-mix(in srgb, var(--accent) calc(var(--a) * 100%), var(--fill)); }

.spinner { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.spinner.big { width: 30px; height: 30px; border-width: 3px; }
.stat .tile { width: 26px; height: 26px; }
.stat .tile .ic { width: 22px; height: 22px; }
.day-block .day { margin-top: 22px; }
.view-ghost { position: fixed; z-index: 1; pointer-events: none; }

/* ───── Жидкая капля при нажатии ───── */
.icon-btn, .chip { position: relative; }
:is(.btn, .icon-btn, .chip, .tab, .seg button, .action-list button, .ctx-menu button, .t-act)::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at var(--px, 50%) var(--py, 50%), color-mix(in srgb, currentColor 22%, transparent) 0, color-mix(in srgb, currentColor 8%, transparent) 45%, transparent 75%);
  transform: scale(.6); transition: opacity .45s var(--ease), transform .6s var(--ios);
}
.pressing::after { opacity: 1 !important; transform: none !important; transition-duration: .12s, .35s !important; }
.btn-primary.pressing::after, .btn-green.pressing::after { background: radial-gradient(circle at var(--px) var(--py), rgba(255, 255, 255, .35), transparent 70%); }
.t-act { position: relative; }

/* ───── Шторки: смена без закрытия ───── */
.sheet.swapping { transition: none; overflow: hidden; }
.sheet.closing-swap { pointer-events: none; }

/* ───── Контекстное меню ───── */
.ctx-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .08); -webkit-backdrop-filter: blur(10px) saturate(120%); backdrop-filter: blur(10px) saturate(120%); opacity: 0; transition: opacity .3s var(--ease); touch-action: none; }
html[data-theme="dark"] .ctx-scrim { background: rgba(0, 0, 0, .35); }
.ctx-scrim.open { opacity: 1; }
.ctx-preview { position: fixed; z-index: 91; margin: 0; list-style: none; background: var(--card); border-radius: 18px; box-shadow: 0 22px 54px -14px rgba(0, 0, 0, .36), 0 4px 14px -6px rgba(0, 0, 0, .12); pointer-events: none; transform-origin: center; }
.ctx-preview .row, .ctx-preview .row:hover { background: transparent !important; }
.ctx-preview .row { border-radius: 18px; }
.ctx-menu {
  position: fixed; z-index: 92; width: 250px; border-radius: 16px; overflow: hidden; padding: 0;
  background: var(--glass-strong); -webkit-backdrop-filter: blur(40px) saturate(200%); backdrop-filter: blur(40px) saturate(200%);
  box-shadow: 0 22px 60px -14px rgba(0, 0, 0, .4), 0 0 0 .5px var(--sep);
}
.ctx-menu button { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 16px; font-size: 16.5px; font-weight: 500; text-align: left; position: relative; transition: background-color .15s; }
.ctx-menu button > span { flex: 1; }
.ctx-menu button .ic { width: 20px; height: 20px; color: var(--text); }
.ctx-menu button + button { border-top: .5px solid var(--sep); }
.ctx-menu button.gap { border-top: 7px solid color-mix(in srgb, var(--text) 6%, transparent); }
.ctx-menu button:active, .ctx-menu button.hover { background: var(--fill); }
.ctx-menu .danger, .ctx-menu .danger .ic { color: var(--red); }
.ctx-row-hidden { visibility: hidden; }

/* ───── Компактный список ───── */
html.compact .row { min-height: 48px; padding-top: 5px; padding-bottom: 5px; gap: 10px; }
html.compact .row .tile:not(.sm) { width: 28px; height: 28px; }
html.compact .row .tile:not(.sm) .ic { width: 23px; height: 23px; }
html.compact .row-title { font-size: 16px; }
html.compact .row-sub { font-size: 12.5px; }
html.compact .row + .row::after { left: 52px; }
html.compact .row.chk + .row::after { left: 92px; }
html.compact .row.av + .row::after { left: 62px; }
html.compact .section { margin-top: 18px; }
html.compact-anim .row, html.compact-anim .row .tile, html.compact-anim .section { transition: min-height .4s var(--ios), padding .4s var(--ios), width .4s var(--ios), height .4s var(--ios), margin .4s var(--ios), background-color .25s; }

/* ───── Аватары рядом с именами ───── */
.who { display: inline-flex; align-items: center; gap: 4px; vertical-align: bottom; }
.who .avatar.xs, .claim-txt .avatar.xs { width: 16px; height: 16px; font-size: 8.5px; box-shadow: none; letter-spacing: -.2px; }
.avatar { letter-spacing: -.5px; }

/* ───── Конфетти ───── */
.confetti { position: fixed; inset: 0; z-index: 95; pointer-events: none; }

/* ───── Сканер штрихкодов ───── */
.scan-box { position: relative; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; background: #000; }
.scan-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-box .frame { position: absolute; left: 12%; right: 12%; top: 32%; bottom: 32%; border-radius: 14px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); border: 2px solid rgba(255, 255, 255, .85); }
.scan-box .frame i { position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; border-radius: 2px; background: var(--red); box-shadow: 0 0 12px var(--red); animation: scanLine 1.8s ease-in-out infinite alternate; }
@keyframes scanLine { from { transform: translateY(-260%); } to { transform: translateY(260%); } }
.scan-box .scan-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #fff; padding: 20px; font-size: 15px; font-weight: 550; background: #111; }
.scan-box.found .frame { border-color: var(--green); }
.scan-box.found .frame i { background: var(--green); box-shadow: 0 0 12px var(--green); animation: none; }
.inline-form { display: flex; gap: 8px; margin-top: 12px; }
.inline-form .field { flex: 1; min-width: 0; }
.inline-form .btn { flex: none; }
.bc-pill { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }

/* ───── Цены и бюджет ───── */
.price-field { display: flex; align-items: center; gap: 6px; height: 72px; padding: 0 20px; border-radius: 20px; background: var(--fill); }
.price-field input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 34px; font-weight: 750; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.price-field span { font-size: 28px; font-weight: 700; color: var(--text-3); }
.price-tag { font-weight: 650; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ev-price { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.ev-price .ic { width: 12px; height: 12px; }
.budget-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.budget-top b { font-size: 30px; font-weight: 780; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.budget-top span { color: var(--text-2); font-weight: 550; font-size: 15px; }
.budget-meter { height: 10px; margin: 12px 0 8px; }
.budget-meter.over i { background: var(--red) !important; }
.budget-note { font-size: 13.5px; color: var(--text-2); font-weight: 500; }
.budget-note b { color: var(--text); }
.stat-card .link-btn { margin-left: auto; font-size: 15px; font-weight: 600; color: var(--accent); }
.seg.mini button { height: 32px; font-size: 14px; }
.seg.mini .thumb { border-radius: 9px; }

/* ───── Вход по коду ───── */
.big-code { font-size: 44px; font-weight: 800; letter-spacing: 10px; text-align: center; padding-left: 10px; font-variant-numeric: tabular-nums; font-family: ui-rounded, var(--font); margin: 6px 0 2px; }
.code-timer { text-align: center; color: var(--text-2); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.code-field { letter-spacing: 8px; font-weight: 750; text-align: center; font-size: 24px !important; font-variant-numeric: tabular-nums; }
.auth .collapse > div { padding: 0 2px; margin: 0 -2px; }
.label .opt { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--text-3); margin-left: 4px; }

/* ───── Мелочи ───── */
.btn .swap { justify-items: center; }
.btn .swap > * { justify-content: center; }
.sheet.swapping .sheet-body { overflow: hidden; }
html.win .ctx-scrim { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(0, 0, 0, .16); }
html.win[data-theme="dark"] .ctx-scrim { background: rgba(0, 0, 0, .5); }
.burst { position: fixed; z-index: 50; border-radius: 50%; border: 2px solid var(--green); pointer-events: none; }

/* ───── Иллюстрации ───── */
.art { display: block; width: 150px; height: 112px; margin: 0 auto; color: var(--ink); --art-fill: color-mix(in srgb, var(--accent) 13%, transparent); }
.art svg { display: block; width: 100%; height: 100%; overflow: visible; }
.art * { transform-box: fill-box; transform-origin: center; }
.art .f { fill: var(--art-fill); }
.art .k { fill: var(--card); stroke: none; }
.art .sh { fill: var(--fill); stroke: none; }
.art .a { stroke: var(--accent); }
.art .af { fill: var(--accent); stroke: none; }
.art .gf { fill: var(--green); stroke: none; }
.art .wk { stroke: #fff; stroke-width: 3; }
.art .dot { fill: currentColor; stroke: none; }
.art .thick { stroke-width: 5; }
.art .dash { stroke-dasharray: 4 5; opacity: .55; }
.art .dashl { stroke-dasharray: 3 6; }
.art .fl { animation: artFloat 3.6s ease-in-out infinite; }
.art .tw { animation: twinkle 2.6s ease-in-out infinite; }
.art .zz { opacity: 0; animation: zz 3.3s ease-in-out infinite; }
.art .d2 { animation-delay: .9s; }
.art .d3 { animation-delay: 1.8s; }
.art .sw { transform-origin: 50% 0; animation: swing 4.2s ease-in-out infinite; }
.art .beat { animation: beat 1.8s ease-in-out infinite; }
.art .nudge { animation: nudge 2s var(--ease) infinite; }
.art .pop2 { animation: popIn .7s .25s var(--spring) both; }
.art .grow { transform-origin: 50% 100%; animation: grow .9s var(--ios) both; }
.art .g2 { animation-delay: .12s; }
.art .g3 { animation-delay: .24s; }
@keyframes artFloat { 50% { transform: translateY(-5px); } }
@keyframes twinkle { 0%, 100% { opacity: .2; transform: scale(.65); } 50% { opacity: 1; transform: none; } }
@keyframes zz { 0% { opacity: 0; transform: translate(-4px, 8px) scale(.5); } 30% { opacity: 1; } 75% { opacity: .8; } 100% { opacity: 0; transform: translate(8px, -12px) scale(1.1); } }
@keyframes swing { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes beat { 0%, 100%, 45% { transform: none; } 15% { transform: scale(1.18); } 30% { transform: scale(.98); } }
@keyframes nudge { 0%, 100% { transform: none; } 50% { transform: translateX(7px); } }
@keyframes grow { from { transform: scaleY(0); } }
.empty .art { margin-bottom: 2px; }
.confirm .art { width: 160px; height: 120px; }
.auth-hero .art { width: 170px; height: 128px; }

/* ───── Категории: сворачивание ───── */
.cat-head { width: 100%; text-align: left; cursor: pointer; min-height: 30px; border-radius: 10px; }
.cat-head h2 { flex: 1; min-width: 0; }
.cat-meta { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-size: 13.5px; font-weight: 650; font-variant-numeric: tabular-nums; padding-right: 2px; }
.cat-meta .chev { width: 15px; height: 15px; stroke-width: 2.4; transform: rotate(90deg); transition: transform .5s var(--ios); }
.cat-sec.collapsed .chev { transform: none; }
.cat-meta .cnt { opacity: 0; transform: translateX(8px); transition: opacity .3s var(--ease), transform .5s var(--ios); }
.cat-sec.collapsed .cnt { opacity: 1; transform: none; }
.cat-sec .collapse { transition: grid-template-rows .5s var(--ios), opacity .35s var(--ease); }
.cat-sec .section-head { transition: padding .5s var(--ios); }
.cat-sec.collapsed .section-head { padding-bottom: 0; }
.rep-sub { display: inline-flex; align-items: center; gap: 3px; vertical-align: bottom; }
.rep-sub .ic { width: 13px; height: 13px; stroke-width: 2.2; }

/* ───── Статистика: скелет и плавные числа ───── */
.skel { position: relative; overflow: hidden; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(100deg, transparent 25%, var(--shine) 50%, transparent 75%); animation: shimmer 1.5s ease-in-out infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk { display: block; height: 12px; border-radius: 6px; background: var(--fill); }
.sk.c { width: 26px; height: 26px; border-radius: 9px; }
.sk.n { height: 26px; width: 52%; border-radius: 8px; }
.sk.t { width: 72%; }
.sk.h { width: 46%; height: 16px; margin-bottom: 14px; }
.sk-bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; align-items: end; height: 110px; }
.sk-bars i { display: block; border-radius: 6px 6px 3px 3px; background: var(--fill); }
.bars i { transition: height .6s var(--ios); }
.meter i { transition: width .7s var(--ios); }
.week i { transition: background-color .5s var(--ease); animation: weekIn .55s var(--ios) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes weekIn { from { transform: scale(.5); opacity: 0; } }
.rc-list .stat-row .tile { color: var(--ink); }
.rc-del { color: var(--text-3); }

/* ───── Фото: аватары и обрезка ───── */
.avatar { position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.av-edit { position: relative; border-radius: 50%; flex: none; }
.av-edit .av-cam { position: absolute; right: -3px; bottom: -3px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; box-shadow: 0 0 0 2px var(--glass-strong); }
.av-edit .av-cam .ic { width: 13px; height: 13px; stroke-width: 2.2; }
.crop { position: relative; width: min(100%, 300px); aspect-ratio: 1; margin: 4px auto 0; border-radius: 26px; overflow: hidden; background: #0d0d0f; touch-action: none; cursor: grab; }
.crop:active { cursor: grabbing; }
.crop img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; will-change: transform; }
.crop::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .52), inset 0 0 0 1.5px rgba(255, 255, 255, .7); pointer-events: none; }
.crop-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-2); font-size: 15px; font-weight: 600; text-align: center; padding: 30px; cursor: pointer; }
.crop-empty span { display: grid; justify-items: center; gap: 10px; }
.crop-empty .ic { width: 34px; height: 34px; color: var(--accent); }
.crop:not(.has) { background: var(--fill); }
.crop:not(.has)::after { box-shadow: none; border: 2px dashed var(--fill-2); }
.zoom-row { display: flex; align-items: center; gap: 12px; margin: 16px 4px 0; color: var(--text-3); }
.zoom-row input { flex: 1; accent-color: var(--accent); }
.zoom-row .ic { width: 18px; height: 18px; }
.zoom-row .ic.big { width: 24px; height: 24px; }

/* ───── QR-коды ───── */
.qr-card { width: 196px; margin: 16px auto 4px; padding: 12px; border-radius: 22px; background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .08); }
.qr-card svg { display: block; width: 100%; height: auto; }
.qr-toggle { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 15px; font-weight: 600; color: var(--accent); }
.qr-toggle .ic { width: 18px; height: 18px; }

/* ───── Чеки ───── */
.rc-sum { text-align: center; font-size: 40px; font-weight: 800; letter-spacing: -.8px; font-variant-numeric: tabular-nums; margin: 4px 0 0; }
.rc-when { text-align: center; color: var(--text-2); font-weight: 550; font-size: 15px; }
.pick-list { border-radius: 18px; background: var(--fill); overflow: hidden; margin-top: 8px; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 14px; text-align: left; position: relative; transition: background-color .15s, opacity .2s; }
.pick + .pick::before { content: ""; position: absolute; top: 0; left: 54px; right: 0; height: .5px; background: var(--sep); }
.pick:active { background: var(--fill-2); }
.pick .check { width: 26px; height: 26px; }
.pick .check .ic { width: 15px; height: 15px; }
.pick .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick .grow b { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick .grow small { color: var(--text-2); font-size: 13px; }
.pick[disabled] { opacity: .45; pointer-events: none; }
.pick .tile { width: 26px; height: 26px; }
.pick .tile .ic { width: 22px; height: 22px; }

/* ───── Расписание ───── */
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.days button { height: 40px; border-radius: 12px; background: var(--fill); font-size: 14px; font-weight: 650; color: var(--text-2); transition: background-color .2s, color .2s, transform .4s var(--spring); }
.days button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.days button:active { transform: scale(.9); }
.rep-time { display: flex; gap: 10px; margin-top: 10px; }
.rep-time .time-field { flex: 1; background: var(--fill); }

/* ───── Заставка ───── */
#splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); }
#splash.out { animation: spOut .45s var(--ease) forwards; pointer-events: none; }
#splash.out .sp-wrap { animation: spWrapOut .45s var(--ease) forwards; }
@keyframes spOut { to { opacity: 0; } }
@keyframes spWrapOut { to { transform: scale(1.14); } }
.sp-logo { width: 108px; height: 108px; animation: spIn .55s var(--spring) both; }
.sp-logo svg, .splash svg { display: block; width: 100%; height: 100%; overflow: visible; }
.sp-logo * { transform-box: fill-box; }
.sp-logo .sp-shelf { stroke-dasharray: 320; stroke-dashoffset: 320; animation: spDraw .5s .15s var(--ease) forwards; }
.sp-logo .sp-leg { opacity: 0; animation: spFade .3s .45s var(--ease) forwards; }
.sp-logo .sp-it { transform-origin: 50% 100%; animation: spDrop .65s var(--spring) both; }
.sp-logo .i1 { animation-delay: .38s; }
.sp-logo .i2 { animation-delay: .48s; }
.sp-logo .i3 { animation-delay: .58s; }
@keyframes spIn { from { transform: scale(.8); opacity: 0; } }
@keyframes spDraw { to { stroke-dashoffset: 0; } }
@keyframes spFade { to { opacity: 1; } }
@keyframes spDrop { from { transform: translateY(-120px) scale(.92, 1.08); opacity: 0; } 40% { opacity: 1; } }
.splash .sp-logo { animation: pulse 1.8s var(--ease) infinite; }

.fpic { width: 50px; height: 50px; border-radius: 16px; overflow: hidden; display: grid; place-items: center; background: var(--fill); color: var(--ink); }
.fpic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fpic .ic { width: 28px; height: 28px; }
.av-edit .avatar.lg { box-shadow: none; }
.scan-box.qr .frame { left: 25%; right: 25%; top: 12%; bottom: 12%; border-radius: 20px; }
.badge { overflow: hidden; }
.badge > span { grid-area: 1 / 1; display: block; }
.stat-card { overflow: hidden; }
/* ───── Чек: товары из ФНС ───── */
.link { font-size: 15px; font-weight: 600; color: var(--accent); padding: 4px 2px; }
.fns-banner { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 18px; text-align: left; background: color-mix(in srgb, var(--green) 10%, var(--fill)); transition: background-color .2s, transform .45s var(--spring); }
.fns-banner:active { transform: scale(.98); transition-duration: .15s; }
.fns-banner .grow, .rc-item .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fns-banner b { font-weight: 650; font-size: 16px; }
.fns-banner small { color: var(--text-2); font-size: 13px; line-height: 1.3; }
.fns-banner .chev, .rc-items-head .chev { width: 15px; height: 15px; flex: none; color: var(--text-3); stroke-width: 2.4; transition: transform .5s var(--ios); }
.rc-items.skel { border-radius: 18px; background: var(--fill); padding: 10px 14px; }
.rc-sk { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.rc-sk .sk { background: var(--fill-2); }
.rc-sk .sk.t { flex: 1; width: auto; }
.rc-note { align-items: flex-start; font-weight: 500; font-size: 14.5px; line-height: 1.35; }
.rc-note .ic { margin-top: 2px; color: var(--orange); flex: none; }
.rc-note .grow { flex: 1; min-width: 0; }
.rc-note .link { flex: none; padding: 0 2px; font-size: 14.5px; }
.rc-store { display: flex; align-items: center; gap: 8px; justify-content: center; color: var(--text-2); font-weight: 600; font-size: 14.5px; margin: 0 0 8px; }
.rc-store span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-items-head { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 14px; border-radius: 16px; background: var(--fill); font-weight: 600; font-size: 16px; text-align: left; }
.rc-items-head.open .chev { transform: rotate(90deg); }
.rc-items { margin-top: 8px; }
.rc-item { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 7px 14px; position: relative; }
.rc-item + .rc-item::before { content: ""; position: absolute; top: 0; left: 52px; right: 0; height: .5px; background: var(--sep); }
.rc-item b { font-weight: 550; font-size: 15px; line-height: 1.25; }
.rc-item small { color: var(--text-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pick-price { flex: none; font-weight: 650; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--text); }
.rc-more { display: block; margin: 8px auto 0; }
