/* Палитра «абрикос и ночь»: тёплая бумага и абрикосовый акцент днём, глубокий баклажан ночью.
   Я — абрикос, партнёр — бирюза. Сетка отступов: 4 / 8 / 12 / 16 / 24; нажимаемое — 48, чипы — 36. */
:root {
  color-scheme: light;
  --bg: #f5efe6;
  --sec: #fffcf7;
  --field: #f1e9dd;
  --text: #2b1f2e;
  --hint: #94877f;
  --sep: rgba(43, 31, 46, .12);
  --accent: #ea6a3c;
  --accent-text: #ffffff;
  --me: #ea6a3c;
  --you: #1f9488;
  --t-common: #94877f;
  --t-rare: #1f9488;
  --t-epic: #8a55d6;
  --t-legend: #d49a12;
  --r: 12px;
  --ease: cubic-bezier(.2, .8, .3, 1);
}
:root[data-scheme=dark] {
  color-scheme: dark;
  --bg: #15101a;
  --sec: #211927;
  --field: #2d2335;
  --text: #f4ece4;
  --hint: #9a8c9c;
  --sep: rgba(244, 236, 228, .1);
  --accent: #ff8c5a;
  --accent-text: #24120a;
  --me: #ff8c5a;
  --you: #56cdbd;
  --t-common: #9a8c9c;
  --t-rare: #56cdbd;
  --t-epic: #b48cf2;
  --t-legend: #f2c14e;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); color: var(--text); transition: background-color .3s ease, color .3s ease; }
body { font: 16px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
svg.i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.fill { fill: currentColor; stroke: none; }

main { max-width: 520px; margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(56px + 24px + env(safe-area-inset-bottom)); }

.flow > * + * { margin-top: 12px; }
.flow > h2 { margin-top: 24px; }
.flow > h2 + * { margin-top: 8px; }
.flow > label { margin-top: 16px; }
.flow > label + * { margin-top: 8px; }
.flow > .hint { margin-top: 8px; }
.flow > h1 + .hint { margin-top: 4px; }
.flow > h1 + * { margin-top: 16px; }

h1 { font-size: 24px; line-height: 1.2; font-weight: 700; }
h2 { font-size: 13px; font-weight: 500; color: var(--hint); text-transform: uppercase; letter-spacing: .03em; padding: 0 16px; }
label { display: block; font-size: 13px; color: var(--hint); padding: 0 4px; }
.hint { color: var(--hint); font-size: 14px; line-height: 1.4; }
main > .hint { padding: 0 16px; }

.card { background: var(--sec); border-radius: var(--r); padding: 16px; transition: background-color .3s ease; }
.card > * + * { margin-top: 8px; }
.card > label { margin-top: 16px; padding: 0; }
.card > .btn, .card > .row { margin-top: 12px; }
.card > :first-child { margin-top: 0; }

/* всё нажимаемое отзывается на палец */
.btn, .chip, .day, .tick, .item, .tap, nav button { transition: transform .12s var(--ease), background-color .18s ease, color .18s ease, opacity .18s ease, box-shadow .18s ease; }
.btn:active, .chip:active, .tick:active, .tap:active { transform: scale(.96); }
.day:active { transform: scale(.88); }
.item:active { background: var(--field); }
nav button:active { transform: scale(.92); }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 0 16px;
  border-radius: var(--r); background: var(--accent); color: var(--accent-text); font-weight: 600; text-align: center; }
.btn.ghost { background: var(--sec); color: var(--text); font-weight: 500; }
.sheet-body .btn.ghost, .card .btn.ghost { background: var(--field); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.row { display: flex; gap: 8px; align-items: stretch; }
.row > * { flex: 1; min-width: 0; }
.row > .fit { flex: none; width: auto; }

/* нижние вкладки */
nav { position: fixed; z-index: 3; left: 0; right: 0; bottom: 0; display: flex; background: var(--sec);
  border-top: .5px solid var(--sep); padding-bottom: env(safe-area-inset-bottom); transition: background-color .3s ease; }
nav button { flex: 1; height: 56px; font-size: 11px; color: var(--hint); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; }
nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .25s var(--ease); }
nav button.on { color: var(--accent); }
nav button.on svg { transform: translateY(-1px) scale(1.08); }

/* календарь */
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-head button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--hint); font-size: 20px; }
.cal-title { font-weight: 600; font-size: 17px; text-transform: capitalize; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dow { text-align: center; font-size: 12px; color: var(--hint); height: 24px; line-height: 24px; }
.day { position: relative; aspect-ratio: 1; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1; }
.day.out { visibility: hidden; }
.day.past { color: var(--hint); opacity: .6; }
.day.today { box-shadow: inset 0 0 0 1.5px var(--text); }
.day.both { background: var(--accent); color: var(--accent-text); font-weight: 600; }
.day.pop { animation: pop .32s var(--ease); }
.day .marks { position: absolute; left: 0; right: 0; bottom: 3px; height: 11px; display: flex; justify-content: center; align-items: center;
  gap: 2px; font-size: 11px; }
.day .marks.top { bottom: auto; top: 3px; }
.marks .me { color: var(--me); display: flex; }
.marks .you { color: var(--you); display: flex; }
.day.both .marks * { color: var(--accent-text); }
.card > .legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; color: var(--hint); margin-top: 12px;
  padding-top: 12px; border-top: .5px solid var(--sep); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend .me { color: var(--me); } .legend .you { color: var(--you); }
.legend svg { font-size: 12px; }

/* шторка */
#sheet { position: fixed; inset: 0; z-index: 5; background: rgba(0, 0, 0, .5); display: flex; align-items: flex-end; animation: fade .22s ease both; }
.sheet-body { position: relative; background: var(--sec); width: 100%; max-width: 520px; margin: 0 auto; max-height: 88vh;
  overflow-y: auto; border-radius: 20px 20px 0 0; padding: 28px 16px calc(24px + env(safe-area-inset-bottom));
  animation: sheetIn .34s cubic-bezier(.2, .9, .25, 1.04) both; }
#sheet.closing { animation: fadeOut .2s ease both; }
#sheet.closing .sheet-body { animation: sheetOut .2s cubic-bezier(.4, 0, 1, 1) both; }
.sheet-body::before { content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px;
  border-radius: 2px; background: var(--sep); }
.sheet-body > .actions { margin-top: 24px; }
.actions > * + * { margin-top: 8px; }

/* поля */
input, textarea { display: block; width: 100%; font: inherit; color: var(--text); background: var(--field); border: 0;
  border-radius: var(--r); padding: 0 14px; height: 48px; outline: none; -webkit-appearance: none; appearance: none;
  transition: box-shadow .18s ease; }
textarea { height: auto; min-height: 88px; padding: 12px 14px; resize: none; }
input:focus, textarea:focus { box-shadow: inset 0 0 0 1.5px var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px;
  border-radius: 18px; background: var(--field); font-size: 15px; white-space: nowrap; }
.chip.on { background: var(--accent); color: var(--accent-text); }
.chips.even { flex-wrap: nowrap; }
.chips.even .chip { flex: 1; padding: 0 4px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.scroll .chip { flex: none; }
.row > .chips { flex-wrap: nowrap; }
.row > .chips .chip { min-height: 48px; min-width: 48px; border-radius: var(--r); font-size: 18px; }

/* шкала: цвет теплеет, подпись растёт и «подпрыгивает» вместе со степенью */
.scale { --lvl: 0; --hot: #e2334d; --c: color-mix(in srgb, var(--hot) calc(var(--lvl) * 25%), var(--accent));
  background: var(--field); border-radius: 16px; padding: 16px; touch-action: pan-y; }
.flow > .scale { margin-top: 12px; }
.flow > .hint + .scale { margin-top: 16px; }
.scale-name { font-size: 13px; color: var(--hint); }
.scale-val { margin-top: 4px; min-height: 30px; font-weight: 700; line-height: 30px; color: var(--hint);
  font-size: calc(17px + var(--lvl) * 1.5px); transition: color .25s ease, font-size .25s var(--ease); transform-origin: left center; }
.scale.set .scale-val { color: var(--c); }
.scale-val.pop { animation: labelPop .34s var(--ease); }
.track { position: relative; display: flex; align-items: center; justify-content: space-around; height: 40px; margin-top: 12px;
  border-radius: 20px; background: color-mix(in srgb, var(--hint) 16%, transparent); touch-action: none; cursor: pointer; }
.track .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 20px; background: var(--c);
  transition: width .3s var(--ease), background-color .3s ease; }
.scale.set .fill { width: calc((var(--lvl) + 1) * 20%); }
.stop { position: relative; z-index: 1; width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--hint) 55%, transparent);
  transition: background-color .2s ease, transform .2s var(--ease); pointer-events: none; }
.stop.on { background: rgba(255, 255, 255, .75); transform: scale(.8); }
.thumb { position: absolute; z-index: 2; top: 50%; left: calc((var(--lvl) + .5) * 20%); width: 28px; height: 28px; margin: -14px 0 0 -14px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); opacity: 0; pointer-events: none;
  transform: scale(calc(.8 + var(--lvl) * .07)); transition: left .3s var(--ease), transform .2s var(--ease), opacity .2s ease; }
.scale.set .thumb { opacity: 1; }
.scale.drag .thumb { transform: scale(calc(1 + var(--lvl) * .08)); }
.scale.set[data-val="4"] .fill { animation: glow 1.4s ease-in-out infinite alternate; }
@keyframes labelPop { 0% { transform: scale(.9); opacity: .4; } 55% { transform: scale(1.06); } }
@keyframes glow { to { filter: brightness(1.18); box-shadow: 0 0 14px color-mix(in srgb, var(--hot) 60%, transparent); } }

/* шаги и раскрывашка */
.steps-dots { display: flex; gap: 6px; justify-content: center; }
.steps-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--sep); transition: width .3s var(--ease), background-color .3s; }
.steps-dots i.on { width: 20px; background: var(--accent); }
.grid.mini .day { font-size: 15px; aspect-ratio: auto; height: 38px; }
.day.off { color: var(--hint); opacity: .35; pointer-events: none; }
.day.sel { background: var(--accent); color: var(--accent-text); font-weight: 600; box-shadow: none; }
.cal-head button[disabled] { opacity: .25; pointer-events: none; }
.fold { border-radius: var(--r); background: var(--field); overflow: hidden; }
.flow > .fold { margin-top: 16px; }
.fold-head { display: flex; align-items: center; gap: 8px; width: 100%; height: 48px; padding: 0 14px; text-align: left; }
.fold-head .hint { flex: 1; }
.fold-head svg { color: var(--hint); transition: transform .25s var(--ease); }
.fold.open .fold-head svg { transform: rotate(90deg); }
.fold-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease); }
.fold-body > * { min-height: 0; overflow: hidden; background: transparent; padding-top: 0; padding-bottom: 0; transition: padding .3s var(--ease); }
.fold.open .fold-body { grid-template-rows: 1fr; }
.fold.open .fold-body > * { min-height: 88px; padding-bottom: 12px; }
.fold textarea:focus { box-shadow: none; }

/* выбор свободного времени */
.opt { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 16px; border-radius: 16px;
  background: var(--field); text-align: left; overflow: hidden; isolation: isolate;
  transition: transform .14s var(--ease), box-shadow .25s ease, background-color .25s ease, color .25s ease; }
button.opt:active, .opt-head:active { transform: scale(.97); }
.opt-t { flex: 1; min-width: 0; }
.opt-t b { display: block; font-weight: 600; }
.opt-t small { display: block; font-size: 13px; color: var(--hint); margin-top: 1px; transition: color .25s ease; }
.opt.on { color: #fff; }
.opt.on .opt-t small { color: rgba(255, 255, 255, .78); }
.art { width: 32px; height: 32px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  color: var(--hint); transition: color .25s ease, transform .5s var(--ease); }
.art .core { fill: currentColor; stroke: none; }
.art .star { fill: currentColor; stroke: none; opacity: 0; }
.art .rays { transform-origin: 24px 24px; }
.opt.on .art { color: #fff; }
.opt.on .sun { transform: translateY(0) scale(1.08); }
.opt.on .sun .rays { animation: spin 9s linear infinite; }
.opt.on .moon { animation: rock 3.2s ease-in-out infinite alternate; }
.opt.on .moon .star { animation: twinkle 1.8s ease-in-out infinite alternate; }
.opt.on .moon .s2 { animation-delay: .6s; } .opt.on .moon .s3 { animation-delay: 1.1s; }
.opt.morning .sun { transform: translateY(5px) scale(.92); }
.opt.morning.on { background: linear-gradient(135deg, #ffb24d, #f2673a); box-shadow: 0 6px 18px -8px #f2673a; }
.opt.evening.on { background: linear-gradient(135deg, #5b4bb5, #2a1f55); box-shadow: 0 6px 18px -8px #2a1f55; }
/* весь день: небо от рассвета до ночи, которое медленно плывёт */
.opt.all { min-height: 76px; }
.opt.all .sky { position: absolute; inset: 0; z-index: -1; opacity: .22; transition: opacity .35s ease;
  background: linear-gradient(100deg, #ffb24d 0%, #f2673a 28%, #c8508f 52%, #5b4bb5 76%, #241a4a 100%); background-size: 180% 100%; }
.opt.all .sky::after { content: ""; position: absolute; inset: 0; opacity: .5;
  background: radial-gradient(circle at 12% 30%, rgba(255, 255, 255, .5) 0 1px, transparent 2px) 0 0 / 46px 38px,
              radial-gradient(circle at 70% 70%, rgba(255, 255, 255, .35) 0 1px, transparent 2px) 0 0 / 62px 44px;
  -webkit-mask-image: linear-gradient(90deg, transparent 45%, #000 80%); mask-image: linear-gradient(90deg, transparent 45%, #000 80%); }
.opt.all.on .sky { opacity: 1; animation: skyShift 7s ease-in-out infinite alternate; }
.opt.all.on { box-shadow: 0 8px 22px -10px #c8508f; }
.opt.all .art { color: var(--text); opacity: .55; }
.opt.all.on .art { color: #fff; opacity: 1; }
/* своё время */
.opt.time { display: block; padding: 0; }
.opt-head { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 16px; text-align: left; transition: transform .14s var(--ease); }
.opt.time.on { background: linear-gradient(135deg, #1f9488, #17695f); box-shadow: 0 6px 18px -8px #17695f; }
.clock .hand { transform-origin: 24px 24px; transition: transform .45s var(--ease); }
.clock .hand.h { stroke-width: 3.2; }
.opt-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s var(--ease); }
.opt-more > * { min-height: 0; overflow: hidden; }
.opt.time.on .opt-more { grid-template-rows: 1fr; }
.steps { display: flex; align-items: center; justify-content: center; gap: 10px; }
.opt.time.on .steps { padding: 0 16px 14px; }
.steps .hint { color: rgba(255, 255, 255, .78); }
.step { display: flex; align-items: center; gap: 4px; background: rgba(255, 255, 255, .16); border-radius: 12px; padding: 4px; }
.step button { width: 36px; height: 36px; border-radius: 9px; font-size: 20px; line-height: 1; background: rgba(255, 255, 255, .18); color: #fff; }
.step b { min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rock { from { transform: rotate(-10deg); } to { transform: rotate(8deg); } }
@keyframes twinkle { from { opacity: .15; } to { opacity: 1; } }
@keyframes skyShift { from { background-position: 0 0; } to { background-position: 100% 0; } }

/* мы */
.who { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.who > * + * { margin-top: 0; }
.who + .who { margin-top: 12px; padding-top: 12px; border-top: .5px solid var(--sep); }
.who .grow { flex: 1; min-width: 0; }
.ava { width: 48px; height: 48px; border-radius: 50%; background: var(--me); color: var(--accent-text); display: grid; place-items: center;
  font-size: 22px; flex: none; }
.ava.you { background: var(--you); }
.who b { display: block; font-weight: 600; }
.who .hint { display: block; margin-top: 2px; }
.sex { color: var(--hint); font-weight: 400; }
.chev { color: var(--hint); font-size: 16px; }
.level { display: flex; justify-content: space-between; align-items: baseline; }
.level b { font-size: 28px; line-height: 1; }
.bar { height: 8px; background: var(--field); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .6s var(--ease); }
.card > .stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; margin-top: 16px;
  padding-top: 16px; border-top: .5px solid var(--sep); }
.stats > * + * { border-left: .5px solid var(--sep); }
.stats b { display: block; font-size: 22px; line-height: 1.2; }
.stats span { font-size: 12px; color: var(--hint); }

/* статусы: цвет по редкости */
.t-common { --t: var(--t-common); } .t-rare { --t: var(--t-rare); } .t-epic { --t: var(--t-epic); }
.t-legend { --t: var(--t-legend); } .t-secret { --t: var(--accent); }
.status-now { text-align: center; padding: 24px 16px; }
.status-now b { display: block; font-size: 20px; line-height: 1.25; }
.status-now .hint { margin-top: 6px; }
.smiles { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--t-legend); }
.smiles svg { font-size: 18px; }
.list { padding: 0; overflow: hidden; }
.list > * + * { margin-top: 0; border-top: .5px solid var(--sep); }
.item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 10px 16px; text-align: left; }
.item::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--t); flex: none; }
.item .grow { flex: 1; min-width: 0; }
.item .meta { font-size: 13px; color: var(--hint); display: inline-flex; align-items: center; gap: 4px; flex: none; }
.item.on { color: var(--t); font-weight: 600; }
.item.locked { color: var(--hint); pointer-events: none; }
.item.locked::before { opacity: .4; }
.t-secret .item:not(.locked) .grow { background: linear-gradient(90deg, var(--accent), var(--t-epic)); -webkit-background-clip: text;
  background-clip: text; color: transparent; font-weight: 600; }
h2.tier { color: var(--t); display: flex; align-items: center; gap: 6px; }

.badge { display: inline-block; font-size: 12px; line-height: 20px; padding: 0 8px; border-radius: 10px;
  background: var(--field); color: var(--hint); white-space: nowrap; }
.badge.hot { background: var(--accent); color: var(--accent-text); }
.m-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card > .sub { margin-top: 12px; padding-top: 12px; border-top: .5px solid var(--sep); font-size: 13px; color: var(--hint); }
.kv { font-size: 14px; display: flex; justify-content: space-between; gap: 12px; }
.kv span { color: var(--hint); }
.kv b { font-weight: 500; text-align: right; }
.card > .kv { margin-top: 4px; }
.link { word-break: break-all; font-size: 14px; background: var(--field); border-radius: var(--r); padding: 12px 14px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 16px; height: 32px; }

/* всплывающая строка вместо системных окон */
#toast { position: fixed; z-index: 8; left: 50%; bottom: calc(72px + env(safe-area-inset-bottom)); max-width: calc(100% - 32px);
  padding: 12px 16px; border-radius: 14px; background: var(--text); color: var(--bg); font-size: 15px; text-align: center;
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .2s ease, transform .28s var(--ease); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* мэтч */
#match { position: fixed; inset: 0; z-index: 9; background: var(--accent); color: var(--accent-text); display: grid; place-items: center;
  text-align: center; animation: fade .25s both; }
#match.closing { animation: fadeOut .3s both; }
.hearts { font-size: 96px; line-height: 1; animation: pulse .7s ease-in-out infinite alternate; }
.hearts svg { display: block; margin: 0 auto; }
#match-text { margin-top: 16px; font-size: 22px; font-weight: 700; padding: 0 24px; white-space: pre-line; animation: rise .4s .1s var(--ease) both; }

.stagger > * { animation: rise .32s var(--ease) both; }
.stagger > :nth-child(2) { animation-delay: .03s; } .stagger > :nth-child(3) { animation-delay: .06s; }
.stagger > :nth-child(4) { animation-delay: .09s; } .stagger > :nth-child(5) { animation-delay: .12s; }
.stagger > :nth-child(n+6) { animation-delay: .15s; }

@keyframes pulse { from { transform: scale(.85); } to { transform: scale(1.12); } }
@keyframes pop { 40% { transform: scale(1.18); } }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes sheetIn { from { transform: translateY(calc(100% + 16px)); } }
@keyframes sheetOut { to { transform: translateY(calc(100% + 16px)); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.marks svg { stroke-width: 2.8; }
.legend svg { stroke-width: 2.4; }

/* мэтч: сердца взлетают снизу */
#burst { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
#burst i { position: absolute; bottom: -40px; opacity: 0; color: rgba(255, 255, 255, .55); animation: floatUp 2.4s ease-out both; }
#burst svg { display: block; }
.match-box { position: relative; animation: boxIn .5s var(--ease) both; }
@keyframes floatUp { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 15% { opacity: 1; }
  100% { transform: translate(var(--dx), -105vh) scale(1.1) rotate(18deg); opacity: 0; } }
@keyframes boxIn { from { transform: scale(.6); opacity: 0; } }

/* фон: тёплые размытые пятна и мелкая крапинка — чтобы страница не была плоской */
#bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
#bg::before, #bg::after { content: ""; position: absolute; border-radius: 50%; filter: blur(60px); }
#bg::before { width: 78vw; height: 78vw; left: -28vw; top: -18vw; background: var(--me); opacity: .30; animation: drift 26s ease-in-out infinite alternate; }
#bg::after { width: 86vw; height: 86vw; right: -36vw; bottom: 4vh; background: var(--you); opacity: .22; animation: drift 32s ease-in-out infinite alternate-reverse; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: radial-gradient(var(--sep) 1px, transparent 1.4px); background-size: 18px 18px; }
:root[data-scheme=dark] #bg::before { opacity: .22; }
:root[data-scheme=dark] #bg::after { opacity: .16; background: #7b4fd0; }
@keyframes drift { to { transform: translate(14vw, 10vh) scale(1.15); } }
.card { box-shadow: 0 1px 0 var(--sep), 0 10px 30px -22px rgba(43, 31, 46, .45); }
nav { background: color-mix(in srgb, var(--sec) 86%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }

/* точка на вкладке: что-то ждёт внутри */
nav button { position: relative; }
nav button.dot::after { content: ""; position: absolute; top: 9px; left: 50%; margin-left: 9px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 2px var(--sec); animation: dotIn .4s var(--ease), dotPulse 2.4s ease-in-out .4s infinite; }
@keyframes dotIn { from { transform: scale(0); } }
@keyframes dotPulse { 50% { transform: scale(1.25); } }
nav button { font-size: 10.5px; }

/* воспоминания */
.mem .m-head { align-items: flex-start; }
.mem .m-head b { display: block; font-size: 17px; }
.mem .m-head .hint { display: block; margin-top: 2px; }
.badge.warm { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }
.card > .cmp { margin-top: 14px; padding-top: 14px; border-top: .5px solid var(--sep); }
.cmp-name { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--hint); margin-bottom: 8px; }
.cmp-name span { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 600; }
.cmp-row { display: grid; grid-template-columns: 56px 84px 1fr; align-items: center; gap: 10px; min-height: 26px; }
.cmp-who { font-size: 13px; color: var(--hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-val { font-size: 15px; font-weight: 500; }
.pips { display: flex; gap: 3px; }
.pips i { flex: 1; height: 8px; border-radius: 4px; background: var(--field); }
.cmp-row.me .pips i.on { background: var(--me); }
.cmp-row.you .pips i.on { background: var(--you); }
.card > .quote { margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: var(--field); font-size: 15px; border-left: 3px solid var(--me); }
.card > .quote + .quote { margin-top: 8px; }
.quote.you { border-left-color: var(--you); }

/* прошедшее время и знакомство */
.opt.gone { opacity: .38; }
.hello { text-align: center; padding: 28px 0 8px; }
.hello-art { font-size: 56px; color: var(--accent); line-height: 1; animation: pulse 1s ease-in-out infinite alternate; }
.hello-art svg { display: block; margin: 0 auto; }
.hello h1 { margin-top: 12px; font-size: 28px; }
.hello .hint { margin-top: 6px; }
body { background: none; }

/* идеи под календарём */
.idea-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--accent); }
.idea p { font-size: 17px; line-height: 1.35; }
.idea .hint { font-size: 14px; }
.idea.won { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--sec)), var(--sec)); }
.idea { animation: rise .32s var(--ease) both; transition: opacity .25s ease, transform .25s var(--ease); }
.idea.leaving { opacity: .35; transform: scale(.97); pointer-events: none; }
.idea-new { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 64px; }
.idea-new > * + * { margin-top: 0; }
.idea-new > svg:first-child { font-size: 24px; color: var(--accent); }
.idea-new > svg:last-child { color: var(--hint); }
.idea-new .grow { flex: 1; min-width: 0; }
.idea-new b { display: block; font-weight: 600; }
.idea-new small { display: block; font-size: 13px; color: var(--hint); margin-top: 2px; }

/* воспоминание: одна шкала, две отметки */
.card > .duo { margin-top: 16px; padding-top: 14px; border-top: .5px solid var(--sep); }
.duo-name { font-size: 13px; color: var(--hint); }
.duo-track { position: relative; display: flex; justify-content: space-around; align-items: center; height: 30px; margin-top: 10px; }
.duo-track::before { content: ""; position: absolute; left: 10%; right: 10%; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; background: var(--field); }
.duo-track s { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--sec); box-shadow: inset 0 0 0 2px var(--field); text-decoration: none; }
.pin { position: absolute; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; font-style: normal; color: var(--accent-text); box-shadow: 0 0 0 2px var(--sec), 0 2px 6px rgba(0, 0, 0, .18); z-index: 1; }
.pin.me { background: var(--me); }
.pin.you { background: var(--you); }
.duo.same .pin.me { transform: translateX(-9px); }
.duo.same .pin.you { transform: translateX(9px); }
.duo-words { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 15px; font-weight: 600; }
.duo-words .me { color: var(--me); }
.duo-words .you { color: var(--you); text-align: right; }
.duo-words .hint { font-weight: 400; text-align: right; }
.duo-words .both { display: inline-flex; align-items: center; gap: 6px; margin: 0 auto; color: var(--accent); }
