/* =====================================================================
   Раздел «Задания» (префикс tk-): сводка, секции, строки заданий,
   шторки (опрос, описание профиля, приглашение), эффекты награды, админка.
   ===================================================================== */

/* ---------- Счётчик в заголовке ---------- */
.tk-count { min-width: 30px; justify-content: center; font-size: 12px; transition: background var(--t) var(--ease), color var(--t), box-shadow var(--t); }
.tk-count .ico svg { width: 13px; height: 13px; stroke-width: 3; display: block; }
.tk-count.badge-gold { animation: tkBadge 2.2s ease-in-out infinite; }
.tk-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: #3b2200; animation: pulse 1.1s ease-in-out infinite; }

/* ---------- Загрузка ---------- */
.tk-skel { display: flex; flex-direction: column; gap: 10px; }
.tk-skel .skel { border-radius: 22px; }
.tk-skel .skel:first-child { border-radius: var(--r-l); margin-bottom: 14px; }

/* ---------- Сводка: кольцо прогресса, заработано, обновление ---------- */
.tk-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 16px;
  padding: 16px;
  border-radius: var(--r-l);
  background:
    radial-gradient(90% 130% at 100% 0%, rgba(255, 197, 61, 0.2) 0%, rgba(255, 197, 61, 0) 58%),
    radial-gradient(80% 120% at 0% 100%, rgba(47, 217, 245, 0.12) 0%, rgba(47, 217, 245, 0) 60%),
    var(--grad-card);
  border: 1px solid var(--stroke-2);
  box-shadow: var(--sh-1), var(--hl);
  animation: fadeUp 0.5s var(--ease) both;
}
/* Блик, медленно пробегающий по карточке */
.tk-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.07) 50%, transparent 62%);
  background-size: 260% 100%;
  animation: tkSweep 7s ease-in-out infinite;
  pointer-events: none;
}
.tk-hero-art { position: absolute; z-index: -1; top: -14px; right: -12px; width: 92px; height: 92px; pointer-events: none; }
.tk-hero-art::before {
  content: '';
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 197, 61, 0.5), rgba(255, 197, 61, 0) 68%);
  filter: blur(6px);
  animation: glow 3s ease-in-out infinite;
}
.tk-hero-art img { position: relative; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.45)); animation: floatyRot 5.5s ease-in-out infinite; }

.tk-ring { position: relative; width: 72px; height: 72px; flex: none; }
.tk-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.tk-ring circle { fill: none; stroke-width: 7; }
.tk-ring-bg { stroke: rgba(255, 255, 255, 0.09); }
.tk-ring-fg { stroke: url(#tkRingGrad); stroke-linecap: round; transition: stroke-dashoffset 1.1s var(--ease); filter: drop-shadow(0 0 5px rgba(255, 180, 40, 0.55)); }
.tk-ring.full .tk-ring-fg { animation: tkRingGlow 2.4s ease-in-out infinite; }
.tk-ring-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-d); font-variant-numeric: tabular-nums; }
.tk-ring-num b { font-size: 19px; font-weight: 800; }
.tk-ring-num small { margin-top: 6px; font-size: 11px; font-weight: 700; color: var(--text-3); }

.tk-hero-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-right: 52px; }
.tk-earned { display: flex; align-items: center; gap: 7px; font: 800 24px/1.15 var(--font-d); }
.tk-earned .st { width: 24px; height: 24px; }
.tk-earned b { background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.tk-hero-label { font-size: 12.5px; font-weight: 700; color: var(--text-3); }
.tk-hero-reset { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 12px; font-weight: 700; line-height: 1.3; color: var(--text-2); }
.tk-hero-reset .ico { flex: none; color: var(--cyan); }
.tk-hero-reset .ico svg { width: 14px; height: 14px; display: block; }
.tk-hero-reset b { color: var(--text); }

.tk-ready {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 197, 61, 0.45);
  background: linear-gradient(90deg, rgba(255, 197, 61, 0.2), rgba(255, 138, 0, 0.07));
  color: #ffe7a6;
  font: 800 13.5px/1 var(--font);
  text-align: left;
  transition: transform var(--t-fast) var(--spring), background var(--t);
}
.tk-ready span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-ready .ico svg { width: 17px; height: 17px; display: block; }
.tk-ready .ico:first-child { color: var(--gold); animation: twinkle 1.6s ease-in-out infinite; }
.tk-ready .ico:last-child { animation: tkNudge 1.4s ease-in-out infinite; }
.tk-ready:active { transform: scale(0.97); }
.tk-alldone {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(70, 240, 143, 0.1);
  border: 1px solid rgba(70, 240, 143, 0.32);
  color: var(--green);
  font: 800 13.5px/1 var(--font);
  animation: popIn 0.5s var(--spring) both;
}
.tk-alldone .ico svg { width: 17px; height: 17px; stroke-width: 3; display: block; }

/* ---------- Секции ---------- */
.tk-sec-head { margin-top: 24px; }
.tk-sec-head h2 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tk-sec-n {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font: 800 11px/1 var(--font);
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--stroke);
}
.tk-sec-done .tk-sec-n { color: var(--green); background: rgba(70, 240, 143, 0.1); border-color: rgba(70, 240, 143, 0.3); }
.tk-reset {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #c6f6ff;
  background: rgba(47, 217, 245, 0.1);
  border: 1px solid rgba(47, 217, 245, 0.28);
  font: 800 12px/1 var(--font);
  white-space: nowrap;
}
.tk-reset .ico svg { width: 14px; height: 14px; display: block; }
.tk-list { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Строка задания ---------- */
.tk-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px 12px 12px 13px;
  border-radius: 22px;
  background:
    radial-gradient(130% 150% at 0% 50%, rgba(var(--tc), 0.22) 0%, rgba(var(--tc), 0.06) 36%, rgba(var(--tc), 0) 62%),
    var(--grad-card);
  border: 1px solid rgba(var(--tc), 0.24);
  box-shadow: var(--sh-1), var(--hl);
  cursor: pointer;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  transition: transform var(--t-fast) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.tk-row:active { transform: scale(0.985); }
.tk-row:focus-visible { box-shadow: var(--sh-1), 0 0 0 2px rgba(167, 139, 250, 0.75); }
.tk-row.busy { pointer-events: none; }
@media (hover: hover) {
  .tk-row:hover { border-color: rgba(var(--tc), 0.45); }
}
/* Награда ждёт: переливающаяся золотая обводка */
.tk-row::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(120deg, rgba(255, 228, 140, 0.95), rgba(255, 159, 28, 0.12) 38%, rgba(255, 159, 28, 0.12) 62%, rgba(255, 228, 140, 0.95));
  background-size: 220% 220%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--t) var(--ease);
  pointer-events: none;
}
.tk-row[data-st='ready'] { border-color: transparent; box-shadow: var(--sh-1), 0 10px 30px rgba(255, 170, 30, 0.16), var(--hl); }
.tk-row[data-st='ready']::after { opacity: 1; animation: tkBorder 2.6s ease-in-out infinite alternate; }
.tk-row[data-st='done'] { background: var(--grad-card); border-color: var(--stroke); }
.tk-row[data-st='done'] .tk-tile { opacity: 0.6; filter: saturate(0.55); }
.tk-row[data-st='done'] .tk-tile::before { opacity: 0; }
.tk-row[data-st='done'] .tk-name { color: var(--text-2); }

/* Цветная плитка с мягким свечением своего цвета */
.tk-tile { position: relative; flex: none; transition: opacity var(--t), filter var(--t); }
.tk-tile::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 14px;
  background: rgb(var(--tc));
  filter: blur(12px);
  opacity: 0.5;
  transition: opacity var(--t);
}
.tk-tile .ic-tile { position: relative; }
.tk-row[data-st='ready'] .tk-tile .ic-tile { animation: tkWobble 2.8s var(--ease) infinite; }
.tk-row[data-st='in_progress'] .tk-tile::before { animation: tkTileGlow 2.2s ease-in-out infinite; }

.tk-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.tk-name {
  font: 800 14.5px/1.25 var(--font);
  color: var(--text);
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color var(--t);
}
.tk-st { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 22px; }

/* Статусы */
.tk-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font: 800 11px/1 var(--font);
  white-space: nowrap;
  color: #dccfff;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(167, 139, 250, 0.32);
}
.tk-badge .ico svg { width: 12px; height: 12px; display: block; }
.tk-badge.wait { color: #ffe3a3; background: rgba(255, 197, 61, 0.12); border-color: rgba(255, 197, 61, 0.36); }
.tk-badge.wait::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 6px var(--gold); animation: pulse 1.1s ease-in-out infinite; }
.tk-badge.ready { color: #3b2200; background: var(--grad-gold); border-color: transparent; box-shadow: 0 4px 12px rgba(255, 159, 28, 0.3); }
.tk-ok { display: inline-flex; align-items: center; gap: 5px; min-width: 0; font: 800 12px/1.2 var(--font); color: var(--green); white-space: nowrap; }
.tk-ok > .ico svg { width: 14px; height: 14px; stroke-width: 3; display: block; }
.tk-again { color: var(--text-3); font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.tk-again b { color: var(--text-2); }

/* Шкала прогресса: деления заливаются по очереди */
.tk-bar { flex: 1; min-width: 0; max-width: 168px; display: flex; gap: 4px; }
.tk-seg { position: relative; flex: 1; height: 6px; border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, 0.09); }
.tk-seg i {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(var(--tc), 0.75), rgb(var(--tc)));
  box-shadow: 0 0 10px rgba(var(--tc), 0.7);
  transition: transform 0.55s var(--ease), background var(--t);
  transition-delay: calc(var(--k, 0) * 90ms);
}
.tk-seg.on i { transform: scaleX(1); }
/* Первое появление списка: заливка начинается, когда строка уже видна */
.tk-list.stagger .tk-seg i { transition-delay: calc(var(--i, 0) * 45ms + 260ms + var(--k, 0) * 90ms); }
.tk-bar.solid .tk-seg i { transform: scaleX(var(--p, 0)); transition-delay: 0s; }
.tk-row[data-st='ready'] .tk-seg i { background: var(--grad-gold); box-shadow: 0 0 10px rgba(255, 180, 40, 0.7); }
.tk-frac { flex: none; font: 800 12px/1 var(--font); color: var(--text-3); white-space: nowrap; transition: color var(--t); }
.tk-row[data-st='ready'] .tk-frac { color: var(--gold); }

/* Кнопка справа: награда → «Проверить» → «Забрать» → галочка */
.tk-act {
  position: relative;
  overflow: hidden;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 36px;
  min-width: 62px;
  padding: 0 12px;
  border: 0;
  border-radius: 13px;
  font: 800 14px/1 var(--font);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #3b2200;
  background: var(--grad-gold);
  box-shadow: 0 6px 16px rgba(255, 159, 28, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform var(--t-fast) var(--spring), box-shadow var(--t), filter var(--t);
}
.tk-act .st { width: 17px; height: 17px; filter: drop-shadow(0 1px 1px rgba(120, 60, 0, 0.35)); }
.tk-act:active { transform: scale(0.9); }
.tk-act.claim::after,
.tk-act.check::after {
  content: '';
  position: absolute;
  top: 0;
  left: -70%;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-20deg);
  animation: shine 3.2s var(--ease) infinite;
  pointer-events: none;
}
.tk-act.claim { height: 40px; padding: 0 12px; gap: 6px; animation: tkGlow 1.8s ease-in-out infinite; }
.tk-act.claim small { padding: 3px 6px; border-radius: 8px; font: 800 11px/1 var(--font); background: rgba(59, 34, 0, 0.14); }
.tk-act.check { gap: 6px; color: #fff; background: var(--grad-primary); box-shadow: 0 6px 18px rgba(124, 58, 237, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
.tk-act.check .ico svg { width: 15px; height: 15px; display: block; }
.tk-act.done { width: 36px; min-width: 36px; padding: 0; border-radius: 50%; color: var(--green); background: rgba(70, 240, 143, 0.12); box-shadow: inset 0 0 0 1px rgba(70, 240, 143, 0.38); }
.tk-act.done .ico svg { width: 18px; height: 18px; stroke-width: 3; display: block; }
/* Идёт запрос: вместо текста — спиннер */
.tk-act.busy > *,
.tk-sh .btn.busy > * { opacity: 0; }
.tk-act.busy::before,
.tk-sh .btn.busy::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}

/* ---------- Шторки ---------- */
.tk-sheet .sheet-title { text-align: center; }
.tk-sh > p { margin: 0; }
.tk-sh-art { position: relative; width: 92px; height: 92px; margin: -2px auto 0; }
.tk-sh-art::before {
  content: '';
  position: absolute;
  inset: -10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.45), rgba(167, 139, 250, 0) 66%);
  animation: glow 2.8s ease-in-out infinite;
}
.tk-sh-art img { position: relative; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.5)); animation: floaty 3.4s ease-in-out infinite; }
.tk-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tk-steps li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 15px;
  background: var(--well);
  border: 1px solid var(--stroke);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-2);
  animation: fadeUp 0.5s var(--ease) both;
}
.tk-steps li:nth-child(2) { animation-delay: 70ms; }
.tk-steps li:nth-child(3) { animation-delay: 140ms; }
.tk-steps b {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: -2px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 800 11px/1 var(--font-d);
  color: #fff;
  background: var(--grad-primary);
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.45);
}
.tk-linkbox { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 6px 6px 6px 14px; border-radius: 16px; border: 1.5px dashed rgba(255, 197, 61, 0.5); background: rgba(255, 197, 61, 0.06); }
.tk-linkbox.none { justify-content: center; padding: 12px; border-color: var(--stroke-2); background: var(--well); color: var(--text-3); font-size: 13px; font-weight: 700; text-align: center; }
.tk-link { flex: 1; min-width: 0; }
.tk-linkbox .tk-link.mono { color: var(--gold); font-size: 12.5px; }
.tk-copy { color: var(--gold); border-color: rgba(255, 197, 61, 0.35); background: rgba(255, 197, 61, 0.1); }
.tk-inv { display: grid; gap: 10px; padding: 14px; border-radius: 18px; background: var(--well); border: 1px solid var(--stroke); }
.tk-inv .tk-bar { max-width: none; }
.tk-inv .tk-seg { height: 8px; }
.tk-inv b { font: 800 15px/1 var(--font-d); }
.tk-sh-done {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  border-radius: 16px;
  color: var(--green);
  background: rgba(70, 240, 143, 0.1);
  border: 1px solid rgba(70, 240, 143, 0.3);
  font-weight: 800;
}
.tk-sh-done .ico svg { width: 18px; height: 18px; stroke-width: 3; display: block; }
.tk-btn-amt { display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; border-radius: 10px; background: rgba(59, 34, 0, 0.14); font-size: 14px; }
.tk-btn-amt .st { width: 16px; height: 16px; }

/* Опрос */
.tk-poll { display: flex; flex-direction: column; gap: 12px; }
.tk-poll-q {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 10px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 197, 61, 0.13), rgba(255, 197, 61, 0.02));
  border: 1px solid rgba(255, 197, 61, 0.22);
}
.tk-poll-art { width: 54px; height: 54px; flex: none; }
.tk-poll-art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.45)); animation: floatyRot 4.4s ease-in-out infinite; }
.tk-poll-hint { margin: -2px 2px 0; }
.tk-opts { display: flex; flex-direction: column; gap: 8px; }
.tk-opt {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--stroke-2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: 800 14.5px/1.3 var(--font);
  text-align: left;
  transition: transform var(--t-fast) var(--ease), background var(--t), border-color var(--t), box-shadow var(--t);
}
button.tk-opt:active { transform: scale(0.98); }
.tk-opt-mark { position: relative; width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--stroke-2); transition: border-color var(--t), background var(--t), box-shadow var(--t); }
.tk-opt.sel { background: rgba(139, 92, 246, 0.2); border-color: rgba(167, 139, 250, 0.6); box-shadow: 0 6px 20px rgba(124, 58, 237, 0.25); }
.tk-opt.sel .tk-opt-mark { border-color: var(--violet-2); background: radial-gradient(circle, #fff 0 32%, var(--violet) 38% 100%); box-shadow: 0 0 10px rgba(167, 139, 250, 0.7); animation: pop 0.35s var(--spring); }
.tk-opt-t { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; }
.tk-opt.res { cursor: default; }
.tk-opt-fill { position: absolute; inset: 0; transform: scaleX(0); transform-origin: left center; background: linear-gradient(90deg, rgba(139, 92, 246, 0.36), rgba(139, 92, 246, 0.12)); transition: transform 0.9s var(--ease); }
.tk-opt.mine { border-color: rgba(255, 197, 61, 0.55); }
.tk-opt.mine .tk-opt-fill { background: linear-gradient(90deg, rgba(255, 197, 61, 0.38), rgba(255, 159, 28, 0.1)); }
.tk-opt-p { position: relative; flex: none; color: var(--text-2); }
.tk-opt.mine .tk-opt-p { color: var(--gold); }
.tk-opt-me { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; border-radius: 50%; color: #3b2200; background: var(--grad-gold); }
.tk-opt-me svg { width: 12px; height: 12px; stroke-width: 3; display: block; }

/* ---------- Эффекты награды (поверх всего) ---------- */
.tk-fly { position: fixed; left: 0; top: 0; z-index: 400; width: 30px; height: 30px; pointer-events: none; will-change: transform, opacity; }
.tk-fly img { width: 100%; height: 100%; filter: drop-shadow(0 3px 8px rgba(255, 150, 20, 0.6)); }
.tk-burst { position: fixed; z-index: 399; width: 0; height: 0; pointer-events: none; }
.tk-burst::before {
  content: '';
  position: absolute;
  left: -30px;
  top: -30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(255, 214, 102, 0.85);
  animation: tkRing 0.6s var(--ease) forwards;
}
.tk-burst i {
  position: absolute;
  left: -3px;
  top: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffd34d;
  box-shadow: 0 0 8px rgba(255, 190, 40, 0.9);
  animation: tkSpark 0.75s var(--ease) forwards;
}
.tk-plus {
  position: fixed;
  z-index: 401;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  white-space: nowrap;
  font: 800 19px/1 var(--font-d);
  color: #ffd34d;
  text-shadow: 0 2px 14px rgba(255, 160, 20, 0.65);
  animation: tkPlus 1.1s var(--ease) forwards;
}
.tk-plus .st { width: 20px; height: 20px; }

/* ---------- Узкие экраны ---------- */
@media (max-width: 380px) {
  .tk-row { gap: 10px; padding: 11px 10px 11px 11px; }
  .tk-row .ic-tile { width: 42px; height: 42px; border-radius: 14px; }
  .tk-name { font-size: 14px; }
  .tk-act.claim small { display: none; }
  .tk-bar { max-width: 120px; }
  .tk-hero { gap: 12px 14px; padding: 14px; }
  .tk-ring { width: 64px; height: 64px; }
  .tk-ring-num b { font-size: 17px; }
  .tk-earned { font-size: 21px; }
  .tk-hero-info { padding-right: 40px; }
}

/* ---------- Админка ---------- */
.tk-ad { display: flex; flex-direction: column; gap: 14px; }
.tk-ad-pane { display: flex; flex-direction: column; gap: 12px; }
.tk-ad-pane > .skel { border-radius: 18px; }
.tk-ad-bot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: #b9f9d3;
  background: rgba(70, 240, 143, 0.08);
  border: 1px solid rgba(70, 240, 143, 0.28);
}
.tk-ad-bot.off { color: #ffe3a3; background: rgba(255, 197, 61, 0.08); border-color: rgba(255, 197, 61, 0.3); }
.tk-ad-bot .ico { flex: none; }
.tk-ad-bot .ico svg { width: 18px; height: 18px; display: block; }
.tk-ad-list { display: flex; flex-direction: column; gap: 8px; }
.tk-ad-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border-radius: 18px;
  border: 1px solid rgba(var(--tc), 0.22);
  background: radial-gradient(120% 140% at 0% 50%, rgba(var(--tc), 0.16), rgba(var(--tc), 0) 55%), var(--grad-card);
  color: var(--text);
  text-align: left;
  transition: transform var(--t-fast) var(--ease), border-color var(--t), opacity var(--t);
}
.tk-ad-row:active { transform: scale(0.985); }
.tk-ad-row.off { opacity: 0.55; }
.tk-ad-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tk-ad-name { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; font-weight: 800; }
.tk-ad-name > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-ad-off { flex: none; padding: 3px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800; color: var(--text-3); background: rgba(255, 255, 255, 0.07); border: 1px solid var(--stroke); }
.tk-ad-meta { font-size: 12px; font-weight: 700; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-ad-warn { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: #ffcf6b; }
.tk-ad-warn .ico { flex: none; }
.tk-ad-warn .ico svg { width: 13px; height: 13px; display: block; }
.tk-ad-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.tk-ad-rew { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: 10px; font: 800 12.5px/1 var(--font); color: #3b2200; background: var(--grad-gold); }
.tk-ad-rew .st { width: 14px; height: 14px; }
.tk-ad-stat { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; color: var(--text-2); white-space: nowrap; }
.tk-ad-stat .ico svg { width: 13px; height: 13px; display: block; }
.tk-ad-stat small { color: var(--text-3); font-weight: 700; }

/* Редактор задания */
.tk-ad-form { gap: 14px; }
.tk-ad-prev-wrap { display: grid; gap: 8px; padding: 12px; border-radius: 20px; background: var(--well); border: 1px dashed var(--stroke-2); }
.tk-ad-prev { pointer-events: none; }
.tk-ad-langs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tk-ad-lang { position: relative; display: block; }
.tk-ad-lang .input { padding-left: 44px; }
.tk-ad-lang b {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 5px;
  border-radius: 6px;
  font: 800 10.5px/1 var(--font);
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}
.tk-ad-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tk-ad-icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 6px;
  max-height: 188px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border-radius: 16px;
  background: var(--well);
  border: 1px solid var(--stroke);
}
.tk-ad-ic {
  height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-2);
  transition: transform var(--t-fast) var(--spring), background var(--t), color var(--t), border-color var(--t), box-shadow var(--t);
}
.tk-ad-ic svg { width: 20px; height: 20px; display: block; }
.tk-ad-ic:active { transform: scale(0.88); }
.tk-ad-ic.on { color: #fff; background: rgba(139, 92, 246, 0.35); border-color: rgba(167, 139, 250, 0.7); box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35); }
.tk-ad-colors { display: flex; flex-wrap: wrap; gap: 9px; }
.tk-ad-sw {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform var(--t-fast) var(--spring), box-shadow var(--t);
}
.tk-ad-sw:active { transform: scale(0.88); }
.tk-ad-sw.on { transform: scale(1.06); box-shadow: 0 0 0 2px #150d2f, 0 0 0 4px #fff, inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.tk-ad-actions { display: grid; gap: 8px; margin-top: 2px; }

/* Редактор опроса */
.tk-ad-opt { display: grid; gap: 8px; padding: 12px; border-radius: 18px; background: var(--well); border: 1px solid var(--stroke); animation: fadeUp 0.4s var(--ease) both; }
.tk-ad-opt-head { display: flex; align-items: center; gap: 10px; }
.tk-ad-opt-head b { flex: 1; min-width: 0; font-size: 13px; }
.tk-ad-opt-head .icon-btn { width: 34px; height: 34px; border-radius: 11px; }
.tk-ad-opt-head .icon-btn svg { width: 17px; height: 17px; }
.tk-ad-opt-head .icon-btn:disabled { opacity: 0.35; }
.tk-ad-votes { font-size: 12px; font-weight: 800; color: var(--text-2); font-variant-numeric: tabular-nums; }
.tk-ad-vbar { height: 5px; border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, 0.08); }
.tk-ad-vbar i { display: block; height: 100%; border-radius: inherit; background: var(--grad-gold); transform-origin: left center; transition: transform 0.8s var(--ease); }
.tk-ad-note {
  display: flex;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.25);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-2);
}
.tk-ad-note .ico { flex: none; color: var(--violet-2); }
.tk-ad-note .ico svg { width: 18px; height: 18px; display: block; }
.tk-ad-kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--stroke); font-size: 13px; }
.tk-ad-kv:last-child { border-bottom: 0; }
.tk-ad-kv span { flex: none; color: var(--text-3); font-weight: 700; }
.tk-ad-kv b { min-width: 0; overflow-wrap: anywhere; text-align: right; }
@media (max-width: 380px) {
  .tk-ad-langs,
  .tk-ad-two { grid-template-columns: 1fr; }
}

/* ---------- Анимации раздела ---------- */
@keyframes tkBadge { 0%, 100% { box-shadow: 0 4px 12px rgba(255, 159, 28, 0.35); } 50% { box-shadow: 0 4px 20px rgba(255, 159, 28, 0.75); } }
@keyframes tkSweep { 0%, 100% { background-position: 120% 0; } 50% { background-position: -20% 0; } }
@keyframes tkNudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2px); } }
@keyframes tkRingGlow { 0%, 100% { filter: drop-shadow(0 0 4px rgba(255, 180, 40, 0.5)); } 50% { filter: drop-shadow(0 0 11px rgba(255, 180, 40, 0.95)); } }
@keyframes tkBorder { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes tkWobble { 0%, 68%, 100% { transform: none; } 74% { transform: rotate(-8deg) scale(1.06); } 80% { transform: rotate(7deg) scale(1.06); } 86% { transform: rotate(-4deg); } 92% { transform: rotate(2deg); } }
@keyframes tkTileGlow { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.85; } }
@keyframes tkGlow {
  0%, 100% { box-shadow: 0 6px 16px rgba(255, 159, 28, 0.3), 0 0 0 0 rgba(255, 197, 61, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
  50% { box-shadow: 0 8px 22px rgba(255, 159, 28, 0.45), 0 0 0 7px rgba(255, 197, 61, 0), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
}
@keyframes tkSpark { from { transform: rotate(var(--a)) translateX(0) scale(1); opacity: 1; } to { transform: rotate(var(--a)) translateX(var(--d, 44px)) scale(0.2); opacity: 0; } }
@keyframes tkRing { from { transform: scale(0.3); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
@keyframes tkPlus {
  0% { transform: translate(-50%, 4px) scale(0.6); opacity: 0; }
  25% { transform: translate(-50%, -14px) scale(1.12); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(-50%, -48px) scale(1); opacity: 0; }
}
