/* =====================================================================
   Тёплышко — «свет лампы»
   Дом, освещённый тёплой лампой: свет сверху меняется по времени суток
   (утро — бледное золото, день — светлый мёд, вечер — абрикос и малина,
   ночь — низкий янтарь в темноте). У каждого из пары свой цвет:
   мандарин и сирень. Поверхности — плотные и мягкие, как керамика,
   без стеклянной размытости. Заголовки — скруглённый шрифт системы.
   ===================================================================== */

@font-face { font-family: "Inter"; src: url(/fonts/Inter-Regular.woff) format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url(/fonts/Inter-Medium.woff) format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url(/fonts/Inter-SemiBold.woff) format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url(/fonts/InterDisplay-SemiBold.woff) format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url(/fonts/InterDisplay-Bold.woff) format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url(/fonts/InterDisplay-ExtraBold.woff) format("woff"); font-weight: 800; font-display: swap; }

/* ---------- Токены: светлая тема ---------- */
:root {
  --a: #ff7a3d;          /* мандарин — первый участник */
  --b: #7a68f2;          /* сирень — второй участник */
  --duo: #e2537b;        /* малина — «мы», общее */
  --honey: #f4ad32;
  --mint: #23b585;
  --danger: #e23d4f;

  --bg: #fbf2ee;
  --bg2: #f4e6e0;
  --ink: #2a1c19;
  --ink-2: rgba(42, 28, 25, .68);
  --ink-3: rgba(42, 28, 25, .42);
  --hair: rgba(96, 50, 36, .11);
  --glass: #fffaf7;                        /* поверхность карточек */
  --glass-strong: #ffffff;
  --field: #fdf6f2;
  --sheet: #fff9f6;
  --stroke: rgba(255, 255, 255, .9);
  --shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 1px 2px rgba(96, 50, 36, .06), 0 12px 28px -14px rgba(120, 60, 40, .22);
  --honey-ink: #9a5d00;
  --mint-ink: #0b7d59;
  --lamp: #ffd7a3;                         /* цвет света сверху, меняется по времени суток */
  --lamp-2: #ffb3a1;
  --lamp-op: .85;
  --blend: multiply;
  --grain-op: .045;
  --display: ui-rounded, "SF Pro Rounded", "Inter Display", "Inter", system-ui, sans-serif;

  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}
:root[data-daypart="morning"] { --lamp: #fff0b8; --lamp-2: #ffd6c2; }
:root[data-daypart="day"]     { --lamp: #ffe2a8; --lamp-2: #ffc9b0; --lamp-op: .7; }
:root[data-daypart="evening"] { --lamp: #ffb27a; --lamp-2: #ff8fa6; }
:root[data-daypart="night"]   { --lamp: #ffa96b; --lamp-2: #c08bff; --lamp-op: .6; }

/* ---------- Тёмная тема: комната вечером ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171110; --bg2: #211816; --ink: #f8ede8;
    --ink-2: rgba(248, 237, 232, .7); --ink-3: rgba(248, 237, 232, .42);
    --hair: rgba(255, 220, 200, .09);
    --glass: #231a18; --glass-strong: #31241f; --field: #1d1513; --sheet: #241a17;
    --stroke: rgba(255, 220, 200, .06);
    --shadow: 0 1px 0 rgba(255, 230, 215, .05) inset, 0 16px 34px -18px rgba(0, 0, 0, .75);
    --honey-ink: #ffc36a; --mint-ink: #58e0b4;
    --lamp-op: .26; --blend: screen; --grain-op: .06;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #171110; --bg2: #211816; --ink: #f8ede8;
  --ink-2: rgba(248, 237, 232, .7); --ink-3: rgba(248, 237, 232, .42);
  --hair: rgba(255, 220, 200, .09);
  --glass: #231a18; --glass-strong: #31241f; --field: #1d1513; --sheet: #241a17;
  --stroke: rgba(255, 220, 200, .06);
  --shadow: 0 1px 0 rgba(255, 230, 215, .05) inset, 0 16px 34px -18px rgba(0, 0, 0, .75);
  --honey-ink: #ffc36a; --mint-ink: #58e0b4;
  --lamp-op: .26; --blend: screen; --grain-op: .06;
  color-scheme: dark;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink);
  font: 400 16px/1.45 "Inter", system-ui, -apple-system, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2.5px solid var(--duo); outline-offset: 3px; border-radius: 10px; }
::selection { background: color-mix(in oklab, var(--a) 30%, transparent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { padding: 40px; text-align: center; }

/* ---------- Лампа: тёплый свет сверху и лёгкое зерно ---------- */
.lamp { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; opacity: var(--lamp-op); transition: opacity 1.2s; }
.lamp::before, .lamp::after { content: ""; position: absolute; left: 50%; border-radius: 50%; transition: background 2s; }
.lamp::before {   /* сам свет */
  top: -34vmax; width: 120vmax; height: 78vmax; transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--lamp) 0%, color-mix(in oklab, var(--lamp) 70%, transparent) 45%, color-mix(in oklab, var(--lamp) 25%, transparent) 75%, transparent 100%);
  animation: lamp-breathe 9s ease-in-out infinite;
}
.lamp::after {    /* второй, розоватый отсвет — чуть сбоку */
  top: -22vmax; width: 70vmax; height: 56vmax; transform: translateX(-8%);
  background: radial-gradient(closest-side, var(--lamp-2), transparent 100%); opacity: .55;
  animation: lamp-drift 23s ease-in-out infinite alternate;
}
@keyframes lamp-breathe { 50% { transform: translateX(-50%) scale(1.04); } }
@keyframes lamp-drift { to { transform: translateX(-60%) translateY(4vmax) scale(1.1); } }
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: var(--grain-op);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Раскладка ---------- */
#app {
  max-width: 520px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 16px) 16px calc(env(safe-area-inset-bottom) + 112px);
}
#app.is-auth { padding-bottom: calc(env(safe-area-inset-bottom) + 24px); }
.view { display: flex; flex-direction: column; gap: 14px; view-transition-name: view; }
.boot { min-height: 80dvh; display: grid; place-items: center; }

/* ---------- Типографика ---------- */
.h1 { font: 800 clamp(34px, 9.6vw, 44px)/.98 var(--display); letter-spacing: -.035em; }
.h2 { font: 700 21px/1.15 var(--display); letter-spacing: -.015em; }
.h3 { font: 700 17px/1.2 var(--display); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 6px 2px 4px; }
.page-head .h1 { display: flex; align-items: baseline; gap: 10px; }
.sub { color: var(--ink-2); font-size: 15px; }
.hint { color: var(--ink-3); font-size: 13px; margin: -6px 6px 0; }
.muted { color: var(--ink-3); }
.center { text-align: center; }
small { font-size: 13px; color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Поверхности: плотные и мягкие ---------- */
.card, .tile, .tabbar, .toast, .adder, .chore, .tx, .install {
  background: var(--glass);
  border: 1px solid var(--hair);
  box-shadow: var(--shadow);
}
.card { border-radius: 22px; }
.pad { padding: 18px; }

/* ---------- Аватары и «дуэт» ---------- */
.ava {
  --s: 40px; width: var(--s); height: var(--s); border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; color: #fff;
  font: 700 calc(var(--s) * .42)/1 var(--display);
  background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .55), transparent 46%), var(--ava);
  box-shadow: 0 8px 18px -8px var(--ava), inset 0 0 0 2px rgba(255, 255, 255, .28);
}
.ava-a { --ava: var(--a); }
.ava-b { --ava: var(--b); }
.ava-ghost { --ava: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 2px var(--ink-3); background: none; }
.ava.xs { --s: 22px; }
.ava.sm { --s: 30px; }
.ava.lg { --s: 68px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--ava); }

.duo { display: flex; align-items: center; cursor: pointer; border: 0; background: none; padding: 4px; }
.duo .ava { --s: 54px; animation: breathe 6s ease-in-out infinite; }
.duo .ava + .ava { margin-left: -16px; animation-delay: -3s; }
.duo .ava:first-child { position: relative; z-index: 1; }
.duo.bump .ava:first-child { animation: bumpL .8s var(--spring); }
.duo.bump .ava:last-child { animation: bumpR .8s var(--spring); }
.duo.big .ava { --s: 76px; }
.duo.big .ava + .ava { margin-left: -22px; }
@keyframes breathe { 50% { transform: translateY(-3px) scale(1.03); } }
@keyframes bumpL { 40% { transform: translateX(9px) rotate(-8deg) scale(1.08); } }
@keyframes bumpR { 40% { transform: translateX(-9px) rotate(8deg) scale(1.08); } }

/* Орб входа: два цвета, которые обнимаются */
.orb { position: relative; width: 132px; height: 104px; margin: 0 auto; }
.orb i { position: absolute; top: 14px; width: 76px; height: 76px; border-radius: 50%; mix-blend-mode: var(--blend); }
.orb i:first-child { left: 10px; background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .6), transparent 42%), var(--a); animation: orbL 5.5s var(--ease) infinite; }
.orb i:last-child { right: 10px; background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .6), transparent 42%), var(--b); animation: orbR 5.5s var(--ease) infinite; }
.boot .orb i { animation-duration: 1.8s; }
@keyframes orbL { 0%, 100% { transform: translateX(-6px); } 45%, 55% { transform: translateX(14px) scale(1.04); } }
@keyframes orbR { 0%, 100% { transform: translateX(6px); } 45%, 55% { transform: translateX(-14px) scale(1.04); } }

/* ---------- Кнопки ---------- */
.btn {
  appearance: none; border: 0; cursor: pointer; position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 54px; padding: 0 22px; border-radius: 18px;
  font: 600 16px "Inter", sans-serif; color: #fff; text-decoration: none;
  background: linear-gradient(115deg, var(--a), var(--duo) 50%, var(--b), var(--duo));
  background-size: 300% 100%; background-position: 0 50%;
  box-shadow: 0 12px 26px -12px color-mix(in oklab, var(--duo) 85%, transparent), inset 0 1px 0 rgba(255, 255, 255, .3);
  transition: background-position .8s var(--ease), transform .45s var(--spring), box-shadow .3s;
}
.btn:hover { background-position: 66% 50%; }
.btn:active { transform: scale(.965); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-block { width: 100%; }
.btn-soft { color: var(--ink); background: var(--glass-strong); box-shadow: inset 0 0 0 1px var(--hair), 0 8px 18px -12px rgba(40, 20, 70, .3); }
.btn-soft:hover { background: var(--glass-strong); }
.btn-ghost { color: var(--ink); background: transparent; box-shadow: inset 0 0 0 1px var(--hair); }
.btn-danger { color: var(--danger); background: transparent; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--danger) 35%, transparent); }
.btn-sm { height: 42px; padding: 0 16px; border-radius: 14px; font-size: 15px; }
.btn svg { width: 20px; height: 20px; }
.btn.busy { color: transparent; pointer-events: none; }
.btn.busy::after {
  content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn-soft.busy::after { border-color: var(--hair); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(1turn); } }

.btn-round {
  width: 50px; height: 50px; border-radius: 18px; border: 0; cursor: pointer; flex: none;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--a), var(--b));
  box-shadow: 0 12px 24px -10px color-mix(in oklab, var(--duo) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .5s var(--spring);
}
.btn-round svg { width: 24px; height: 24px; transition: transform .5s var(--spring); }
.btn-round:hover svg { transform: rotate(90deg); }
.btn-round:active { transform: scale(.9); }

.link { background: none; border: 0; padding: 4px; cursor: pointer; color: var(--ink-2); font: 600 15px "Inter", sans-serif; text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 4px; }
.link:hover { color: var(--ink); }

.ripple { position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: .18; transform: scale(0); }

/* ---------- Поля ---------- */
.field { position: relative; display: block; }
.field input {
  width: 100%; height: 58px; padding: 22px 16px 7px; border-radius: 18px;
  border: 1px solid var(--hair); background: var(--field); color: var(--ink);
  font: 500 16px "Inter", sans-serif; outline: none; -webkit-appearance: none;
  transition: border-color .25s, box-shadow .35s var(--ease), background .25s;
}
.field > span {
  position: absolute; left: 17px; top: 18px; color: var(--ink-3); pointer-events: none;
  transform-origin: left top; transition: transform .45s var(--spring), color .2s; white-space: nowrap;
}
.field input:focus + span, .field input:not(:placeholder-shown) + span { transform: translateY(-10px) scale(.76); color: var(--ink-2); }
.field input:focus { border-color: color-mix(in oklab, var(--duo) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--duo) 18%, transparent); }
.field.bad input { border-color: color-mix(in oklab, var(--danger) 70%, transparent); }
.field input[name="code"] { letter-spacing: .14em; font-weight: 600; text-transform: uppercase; }
.field .eye {
  position: absolute; right: 8px; top: 9px; width: 40px; height: 40px; border: 0; border-radius: 12px;
  background: none; color: var(--ink-3); cursor: pointer; display: grid; place-items: center;
}
.field .eye svg { width: 22px; height: 22px; }
.field-pw input { padding-right: 52px; }
.field.big input { height: 72px; font: 700 30px var(--display); letter-spacing: -.02em; padding-top: 26px; }

.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: -4px 4px 0; }
.meter i { height: 4px; border-radius: 4px; background: var(--hair); transition: background .4s, transform .5s var(--spring); }
.meter[data-s="1"] i:nth-child(-n+1) { background: var(--danger); }
.meter[data-s="2"] i:nth-child(-n+2) { background: var(--honey); }
.meter[data-s="3"] i:nth-child(-n+3) { background: var(--duo); }
.meter[data-s="4"] i { background: var(--mint); }
.meter-note { font-size: 13px; color: var(--ink-3); margin: -6px 6px 0; min-height: 18px; }

.form-err { color: var(--danger); font-size: 14px; font-weight: 600; padding: 0 4px; }
.form-err:empty { display: none; }

/* Сегменты с «живым» ползунком */
.seg {
  --n: 2; --i: 0; position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  padding: 4px; border-radius: 16px; background: var(--field); border: 1px solid var(--hair);
}
.seg label { position: relative; z-index: 1; cursor: pointer; text-align: center; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 10px 6px; border-radius: 12px; font-weight: 600; font-size: 14px; color: var(--ink-2); transition: color .3s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg input:checked + span { color: var(--ink); }
.seg input:focus-visible + span { outline: 2px solid var(--duo); }
.seg-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n));
  transform: translateX(calc(100% * var(--i))); border-radius: 12px; background: var(--glass-strong);
  box-shadow: 0 6px 14px -6px rgba(40, 20, 70, .3), inset 0 0 0 1px var(--stroke);
  transition: transform .55s var(--spring);
}
.flabel { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 2px 6px -6px; }

/* Чипсы */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 3px 16px 5px; scroll-snap-type: x proximity; }
.sheet .chips { margin: 0 -18px; padding-inline: 18px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; scroll-snap-align: start; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--hair); background: var(--glass); color: var(--ink);
  
  border-radius: 999px; padding: 9px 14px; font: 600 14px "Inter", sans-serif;
  transition: transform .45s var(--spring), background .25s, color .25s;
}
.chip:active { transform: scale(.92); }
.chip.on { color: #fff; border-color: transparent; background: linear-gradient(120deg, var(--a), var(--b)); }

/* ---------- Экран входа ---------- */
.auth { min-height: calc(100dvh - 60px); display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.auth-hero { text-align: center; }
.wordmark {
  font: 800 clamp(52px, 15.5vw, 84px)/.9 var(--display); letter-spacing: -.055em;
  margin: 12px 0 12px; padding-bottom: .06em;
  background: linear-gradient(100deg, var(--a) 0%, var(--duo) 30%, var(--b) 55%, var(--duo) 78%, var(--a) 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 9s linear infinite;
}
@keyframes sheen { to { background-position: -250% 0; } }
.lede { color: var(--ink-2); max-width: 30ch; margin: 0 auto; font-size: 17px; }
.auth-card { padding: 16px; border-radius: 28px; display: flex; flex-direction: column; gap: 12px; }
.auth-card .h2 { padding: 4px 4px 2px; }
.auth-switch { text-align: center; }
.invite-from { display: flex; align-items: center; gap: 12px; padding: 4px 4px 2px; }

/* ---------- Главная ---------- */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 8px 2px 6px; }
.hello-date { color: var(--ink-2); font-weight: 500; margin-bottom: 8px; }
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.span2 { grid-column: span 2; }
.tile {
  --glow: var(--duo); position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: 6px; min-height: 152px; padding: 16px;
  border-radius: 28px; text-align: left; text-decoration: none; color: inherit; cursor: pointer;
  font: inherit; transition: transform .55s var(--spring);
}
.tile::after {
  content: ""; position: absolute; z-index: -1; width: 180px; height: 180px; right: -70px; bottom: -80px;
  border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 68%); opacity: .38;
  transition: transform 1s var(--ease), opacity .4s;
}
.tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .22), transparent 60%);
}
.tile:hover::before { opacity: 1; }
.tile:hover::after { transform: scale(1.25); opacity: .5; }
.tile:active { transform: scale(.972); }
.tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.tile-top svg { width: 20px; height: 20px; opacity: .7; }
.tile-num { display: block; font: 800 50px/1 var(--display); letter-spacing: -.045em; font-variant-numeric: tabular-nums; margin-top: auto; }
.tile-cap { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.tile-list { list-style: none; padding: 0; margin: 2px 0 0; font-size: 14px; color: var(--ink-2); }
.tile-list li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-shop { --glow: var(--a); }
.t-chores { --glow: var(--b); }
.t-money { --glow: var(--honey); min-height: 0; flex-direction: row; align-items: center; gap: 14px; }
.t-money .tile-num { font-size: 34px; margin: 2px 0 0; }
.t-money .money-text { flex: 1; min-width: 0; }
.t-hug { --glow: var(--a); border: 1px solid var(--stroke); align-items: center; justify-content: center; text-align: center; }
.t-hug .heart { width: 64px; height: 64px; color: var(--a); filter: drop-shadow(0 8px 14px color-mix(in oklab, var(--a) 55%, transparent)); animation: beat 2.4s ease-in-out infinite; }
.t-hug b { font-weight: 600; }
.t-hug.sent .heart { animation: beatBig .7s var(--spring); }
@keyframes beat { 0%, 60%, 100% { transform: scale(1); } 10%, 30% { transform: scale(1.12); } 20% { transform: scale(.96); } }
@keyframes beatBig { 40% { transform: scale(1.45) rotate(-8deg); } }
.t-days { --glow: var(--mint); }
.t-days .tile-num { font-size: 44px; }

.t-partner { --glow: var(--pc, var(--b)); min-height: 0; gap: 12px; cursor: default; }
.t-partner:active { transform: none; }
.pt-head { display: flex; align-items: center; gap: 12px; }
.pt-head b { display: block; font-weight: 600; }
.pt-status { font: 700 26px/1.1 var(--display); letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.pt-status.pt-empty { display: block; text-align: left; font: 500 15px/1.4 "Inter", sans-serif; color: var(--ink-2); letter-spacing: 0; }
.pt-emoji { font-size: 32px; display: inline-block; animation: wobble 4s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 8% { transform: rotate(-12deg); } 16% { transform: rotate(10deg); } 24% { transform: rotate(0); } }
.live { margin-left: auto; width: 10px; height: 10px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 color-mix(in oklab, var(--mint) 60%, transparent); animation: live 2s infinite; }
.live.off { background: var(--ink-3); animation: none; }
@keyframes live { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.my-status { display: flex; flex-direction: column; gap: 8px; }
.my-status .flabel { margin: 0 4px; }

.install { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 22px; }
.install-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(135deg, var(--a), var(--b)); }
.install-ico svg { width: 22px; height: 22px; }
.install p { font-size: 14px; color: var(--ink-2); }
.install b { display: block; color: var(--ink); font-size: 15px; }

/* ---------- Списки и строки ---------- */
.list { border-radius: 22px; overflow: hidden; }
.row { position: relative; overflow: hidden; }
.list > .row + .row { border-top: 1px solid var(--hair); }
.row-body {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 56px;
  touch-action: pan-y; transition: background .2s;
}
.row-del {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding-right: 22px;
  background: var(--danger); color: #fff; opacity: 0; transition: opacity .15s;
}
.row-del svg { width: 22px; height: 22px; transition: transform .45s var(--spring); }
.row.dragging .row-del { opacity: 1; }
.row.dragging .row-body { background: var(--bg2); }
.row.armed .row-del svg { transform: scale(1.3) rotate(-10deg); }
.row-text { flex: 0 1 auto; margin-right: auto; min-width: 0; position: relative; overflow-wrap: anywhere; transition: color .3s; }
.row-text::after {
  content: ""; position: absolute; left: -2px; right: -2px; top: calc(50% - 1px); height: 2px; border-radius: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.row.is-done .row-text { color: var(--ink-3); }
.row.is-done .row-text::after { transform: scaleX(1); }

.check {
  width: 28px; height: 28px; border-radius: 50%; flex: none; padding: 0; cursor: pointer;
  display: grid; place-items: center; background: transparent; border: 2px solid var(--ink-3);
  transition: border-color .25s, background .3s, transform .5s var(--spring);
}
.check svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .4s .1s var(--ease); }
.check:hover { border-color: var(--duo); transform: scale(1.08); }
.check.on { border-color: transparent; background: linear-gradient(135deg, var(--a), var(--b)); animation: pop .5s var(--spring); }
.check.on svg { stroke-dashoffset: 0; }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }

.adder {
  position: sticky; top: calc(env(safe-area-inset-top) + 8px); z-index: 5;
  display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 8px; border-radius: 22px;
  transition: box-shadow .35s var(--ease);
}
.adder:focus-within { box-shadow: var(--shadow), 0 0 0 4px color-mix(in oklab, var(--duo) 20%, transparent); }
.adder input { flex: 1; min-width: 0; height: 48px; border: 0; background: transparent; outline: none; padding: 0 8px; font: 500 16px "Inter", sans-serif; color: var(--ink); }
.adder input::placeholder { color: var(--ink-3); }
.adder .btn-round { width: 46px; height: 46px; border-radius: 16px; }

.count-pill { font: 700 15px/1 "Inter", sans-serif; letter-spacing: 0; padding: 7px 11px; border-radius: 99px; color: #fff; background: linear-gradient(120deg, var(--a), var(--b)); transform-origin: left; }
.count-pill:empty { display: none; }
.count-pill.bump { animation: pop .5s var(--spring); }

.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 8px 4px 0; }
.sec-head .h2 { font-size: 18px; }

.empty { text-align: center; padding: 34px 20px 26px; }
.empty-ico { font-size: 60px; line-height: 1; display: inline-block; animation: float 4.5s ease-in-out infinite; }
.empty .h2 { margin-top: 12px; }
.empty p { color: var(--ink-2); margin-top: 6px; }
@keyframes float { 50% { transform: translateY(-10px) rotate(-4deg); } }
[hidden] { display: none !important; }

/* ---------- Дела ---------- */
.chores { display: flex; flex-direction: column; gap: 10px; }
.chore { border-radius: 22px; }
.chore .row-body { padding: 12px 12px 12px 12px; }
.chore-emoji { width: 48px; height: 48px; border-radius: 16px; flex: none; display: grid; place-items: center; font-size: 25px; background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); }
.chore-main { flex: 1; min-width: 0; }
.chore-main b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.chore-main small { display: block; }
.chore.late small .due { color: var(--honey-ink); font-weight: 600; }
.chore.today small .due { color: var(--ink); font-weight: 600; }
.chore .ava { transition: transform .6s var(--spring); }
.chore.swap .ava { animation: swap .7s var(--spring); }
@keyframes swap { 0% { transform: rotateY(0); } 50% { transform: rotateY(90deg) scale(.8); } 100% { transform: rotateY(0); } }
.done-btn {
  position: relative; width: 46px; height: 46px; border-radius: 50%; border: 0; flex: none; cursor: pointer;
  display: grid; place-items: center; color: var(--ink-2); background: var(--field); box-shadow: inset 0 0 0 1px var(--hair);
  transition: transform .5s var(--spring), background .3s, color .3s;
}
.done-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.done-btn:hover { transform: scale(1.08); color: var(--ink); }
.done-btn:active { transform: scale(.88); }
.chore.today .done-btn, .chore.late .done-btn { color: #fff; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: 0 10px 22px -10px var(--duo); }
.chore.today .done-btn::after, .chore.late .done-btn::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--duo); opacity: 0; animation: ring 2.4s var(--ease) infinite;
}
@keyframes ring { 0% { transform: scale(.85); opacity: .7; } 80%, 100% { transform: scale(1.25); opacity: 0; } }

.meter-card { padding: 16px 18px; }
.duo-meter { display: flex; gap: 4px; height: 14px; margin: 12px 0 10px; }
.duo-meter i { --w: 50%; flex: 0 0 auto; width: calc(var(--w) - 2px); min-width: 14px; border-radius: 99px; transition: width 1.1s var(--ease); }
.duo-meter .ma { background: linear-gradient(90deg, color-mix(in oklab, var(--a) 70%, white), var(--a)); }
.duo-meter .mb { background: linear-gradient(90deg, var(--b), color-mix(in oklab, var(--b) 70%, white)); }
.meter-legend { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink-2); }
.meter-legend > span { display: flex; align-items: center; gap: 8px; }
.meter-legend b { color: var(--ink); font-variant-numeric: tabular-nums; }

.log .row-body { min-height: 48px; padding: 10px 14px; font-size: 15px; }
.log time { margin-left: auto; color: var(--ink-3); font-size: 13px; white-space: nowrap; }

.emoji-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.emoji-grid label { cursor: pointer; }
.emoji-grid input { position: absolute; opacity: 0; pointer-events: none; }
.emoji-grid span { display: grid; place-items: center; height: 46px; border-radius: 14px; font-size: 23px; background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); transition: transform .45s var(--spring), box-shadow .2s, background .2s; }
.emoji-grid input:checked + span { transform: scale(1.1) rotate(-4deg); background: var(--glass-strong); box-shadow: 0 0 0 2px var(--duo), 0 8px 18px -8px var(--duo); }
.emoji-grid input:focus-visible + span { outline: 2px solid var(--duo); }

/* ---------- Деньги ---------- */
.balance { position: relative; overflow: hidden; isolation: isolate; padding: 22px 20px 20px; border-radius: 30px; text-align: center; }
.balance::after { content: ""; position: absolute; z-index: -1; inset: auto -30% -70% -30%; height: 120%; background: radial-gradient(ellipse at center, var(--honey), transparent 65%); opacity: .3; }
.bal-label { color: var(--ink-2); font-weight: 600; }
.bal-num { font: 800 clamp(46px, 14vw, 60px)/1 var(--display); letter-spacing: -.05em; margin: 10px 0 16px; font-variant-numeric: tabular-nums; }
.bal-flow { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 18px; }
.flow { width: 120px; height: 14px; overflow: visible; }
.flow line { stroke: var(--duo); stroke-width: 4; stroke-linecap: round; stroke-dasharray: .1 12; animation: flow .9s linear infinite; }
.flow.rev line { animation-direction: reverse; }
.flow.still line { animation: none; stroke: var(--hair); stroke-dasharray: none; }
@keyframes flow { to { stroke-dashoffset: -12.1; } }
.month { padding: 16px 18px; }
.month .duo-meter { height: 10px; margin: 10px 0 8px; }
.ledger { display: flex; flex-direction: column; gap: 8px; }
.day-h { font-size: 13px; font-weight: 600; color: var(--ink-3); margin: 10px 8px 0; }
.tx { border-radius: 20px; }
.tx-ico { width: 40px; height: 40px; border-radius: 14px; flex: none; display: grid; place-items: center; font-size: 19px; background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); }
.tx-main { flex: 1; min-width: 0; }
.tx-main b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.tx-main small { display: flex; align-items: center; gap: 6px; }
.tx-amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx.settle .tx-amt { color: var(--mint-ink); }
.split-note { font-size: 14px; color: var(--ink-2); padding: 0 6px; min-height: 20px; }

/* ---------- Мы ---------- */
.couple { padding: 24px 18px 18px; text-align: center; border-radius: 30px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.couple-names { font: 800 30px/1.05 var(--display); letter-spacing: -.035em; }
.couple-days { color: var(--ink-2); }
.together-form { display: flex; gap: 8px; width: 100%; }
.together-form .field { flex: 1; min-width: 0; }
.together-form .btn { flex: none; }
.together-form input[type="date"] { min-width: 0; }
.set { padding: 6px; border-radius: 24px; }
.set-row { display: flex; align-items: center; gap: 14px; padding: 12px; }
.set-row + .set-row { border-top: 1px solid var(--hair); }
.set-ico { width: 40px; height: 40px; border-radius: 13px; flex: none; display: grid; place-items: center; background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); }
.set-ico svg { width: 21px; height: 21px; }
.set-main { flex: 1; min-width: 0; }
.set-main b { display: block; font-weight: 600; }
.set-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 12px 12px; }
.set-actions .btn { flex: 1 1 auto; }
.set > .seg { margin: 4px 6px 6px; }
.code-box { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px; margin: 4px 6px 6px; border-radius: 20px; background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); }
.code { font: 800 38px/1 var(--display); letter-spacing: .06em; font-variant-numeric: tabular-nums; background: linear-gradient(110deg, var(--a), var(--b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.steps { margin: 4px 0 6px; padding: 0 12px 6px 40px; color: var(--ink-2); display: flex; flex-direction: column; gap: 10px; }
.steps li::marker { color: var(--duo); font-weight: 700; }
.steps svg { width: 18px; height: 18px; vertical-align: -3px; color: var(--b); }
.foot { text-align: center; font-size: 13px; color: var(--ink-3); padding: 8px 0 0; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 99px; margin-left: 6px; vertical-align: 1px; }
.badge.ok { color: var(--mint-ink); background: color-mix(in oklab, var(--mint) 16%, transparent); }
.badge.no { color: var(--ink-2); background: var(--field); }

/* ---------- Нижняя панель ---------- */
.tabbar {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 12px); z-index: 50;
  width: min(488px, calc(100% - 24px)); transform: translateX(-50%);
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px; border-radius: 28px;
  view-transition-name: tabbar;
}
.tab {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 0 7px; text-decoration: none; color: var(--ink-3); font-size: 11px; font-weight: 600;
  transition: color .3s; border-radius: 20px;
}
.tab svg { width: 24px; height: 24px; transition: transform .55s var(--spring); }
.tab.on { color: var(--ink); }
.tab.on svg { transform: translateY(-1px) scale(1.06); }
.tab.pop svg { animation: tabpop .6s var(--spring); }
.tab .tab-badge { position: absolute; top: 5px; left: calc(50% + 7px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; font-size: 11px; line-height: 17px; color: #fff; background: var(--a); text-align: center; animation: pop .5s var(--spring); }
.tab-ink {
  position: absolute; top: 6px; bottom: 6px; left: 0; width: var(--w, 20%); border-radius: 22px;
  transform: translateX(var(--x, 6px)); background: var(--glass-strong);
  box-shadow: inset 0 0 0 1px var(--stroke), 0 8px 20px -10px color-mix(in oklab, var(--duo) 70%, transparent);
  transition: transform .6s var(--spring), width .6s var(--spring);
}
.tab-ink.no-anim { transition: none; }
@keyframes tabpop { 0% { transform: scale(1); } 35% { transform: scale(.82) rotate(-6deg); } 70% { transform: scale(1.14) rotate(3deg); } 100% { transform: scale(1.06); } }

/* ---------- Нижние шторки ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(40, 18, 12, .34); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity .35s; }
.sheet {
  position: absolute; left: 50%; bottom: -60px; width: min(520px, 100%); max-height: calc(92dvh + 60px); overflow-y: auto;
  padding: 10px 18px calc(env(safe-area-inset-bottom) + 84px); border-radius: 30px 30px 0 0;
  background: var(--sheet);
  box-shadow: 0 -20px 50px -20px rgba(30, 10, 60, .45), inset 0 1px 0 var(--stroke);
  transform: translate(-50%, 100%); transition: transform .6s var(--spring); overscroll-behavior: contain;
}
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: translate(-50%, 0); }
.sheet-wrap.closing .sheet-backdrop { opacity: 0; }
.sheet-wrap.closing .sheet { transform: translate(-50%, 100%); transition: transform .32s var(--ease); }
.sheet-grip { width: 100%; height: 26px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.sheet-grip::before { content: ""; width: 42px; height: 5px; border-radius: 5px; background: var(--ink-3); opacity: .55; }
.sheet .h2 { margin: 2px 2px 14px; font-size: 24px; }
.sheet form { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Тосты и частицы ---------- */
#toasts { position: fixed; top: calc(env(safe-area-inset-top) + 10px); left: 50%; transform: translateX(-50%); z-index: 200; width: min(440px, calc(100% - 24px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 18px; font-weight: 600; font-size: 15px; background: var(--sheet); }
.toast.err { box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--danger) 55%, transparent), var(--shadow); }
.toast-i { font-size: 18px; }
.fx-layer { position: fixed; inset: 0; z-index: 300; pointer-events: none; overflow: hidden; }
.pt { position: absolute; left: 0; top: 0; width: 9px; height: 9px; border-radius: 3px; background: var(--c); will-change: transform, opacity; }
.pt.round { border-radius: 50%; }
.pt-char { width: auto; height: auto; background: none; font-size: 22px; line-height: 1; }

/* ---------- Скелетоны ---------- */
.skel { border-radius: 28px; background: linear-gradient(100deg, var(--glass) 30%, var(--glass-strong) 50%, var(--glass) 70%); background-size: 300% 100%; animation: shimmer 1.6s linear infinite; border: 1px solid var(--stroke); }
.skel.s1 { height: 120px; } .skel.s2 { height: 160px; } .skel.s3 { height: 64px; border-radius: 22px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }

/* ---------- Переходы между разделами (View Transitions) ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-old(view) { animation: vt-out .22s var(--ease) both; }
::view-transition-new(view) { animation: vt-in .5s var(--ease) both; }
html[data-dir="back"]::view-transition-old(view) { animation-name: vt-out-back; }
html[data-dir="back"]::view-transition-new(view) { animation-name: vt-in-back; }
@keyframes vt-out { to { opacity: 0; transform: translateX(-28px); filter: blur(6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateX(36px); filter: blur(8px); } }
@keyframes vt-out-back { to { opacity: 0; transform: translateX(28px); filter: blur(6px); } }
@keyframes vt-in-back { from { opacity: 0; transform: translateX(-36px); filter: blur(8px); } }

.shake { animation: shake .5s var(--ease); }
@keyframes shake { 15% { transform: translateX(-9px); } 30% { transform: translateX(8px); } 45% { transform: translateX(-6px); } 60% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }

@media (min-width: 560px) {
  #app { padding-top: 34px; }
}

/* ---------- Уважение к «Уменьшить движение» ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .lamp::before, .lamp::after { animation: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- Дополнения ---------- */
.pc-a { --pc: var(--a); }
.pc-b { --pc: var(--b); }
.duo-meter .ma { background: linear-gradient(90deg, color-mix(in oklab, var(--a) 65%, white), var(--a)); }
.duo-meter .mb { background: linear-gradient(90deg, var(--b), color-mix(in oklab, var(--b) 65%, white)); }
.t-money .bal-flow { margin: 0; flex: none; gap: 2px; }
.t-money .flow { width: 46px; }
.t-partner .duo .ava { --s: 34px; }
.t-partner .duo .ava + .ava { margin-left: -10px; }
.opt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.opt-grid label { cursor: pointer; }
.opt-grid input { position: absolute; opacity: 0; pointer-events: none; }
.opt-grid span { display: grid; place-items: center; height: 44px; padding: 0 6px; border-radius: 14px; text-align: center; font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); transition: transform .45s var(--spring), background .2s, color .2s, box-shadow .2s; }
.opt-grid input:checked + span { color: var(--ink); background: var(--glass-strong); box-shadow: 0 0 0 2px var(--duo); transform: scale(1.03); }
.opt-grid input:focus-visible + span { outline: 2px solid var(--duo); }
.install .btn { flex: none; }
.install p { flex: 1; min-width: 0; }
a.install { text-decoration: none; color: inherit; }

/* Смена темы — круговая волна по всему экрану */
html[data-vt="theme"] .view, html[data-vt="theme"] .tabbar { view-transition-name: none; }
html[data-vt="theme"]::view-transition-old(root) { animation: none; }

/* ---------- Календарь дел ---------- */
.mode-pane { display: flex; flex-direction: column; gap: 14px; }
.cal { padding: 14px 12px 12px; border-radius: 28px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 8px; }
.cal-title { font-size: 22px; }
.cal-nav {
  width: 40px; height: 40px; border-radius: 14px; border: 0; cursor: pointer; flex: none;
  display: grid; place-items: center; color: var(--ink); background: var(--field); box-shadow: inset 0 0 0 1px var(--hair);
  transition: transform .45s var(--spring), background .2s;
}
.cal-nav svg { width: 20px; height: 20px; }
.cal-nav:hover { background: var(--glass-strong); }
.cal-nav:active { transform: scale(.88); }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 2px 0 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-day {
  position: relative; min-height: 48px; border: 0; border-radius: 14px; padding: 6px 0 5px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 5px;
  background: transparent; color: var(--ink); font: 600 15px "Inter", sans-serif;
  transition: background .25s, box-shadow .25s, transform .45s var(--spring);
}
.cal-day:hover { background: var(--field); }
.cal-day:active { transform: scale(.9); }
.cal-day.out { opacity: .4; }
.cal-day.past .cal-n { color: var(--ink-2); }
.cal-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; line-height: 1; font-variant-numeric: tabular-nums; }
.cal-day.today .cal-n { color: #fff; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: 0 6px 14px -6px var(--duo); }
.cal-day.sel { background: var(--glass-strong); box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--duo) 55%, transparent), 0 8px 18px -10px var(--duo); }
.cal-dots { display: flex; align-items: center; justify-content: center; gap: 3px; height: 7px; }
.cal-dots b { font-size: 10px; line-height: 7px; color: var(--ink-3); }
.cd { --uc: var(--ink-3); width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex: none; }
.cd.u-a { --uc: var(--a); }
.cd.u-b { --uc: var(--b); }
.cd.plan { box-shadow: inset 0 0 0 1.7px var(--uc); }
.cd.done { background: var(--uc); }
.cd.late { background: var(--honey); box-shadow: 0 0 0 2px color-mix(in oklab, var(--honey) 35%, transparent); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 12px 6px 2px; font-size: 12px; color: var(--ink-2); }
.cal-legend span { display: flex; align-items: center; gap: 6px; }
.cal-legend .cd { width: 8px; height: 8px; }
.agenda .sec-head .h2 { font-size: 19px; }
.agenda .list { margin-top: 8px; }
.chore-emoji.sm { width: 40px; height: 40px; border-radius: 13px; font-size: 20px; }
.ag-ok { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; color: var(--mint-ink); background: color-mix(in oklab, var(--mint) 16%, transparent); }
.ag-ok svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ag-done .chore-main b { color: var(--ink-2); }
.ag-late .chore-main small { color: var(--honey-ink); font-weight: 600; }
.ag-empty { text-align: center; color: var(--ink-3); padding: 14px 0 4px; font-size: 14px; }
.ava-btn { border: 0; background: none; padding: 0; border-radius: 50%; cursor: pointer; flex: none; transition: transform .45s var(--spring); }
.ava-btn:hover { transform: scale(1.1) rotate(-6deg); }
.ava-btn:active { transform: scale(.88); }
.first-wrap { display: flex; flex-direction: column; gap: 12px; }
.balance .duo-meter { margin: 2px 0 10px; }
.balance .meter-legend { text-align: left; }

/* =====================================================================
   «Свет лампы» — новые компоненты и переоформление
   ===================================================================== */

/* ---------- Кнопки: тёплый уголёк вместо радуги ---------- */
.btn {
  background: linear-gradient(120deg, var(--a), var(--duo) 60%, color-mix(in oklab, var(--duo) 70%, var(--b)));
  background-size: 200% 100%;
  box-shadow: 0 10px 22px -12px color-mix(in oklab, var(--a) 90%, transparent), inset 0 1px 0 rgba(255, 255, 255, .28);
  border-radius: 16px;
}
.btn:hover { background-position: 100% 50%; }
.btn-soft { color: var(--ink); background: var(--glass-strong); box-shadow: inset 0 0 0 1px var(--hair), 0 6px 14px -10px rgba(96, 50, 36, .3); }
.btn-ghost { color: var(--ink); background: transparent; box-shadow: inset 0 0 0 1px var(--hair); }
.btn-danger { color: var(--danger); background: transparent; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--danger) 35%, transparent); }
.btn-danger-solid { background: var(--danger); box-shadow: 0 10px 22px -12px var(--danger); }
.btn-xs { height: 34px; padding: 0 12px; border-radius: 11px; font-size: 14px; }
.btn-round { border-radius: 17px; background: linear-gradient(140deg, var(--a), var(--duo)); box-shadow: 0 10px 22px -10px color-mix(in oklab, var(--a) 85%, transparent), inset 0 1px 0 rgba(255, 255, 255, .3); }
.plain { appearance: none; background: none; border: 0; padding: 0; margin: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 13px; border: 0; flex: none; cursor: pointer; text-decoration: none;
  display: inline-grid; place-items: center; color: var(--ink-2); background: var(--glass); box-shadow: inset 0 0 0 1px var(--hair);
  transition: transform .45s var(--spring), color .2s, background .2s;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { color: var(--ink); background: var(--glass-strong); }
.icon-btn:active { transform: scale(.88); }
.icon-btn.danger { color: var(--danger); }
.file-btn { cursor: pointer; }

/* ---------- Нижняя панель: тёплая плитка ---------- */
.tabbar { background: color-mix(in oklab, var(--glass) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-radius: 26px; }
.tab { font-size: 10.5px; }
.tab.on { color: var(--ink); }
.tab-ink { background: color-mix(in oklab, var(--a) 14%, var(--glass-strong)); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--a) 22%, transparent); border-radius: 20px; }
.tab.on svg { color: var(--a); }
.tab-ink.gone { opacity: 0; }
.tab .tab-badge { background: var(--duo); }

/* ---------- Мелкие элементы в новых цветах ---------- */
.chip.on { background: linear-gradient(120deg, var(--a), var(--duo)); }
.check.on { background: linear-gradient(135deg, var(--a), var(--duo)); }
.cal-day.today .cal-n { background: linear-gradient(135deg, var(--a), var(--duo)); }
.count-pill { background: linear-gradient(120deg, var(--a), var(--duo)); }
.code { background: linear-gradient(110deg, var(--a), var(--duo), var(--b)); -webkit-background-clip: text; background-clip: text; }
.wordmark { background: linear-gradient(100deg, var(--a) 0%, var(--duo) 40%, var(--b) 70%, var(--a) 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; }
.install-ico { background: linear-gradient(135deg, var(--a), var(--duo)); }
.chore.today .done-btn, .chore.late .done-btn { background: linear-gradient(135deg, var(--a), var(--duo)); }
.done-btn.ghost { opacity: .45; pointer-events: none; }
.done-btn.is-on { color: var(--mint-ink); background: color-mix(in oklab, var(--mint) 16%, transparent); }
.done-btn svg { fill: none; stroke: currentColor; }
.tile { border-radius: 26px; }
.t-partner { background: linear-gradient(160deg, color-mix(in oklab, var(--pc, var(--b)) 9%, var(--glass)), var(--glass) 60%); }
.sheet .sub { display: flex; flex-direction: column; gap: 12px; color: inherit; font-size: inherit; }
.sheet .h2 { font-size: 23px; }
.sheet-text { color: var(--ink-2); margin: -4px 2px 14px; }
.sheet-actions { display: flex; flex-direction: column; gap: 10px; }
.sheet-row-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.sheet-row-actions .btn { flex: 1 1 auto; }
.warn { color: var(--honey-ink); font-weight: 600; }
.badge.bad { color: var(--danger); background: color-mix(in oklab, var(--danger) 13%, transparent); }
.dot.ok { background: var(--mint); }
.dot.bad { background: var(--danger); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 .field { min-width: 0; }

/* ---------- Очаг на экране входа: два огонька и уголёк ---------- */
.hearth { position: relative; width: 112px; height: 108px; margin: 0 auto; }
.hearth i {
  position: absolute; bottom: 22px; width: 52px; height: 74px; border-radius: 50% 50% 46% 46% / 62% 62% 38% 38%;
  mix-blend-mode: var(--blend); transform-origin: 50% 100%;
}
.hearth i:first-child { left: 14px; background: radial-gradient(60% 70% at 50% 75%, #ffe3a3, var(--a) 70%); animation: flameL 3.4s ease-in-out infinite; }
.hearth i:nth-child(2) { right: 14px; background: radial-gradient(60% 70% at 50% 75%, #ffd9f0, var(--b) 70%); animation: flameR 3.4s ease-in-out infinite; }
.hearth b {
  position: absolute; left: 50%; bottom: 8px; width: 84px; height: 22px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--duo) 80%, #ffd27a), transparent); filter: blur(2px);
  animation: ember 3.4s ease-in-out infinite;
}
@keyframes flameL { 0%, 100% { transform: rotate(-6deg) scaleY(1); } 50% { transform: rotate(4deg) translateX(8px) scaleY(1.08); } }
@keyframes flameR { 0%, 100% { transform: rotate(6deg) scaleY(1.04); } 50% { transform: rotate(-4deg) translateX(-8px) scaleY(.96); } }
@keyframes ember { 50% { opacity: .7; transform: translateX(-50%) scaleX(1.1); } }

/* ---------- Шапка главной ---------- */
.hello { display: block; padding: 4px 2px 6px; }
.hello-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.house-name { font: 700 15px var(--display); color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; }
.house-name::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe7b0, var(--a)); box-shadow: 0 0 12px 3px color-mix(in oklab, var(--lamp) 80%, transparent); }
.hello-date { margin-bottom: 6px; }
.hello-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }

/* ---------- Плитки главной: даты и желания ---------- */
.t-events { --glow: var(--honey); min-height: 0; }
.ev-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ev-list li { display: flex; align-items: center; gap: 10px; }
.ev-emoji { font-size: 22px; width: 32px; text-align: center; }
.ev-title { flex: 1; min-width: 0; font-weight: 600; }
.ev-title small { font-weight: 500; }
.ev-list b, .ev-when { font-size: 14px; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.soon { color: var(--duo) !important; }
.t-wish { --glow: var(--b); min-height: 0; flex-direction: row; align-items: center; gap: 14px; }
.t-wish b { display: block; }
.wish-ico { font-size: 34px; }

/* ---------- Полоса «кто сколько» ---------- */
.duo-bar { display: flex; gap: 4px; height: 12px; margin: 12px 0 10px; }
.duo-bar i { --w: 50%; width: calc(var(--w) - 2px); min-width: 12px; border-radius: 99px; transition: width 1.1s var(--ease); }
.duo-bar .ma { background: linear-gradient(90deg, color-mix(in oklab, var(--a) 60%, white), var(--a)); }
.duo-bar .mb { background: linear-gradient(90deg, var(--b), color-mix(in oklab, var(--b) 60%, white)); }
.duo-legend { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink-2); }
.duo-legend span { display: flex; align-items: center; gap: 7px; }
.duo-legend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.balance .duo-legend { text-align: left; }
.balance::after { background: radial-gradient(ellipse at center, var(--lamp), transparent 65%); opacity: .45; }

/* ---------- Выбор периода ---------- */
.period { display: flex; flex-direction: column; gap: 8px; }
.seg-sm span { padding: 8px 4px; font-size: 13px; }
.period-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.period-label { font: 700 18px var(--display); }
.period-custom { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.field-sm input { height: 50px; padding-top: 18px; font-size: 15px; }
.field-sm > span { top: 15px; }
.cmp { font-size: 14px; font-weight: 600; color: var(--ink-2); margin: -6px 0 6px; }
.cmp.up { color: var(--duo); }
.cmp.down { color: var(--mint-ink); }

/* ---------- Итоги и категории ---------- */
.stats { display: flex; flex-direction: column; gap: 12px; }
.stat-big { font: 600 17px var(--display); color: var(--ink-2); }
.stat-big b { font-size: 46px; font-weight: 800; color: var(--ink); letter-spacing: -.04em; margin-right: 4px; font-variant-numeric: tabular-nums; }
.rank { margin: 10px 0 0; padding: 0; list-style: none; counter-reset: r; display: flex; flex-direction: column; gap: 8px; }
.rank li { counter-increment: r; display: flex; align-items: center; gap: 10px; }
.rank li::before { content: counter(r); width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--ink-2); background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); }
.rank li span { flex: 1; }
.cats .h3 { margin-bottom: 10px; }
.cat-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.cat-bars li { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.cat-name { font-weight: 500; }
.cat-bars b { font-variant-numeric: tabular-nums; font-size: 15px; }
.cat-bars .bar { grid-column: 1 / -1; display: block; height: 8px; width: var(--w); border-radius: 99px; background: linear-gradient(90deg, var(--honey), var(--a)); transform-origin: left; animation: grow .9s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
.cat-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-pick label { cursor: pointer; }
.cat-pick input { position: absolute; opacity: 0; pointer-events: none; }
.cat-pick span { display: inline-block; padding: 8px 12px; border-radius: 99px; font-size: 14px; font-weight: 600; color: var(--ink-2); background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); transition: transform .45s var(--spring), background .2s, color .2s; }
.cat-pick input:checked + span { color: #fff; background: linear-gradient(120deg, var(--a), var(--duo)); box-shadow: none; transform: scale(1.04); }
.cat-pick input:focus-visible + span { outline: 2px solid var(--duo); }

/* ---------- Форма дела: повтор ---------- */
.every { display: flex; align-items: center; gap: 10px; }
.every > span { font-weight: 600; color: var(--ink-2); }
.every input { width: 72px; height: 48px; border-radius: 14px; border: 1px solid var(--hair); background: var(--field); text-align: center; font: 700 18px var(--display); }
.every .seg { flex: 1; }
.wd-pick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.wd-pick label { cursor: pointer; }
.wd-pick input { position: absolute; opacity: 0; pointer-events: none; }
.wd-pick span { display: grid; place-items: center; height: 44px; border-radius: 13px; font-weight: 700; font-size: 14px; color: var(--ink-2); background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); transition: transform .45s var(--spring), background .2s, color .2s; }
.wd-pick input:checked + span { color: #fff; background: linear-gradient(135deg, var(--a), var(--duo)); box-shadow: none; transform: scale(1.06); }
.wd-pick input:focus-visible + span { outline: 2px solid var(--duo); }
.chips.mini .chip { padding: 6px 12px; font-size: 13px; }
.cd.event { background: var(--honey); }
.cd.u-x { --uc: var(--ink-3); }
.ag-event .chore-main small { color: var(--honey-ink); font-weight: 600; }

/* ---------- Поля: текст, выпадающий список, переключатель ---------- */
.field-area textarea {
  width: 100%; min-height: 76px; resize: vertical; padding: 24px 16px 10px; border-radius: 16px;
  border: 1px solid var(--hair); background: var(--field); color: var(--ink); font: 500 16px "Inter", sans-serif; outline: none;
  transition: border-color .25s, box-shadow .35s var(--ease);
}
.field-area textarea:focus { border-color: color-mix(in oklab, var(--a) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--a) 16%, transparent); }
.field-area textarea:focus + span, .field-area textarea:not(:placeholder-shown) + span { transform: translateY(-10px) scale(.76); color: var(--ink-2); }
.field-select select {
  width: 100%; height: 58px; padding: 22px 40px 6px 16px; border-radius: 18px; border: 1px solid var(--hair); background: var(--field);
  color: var(--ink); font: 500 16px "Inter", sans-serif; outline: none; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a07a70' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.field-select > span { transform: translateY(-10px) scale(.76); color: var(--ink-2); }
.field input:focus { border-color: color-mix(in oklab, var(--a) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--a) 16%, transparent); }
.toggle { display: flex; align-items: center; gap: 14px; cursor: pointer; padding: 6px 4px; }
.toggle-text { flex: 1; min-width: 0; }
.toggle-text b { display: block; font-weight: 600; }
.toggle-text small { display: block; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle i { position: relative; width: 52px; height: 32px; border-radius: 99px; flex: none; background: var(--hair); box-shadow: inset 0 0 0 1px var(--hair); transition: background .3s; }
.toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(60, 20, 10, .25); transition: transform .45s var(--spring); }
.toggle input:checked + i { background: linear-gradient(120deg, var(--a), var(--duo)); }
.toggle input:checked + i::after { transform: translateX(20px); }
.toggle input:focus-visible + i { outline: 2px solid var(--duo); outline-offset: 2px; }

/* ---------- Желания ---------- */
.wish .row-body { align-items: center; }
.wish-main { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 12px; }
.wish-emoji { width: 46px; height: 46px; border-radius: 15px; flex: none; display: grid; place-items: center; font-size: 24px; background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); }
.wish-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.wish-text b { font-weight: 600; overflow-wrap: anywhere; }
.wish-text small { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.wish-star svg { width: 15px; height: 15px; vertical-align: -2px; color: var(--honey); fill: var(--honey); }
.wish-link { display: inline-flex; align-items: center; gap: 3px; color: var(--b); text-decoration: none; font-weight: 600; }
.wish-link svg { width: 14px; height: 14px; }
.wish-note { font-size: 13px; color: var(--ink-3); margin-top: 2px; overflow-wrap: anywhere; }
.wish.is-done .wish-text b { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 2px; }
.wish-badge { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 99px; color: var(--mint-ink); background: color-mix(in oklab, var(--mint) 15%, transparent); }
.reserve {
  flex: none; height: 38px; padding: 0 14px; border-radius: 12px; border: 0; cursor: pointer; font: 600 14px "Inter", sans-serif;
  color: var(--ink); background: var(--glass-strong); box-shadow: inset 0 0 0 1px var(--hair); transition: transform .45s var(--spring), background .25s, color .25s;
}
.reserve:active { transform: scale(.92); }
.reserve.on { color: #fff; background: linear-gradient(120deg, var(--b), var(--duo)); box-shadow: 0 8px 18px -10px var(--b); }

/* ---------- Мы ---------- */
.set-link { width: 100%; appearance: none; background: none; border: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; border-radius: 16px; transition: background .2s; }
.set-link:hover { background: var(--field); }
.set-link > svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.set-row + .set-link, .set-link + .set-link, .set-link + .set-row { border-top: 1px solid var(--hair); border-radius: 0; }
.set-ico.sm { width: 32px; height: 32px; border-radius: 10px; }
.set-ico.sm svg { width: 17px; height: 17px; }
.set-ico { color: var(--a); }

/* ---------- Админка ---------- */
.adm { display: flex; flex-direction: column; gap: 12px; }
.adm-user { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.adm-user-head { display: flex; align-items: center; gap: 12px; }
.adm-user-head .set-main b { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.adm-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); }
.adm-facts span { display: inline-flex; align-items: center; gap: 6px; }
.adm-facts svg { width: 15px; height: 15px; }
.adm-facts .live { margin: 0; width: 8px; height: 8px; }
.adm-user .flabel { margin: 0 2px -4px; }
.adm-sessions, .adm-backups, .adm-log { border-radius: 16px; background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); overflow: hidden; }
.adm-sessions .row + .row, .adm-backups .row + .row, .adm-log .row + .row { border-top: 1px solid var(--hair); }
.adm-sessions .row-body, .adm-backups .row-body, .adm-log .row-body { min-height: 0; padding: 10px 12px; gap: 10px; }
.adm-backups .icon-btn { width: 36px; height: 36px; border-radius: 11px; }
.adm-user .set-actions { padding: 0; }
.set .adm-backups, .set .adm-log { margin: 0 12px 12px; }
.set [data-ref="check"] .list { margin: 0 12px 12px; border-radius: 16px; background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); overflow: hidden; }
.set [data-ref="check"] .row + .row { border-top: 1px solid var(--hair); }
.set [data-ref="check"] .row-body { min-height: 0; padding: 10px 12px; }
.adm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; padding: 0; overflow: hidden; background: var(--hair); }
.adm-grid > div { background: var(--glass); padding: 14px 10px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.adm-grid span { font-size: 20px; }
.adm-grid b { font: 800 20px var(--display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.adm-grid small { font-size: 12px; }
.adm-errors { display: flex; flex-direction: column; gap: 6px; padding: 0 12px 12px; }
.adm-errors details { border-radius: 12px; background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); padding: 8px 12px; font-size: 13px; }
.adm-errors summary { cursor: pointer; color: var(--ink-2); }
.adm-errors pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.45 ui-monospace, Menlo, Consolas, monospace; margin: 8px 0 0; color: var(--ink); }
.adm-settings { display: flex; flex-direction: column; gap: 12px; padding: 16px; }

@media (max-width: 360px) {
  .adm-grid { grid-template-columns: repeat(2, 1fr); }
  .row2 { grid-template-columns: 1fr; }
}
.duo-legend .ava, .tx-main .ava, .meter-legend .ava { flex: none; }

/* =====================================================================
   Движение v2 — спокойно и предсказуемо
   Правила: без размытия, без «пружинных» перелётов, ничего не шевелится
   само по себе (кроме огонька на экране входа и точки «на связи»).
   Анимация отвечает только на действие человека и показывает, что изменилось.
   ===================================================================== */
:root { --spring: cubic-bezier(.25, 1.1, .5, 1); --out: cubic-bezier(.2, .8, .2, 1); }

/* Вечные движения — выключены */
.duo .ava, .pt-emoji, .t-hug .heart, .empty-ico, .wordmark, .lamp::before, .lamp::after { animation: none; }
.chore.today .done-btn::after, .chore.late .done-btn::after { animation: none; opacity: 0; }

/* Нажатие — короткое «вдавливание» вместо ряби */
.btn, .btn-round, .chip, .tile, .icon-btn, .reserve, .done-btn, .check, .cal-day, .cal-nav {
  transition: transform .14s var(--out), background-color .2s, color .2s, box-shadow .2s, opacity .2s;
}
.btn:active, .btn-round:active, .chip:active, .icon-btn:active, .reserve:active, .cal-nav:active { transform: scale(.96); }
.tile:active { transform: scale(.985); }
.done-btn:active, .check:active, .cal-day:active { transform: scale(.92); }
.btn-round:hover svg { transform: none; }
.btn:hover { background-position: 0 50%; }
.tile:hover::after { transform: none; opacity: .38; }
.tile::before { display: none; }

/* Ползунки вкладок и переключателей — плавно, без перелёта */
.seg-thumb { transition: transform .3s var(--out); }
.tab-ink { transition: transform .32s var(--out), width .32s var(--out), opacity .2s; }
.tab svg { transition: transform .2s var(--out); }
.tab.on svg { transform: none; }
.tab.pop svg { animation: none; }
.toggle i::after { transition: transform .22s var(--out); }

/* Галочки и отметки — короткий отклик */
.check.on { animation: tick .26s var(--out); }
@keyframes tick { 0% { transform: scale(.85); } 100% { transform: scale(1); } }
.emoji-grid input:checked + span, .wd-pick input:checked + span, .cat-pick input:checked + span { transform: none; transition: background .18s, color .18s, box-shadow .18s; }
.count-pill.bump { animation: tick .26s var(--out); }
.tab .tab-badge { animation: none; }

/* «Дуэт» и сердце — отклик только на нажатие */
.duo.bump .ava:first-child { animation: nudgeL .45s var(--out); }
.duo.bump .ava:last-child { animation: nudgeR .45s var(--out); }
@keyframes nudgeL { 40% { transform: translateX(6px); } }
@keyframes nudgeR { 40% { transform: translateX(-6px); } }
.t-hug.sent .heart { animation: hug .5s var(--out); }
@keyframes hug { 35% { transform: scale(1.18); } }
.chore.swap .ava { animation: tick .3s var(--out); }

/* Шторки — как в iOS: быстрый подъём без отскока */
.sheet { transition: transform .42s cubic-bezier(.32, .72, 0, 1); }
.sheet-wrap.closing .sheet { transition: transform .26s cubic-bezier(.4, 0, 1, 1); }
.sheet-backdrop { transition: opacity .3s var(--out); }

/* Строки списков: зачёркивание и полосы */
.row-text::after { transition: transform .28s var(--out); }
.duo-bar i, .duo-meter i { transition: width .6s var(--out); }
.cat-bars .bar { animation: grow .5s var(--out) both; }

/* Огонёк на экране входа — тише */
@keyframes flameL { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(2deg) translateX(3px) scaleY(1.03); } }
@keyframes flameR { 0%, 100% { transform: rotate(3deg); } 50% { transform: rotate(-2deg) translateX(-3px) scaleY(.98); } }
.hearth i, .hearth b { animation-duration: 5s; }

/* Тряска при ошибке — короче */
.shake { animation: shake2 .32s var(--out); }
@keyframes shake2 { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }

/* Переходы разделов делает скрипт одной лёгкой анимацией */
.view { view-transition-name: none; }

/* =====================================================================
   Ужин, регулярные платежи, недельная сводка
   ===================================================================== */
.food-link { align-self: center; flex: none; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--ink); padding: 9px 13px; border-radius: 99px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--hair); }
.food-link:active { transform: scale(.96); }

.dinner-hero { padding: 20px 18px; display: flex; flex-direction: column; gap: 10px; text-align: center; align-items: center; position: relative; overflow: hidden; isolation: isolate; }
.dinner-hero::after { content: ""; position: absolute; z-index: -1; inset: -40% -20% auto; height: 120%; background: radial-gradient(closest-side, var(--lamp), transparent); opacity: .5; }
.dinner-plate { font-size: 54px; line-height: 1; }
.dinner-hero .sub { max-width: 30ch; }
.dinner-label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.dinner-dish { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dinner-emoji { font-size: 64px; line-height: 1.05; }
.dinner-dish b { font: 800 28px/1.1 var(--display); letter-spacing: -.02em; }
.dinner-dish.spin b, .dinner-dish.spin .dinner-emoji { opacity: .8; }
.dinner-ingr { font-size: 14px; color: var(--ink-2); max-width: 34ch; }
.dinner-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; width: 100%; }
.dinner-actions .btn { flex: 1 1 auto; }
.btn.is-on { color: var(--mint-ink); background: color-mix(in oklab, var(--mint) 15%, var(--glass-strong)); }
.dish-main, .bill-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }

.t-dinner, .t-digest { --glow: var(--honey); min-height: 0; flex-direction: row; align-items: center; gap: 14px; }
.t-digest { --glow: var(--b); background: linear-gradient(120deg, color-mix(in oklab, var(--b) 10%, var(--glass)), var(--glass) 70%); }
.t-dinner > span:nth-child(2), .t-digest > span:nth-child(2) { flex: 1; min-width: 0; }
.t-dinner small, .t-digest small { display: block; }
.t-dinner b, .t-digest b { display: block; font: 700 19px/1.2 var(--display); }
.t-dinner > svg, .t-digest > svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.dinner-ico { font-size: 34px; line-height: 1; }

.bills { display: flex; flex-direction: column; gap: 8px; }
.bills .sec-head { margin-top: 0; }
.bill .row-body { gap: 10px; }
.bill .tx-main small { display: block; }
.bill-soon .due { color: var(--duo); font-weight: 600; }
.bill-late .due { color: var(--honey-ink); font-weight: 700; }
.pay-btn { flex: none; height: 36px; padding: 0 12px; border: 0; border-radius: 11px; cursor: pointer; font: 600 14px "Inter", sans-serif; color: #fff; background: linear-gradient(120deg, var(--a), var(--duo)); }
.pay-btn:active { transform: scale(.95); }

.digest { display: flex; flex-direction: column; gap: 12px; }
.dg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dg-grid > div { display: flex; flex-direction: column; gap: 2px; }
.dg-grid span { font-size: 22px; }
.dg-grid b { font: 800 26px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.dg-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.dg-row + .dg-row { border-top: 1px solid var(--hair); }
.dg-row b { flex: 1; }
.dg-row > span:not(.ava) { color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 70px; text-align: right; }
.dg-hint { margin: 8px 0 0; }
.dg-food { margin-top: 6px; color: var(--ink-2); }
.dg-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dg-list li { display: flex; align-items: center; gap: 10px; }
.dg-list li > span:first-child { font-size: 20px; width: 28px; text-align: center; }
.dg-list b { flex: 1; min-width: 0; font-weight: 600; }
.dg-list time { color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.digest .h3 { margin-bottom: 4px; }

/* ===================== Ачивки ===================== */
.t-ach { --glow: var(--honey); min-height: 0; flex-direction: row; align-items: center; gap: 14px;
  background: linear-gradient(120deg, color-mix(in oklab, var(--honey) 14%, var(--glass)), var(--glass) 70%); }
.t-ach > span:nth-child(2) { flex: 1; min-width: 0; }
.t-ach small { display: block; }
.t-ach b { display: block; font: 700 18px/1.2 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-ach > svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.t-ach .ach-bar { margin-top: 8px; }
.ach-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--duo); flex: none; box-shadow: 0 0 0 4px color-mix(in oklab, var(--duo) 20%, transparent); }

.ach-bar { display: block; height: 6px; border-radius: 99px; background: color-mix(in oklab, var(--ink) 9%, transparent); overflow: hidden; }
.ach-bar.big { height: 9px; margin-top: 10px; }
.ach-bar i { --w: 0%; display: block; height: 100%; width: var(--w); border-radius: inherit;
  background: linear-gradient(90deg, var(--a), var(--duo), var(--b)); transition: width .9s var(--out, ease); }

.ach-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.ach-hero > div { flex: 1; min-width: 0; }
.ach-hero b { display: block; font: 700 21px/1.2 var(--display); }
.ach-hero small { color: var(--ink-2); }
.ach-cup { font-size: 46px; line-height: 1; }

.ach-sec { margin: 0 0 20px; }
.ach-sec .h3 { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 10px; }
.ach-sec .h3 small { font: 500 13px/1 var(--display); color: var(--ink-3); }
.ach-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 620px) { .ach-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.ach { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 4px; padding: 14px;
  border-radius: 20px; background: var(--glass); border: 1px solid var(--hair); position: relative;
  transition: transform .18s var(--out, ease); -webkit-tap-highlight-color: transparent; }
.ach:active { transform: scale(.97); }
.ach .ach-emo { font-size: 30px; line-height: 1.1; margin-bottom: 4px; }
.ach b { font: 650 15px/1.25 var(--display); color: var(--ink); }
.ach small { font-size: 12.5px; line-height: 1.35; color: var(--ink-2); }
.ach .ach-bar { margin-top: 8px; }
.ach-num, .ach-date { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; font-variant-numeric: tabular-nums; }
.ach.locked .ach-emo { filter: grayscale(1); opacity: .45; }
.ach.locked b { color: var(--ink-2); }
.ach.got { background: linear-gradient(150deg, color-mix(in oklab, var(--honey) 16%, var(--glass)), var(--glass) 75%);
  border-color: color-mix(in oklab, var(--honey) 35%, var(--hair)); }
.ach.sec.locked { border-style: dashed; }
.ach.fresh::after { content: "новая"; position: absolute; top: 10px; right: 10px; font: 600 10.5px/1 var(--display);
  padding: 4px 7px; border-radius: 99px; color: #fff; background: var(--duo); }

.ach-detail { text-align: center; padding: 6px 4px 10px; }
.ach-detail .ach-emo { display: block; font-size: 64px; line-height: 1.1; margin-bottom: 8px; }
.ach-detail:not(.got) .ach-emo { filter: grayscale(1); opacity: .5; }
.ach-detail p { margin: 6px 0; }
.ach-detail .ach-bar { margin: 14px auto 6px; max-width: 260px; }

/* ===================== Рецепты, меню, готовка ===================== */
.food-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 2px -16px 4px; padding: 2px 16px 4px; }
.food-nav a { flex: none; padding: 9px 14px; border-radius: 99px; text-decoration: none; color: var(--ink-2); font: 600 14px/1 var(--display);
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--hair); transition: background .2s, color .2s; }
.food-nav a.on { color: #fff; background: linear-gradient(120deg, var(--a), var(--duo)); box-shadow: none; }
.search-field input { padding-right: 14px; }
.chips-sm .chip { font-size: 13px; padding: 7px 11px; }
.r-count { margin: 2px 6px -4px; font-size: 13px; }
.r-foot { margin-top: 8px; }
a.row { display: block; color: inherit; text-decoration: none; }
.r-row .row-body > svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.r-row.plain { all: unset; display: block; width: 100%; cursor: pointer; }
.r-emoji { width: 46px; height: 46px; flex: none; display: grid; place-items: center; font-size: 25px; border-radius: 15px;
  background: color-mix(in oklab, var(--honey) 12%, var(--field)); box-shadow: inset 0 0 0 1px var(--hair); }
.r-emoji.sm, .r-img.sm { width: 34px; height: 34px; font-size: 19px; border-radius: 11px; }
.r-emoji.big { width: 56px; height: 56px; font-size: 32px; border-radius: 18px; }
.r-img { width: 46px; height: 46px; flex: none; object-fit: cover; border-radius: 15px; background: var(--field); }
.cook-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: inherit; border-radius: 20px;
  background: linear-gradient(120deg, color-mix(in oklab, var(--a) 14%, var(--glass)), var(--glass) 70%); border: 1px solid color-mix(in oklab, var(--a) 30%, var(--hair)); }
.cook-banner span { font-size: 26px; }
.cook-banner b { flex: 1; }
.cook-banner svg { width: 18px; height: 18px; color: var(--ink-3); }

.r-head { align-items: center; }
.r-head-actions { display: flex; gap: 8px; }
.icon-btn.is-fav { color: var(--honey); }
.icon-btn.is-fav svg { fill: var(--honey); }
.r-hero { padding: 20px 18px 18px; text-align: center; overflow: hidden; }
.r-cover { display: block; width: calc(100% + 36px); margin: -20px -18px 14px; aspect-ratio: 16 / 10; object-fit: cover; }
.r-big { display: block; font-size: 64px; line-height: 1.1; margin: 4px 0 6px; }
.r-title { font-size: 28px; line-height: 1.15; margin: 4px 0 10px; overflow-wrap: anywhere; }
.r-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 16px; }
.r-meta span { font-size: 12.5px; padding: 5px 9px; border-radius: 99px; background: var(--field); color: var(--ink-2); }
.r-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.r-actions .btn:first-child { grid-column: 1 / -1; }
.r-src { margin: 12px 0 0; }
.r-src a { color: var(--b); }
.r-sec { margin: 0 0 8px; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper .icon-btn { width: 34px; height: 34px; font: 600 20px/1 var(--display); }
.stepper b { min-width: 86px; text-align: center; font-size: 14px; }
.ing-list { list-style: none; margin: 0; padding: 0; }
.ing-list li { display: flex; justify-content: space-between; gap: 14px; padding: 9px 2px; border-bottom: 1px dashed var(--hair); }
.ing-list li:last-child { border-bottom: 0; }
.ing-list b { font-weight: 600; white-space: nowrap; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.steps { list-style: none; margin: 10px 0 0; padding: 0; counter-reset: s; }
.steps li { display: flex; gap: 12px; padding: 10px 0; }
.st-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 14px/1 var(--display);
  color: #fff; background: linear-gradient(140deg, var(--a), var(--duo)); }
.steps p { margin: 3px 0 0; line-height: 1.5; }
.st-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px !important; }
.st-tags span { font-size: 12px; padding: 4px 8px; border-radius: 99px; background: var(--field); color: var(--ink-2); }

.pick-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.pick-chips label { cursor: pointer; }
.pick-chips input { position: absolute; opacity: 0; pointer-events: none; }
.pick-chips span { display: inline-block; padding: 8px 12px; border-radius: 99px; font-size: 14px; background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); transition: background .2s, color .2s; }
.pick-chips input:checked + span { color: #fff; background: linear-gradient(120deg, var(--a), var(--b)); box-shadow: none; }
.pick-chips input:focus-visible + span { outline: 2px solid var(--b); outline-offset: 2px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-list { display: grid; gap: 8px; margin-top: 6px; }
.choice { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px;
  align-items: center; padding: 13px 14px; border-radius: 18px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--hair); color: var(--ink); text-decoration: none; }
.choice > span { grid-row: 1 / 3; font-size: 24px; text-align: center; }
.choice b { font-weight: 650; }
.choice small { color: var(--ink-3); font-size: 13px; }
.choice:active { transform: scale(.98); }
.choice.danger b { color: var(--danger); }
.shop-pick { display: grid; gap: 2px; max-height: 52vh; overflow: auto; margin: 4px -4px 0; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 12px; cursor: pointer; }
.check-row input { position: absolute; opacity: 0; }
.check-row i { width: 22px; height: 22px; flex: none; border-radius: 7px; box-shadow: inset 0 0 0 2px var(--stroke, var(--hair)); transition: background .2s; position: relative; }
.check-row input:checked + i { background: linear-gradient(140deg, var(--a), var(--duo)); box-shadow: none; }
.check-row input:checked + i::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.check-row input:focus-visible + i { outline: 2px solid var(--b); outline-offset: 2px; }
.check-row small { color: var(--ink-3); }
.check-row.have span { color: var(--ink-2); }

.ck-head { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.ck-head > div { flex: 1; min-width: 0; }
.ck-head b { display: block; font: 700 18px/1.25 var(--display); }
.ck-head small { color: var(--ink-2); font-size: 13px; }
.ck-head .ach-bar { margin-top: 8px; }
.ck-timers { position: sticky; top: calc(env(safe-area-inset-top) + 6px); z-index: 5; display: grid; gap: 8px; }
.tm { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px 15px; border-radius: 18px; overflow: hidden;
  background: color-mix(in oklab, var(--glass-strong, var(--glass)) 92%, transparent); box-shadow: var(--shadow), inset 0 0 0 1px var(--hair); backdrop-filter: blur(14px); }
.tm-label { flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-clock { font: 700 22px/1 var(--display); font-variant-numeric: tabular-nums; }
.tm-x { border: 0; background: none; color: var(--ink-3); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 2px; }
.tm-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: color-mix(in oklab, var(--ink) 7%, transparent); }
.tm-bar i { --w: 0%; display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--a), var(--duo)); transition: width 1s linear; }
.tm.ring { box-shadow: 0 0 0 2px var(--duo), var(--shadow); }
.tm.ring .tm-clock { color: var(--duo); }
@media (prefers-reduced-motion: no-preference) { .tm.ring { animation: tm-ring 1.2s ease-in-out infinite; } }
@keyframes tm-ring { 50% { transform: scale(1.015); } }
.ck-ing summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.ck-ing summary::-webkit-details-marker { display: none; }
.ck-ing summary small { color: var(--ink-3); }
.ck-ing[open] summary { margin-bottom: 6px; }
.ck-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ck-step { display: flex; gap: 12px; padding: 14px; border-radius: 20px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--hair); transition: opacity .25s, box-shadow .25s; }
.ck-step.theirs { opacity: .72; }
.ck-step.now { box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--a) 70%, transparent), 0 12px 26px -16px color-mix(in oklab, var(--a) 70%, transparent); opacity: 1; }
.ck-step.done { opacity: .5; }
.ck-step.done .ck-text { text-decoration: line-through; text-decoration-color: var(--ink-3); }
.ck-check { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; font: 700 15px/1 var(--display);
  color: var(--ink-2); background: var(--field); box-shadow: inset 0 0 0 2px var(--hair); transition: transform .15s var(--out), background .2s; }
.ck-check:active { transform: scale(.9); }
.ck-step.done .ck-check { color: #fff; background: linear-gradient(140deg, var(--a), var(--duo)); box-shadow: none; font-size: 18px; }
.ck-body { flex: 1; min-width: 0; }
.ck-who { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 12.5px; color: var(--ink-2); }
.ck-who em { font-style: normal; margin-left: auto; font-size: 11.5px; padding: 3px 7px; border-radius: 99px; background: var(--field); color: var(--ink-3); }
.ck-text { margin: 0; font-size: 16.5px; line-height: 1.5; }
.ck-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ck-tools:empty { display: none; }
.ck-tools .chip { font-size: 13px; padding: 7px 11px; }
.ck-final { margin-top: 6px; }

.week-nav { display: flex; align-items: center; justify-content: space-between; padding: 8px; }
.week-nav b { font: 650 16px/1 var(--display); }
.menu-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.menu-days { display: grid; gap: 10px; }
.menu-day { padding: 14px 14px 10px; }
.menu-day.today { box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--a) 55%, transparent); }
.menu-day.past { opacity: .6; }
.menu-day .h3 { margin: 0 2px 8px; font-size: 15px; }
.menu-slot { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 6px; border-radius: 12px; min-height: 48px; }
.menu-slot + .menu-slot { border-top: 1px dashed var(--hair); }
.menu-slot small { width: 62px; flex: none; color: var(--ink-3); font-size: 12.5px; }
.menu-slot b { flex: 1; min-width: 0; font-weight: 600; }
.menu-slot .muted { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.menu-slot .muted svg { width: 15px; height: 15px; }
.menu-slot:active { background: var(--field); }
.menu-lunch { font-size: 13px; padding: 4px 6px; }
.pick-list { max-height: 56vh; overflow: auto; margin-top: 10px; }
.t-cooking { --glow: var(--a); background: linear-gradient(120deg, color-mix(in oklab, var(--a) 14%, var(--glass)), var(--glass) 70%); }

/* ===================== Пары и друзья ===================== */
.ava-c { --ava: #1f9e86; }
.ava-d { --ava: #e0912a; }
.ava-sp { width: 22px; flex: none; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 10px; }
.icon-btn.sm svg { width: 16px; height: 16px; }
.ck-check.sm { width: 28px; height: 28px; font-size: 14px; }
.row-form { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.row-form .field { flex: 1; margin: 0; }
.adm-user.is-off { opacity: .65; }
.adm-invites { margin-top: 10px; }

.f-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.f-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.f-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; color: inherit; border-radius: 22px; min-width: 0; max-width: 100%; box-sizing: border-box; }
.f-duo { flex: none; }
.f-card > svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.f-duo .ava { --s: 40px; }
.f-duo .ava + .ava { margin-left: -12px; }
.f-duo .ava { animation: none; }
.f-main { flex: 1; min-width: 0; }
.f-main b { display: block; font: 700 17px/1.25 var(--display); }
.f-main small { color: var(--ink-2); font-size: 13px; }
.f-next, .f-last { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; flex: none;
  font: 700 12px/1 var(--display); color: #fff; background: var(--duo); }
.t-friends { --glow: #1f9e86; min-height: 0; flex-direction: row; align-items: center; gap: 14px;
  background: linear-gradient(120deg, color-mix(in oklab, #1f9e86 12%, var(--glass)), var(--glass) 70%); }
.t-friends > span:nth-child(2) { flex: 1; min-width: 0; }
.t-friends small { display: block; }
.t-friends b { display: block; font: 700 18px/1.2 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-friends > svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }

.f-head { align-items: center; }
.f-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.f-title .f-duo .ava { --s: 34px; }
.f-title b { display: block; font: 700 17px/1.2 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-title small { color: var(--ink-3); font-size: 12.5px; }

.chat { display: flex; flex-direction: column; gap: 3px; padding-bottom: 8px; }
.chat-more { align-self: center; font-size: 13px; }
.chat-empty { margin: 30px 0; }
.chat-day { align-self: center; margin: 12px 0 6px; font-size: 12px; color: var(--ink-3); padding: 3px 10px; border-radius: 99px; background: var(--glass); }
.msg { display: flex; align-items: flex-end; gap: 6px; max-width: 86%; }
.msg:not(.cont) { margin-top: 6px; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.bubble { padding: 8px 12px 6px; border-radius: 18px 18px 18px 6px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--hair); min-width: 0; }
.msg.cont .bubble { border-radius: 18px 18px 18px 6px; }
.msg.mine .bubble { border-radius: 18px 18px 6px 18px; color: #fff; box-shadow: none;
  background: linear-gradient(135deg, color-mix(in oklab, var(--a) 92%, var(--duo)), var(--duo)); }
.bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.bubble time { display: block; text-align: right; font-size: 10.5px; opacity: .6; margin-top: 2px; }
.msg-who { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 1px; }
.chat-input { position: sticky; bottom: calc(env(safe-area-inset-bottom) + 90px); z-index: 4; display: flex; align-items: flex-end; gap: 8px;
  padding: 8px; border-radius: 24px; background: color-mix(in oklab, var(--glass) 94%, transparent); box-shadow: var(--shadow), inset 0 0 0 1px var(--hair);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.chat-input textarea { flex: 1; border: 0; resize: none; background: none; color: var(--ink); font: inherit; font-size: 16px; padding: 9px 8px; max-height: 140px; outline: none; }
.chat-input .btn-round { width: 42px; height: 42px; flex: none; }

.f-add { margin-bottom: 2px; }
.f-plan { padding: 14px 16px; }
.f-plan.past { opacity: .6; }
.f-plan-head { display: flex; align-items: center; gap: 12px; }
.f-plan-head > div { flex: 1; min-width: 0; }
.f-plan-head b { display: block; font: 700 17px/1.25 var(--display); }
.f-plan-head small { color: var(--ink-2); font-size: 13px; }
.f-plan-emoji { font-size: 32px; line-height: 1; }
.f-plan-note { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); white-space: pre-wrap; }
.f-rsvp-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.f-rsvp { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 3px; border-radius: 99px; background: var(--field); font-size: 13px; }
.f-rsvp.none { opacity: .55; }
.f-rsvp-btns { margin-top: 8px; }
.f-past summary { cursor: pointer; color: var(--ink-2); padding: 8px 4px; }
.f-past .f-plan { margin-top: 8px; }
.f-task-form { display: grid; gap: 10px; }
.f-tasks .row-body { gap: 10px; }
.f-task.done .tx-main b { text-decoration: line-through; color: var(--ink-3); }
.f-task.done .ck-check { color: #fff; background: linear-gradient(140deg, var(--a), var(--duo)); box-shadow: none; }

/* ===================== Рядом ===================== */
.near-sub { margin: -4px 4px 10px; }
.near-pad { position: relative; height: min(62vh, 560px); border-radius: 28px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none; background: radial-gradient(120% 90% at 50% 0%, color-mix(in oklab, var(--honey) 18%, var(--glass)), var(--glass) 65%);
  box-shadow: inset 0 0 0 1px var(--hair), var(--shadow); transition: box-shadow .4s; }
.near-pad.both { box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--duo) 55%, transparent), 0 20px 50px -24px color-mix(in oklab, var(--duo) 70%, transparent); }
.near-hint, .near-clock { position: absolute; left: 0; right: 0; text-align: center; pointer-events: none; margin: 0; }
.near-hint { top: 50%; transform: translateY(-50%); color: var(--ink-3); font: 600 17px/1.3 var(--display); padding: 0 24px; transition: opacity .3s; }
.near-pad.active .near-hint:empty { opacity: 0; }
.near-clock { bottom: 16px; color: var(--duo); font: 700 15px/1 var(--display); font-variant-numeric: tabular-nums; }
.near-line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity .3s; }
.near-pad.both .near-line { opacity: 1; }
.near-line line { stroke: var(--duo); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 2 7; }
@media (prefers-reduced-motion: no-preference) { .near-pad.both .near-line line { animation: near-flow 1.1s linear infinite; } }
@keyframes near-flow { to { stroke-dashoffset: -18; } }
.near-dot { --x: 50%; --y: 50%; position: absolute; left: var(--x); top: var(--y); width: 74px; height: 74px; margin: -37px 0 0 -37px; border-radius: 50%;
  pointer-events: none; opacity: 0; transform: scale(.6); transition: opacity .25s, transform .25s var(--out), left 90ms linear, top 90ms linear; }
.near-dot.me { transition: opacity .2s, transform .2s var(--out); }
.near-dot.on { opacity: 1; transform: none; }
.near-dot i { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, var(--c) 0 26%, color-mix(in oklab, var(--c) 45%, transparent) 27% 46%, transparent 70%); }
.near-dot.pc-a { --c: var(--a); }
.near-dot.pc-b { --c: var(--b); }
@media (prefers-reduced-motion: no-preference) { .near-pad.both .near-dot.on i { animation: near-beat 1.1s ease-in-out infinite; } }
@keyframes near-beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.18); } 24% { transform: scale(1); } 36% { transform: scale(1.1); } }
.near-pad.kiss { animation: near-kiss .7s var(--out); }
@keyframes near-kiss { 30% { background-color: color-mix(in oklab, var(--duo) 14%, transparent); } }
.near-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 4px 4px; }
.near-state { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); min-width: 0; }
.near-live { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.near-live.on { background: #2fbf71; box-shadow: 0 0 0 4px color-mix(in oklab, #2fbf71 20%, transparent); }
.t-near { --glow: var(--duo); min-height: 0; flex-direction: row; align-items: center; gap: 14px;
  background: linear-gradient(120deg, color-mix(in oklab, var(--duo) 10%, var(--glass)), var(--glass) 70%); }
.t-near > span:nth-child(2) { flex: 1; min-width: 0; }
.t-near small { display: block; }
.t-near b { display: block; font: 700 18px/1.2 var(--display); }
.t-near > svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.near-ico { position: relative; width: 40px; height: 34px; flex: none; }
.near-ico i { position: absolute; top: 7px; width: 20px; height: 20px; border-radius: 50%; }
.near-ico i:first-child { left: 2px; background: color-mix(in oklab, var(--a) 80%, transparent); }
.near-ico i:last-child { right: 2px; background: color-mix(in oklab, var(--b) 80%, transparent); mix-blend-mode: multiply; }

/* ===================== Виджет и Siri ===================== */
.wg-key { padding: 12px 14px; border-radius: 14px; background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); overflow-wrap: anywhere; }
.wg-key code { font: 600 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.wg-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.wg-h { margin: 16px 2px 6px; }
.wg-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; line-height: 1.45; }
.wg-steps a { color: var(--b); font-weight: 600; }
.wg-cmds { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.wg-cmds li { padding: 10px 12px; border-radius: 14px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--hair); }
.wg-cmds b { display: block; }
.wg-cmds small { color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.wg-cmds .link, .hint .link { font-size: inherit; padding: 0; }

/* ===================== Кнопки: не переносить и не разъезжаться ===================== */
.btn { white-space: nowrap; min-width: 0; }
.btn svg { flex: none; }
.f-actions { grid-template-columns: minmax(0, 1fr) auto; }
.f-actions .btn, .r-actions .btn, .grid2 .btn, .menu-actions .btn, .wg-actions .btn { padding: 0 14px; }
.near-foot .btn { flex: none; }
.near-state { flex: 1; }
.near-state span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 360px) {
  .btn { padding: 0 14px; font-size: 15px; }
  .r-actions .btn, .f-actions .btn { padding: 0 10px; gap: 6px; }
}
@media (max-width: 360px) { .food-link { font-size: 0; padding: 9px 11px; } .food-link::first-letter { font-size: 18px; } }
.page-head .h1 { min-width: 0; }
@media (max-width: 360px) { .together-form { flex-direction: column; } .together-form .btn { width: 100%; } }

/* ===================== Забота ===================== */
.care { display: grid; gap: 12px; }
.care .sec-head { margin-top: 6px; }
.mood-card .h2 { margin: 0 0 12px; }
.mood-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.mood-btn { all: unset; box-sizing: border-box; cursor: pointer; display: grid; justify-items: center; gap: 4px; padding: 10px 2px 8px; border-radius: 16px;
  background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); transition: transform .15s var(--out), background .2s, box-shadow .2s; }
.mood-btn span { font-size: 28px; line-height: 1; }
.mood-btn small { font-size: 11px; color: var(--ink-2); text-align: center; line-height: 1.2; }
.mood-btn:active { transform: scale(.94); }
.mood-btn.on { background: color-mix(in oklab, var(--a) 16%, var(--glass)); box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--a) 70%, transparent); }
.mood-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; transition: opacity .2s; }
.mood-tags.dim { opacity: .45; }
.mood-tags .chip { font-size: 13px; padding: 7px 10px; }
.mood-share { margin: 10px 4px 0; }
.partner-mood { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.partner-mood b { display: block; font-weight: 650; }
.partner-mood p { margin: 3px 0 0; font-size: 13.5px; color: var(--ink-2); }
.care-note { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); background: color-mix(in oklab, var(--b) 8%, var(--glass)); }
.care-tips { display: grid; gap: 10px; }
.care-tip { padding: 14px 16px; }
.ct-head { display: flex; gap: 12px; align-items: center; }
.ct-emoji { font-size: 28px; line-height: 1; flex: none; }
.ct-head b { display: block; font: 650 16px/1.3 var(--display); }
.ct-head small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.care-tip > p { margin: 8px 0 0; line-height: 1.5; color: var(--ink-2); font-size: 14.5px; }
.ct-act { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.ct-act .btn-sm { height: 38px; padding: 0 14px; font-size: 14px; }
.care-chips { margin: 0; padding: 0; flex-wrap: wrap; overflow: visible; }
.qod-card .flabel { margin: 0 0 6px; }
.qod-q { font-size: 20px; line-height: 1.3; margin: 0 0 12px; }
.qod-form textarea { width: 100%; box-sizing: border-box; min-height: 64px; resize: vertical; padding: 12px 14px; border-radius: 16px; border: 0;
  background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); color: var(--ink); font: 400 16px/1.45 "Inter", sans-serif; margin-bottom: 8px; }
.qod-a { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 16px; background: var(--field); margin-top: 8px; }
.qod-a p { margin: 0; flex: 1; line-height: 1.45; overflow-wrap: anywhere; }
.qod-a.mine { background: color-mix(in oklab, var(--a) 10%, var(--field)); }
.qod-a .link { font-size: 12.5px; flex: none; }
.qod-hist { margin-top: 10px; font-size: 13.5px; }
.qod-hist-list { display: grid; gap: 16px; max-height: 60vh; overflow: auto; }
.qh-item small { color: var(--ink-3); }
.qh-item b { display: block; margin: 2px 0 2px; }
.mh-grid { display: grid; grid-template-columns: 26px repeat(14, minmax(0, 1fr)); gap: 3px 2px; align-items: center; margin-top: 8px; }
.mh-c { text-align: center; font-size: 15px; color: var(--ink-3); }
.care-tests-hint { margin: 2px 6px 8px; }
.care-foot { margin: 8px 0 0; }
.t-care { --glow: var(--b); min-height: 0; flex-direction: row; align-items: center; gap: 14px;
  background: linear-gradient(120deg, color-mix(in oklab, var(--b) 10%, var(--glass)), var(--glass) 70%); }
div.t-care { flex-direction: column; align-items: stretch; gap: 10px; }
.t-care .tile-top { display: flex; justify-content: space-between; align-items: center; }
.t-care .tile-top .link { font-size: 13px; padding: 0; }
.t-care > span:nth-child(2) { flex: 1; min-width: 0; }
.t-care small { display: block; }
.t-care b { display: block; font: 700 17px/1.25 var(--display); }
.t-care > svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.care-moods { display: flex; flex: none; }
.care-moods span { font-size: 30px; line-height: 1; }
.care-moods span + span { margin-left: -8px; }
.mood-quick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.mq { all: unset; cursor: pointer; text-align: center; font-size: 28px; padding: 8px 0; border-radius: 14px; background: var(--field); transition: transform .15s var(--out); }
.mq:active { transform: scale(.9); }

.t-intro { text-align: center; }
.t-emoji { font-size: 54px; display: block; line-height: 1.1; }
.t-title { font-size: 26px; margin: 8px 0; }
.t-intro .sub { margin: 0 0 6px; }
.t-intro .hint { margin: 0 0 14px; }
.quiz { min-height: 52vh; display: flex; flex-direction: column; }
.quiz-top { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.quiz-top .ach-bar { flex: 1; }
.quiz-top small { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.quiz-top .icon-btn[disabled] { opacity: .35; }
.quiz-q { font-size: 21px; line-height: 1.35; margin: 4px 0 18px; }
.scale { display: grid; gap: 8px; }
.scale-opt { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 16px;
  background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); font-weight: 550; transition: transform .12s var(--out), background .2s; }
.scale-opt i { font-style: normal; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 700 13px/1 var(--display); background: var(--glass); color: var(--ink-2); }
.scale-opt:active { transform: scale(.98); }
.scale-opt.on { background: color-mix(in oklab, var(--a) 16%, var(--glass)); box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--a) 70%, transparent); }
.scale-opt.on i { background: linear-gradient(140deg, var(--a), var(--duo)); color: #fff; }
.pair-pick { display: grid; gap: 10px; }
.pair-or { text-align: center; color: var(--ink-3); font-size: 13px; }
.pair-opt { all: unset; box-sizing: border-box; cursor: pointer; padding: 22px 18px; border-radius: 20px; text-align: center; font: 600 17px/1.35 var(--display);
  background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); transition: transform .12s var(--out), background .2s; }
.pair-opt:active { transform: scale(.98); }
.pair-opt.on { background: color-mix(in oklab, var(--b) 16%, var(--glass)); box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--b) 70%, transparent); }
.tres .flabel { margin: 0 0 8px; }
.tr-dim { padding: 10px 0; border-bottom: 1px dashed var(--hair); }
.tr-dim:last-child { border-bottom: 0; }
.tr-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tr-head b { flex: 1; min-width: 0; }
.tr-num { font: 700 15px/1 var(--display); font-variant-numeric: tabular-nums; }
.tr-num small { font: 500 11.5px/1 "Inter", sans-serif; margin-left: 4px; }
.tr-num small.up { color: #2fbf71; }
.tr-num small.down { color: var(--danger); }
.tr-apart { font-size: 11.5px; padding: 3px 8px; border-radius: 99px; background: color-mix(in oklab, var(--b) 14%, var(--field)); color: var(--ink-2); }
.tr-dim p { margin: 8px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.care-rank { display: grid; gap: 10px; }
.cr-row { display: grid; grid-template-columns: minmax(0, 1fr) 30% 30%; gap: 8px; align-items: center; font-size: 14px; }
.cr-row .ach-bar.c-a i { background: linear-gradient(90deg, color-mix(in oklab, var(--a) 70%, white), var(--a)); }
.cr-row .ach-bar.c-b i { background: linear-gradient(90deg, color-mix(in oklab, var(--b) 70%, white), var(--b)); }
.cr-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 0; }
@media (max-width: 360px) { .mood-row { gap: 4px; } .mood-btn { padding: 8px 0 7px; } .mood-btn span { font-size: 24px; } .mood-btn small { font-size: 9.5px; } }
