:root {
  --ink: #15171c;
  --ink-dim: rgba(21, 23, 28, 0.7);
  --ink-faint: rgba(21, 23, 28, 0.42);
  --base: #dcdfe5;
  --c1: #8d949e;
  --c2: #c3c8d0;
  --c3: #5c636e;
  --orb1: #ffffff;
  --orb2: #c6ccd4;
  --orb3: #aab1bb;
  --orb-op: 0.85;
  --glass: rgba(255, 255, 255, 0.66);
  --glass-2: rgba(255, 255, 255, 0.82);
  --brd: rgba(255, 255, 255, 0.85);
  --brd-hi: #ffffff;
  --sheen: rgba(255, 255, 255, 0.95);
  --veil: radial-gradient(130% 100% at 50% 0%, rgba(220, 223, 229, 0.05), rgba(220, 223, 229, 0.45) 55%, rgba(220, 223, 229, 0.78) 100%);
  --shadow: 0 30px 60px -32px rgba(18, 20, 26, 0.45), 0 1px 2px rgba(18, 20, 26, 0.07);
  --blur: 16px;
  --r-s: 14px;
  --r-m: 22px;
  --r-l: 28px;
  --r-xl: 36px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="dark"] {
  --ink: #f3f5f8;
  --ink-dim: rgba(243, 245, 248, 0.72);
  --ink-faint: rgba(243, 245, 248, 0.44);
  --base: #0c0d10;
  --c1: #6f7681;
  --c2: #b3bac4;
  --c3: #3c4149;
  --orb1: #3a3f47;
  --orb2: #23272d;
  --orb3: #4a5058;
  --orb-op: 0.9;
  --glass: rgba(22, 24, 29, 0.66);
  --glass-2: rgba(32, 35, 41, 0.8);
  --brd: rgba(255, 255, 255, 0.14);
  --brd-hi: rgba(255, 255, 255, 0.36);
  --sheen: rgba(255, 255, 255, 0.22);
  --veil: radial-gradient(130% 100% at 50% 0%, rgba(12, 13, 16, 0.25), rgba(12, 13, 16, 0.7) 55%, rgba(12, 13, 16, 0.93) 100%);
  --shadow: 0 26px 70px -28px rgba(0, 0, 0, 0.95);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Manrope", "Segoe UI", Roboto, sans-serif;
  background: var(--base);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: "Unbounded", "Segoe UI", sans-serif; letter-spacing: -0.03em; line-height: 1.05; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--base); }

.bg { position: fixed; inset: -10% 0; z-index: -3; overflow: hidden; background: var(--base); }
.orb {
  position: absolute; border-radius: 50%; opacity: var(--orb-op); will-change: transform;
  background: radial-gradient(circle at 50% 50%, var(--oc), transparent 68%);
}
.veil { position: absolute; inset: 0; background: var(--veil); }
.o1 { width: 70vw; height: 70vw; min-width: 280px; min-height: 280px; --oc: var(--orb1); top: -18%; left: -18%; animation: drift1 26s ease-in-out infinite; }
.o2 { width: 58vw; height: 58vw; min-width: 240px; min-height: 240px; --oc: var(--orb2); top: 38%; right: -20%; animation: drift2 32s ease-in-out infinite; }
.o3 { width: 50vw; height: 50vw; min-width: 220px; min-height: 220px; --oc: var(--orb3); bottom: -16%; left: 10%; animation: drift3 29s ease-in-out infinite; }
@keyframes drift1 { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(12vw, 8vh, 0) scale(1.16); } }
@keyframes drift2 { 0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); } 50% { transform: translate3d(-14vw, -10vh, 0) scale(0.88); } }
@keyframes drift3 { 0%, 100% { transform: translate3d(0, 0, 0) scale(0.95); } 50% { transform: translate3d(9vw, -12vh, 0) scale(1.18); } }
.grid-lines {
  position: absolute; inset: 0; opacity: 0.5;
  background-image: linear-gradient(var(--brd) 1px, transparent 1px), linear-gradient(90deg, var(--brd) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(circle at 50% 20%, #000, transparent 72%);
  mask-image: radial-gradient(circle at 50% 20%, #000, transparent 72%);
}

.glass {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--brd);
  border-radius: var(--r-l);
  box-shadow: var(--shadow), inset 0 1px 0 var(--sheen), inset 0 -1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.glass::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 34%, transparent 66%, rgba(255, 255, 255, 0.07) 100%);
}
.glass::before {
  content: ""; position: absolute; top: 0; left: -60%; width: 45%; height: 100%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  transform: skewX(-18deg); transition: left 0.9s var(--ease);
}
.glass:hover::before { left: 120%; }
.nav, .stat, .btn, .panel, .streak-item {
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  backdrop-filter: blur(var(--blur)) saturate(150%);
}

.wrap { width: min(560px, 100%); margin: 0 auto; padding: 0 16px 48px; }

.nav {
  position: sticky; top: 10px; z-index: 40;
  width: min(560px, calc(100% - 20px));
  margin: 12px auto 0;
  border-radius: 999px;
  padding: 8px 8px 8px 18px;
  display: flex; align-items: center; gap: 10px;
}
.brand { font-family: "Unbounded", sans-serif; font-weight: 900; font-size: 15px; position: relative; z-index: 2; }
.brand i {
  font-style: normal;
  background: linear-gradient(90deg, var(--c3), var(--ink), var(--c1));
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: flow 7s linear infinite;
}
@keyframes flow { to { background-position: 220% center; } }
.nav-pill {
  margin-left: auto; position: relative; z-index: 2;
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint);
}
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--brd); background: var(--glass-2);
  color: var(--ink); cursor: pointer; font-size: 16px; display: grid; place-items: center;
  position: relative; z-index: 2; transition: 0.45s var(--ease);
}
.icon-btn:hover { transform: rotate(180deg) scale(1.08); }

.hero { text-align: center; padding: 36px 0 28px; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim);
}
.kick-dot {
  width: 28px; height: 28px; border-radius: 50%; background: var(--ink); position: relative;
}
.kick-dot::after {
  content: ""; position: absolute; right: 1px; bottom: 1px; width: 8px; height: 8px; border-radius: 50%;
  background: #4ade80; box-shadow: 0 0 0 2px var(--base); animation: pulse 2.4s infinite;
}
@keyframes pulse { 50% { opacity: 0.25; transform: scale(0.7); } }

.word { margin-top: 18px; }
.word h1 {
  font-size: clamp(42px, 16vw, 84px); font-weight: 900; letter-spacing: -0.055em; line-height: 0.95; white-space: nowrap;
}
.l { display: inline-block; transform-style: preserve-3d; }
.js .l {
  opacity: 0; transform: translateY(52%) rotateX(-78deg); filter: blur(5px);
  transition: opacity 0.85s var(--ease), transform 1.15s var(--ease), filter 0.85s var(--ease);
  transition-delay: calc(var(--i) * 0.058s);
}
body.ready .l { opacity: 1; transform: none; filter: none; }
.l .m { display: inline-block; will-change: transform; }
.l i { display: inline-block; font-style: normal; --W: 100%; --o: 0px; }
body.ready .l i {
  background-image: linear-gradient(105deg, var(--ink) 0 41%, var(--c1) 47%, var(--c2) 50%, var(--c1) 53%, var(--ink) 59% 100%);
  background-size: var(--W) 100%; background-repeat: repeat-x; background-position-x: calc(0px - var(--o));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: wave 4s var(--ease) infinite, sheen 6.5s linear infinite;
  animation-delay: calc(1.3s + var(--i) * 0.085s), 2.2s;
}
html[data-theme="dark"] body.ready .l i {
  background-image: linear-gradient(105deg, #dde3ec 0 41%, #fff 47%, #fff 53%, #dde3ec 59% 100%);
}
@keyframes sheen {
  0% { background-position-x: calc(0px - var(--o) - var(--W)); }
  60%, 100% { background-position-x: calc(0px - var(--o) + var(--W)); }
}
@keyframes wave { 0%, 58%, 100% { transform: translateY(0); } 28% { transform: translateY(-0.085em); } }

.tag2 {
  display: block; margin-top: 8px;
  font-family: "Unbounded", sans-serif; font-weight: 700; font-size: clamp(16px, 4vw, 22px);
  background: linear-gradient(100deg, var(--c1), var(--ink) 45%, var(--c1));
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: flow 8s linear infinite;
}
.lede { color: var(--ink-dim); font-size: 18px; font-weight: 600; margin: 16px auto 0; line-height: 1.35; }
.rot { display: block; position: relative; overflow: hidden; height: 1.62em; line-height: 1.5; margin-top: 4px; }
.rot i {
  position: absolute; left: 0; right: 0; display: block; font-style: normal; font-weight: 800; color: var(--ink);
  transition: transform 0.55s var(--ease), opacity 0.45s var(--ease);
}
.lede2 { color: var(--ink-faint); font-size: 13.5px; font-weight: 600; margin: 12px auto 22px; }
.cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 14px 22px; border-radius: 999px; border: 1px solid var(--brd);
  background: var(--glass-2); color: var(--ink); cursor: pointer;
  font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 12px;
  position: relative; z-index: 2; transition: 0.5s var(--ease);
}
.btn:hover { transform: translateY(-4px) scale(1.03); border-color: var(--brd-hi); }
.btn:active { transform: scale(0.98); }
.btn.solid { background: var(--ink); color: var(--base); border-color: var(--ink); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.55; transform: none; }

.ribbon {
  position: relative; overflow: hidden; margin: 8px -16px 8px;
  padding: 14px 0; border-top: 1px solid var(--brd); border-bottom: 1px solid var(--brd); background: var(--glass);
}
.ribbon-track {
  display: flex; gap: 28px; width: max-content; white-space: nowrap;
  animation: marquee 22s linear infinite;
  font-family: "Unbounded", sans-serif; font-weight: 900; font-size: 28px; letter-spacing: -0.03em; text-transform: uppercase;
}
.ribbon-track span:nth-child(even) { color: transparent; -webkit-text-stroke: 1px var(--ink-faint); }
@keyframes marquee { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0; }
.stat { padding: 18px 8px; text-align: center; border-radius: var(--r-l); transition: transform 0.7s var(--ease); }
.stat:hover { transform: translateY(-8px); }
.stat > * { position: relative; z-index: 2; }
.stat b {
  display: block; font-family: "Unbounded", sans-serif; font-size: clamp(22px, 7vw, 34px);
  font-weight: 900; letter-spacing: -0.04em; line-height: 1;
}
.stat span {
  display: block; margin-top: 8px; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 800;
}

.stack { display: flex; flex-direction: column; gap: 14px; }
.panel { padding: 20px; }
.panel > * { position: relative; z-index: 2; }
.big-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.big-top h3 { font-size: 22px; font-weight: 900; }
.uname { display: block; color: var(--ink-faint); font-size: 13px; font-weight: 700; margin-top: 2px; }
.acct {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -4px 0 14px;
  padding: 8px 10px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.acct[hidden] { display: none !important; }
.acct-ava {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.acct-fallback {
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
}
.acct-text { min-width: 0; display: flex; flex-direction: column; }
.acct-text strong { font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-text span { color: var(--ink-faint); font-size: 12px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mark {
  width: 52px; height: 52px; border-radius: var(--r-s); background: var(--ink); position: relative; flex: 0 0 auto;
  transition: transform 0.8s var(--ease);
}
.mark em {
  position: absolute; inset: 0; display: grid; place-items: center; font-style: normal;
  font-family: "Unbounded", sans-serif; font-weight: 900; font-size: 13px; color: var(--base);
}
.panel:hover .mark { transform: rotate(-8deg) scale(1.08); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field span { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); font-weight: 800; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--brd); background: var(--glass-2); border-radius: 16px; padding: 12px 14px; outline: none;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.field input:focus, .field textarea:focus { border-color: var(--brd-hi); transform: translateY(-2px); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.login-tabs {
  display: flex; gap: 8px; margin-bottom: 14px; padding: 4px; border-radius: 999px;
  border: 1px solid var(--brd); background: var(--glass-2);
}
.login-tab {
  flex: 1; border: none; background: transparent; color: var(--ink-dim); font-weight: 800;
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; padding: 10px 8px;
  border-radius: 999px; cursor: pointer; transition: 0.35s var(--ease);
}
.login-tab.on { background: var(--ink); color: var(--base); }
.login-pane { display: none; }
.login-pane.on { display: block; }
.qr-wrap {
  padding: 16px; border-radius: 20px; text-align: center; margin-bottom: 12px;
  min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
}
.qr-hint { font-size: 13px; line-height: 1.45; color: var(--ink-dim); font-weight: 600; margin: 0; }
.qr-img {
  width: min(280px, 78vw); height: auto; border-radius: 16px; border: 1px solid var(--brd);
  background: #fff; padding: 10px; image-rendering: pixelated;
}
.qr-placeholder {
  width: min(220px, 72vw); aspect-ratio: 1; border-radius: 16px; border: 1px dashed var(--brd);
  display: flex; align-items: center; justify-content: center; color: var(--ink-faint); font-size: 12px; font-weight: 800;
}
.login-actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.login-extra { margin-top: 14px; }
#login-send-code { margin-bottom: 12px; }
.btn.ghost { background: transparent; margin-top: 8px; }

.switch { position: relative; width: 52px; height: 30px; margin-left: auto; flex-shrink: 0; z-index: 2; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; cursor: pointer; background: var(--glass-2); border: 1px solid var(--brd); border-radius: 999px; transition: 0.35s var(--ease); }
.slider::before {
  content: ""; position: absolute; height: 22px; width: 22px; left: 3px; top: 3px; background: var(--ink); border-radius: 50%; transition: 0.35s var(--ease);
}
.switch input:checked + .slider { background: var(--ink); }
.switch input:checked + .slider::before { transform: translateX(22px); background: var(--base); }

.pill {
  margin-left: auto; min-width: 32px; height: 32px; padding: 0 10px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--brd); background: var(--glass-2); font-family: "Unbounded", sans-serif; font-size: 12px; font-weight: 700;
}
.streak-list { list-style: none; display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow: auto; }
.streak-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-radius: 16px; background: var(--glass-2); border: 1px solid var(--brd);
  animation: inUp 0.7s var(--ease) both;
}
.streak-item .name { font-weight: 800; }
.streak-item .meta { font-size: 12px; color: var(--ink-faint); font-weight: 700; }
.badge {
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px; border: 1px solid var(--brd);
}
.badge-gray { color: var(--ink-dim); }
.badge-active { background: var(--ink); color: var(--base); border-color: var(--ink); }
.badge-unknown { color: var(--ink-faint); }
.log {
  margin-top: 12px; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, 0.28);
  color: var(--ink-dim); font-size: 12px; line-height: 1.45; max-height: 140px; overflow: auto; white-space: pre-wrap;
  font-family: Consolas, monospace;
}
.streak-list:empty::after {
  content: "Список пуст — обнови после входа в TikTok.";
  display: block; color: var(--ink-faint); font-size: 14px; font-weight: 600; padding: 6px 2px;
}

.js .rv { opacity: 0; transform: translateY(42px) scale(0.975); filter: blur(7px); transition: opacity 1s var(--ease), transform 1.1s var(--ease), filter 1s var(--ease); }
.rv.on { opacity: 1 !important; transform: none !important; filter: none; }
.js .in { opacity: 0; transform: translateY(34px); filter: blur(6px); }
body.ready .in { animation: inUp 1.1s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes inUp { to { opacity: 1; transform: none; filter: none; } }

.boot {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--base);
  transition: clip-path 1.05s var(--ease), opacity 0.5s 0.45s;
}
.boot.go { clip-path: inset(0 0 100% 0); opacity: 0; pointer-events: none; }
.boot-in span {
  font-family: "Unbounded", sans-serif; font-weight: 900; font-size: clamp(22px, 6vw, 32px); display: block;
  animation: bootFade 0.7s var(--ease) both;
}
@keyframes bootFade { from { opacity: 0; filter: blur(10px); transform: translateY(12px); } to { opacity: 1; filter: none; transform: none; } }
.boot-in i { display: block; width: min(190px, 54vw); height: 2px; border-radius: 2px; background: var(--brd); margin: 18px auto 0; overflow: hidden; }
.boot-in i b { display: block; height: 100%; width: 0; background: var(--ink); animation: bootBar 1.15s var(--ease) forwards; }
@keyframes bootBar { to { width: 100%; } }

.cur, .cur-ring {
  position: fixed; left: 0; top: 0; z-index: 150; pointer-events: none; border-radius: 50%; opacity: 0; will-change: transform;
}
.cur { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; background: var(--ink); }
.cur-ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1px solid var(--ink-faint);
  transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease), opacity 0.4s;
}
body.ready .cur, body.ready .cur-ring { opacity: 1; }
.cur-ring.hot { width: 70px; height: 70px; margin: -35px 0 0 -35px; }
@media (hover: none), (max-width: 820px) { .cur, .cur-ring { display: none; } }

/* удалённый экран браузера + cookies */
.remote-wrap { padding: 12px; border-radius: 20px; text-align: center; margin: 8px 0 10px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.remote-img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--brd); touch-action: none; user-select: none; -webkit-user-drag: none; cursor: crosshair; }
.field textarea { font: inherit; color: var(--ink); resize: vertical; min-height: 96px; }
