/* =========================
   ТЕМЫ — стиль «Небо»
   ========================= */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --frame: #202024;
  --sky-top: #74dafe;
  --sky-grad: linear-gradient(180deg, #74dafe, #a5e3fb 70%, #c6ebf8);
  --ink: #0e2433;
  --r: 22px;
  --top: calc(var(--tg-safe-area-inset-top, env(safe-area-inset-top, 0px)) + var(--tg-content-safe-area-inset-top, 0px));
  --bottom: var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
}
[data-theme="light"] {
  --sky: #4fb3f6;
  --ind: #202024;
  --bg: #ffffff;
  --card: #f2f6fa;
  --card2: #e4ebf2;
  --text: #0b0b0f;
  --muted: #8a919c;
  --line: rgba(0, 0, 0, .07);
  --accent: #2f9cf0;
  --accent-2: #8fd3ff;
  --accent-soft: rgba(47, 156, 240, .14);
  --inv: #0b0b0f;
  --inv-text: #ffffff;
  --green: #1fae55;
  --red: #ff3b30;
  --orange: #f59e0b;
  --glass: rgba(255, 255, 255, .78);
  --glass-line: rgba(0, 0, 0, .07);
  --glow: rgba(0, 90, 190, .28);
}
[data-theme="dark"] {
  --sky: #1b8df0;
  --ind: #45454e;
  --bg: #121215;
  --card: #1f1f24;
  --card2: #2b2b32;
  --text: #ffffff;
  --muted: #8e8e93;
  --line: rgba(255, 255, 255, .1);
  --accent: #3aa0ff;
  --accent-2: #7cc6ff;
  --accent-soft: rgba(58, 160, 255, .2);
  --inv: #ffffff;
  --inv-text: #000000;
  --green: #30d158;
  --red: #ff453a;
  --orange: #ffb340;
  --glass: rgba(44, 44, 48, .76);
  --glass-line: rgba(255, 255, 255, .12);
  --glow: rgba(0, 40, 110, .5);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { background: var(--frame); }
html.dark-top { background: var(--frame); }
html, body { min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -.02em; white-space: nowrap; }
.acc { color: var(--accent); }
.ok { color: var(--green); }
.bad { color: var(--red); }
.wait { color: var(--orange); }

/* =========================
   ОБЪЁМНЫЕ ФИГУРЫ
   ========================= */
.o { display: block; position: relative; flex: none; font-size: 56px; width: 1em; height: 1em; font-style: normal; pointer-events: none; }
.o-flower {
  filter: drop-shadow(0 .1em .16em rgba(0, 60, 150, .35));
  background:
    radial-gradient(circle at 80% 50%, #bfe3ff 0, var(--accent-2) 7%, var(--accent) 16%, #0a55c8 20%, transparent 21%),
    radial-gradient(circle at 71.2% 71.2%, #bfe3ff 0, var(--accent-2) 7%, var(--accent) 16%, #0a55c8 20%, transparent 21%),
    radial-gradient(circle at 50% 80%, #bfe3ff 0, var(--accent-2) 7%, var(--accent) 16%, #0a55c8 20%, transparent 21%),
    radial-gradient(circle at 28.8% 71.2%, #bfe3ff 0, var(--accent-2) 7%, var(--accent) 16%, #0a55c8 20%, transparent 21%),
    radial-gradient(circle at 20% 50%, #bfe3ff 0, var(--accent-2) 7%, var(--accent) 16%, #0a55c8 20%, transparent 21%),
    radial-gradient(circle at 28.8% 28.8%, #bfe3ff 0, var(--accent-2) 7%, var(--accent) 16%, #0a55c8 20%, transparent 21%),
    radial-gradient(circle at 50% 20%, #bfe3ff 0, var(--accent-2) 7%, var(--accent) 16%, #0a55c8 20%, transparent 21%),
    radial-gradient(circle at 71.2% 28.8%, #bfe3ff 0, var(--accent-2) 7%, var(--accent) 16%, #0a55c8 20%, transparent 21%);
}
.o-flower.w {
  filter: drop-shadow(0 .1em .16em rgba(0, 40, 110, .3));
  background:
    radial-gradient(circle at 80% 50%, #fff 0, #f4f6fa 10%, #d9dee8 20%, transparent 21%),
    radial-gradient(circle at 71.2% 71.2%, #fff 0, #f4f6fa 10%, #d9dee8 20%, transparent 21%),
    radial-gradient(circle at 50% 80%, #fff 0, #f4f6fa 10%, #d9dee8 20%, transparent 21%),
    radial-gradient(circle at 28.8% 71.2%, #fff 0, #f4f6fa 10%, #d9dee8 20%, transparent 21%),
    radial-gradient(circle at 20% 50%, #fff 0, #f4f6fa 10%, #d9dee8 20%, transparent 21%),
    radial-gradient(circle at 28.8% 28.8%, #fff 0, #f4f6fa 10%, #d9dee8 20%, transparent 21%),
    radial-gradient(circle at 50% 20%, #fff 0, #f4f6fa 10%, #d9dee8 20%, transparent 21%),
    radial-gradient(circle at 71.2% 28.8%, #fff 0, #f4f6fa 10%, #d9dee8 20%, transparent 21%);
}
.o-cloud {
  filter: drop-shadow(0 .08em .14em rgba(0, 40, 110, .25));
  background:
    radial-gradient(circle at 50% 42%, #fff 0, #f6f7fa 14%, #dfe3ec 27%, transparent 28%),
    radial-gradient(circle at 27% 60%, #fff 0, #f6f7fa 11%, #dfe3ec 21%, transparent 22%),
    radial-gradient(circle at 73% 60%, #fff 0, #f6f7fa 11%, #dfe3ec 21%, transparent 22%),
    radial-gradient(circle at 50% 66%, #f6f7fa 0, #e6e9f0 18%, transparent 19%);
}

/* =========================
   КАРКАС: голубая шапка + белый лист
   ========================= */
#view { max-width: 480px; margin: 0 auto; }
.pg { position: relative; min-height: 100vh; min-height: 100dvh; padding: calc(var(--top) + 10px) 16px calc(var(--bottom) + 108px); animation: in .35s var(--ease) both; }
.pg::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--top) + 78px); background: var(--bg); border-radius: 32px 32px 0 0; }
.pg > * { position: relative; }
.pg.nonav { padding-bottom: calc(var(--bottom) + 28px); }
.pg.docked { padding-bottom: calc(var(--bottom) + 100px); }
@keyframes in { from { opacity: 0; transform: translateY(8px); } }
.grab { display: none; }

.ph { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 38px; color: #fff; }
.ph h1 { font-size: 24px; font-weight: 700; letter-spacing: -.025em; }
.ph h1 em { font-style: normal; font-size: 11px; font-weight: 600; background: rgba(255, 255, 255, .16); color: #fff; padding: 2px 8px; border-radius: 99px; margin-left: 8px; vertical-align: middle; letter-spacing: 0; }
.bk { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; flex: none; }
.bk .i { width: 17px; height: 17px; }
.sp { margin-left: auto; }

.g { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.span { grid-column: 1 / -1; }
.card { background: var(--card); border-radius: var(--r); padding: 14px; position: relative; overflow: hidden; display: block; text-align: left; width: 100%; transition: transform .15s var(--ease); }
button.card:active, a.card:active, .tap:active { transform: scale(.98); }
.card small, .st { font-size: 11.5px; color: var(--muted); display: block; line-height: 1.3; }
.tt { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.sh { display: flex; align-items: center; gap: 8px; padding: 0 4px; margin: 20px 0 10px; font-size: 17px; font-weight: 700; letter-spacing: -.02em; width: 100%; }
.sh em { font-style: normal; font-size: 10.5px; font-weight: 600; background: var(--card2); color: var(--muted); padding: 2px 7px; border-radius: 99px; letter-spacing: 0; }
.sh .i { width: 13px; height: 13px; color: var(--muted); }

.ava { flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; background: linear-gradient(140deg, var(--accent-2), var(--sky) 60%, #0a55c8); }
.ico { width: 40px; height: 40px; border-radius: 50%; background: var(--card2); display: grid; place-items: center; flex: none; }
.ico .i { width: 17px; height: 17px; }
.ava.ico { background: linear-gradient(140deg, var(--accent-2), var(--sky) 60%, #0a55c8); font-size: 12px; }
.tag, .card small.tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 99px; margin-bottom: 5px; }

/* =========================
   КНОПКИ, ПОЛЯ
   ========================= */
.bt { height: 54px; border-radius: 99px; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; font-size: 15px; font-weight: 600; background: var(--sky); color: #fff; transition: transform .15s var(--ease), opacity .2s; }
.bt:active { transform: scale(.98); }
.bt.ghost { background: var(--card); color: var(--text); }
.bt[disabled] { opacity: .5; pointer-events: none; }
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 26px 16px calc(var(--bottom) + 16px); background: linear-gradient(transparent, var(--bg) 40%); display: grid; gap: 8px; max-width: 480px; margin: 0 auto; }
.field { display: block; width: 100%; background: var(--card); border: 1.5px solid transparent; border-radius: 18px; padding: 14px 16px; font-size: 15px; line-height: 1.4; outline: none; resize: none; }
.field:focus { border-color: var(--sky); }
.field::placeholder { color: var(--muted); }
.lbl { font-size: 12px; color: var(--muted); margin: 12px 6px 6px; display: block; }
.chips { display: flex; gap: 6px; margin-bottom: 12px; }
.chips button { padding: 8px 14px; border-radius: 99px; background: var(--card); font-size: 12.5px; font-weight: 600; color: var(--muted); }
.chips .on { background: var(--sky); color: #fff; }

/* =========================
   ГЛАВНАЯ
   ========================= */
.pg.home { padding: 0; background: var(--frame); display: flex; flex-direction: column; }
.pg.home::before { display: none; }
.hero { position: relative; overflow: hidden; padding: 16px 18px 40px; margin: calc(var(--top) + 10px) 10px 0; border-radius: 46px; text-align: center; color: #0e2433;
  background: var(--sky-grad); }
.hero > * { position: relative; }
/* полупрозрачные «пиксели» по краям — медленно летают */
.hero .pxs { position: absolute; inset: 0; pointer-events: none; }
.pxs i { position: absolute; width: 22px; height: 22px; background: #fff; opacity: var(--o); animation: fly var(--t) ease-in-out infinite; will-change: transform; }
@keyframes fly { 50% { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: calc(var(--o) * .4); } }
.pxs i:nth-child(1) { left: 30px; top: 74px; --o: 0.3; --x: 14px; --y: -22px; --r: 0deg; --t: 7s; animation-delay: -1.3s; }
.pxs i:nth-child(2) { left: 8px; top: 96px; --o: 0.3; --x: -10px; --y: -30px; --r: 12deg; --t: 9s; animation-delay: -2.6s; }
.pxs i:nth-child(3) { left: 52px; top: 96px; --o: 0.3; --x: 20px; --y: -12px; --r: -12deg; --t: 8s; animation-delay: -3.9s; }
.pxs i:nth-child(4) { left: 30px; top: 118px; --o: 0.3; --x: -16px; --y: -26px; --r: 0deg; --t: 11s; animation-delay: -5.2s; }
.pxs i:nth-child(5) { left: 74px; top: 118px; --o: 0.18; --x: 24px; --y: -34px; --r: 12deg; --t: 10s; animation-delay: -6.5s; }
.pxs i:nth-child(6) { left: 8px; top: 162px; --o: 0.2; --x: 12px; --y: -18px; --r: -12deg; --t: 8.5s; animation-delay: -7.8s; }
.pxs i:nth-child(7) { left: 30px; top: 184px; --o: 0.2; --x: -14px; --y: -28px; --r: 0deg; --t: 12s; animation-delay: -9.1s; }
.pxs i:nth-child(8) { left: 52px; top: 162px; --o: 0.12; --x: 18px; --y: -20px; --r: 12deg; --t: 9.5s; animation-delay: -10.4s; }
.pxs i:nth-child(9) { right: 26px; top: 52px; --o: 0.3; --x: -14px; --y: -22px; --r: -12deg; --t: 7s; animation-delay: -11.7s; }
.pxs i:nth-child(10) { right: 48px; top: 74px; --o: 0.3; --x: 10px; --y: -30px; --r: 0deg; --t: 9s; animation-delay: -13.0s; }
.pxs i:nth-child(11) { right: 70px; top: 96px; --o: 0.3; --x: -20px; --y: -12px; --r: 12deg; --t: 8s; animation-delay: -14.3s; }
.pxs i:nth-child(12) { right: 48px; top: 118px; --o: 0.22; --x: 16px; --y: -26px; --r: -12deg; --t: 11s; animation-delay: -15.6s; }
.pxs i:nth-child(13) { right: 26px; top: 140px; --o: 0.22; --x: -24px; --y: -34px; --r: 0deg; --t: 10s; animation-delay: -16.9s; }
.pxs i:nth-child(14) { right: 92px; top: 118px; --o: 0.14; --x: -12px; --y: -18px; --r: 12deg; --t: 8.5s; animation-delay: -18.2s; }
.pxs i:nth-child(15) { right: 26px; top: 184px; --o: 0.16; --x: 14px; --y: -28px; --r: -12deg; --t: 12s; animation-delay: -19.5s; }
.hero .top { display: flex; align-items: center; justify-content: space-between; height: 36px; }
.who { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #0e2433; min-width: 0; }
.who .ava { width: 34px; height: 34px; font-size: 12px; color: #0e2433; background: rgba(255, 255, 255, .5); box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.inf { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .45); box-shadow: 0 0 0 1px rgba(255, 255, 255, .6); color: #0e2433; font-size: 14px; font-weight: 600; flex: none; }
.cap { display: inline-block; margin-top: 12px; padding: 6px 15px; border-radius: 99px; background: rgba(255, 255, 255, .4); box-shadow: 0 0 0 1px rgba(255, 255, 255, .65); font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: #0e2433; }
.hero h2 { font-size: 46px; font-weight: 700; letter-spacing: -.035em; line-height: 1.1; margin-top: 14px; }
.hero p { font-size: 13px; color: rgba(14, 36, 51, .7); margin-top: 6px; }
.strip { height: 56px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; color: #fff; font-size: 13.5px; font-weight: 600; }
.strip span { width: 22px; height: 22px; border-radius: 50%; background: var(--sky); display: grid; place-items: center; }
.strip .i { width: 11px; height: 11px; stroke-width: 2.6; }
.strip .pbar { width: 54px; margin: 0 0 0 4px; background: rgba(255, 255, 255, .22); }
.strip .pbar i { background: #fff; }
.sheet { background: var(--bg); border-radius: 32px 32px 0 0; padding: 20px 16px calc(var(--bottom) + 112px); min-height: 320px; flex: 1; }
.sheet > .sh:first-child { margin-top: 0; }
.rw { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 4px; }
.rw + .rw { border-top: 1px solid var(--line); }
.rw .b { min-width: 0; flex: 1; }
.rw .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rw small { font-size: 11.5px; color: var(--muted); display: block; }
.rw .rt b, .tk .rt b { font-size: 15px; font-weight: 650; }
.sheet > .bt { margin-top: 10px; }
/* на главной вместо голубого — тёмный, как активная кнопка меню */
.home .bt, .home .n.n1, .home .quick button.on { background: var(--ind); color: #fff; }
.home .strip span { background: var(--ind); }
[data-theme="light"] .home .strip span { background: #3a3a42; }
.stat b { font-size: 24px; font-weight: 700; display: block; margin: 2px 0; letter-spacing: -.02em; }
.pbar { height: 6px; border-radius: 3px; background: var(--card2); margin-top: 10px; overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 3px; background: var(--sky); transition: width .6s var(--ease); }

.rad { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--card2); flex: none; display: grid; place-items: center; }
.rad .i { width: 13px; height: 13px; stroke-width: 3; }
.rad.on { border: 0; background: var(--inv); color: var(--inv-text); }
.rad.ok { border: 0; background: var(--green); color: #fff; }
.rad.wait { border: 0; background: var(--orange); color: #fff; }

.stack { border-radius: var(--r); overflow: hidden; display: block; width: 100%; text-align: left; }
.n { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-size: 12px; background: var(--card); }
.n + .n { border-top: 1px solid var(--line); }
.n .b { min-width: 0; flex: 1; }
.n .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n small { font-size: 11px; color: var(--muted); display: block; }
.n .r { margin-left: auto; font-size: 11px; white-space: nowrap; text-align: right; flex: none; }
.n .r b { font-size: 13px; }
.n .d { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--card2); flex: none; }
.n .d .i { width: 14px; height: 14px; }
.n.n1 { background: var(--sky); color: #fff; }
.n.n1 .d { background: rgba(255, 255, 255, .24); }
.n.n1 small, .n.n1 .r { color: rgba(255, 255, 255, .88); }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-content: center; }
.quick button { height: 44px; border-radius: 99px; display: grid; place-items: center; background: var(--card2); color: var(--muted); }
.quick button.on { background: var(--sky); color: #fff; }
.quick .i { width: 17px; height: 17px; }
.help .ico { margin-bottom: 18px; }
.help strong { font-size: 13.5px; font-weight: 600; line-height: 1.25; display: block; }

/* =========================
   ЗАДАНИЯ
   ========================= */
.tks { display: grid; gap: 8px; }
.tk { display: flex; align-items: center; gap: 12px; padding: 16px 14px; }
.tk .b { min-width: 0; flex: 1; }
.tk .tt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
.tk .rt { margin-left: auto; text-align: right; white-space: nowrap; flex: none; }
.tk .rt small { font-size: 11px; }
.tk .rt small.wait { color: var(--orange); }
.tk .rt small.ok { color: var(--green); }
.ring { position: relative; border-radius: calc(var(--r) + 2px); padding: 2px; overflow: hidden; margin: 2px 0; box-shadow: 0 16px 36px -14px var(--glow); }
.ring::before { content: ""; position: absolute; left: 50%; top: 50%; width: 160%; aspect-ratio: 1; translate: -50% -50%; background: conic-gradient(from 0deg, transparent 0 55%, #74dafe 75%, #2f9cf0 88%, transparent 100%); animation: ringspin 2.6s linear infinite; }
.ring::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px var(--line); pointer-events: none; }
@keyframes ringspin { to { rotate: 360deg; } }
.tk.feat { background: var(--bg); z-index: 1; }
.tk.feat .tag { display: inline-flex; align-items: center; gap: 5px; }
.tk.feat .tag .i { width: 11px; height: 11px; stroke-width: 2.2; }
.tk.feat .rt b { display: inline-block; animation: freshpop .7s cubic-bezier(.2, 1.7, .4, 1) .45s both; }
.tk.feat .sk { fill: var(--sky); stroke: var(--sky); }
.tk.feat .sk:nth-child(1) { right: 10px; top: 8px; bottom: auto; width: 13px; height: 13px; --o: .9; --r: 10deg; --t: 2.4s; }
.tk.feat .sk:nth-child(2) { right: 66px; top: auto; bottom: 8px; width: 10px; height: 10px; --o: .6; --r: -10deg; --t: 3.2s; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; padding: 4px 9px; border-radius: 99px; background: var(--card2); color: var(--muted); white-space: nowrap; flex: none; }
.badge .i { width: 10px; height: 10px; stroke-width: 2.6; }
.badge.ok { background: rgba(48, 209, 88, .16); color: var(--green); }
.badge.wait { background: rgba(255, 179, 64, .2); color: var(--orange); }
.badge.bad { background: rgba(255, 69, 58, .14); color: var(--red); }
.badge.blue { background: var(--sky); color: #fff; }
.blur { filter: blur(5px); user-select: none; }
.row { display: flex; align-items: center; gap: 12px; }
.row .b { min-width: 0; flex: 1; }
.row .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .rt { margin-left: auto; text-align: right; white-space: nowrap; flex: none; font-size: 12.5px; font-weight: 600; }
.row .rt b { font-size: 15px; font-weight: 650; display: block; }
.lst { display: grid; gap: 8px; }
.empty { text-align: center; padding: 30px 20px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.empty .ico { margin: 0 auto 12px; width: 52px; height: 52px; }
.empty .ico .i { width: 22px; height: 22px; }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

/* =========================
   ГОЛУБАЯ КАРТОЧКА, ЗАДАНИЕ, ОТЧЁТ
   ========================= */
.big { background: linear-gradient(160deg, #86bef0, #5aa2ec 50%, #3d8ae8); color: #fff; padding: 20px 18px; }
[data-theme="dark"] .big { background: linear-gradient(160deg, #2b2b32, #202024 60%); }
.big > :not(.sks) { position: relative; }
/* мерцающие звёздочки */
.sks { position: absolute; inset: 0; pointer-events: none; }
.sk { position: absolute; fill: #fff; stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; opacity: var(--o); transform: rotate(var(--r)); animation: twinkle var(--t) ease-in-out infinite; }
.sk:nth-child(1) { right: 74px; top: 14px; width: 28px; height: 28px; --o: .34; --r: 14deg; --t: 5s; }
.sk:nth-child(2) { right: 22px; top: 54%; width: 22px; height: 22px; --o: 1; --r: -8deg; --t: 3.6s; animation-delay: -1.2s; }
.sk:nth-child(3) { right: 118px; bottom: 12px; width: 18px; height: 18px; --o: .3; --r: 20deg; --t: 6.5s; animation-delay: -3s; }
@keyframes twinkle { 50% { transform: rotate(calc(var(--r) + 24deg)) scale(.55); opacity: calc(var(--o) * .3); } }
.big > .o { position: absolute; right: -24px; top: -36px; font-size: 132px; }
.big > .o.o-flower { top: auto; bottom: -34px; right: -20px; font-size: 122px; }
.big h2 { font-size: 21px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; margin: 2px 0 8px; max-width: 72%; overflow-wrap: anywhere; }
.big p { font-size: 13px; color: rgba(255, 255, 255, .9); line-height: 1.4; max-width: 78%; }
.big.plain p { max-width: none; }
.big .tag, .card.big small.tag { background: rgba(255, 255, 255, .24); color: #fff; }
.pay { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 14px; }
.pay b { font-size: 30px; font-weight: 700; }
.pay span { font-size: 12px; color: rgba(255, 255, 255, .85); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
.kv div { background: rgba(255, 255, 255, .18); border-radius: 14px; padding: 9px 11px; min-width: 0; }
.kv small, .card.big .kv small { color: rgba(255, 255, 255, .8); font-size: 10.5px; }
.kv b { font-size: 13px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.big .pbar { background: rgba(255, 255, 255, .26); max-width: 70%; }
.big .pbar i { background: #fff; }
.text { font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.lnk { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--accent); }
.lnk span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lnk .i:last-child { margin-left: auto; color: var(--muted); width: 14px; }
.note { display: flex; gap: 10px; align-items: center; font-size: 13px; line-height: 1.35; }
.drop { border: 1.5px dashed color-mix(in srgb, var(--muted) 55%, transparent); border-radius: var(--r); padding: 12px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs .th, .thumbs label { width: 60px; height: 76px; border-radius: 12px; flex: none; position: relative; overflow: hidden; }
.thumbs .th { background: var(--card2) center / cover no-repeat; display: grid; place-items: center; color: var(--muted); }
.thumbs .th button { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; }
.thumbs .th button .i { width: 10px; height: 10px; stroke-width: 2.6; }
.thumbs label { border: 1.5px dashed color-mix(in srgb, var(--muted) 55%, transparent); display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.thumbs input { display: none; }
.drop > small { font-size: 11.5px; color: var(--muted); display: block; margin-top: 8px; }

/* =========================
   ПРОФИЛЬ / ДРУЗЬЯ
   ========================= */
.prof { display: flex; align-items: center; gap: 12px; }
.prof .ava { width: 52px; height: 52px; font-size: 18px; }
.prof .b { min-width: 0; flex: 1; }
.nm { font-size: 17px; font-weight: 650; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.stats.two { grid-template-columns: 1fr 1fr; }
.stats b { font-size: 18px; font-weight: 650; display: block; margin-top: 3px; }
.menu { padding: 2px 14px; }
.menu > * { display: flex; align-items: center; gap: 12px; padding: 13px 0; font-size: 14px; font-weight: 500; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.menu > *:last-child { border: 0; }
.menu > * > .i:first-child { width: 19px; height: 19px; color: var(--sky); }
.menu span { margin-left: auto; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; max-width: 55%; overflow: hidden; white-space: nowrap; }
.menu span .i { width: 12px; height: 12px; }
.sw { display: block; width: 42px; height: 26px; border-radius: 99px; background: var(--card2); position: relative; flex: none; transition: background .25s; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.sw.on { background: var(--sky); }
.sw.on::after { transform: translateX(16px); }
.copy { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 99px; padding: 7px 7px 7px 18px; margin-top: 8px; font-size: 13.5px; width: 100%; text-align: left; }
.copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy i { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; background: var(--sky); color: #fff; display: grid; place-items: center; flex: none; }
.copy i .i { width: 16px; height: 16px; }
.steps { list-style: none; display: grid; gap: 12px; }
.steps li { display: flex; gap: 12px; align-items: center; font-size: 13.5px; line-height: 1.3; }
.steps li b { width: 26px; height: 26px; border-radius: 50%; background: var(--sky); color: #fff; display: grid; place-items: center; font-size: 12px; flex: none; }

/* =========================
   ЧАТ ПОДДЕРЖКИ
   ========================= */
.pg.chat { padding-bottom: calc(var(--bottom) + 100px); }
.msgs { display: flex; flex-direction: column; gap: 6px; }
.m { align-self: flex-start; max-width: 82%; padding: 9px 13px; border-radius: 18px 18px 18px 6px; background: var(--card); font-size: 14.5px; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.m.me { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: var(--ind); color: #fff; }
.m time { display: block; font-size: 10.5px; opacity: .6; margin-top: 3px; text-align: right; }
.m img { display: block; max-width: 100%; max-height: 320px; border-radius: 12px; margin-bottom: 5px; }
.m .fl { display: flex; align-items: center; gap: 6px; font-weight: 600; margin-bottom: 2px; }
.m .fl .i { width: 16px; height: 16px; }
.dock.chatbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.chatbar .field { flex: 1; min-width: 0; border-radius: 23px; padding: 12px 16px; max-height: 120px; }
.att, .snd { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--card); color: var(--muted); cursor: pointer; transition: transform .15s var(--ease), opacity .2s; }
.snd { background: var(--ind); color: #fff; }
.snd:active, .att:active { transform: scale(.92); }
.snd[disabled] { opacity: .5; }
.att input { display: none; }
.chip { width: 100%; display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 14px; padding: 9px 12px; font-size: 12.5px; }
.chip > .i { width: 16px; height: 16px; color: var(--muted); }
.chip span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip button { width: 22px; height: 22px; border-radius: 50%; background: var(--card2); display: grid; place-items: center; flex: none; }
.chip button .i { width: 10px; height: 10px; stroke-width: 2.6; }

/* =========================
   ПОЗДРАВЛЕНИЕ С VIP
   ========================= */
.vipov { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 28px calc(var(--bottom) + 24px); text-align: center; color: #fff;
  background: rgba(24, 24, 28, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); animation: ovin .35s ease both; }
.vipov.out { animation: ovout .28s ease both; }
@keyframes ovin { from { opacity: 0; } }
@keyframes ovout { to { opacity: 0; transform: scale(1.04); } }
.vipov .core { position: relative; width: 150px; height: 150px; margin-bottom: 30px; }
.vipov .star { width: 100%; height: 100%; fill: #fff; stroke: #fff; stroke-width: 1.2; stroke-linejoin: round; filter: drop-shadow(0 0 26px rgba(116, 218, 254, .95));
  animation: vpop .9s cubic-bezier(.2, 1.6, .4, 1) .1s both, vbreath 3.2s ease-in-out 1s infinite; }
@keyframes vpop { from { transform: scale(0) rotate(-90deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes vbreath { 50% { scale: 1.08; filter: drop-shadow(0 0 40px rgba(116, 218, 254, 1)); } }
.vipov .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--sky-top); opacity: 0; animation: vring 1.4s ease-out .2s both; }
.vipov .ring.r2 { animation-delay: .5s; }
@keyframes vring { from { transform: scale(.3); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }
.vipov .burst > * { position: absolute; left: 50%; top: 50%; fill: #fff; opacity: 0; animation: vburst 1.5s cubic-bezier(.1, .7, .3, 1) both; }
.vipov .burst .sky { fill: var(--sky-top); }
.vipov .burst .px { background: var(--sky-top); }
@keyframes vburst {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(1); opacity: 0; }
}
.vipov .tag { background: var(--sky-top); color: var(--ink); animation: vup .5s var(--ease) .45s both; }
.vipov h2 { font-size: 34px; font-weight: 700; letter-spacing: -.03em; margin: 6px 0 10px; animation: vup .5s var(--ease) .55s both; }
.vipov p { font-size: 14.5px; line-height: 1.45; color: rgba(255, 255, 255, .78); max-width: 320px; margin-bottom: 28px; animation: vup .5s var(--ease) .65s both; }
.vipov .bt { max-width: 320px; background: #fff; color: #0b0b0f; animation: vup .5s var(--ease) .8s both; }
@keyframes vup { from { opacity: 0; transform: translateY(14px); } }

/* отчёт отправлен — та же заставка, вместо звезды галочка */
.vipov.sent .core { width: 104px; height: 104px; margin-bottom: 26px; }
.vipov.sent .disc { position: absolute; inset: 0; border-radius: 50%; background: var(--sky-top); box-shadow: 0 0 40px rgba(116, 218, 254, .6); animation: vdisc .55s cubic-bezier(.2, 1.6, .4, 1) .1s both; }
.vipov.sent .tick { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: vdraw .45s ease-out .5s forwards; }
.vipov.sent h2 { font-size: 26px; }
.vipov.sent p { margin-bottom: 0; }
@keyframes vdisc { from { transform: scale(0); } }
@keyframes vdraw { to { stroke-dashoffset: 0; } }

/* =========================
   АНИМАЦИИ «ПОКА ТЕБЯ НЕ БЫЛО»
   ========================= */
.hero .plus { position: absolute; left: 50%; bottom: 9px; translate: -50% 0; padding: 4px 12px; border-radius: 99px; background: var(--frame); color: #fff; font-size: 12.5px; font-weight: 700; white-space: nowrap;
  animation: pluspop .6s cubic-bezier(.2, 1.6, .4, 1) .2s both, plusout .5s ease 3s forwards; }
.hero h2.bump { animation: earnbump .5s var(--ease); }
@keyframes pluspop { from { transform: scale(0) translateY(10px); opacity: 0; } }
@keyframes plusout { to { transform: translateY(-10px); opacity: 0; } }
@keyframes earnbump { 40% { transform: scale(1.08); } }
.strip .pbar i { transition: width 1s cubic-bezier(.3, 1.4, .5, 1); }
.strip.bump span { animation: lockshake .6s ease .5s; }
@keyframes lockshake { 20% { transform: rotate(-14deg) scale(1.15); } 50% { transform: rotate(12deg) scale(1.15); } 80% { transform: rotate(-6deg); } }
.n { position: relative; }
.fresh::after { content: ""; position: absolute; inset: 0; background: var(--green); opacity: 0; pointer-events: none; animation: freshflash 1.5s ease .5s both; }
.fresh .d, .fresh .rt b, .fresh .r b { animation: freshpop .6s cubic-bezier(.2, 1.7, .4, 1) .55s both; }
.n.fresh .d { background: var(--green); color: #fff; }
.fresh .r b { display: inline-block; }
@keyframes freshflash { 25% { opacity: .24; } }
@keyframes freshpop { from { transform: scale(.3); opacity: 0; } }

/* =========================
   АДМИН-ПАНЕЛЬ
   ========================= */
.admin-entry { background: var(--ind); color: #fff; margin-bottom: 8px; }
.admin-entry small { color: rgba(255, 255, 255, .7); }
.admin-entry .ico { background: rgba(255, 255, 255, .14); }
.admin-entry .rt .i { width: 14px; height: 14px; }
.chips.wrap { flex-wrap: wrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); flex: none; }
.dot.on { background: var(--green); }
.srch { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.srch .field { flex: 1; min-width: 0; border-radius: 99px; }
.dock.two { grid-template-columns: 1fr 1fr; }
.bt.bad, button.bad { color: var(--red); }
.g .bt { height: 48px; font-size: 14px; }
select.field { appearance: none; -webkit-appearance: none; }
.admimg { padding: 6px; min-height: 120px; display: grid; place-items: center; }
.admimg img { display: block; width: 100%; border-radius: 16px; }
.spin.dark { margin: 0; border-color: var(--card2); border-top-color: var(--muted); }
.filepick { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); cursor: pointer; }
.filepick input { display: none; }
.filepick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.funnel > button { font-size: 13.5px; }
.menu > button[disabled] { cursor: default; }
.card .lbl:first-child { margin-top: 0; }

/* =========================
   СТАРТ
   ========================= */
.gate { background: var(--sky); position: relative; overflow: hidden; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: calc(var(--top) + 20px) 20px calc(var(--bottom) + 22px); text-align: center; color: #fff; animation: in .4s var(--ease) both; }
.gart { flex: 1; display: grid; place-items: center; min-height: 300px; position: relative; }
.gart .o-cloud { position: absolute; top: calc(-150px - var(--top)); left: 50%; margin-left: -150px; font-size: 300px; animation: drift 9s ease-in-out infinite; }
.gart .o-flower { font-size: 200px; margin-top: 70px; animation: turn 60s linear infinite; }
.gate h2 { font-size: 26px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.gate p { font-size: 14px; color: rgba(255, 255, 255, .9); line-height: 1.45; margin: 10px 0 22px; }
.gate .field { text-align: center; font-size: 22px; font-weight: 600; margin-bottom: 8px; background: rgba(255, 255, 255, .24); color: #fff; border-radius: 99px; }
.gate .field::placeholder { color: rgba(255, 255, 255, .6); }
.gate .field:focus { border-color: #fff; }
.gate .bt { background: #fff; color: #0b0b0f; }
.gate .bt.ghost { background: rgba(255, 255, 255, .24); color: #fff; }
.gate .bt + .bt { margin-top: 8px; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: #fff; animation: rot .8s linear infinite; margin: 40vh auto 0; }
@keyframes rot { to { transform: rotate(360deg); } }

/* =========================
   НИЖНЕЕ МЕНЮ, ТОСТ
   ========================= */
.nv {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottom) + 14px); z-index: 30;
  width: calc(100% - 28px); max-width: 452px; height: 62px; border-radius: 99px; padding: 0 8px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--glass); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-line); box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .45);
  font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.nv { touch-action: none; user-select: none; -webkit-user-select: none; }
.nv .ind { position: absolute; left: 0; top: 7px; height: 46px; border-radius: 99px; background: var(--ind); pointer-events: none;
  transition: transform .45s cubic-bezier(.3, 1.35, .5, 1), width .3s var(--ease), scale .25s var(--ease); }
.nv.drag .ind { scale: 1.06 1.14; transition-duration: .28s, .3s, .25s; }
.nv button { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; height: 46px; border-radius: 99px; transition: color .25s; }
.nv button .i { transition: transform .3s var(--ease); }
.nv button span { display: none; }
.nv button.on { color: #fff; }
.nv button:not(.on):active .i { transform: scale(.86); }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); top: calc(var(--top) + 12px); z-index: 50;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 99px; font-size: 13.5px; font-weight: 500; line-height: 1.35; text-align: center;
  background: var(--glass); color: var(--text); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--glass-line);
  box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .5); animation: in .3s var(--ease) both;
}
.toast.bad { color: var(--red); }
[data-theme="dark"] .big p { color: rgba(255, 255, 255, .7); }
[data-theme="dark"] .kv div { background: rgba(255, 255, 255, .1); }
[data-theme="dark"] .big .tag, [data-theme="dark"] .card.big small.tag { background: var(--sky-top); color: var(--ink); }
.card .field { background: var(--bg); }
.card .chips button:not(.on) { background: var(--card2); }
.why { flex-basis: 100%; font-size: 11.5px; color: var(--red); margin: 2px 0 0 40px; white-space: normal; }
.n:has(.why) { flex-wrap: wrap; }
.cnt { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; margin-right: 6px; }
.admin-entry .rt { display: flex; align-items: center; }
.chk { width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--card2); display: grid; place-items: center; flex: none; color: transparent; }
.chk .i { width: 15px; height: 15px; stroke-width: 3; }
.chk.on { background: var(--ind); border-color: var(--ind); color: #fff; }
.chartc b { display: block; font-size: 20px; font-weight: 700; margin: 2px 0 10px; }
.chart { display: flex; align-items: flex-end; gap: 2px; height: 64px; }
.chart i { flex: 1; border-radius: 3px; background: var(--card2); min-height: 2px; }
.chart i.on { background: var(--sky); }
.axis { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 6px; }
.funnel > button .b, .logl > button .b { min-width: 0; flex: 1; text-align: left; }
.funnel > button .b small, .logl > button .b small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; white-space: normal; }
.funnel > button span, .logl > button span { flex: none; max-width: none; }
.logl > button .tt { white-space: normal; }
