/* Crypto Navigator — дизайн-система Mini App.
   Бренд: чёрный терминал, бычий лайм и медвежий красный из логотипа CN.
   Мотив — свеча: прогресс фарма, серия бонусов, индикатор вкладки. */

:root {
  --ink: #07090e;
  --ink-2: #0b0f16;
  --panel: #0f141c;
  --panel-2: #151c27;
  --panel-3: #1c2532;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #eef2f6;
  /* описания под белыми заголовками: светлый и почти нейтральный — тёмный холодный серый рядом с белым режет глаз */
  --muted: #a6afbe;
  --dim: #7b8596;

  --bull: #a8e830;
  --bull-2: #86bc22;
  --bull-ink: #0c1404;
  --bull-soft: rgba(168, 232, 48, .12);
  --bull-glow: rgba(168, 232, 48, .38);
  --bear: #f01018;
  --bear-2: #c81010;
  --bear-soft: rgba(240, 16, 24, .12);
  --bear-glow: rgba(240, 16, 24, .35);
  /* жёлтый — прогресс серии «Бонуса дня»: не путается с лаймом выполненного и красным падения */
  --gold: #ffd84d;
  --gold-2: #ffb347;
  --gold-glow: rgba(255, 210, 77, .45);

  --r-s: 10px;
  --r-m: 14px;
  --r-l: 20px;
  --r-xl: 26px;

  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);

  --f-display: "Russo One", "Onest", system-ui, sans-serif;
  --f-body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --tabs-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; overscroll-behavior: none; }
body {
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at -10% -10%, rgba(168, 232, 48, .10), transparent 60%),
    radial-gradient(90% 50% at 110% 110%, rgba(240, 16, 24, .08), transparent 60%),
    var(--ink);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.45 var(--f-body);
  font-variant-numeric: tabular-nums;
  /* у Russo One одно начертание: «жирный» браузер дорисовывал бы сам и размазывал буквы */
  font-synthesis: none;
  padding-bottom: calc(var(--tabs-h) + var(--safe-b));
}
/* сетка терминала — едва заметная, только атмосфера */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}
a { color: var(--bull); text-decoration: none; }
button { font: inherit; color: inherit; }
button, [role="button"], .tap, .chip, .tabs a, .seg button {
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
img { display: block; max-width: 100%; height: auto; }   /* width/height в разметке не должны растягивать картинку */
h1, h2, h3 { margin: 0; font-weight: 400; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.display { font-family: var(--f-display); letter-spacing: .01em; }
.up { color: var(--bull); }
.down { color: var(--bear); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.xs { font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------------- шапка ---------------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(7, 9, 14, .92), rgba(7, 9, 14, .78));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.hdr-back { flex-shrink: 0; display: grid; place-items: center; width: 36px; height: 36px; margin-right: -2px; padding: 0;
  border: 1px solid var(--line-2); border-radius: 50%; background: var(--panel-2); color: var(--text); cursor: pointer;
  transition: transform 140ms var(--ease-out), background 140ms var(--ease-out); }
.hdr-back[hidden] { display: none; }
.hdr-back svg { width: 18px; height: 18px; }
.hdr-back:active { transform: scale(.92); background: var(--panel-3); }
.hdr-back:focus-visible { outline: 2px solid var(--bull); outline-offset: 2px; }
.brand { display: flex; align-items: center; gap: 9px; margin-right: auto; color: var(--text); }
.brand img { width: 34px; height: 28px; }
.brand b { font-family: var(--f-display); font-weight: 400; font-size: 15px; line-height: 1.1; letter-spacing: .01em; }
.brand small { display: block; font-size: 11px; color: var(--muted); font-family: var(--f-body); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px 0 7px;
  border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2);
  font-weight: 700; font-size: 14px; cursor: pointer; transition: transform 140ms var(--ease-out);
}
.pill:active { transform: scale(.96); }
.pill svg { width: 20px; height: 20px; }

/* ---------------- экран ---------------- */
.view { max-width: 640px; margin: 0 auto; padding: 14px 16px 24px; }
.view > * + * { margin-top: 14px; }
.page-in { animation: pageIn 280ms var(--ease-out) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 22px 2px 10px; }
.sec-h h2 { font-family: var(--f-display); font-size: 18px; }
.sec-h .act { font-size: 14px; color: var(--muted); cursor: pointer; }

.card {
  position: relative; border-radius: var(--r-l); padding: 16px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
}
.card.flat { background: var(--panel); }
.card.tight { padding: 12px; }
.card.glow-bull { border-color: rgba(168, 232, 48, .35); box-shadow: 0 0 0 1px rgba(168, 232, 48, .08), 0 18px 50px -20px var(--bull-glow); }

.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stack > * + * { margin-top: 10px; }
.hscroll {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -16px; padding: 2px 16px; scroll-padding-inline: 16px; scrollbar-width: none; overscroll-behavior-x: contain;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; }
@media (hover: hover) and (pointer: fine) { .hscroll { cursor: grab; } }
.hscroll.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.hscroll.dragging > * { pointer-events: none; }

/* Полосы прокрутки (видны на ПК): тонкие, скруглённые, в цвет темы, а не системные серые */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .28); }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .16) transparent; }
}

/* ---------------- кнопки ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border: 0; border-radius: var(--r-m);
  font-weight: 700; font-size: 15px; cursor: pointer;
  background: var(--panel-3); color: var(--text);
  transition: transform 140ms var(--ease-out), background 160ms, box-shadow 200ms, opacity 160ms;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 0 13px; font-size: 14px; border-radius: 12px; }
.btn.bull { background: var(--bull); color: var(--bull-ink); }
.btn.bull.glow { box-shadow: 0 10px 30px -8px var(--bull-glow); }
.btn.bear { background: var(--bear); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line-2); }
.btn.soft { background: var(--bull-soft); color: var(--bull); }
.btn svg { width: 18px; height: 18px; }
/* кристалл на лаймовой кнопке — тёмный силуэт, иначе сливается с фоном */
.btn.bull svg, .btn.bull span svg { filter: saturate(0) brightness(.22); }
@media (hover: hover) and (pointer: fine) {
  .btn:not(:disabled):hover { filter: brightness(1.08); }
  .tap:hover { background: rgba(255, 255, 255, .03); }
  .ev-card.tap:hover, .li.tap:hover { background: none; }
  .ev-card.tap:hover::after, .li.tap:hover::after { background: rgba(255, 255, 255, .05); }
  .rs-tile:hover { background: rgba(255, 255, 255, .04); }
}

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; color: var(--text);
  transition: transform 120ms var(--ease-out), background 160ms, border-color 160ms;
}
.chip:active { transform: scale(.96); }
.chip.on { background: var(--bull-soft); border-color: rgba(168, 232, 48, .5); color: var(--bull); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip.lg-more { background: transparent; border-style: dashed; color: var(--muted); }    /* «Ещё N» в легенде графика */

.seg {
  display: flex; gap: 4px; padding: 4px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line);
}
.seg button {
  flex: 1; height: 38px; border: 0; border-radius: 10px; background: transparent;
  color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background 180ms var(--ease-out), color 180ms;
}
/* выбранный — зелёный, как выбранные чипы: на тёмной подложке одной светлоты мало, выбор терялся */
.seg button.on { background: var(--bull-soft); color: var(--bull); box-shadow: inset 0 0 0 1px rgba(168, 232, 48, .4); }
.seg.sm { padding: 3px; border-radius: 12px; }
.seg.sm button { height: 30px; font-size: 13px; border-radius: 9px; }
/* период, который ещё не набрался: серый, ниже — с какого числа */
.seg button.soon { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; color: var(--dim); }
.seg button.soon small { font-size: 10.5px; font-weight: 600; }
.seg.sm button.soon small { font-size: 9.5px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; background: var(--panel-3); color: var(--muted);
}
.badge.bull { background: var(--bull-soft); color: var(--bull); }
.badge.bear { background: var(--bear-soft); color: var(--bear); }
.badge.pro { background: linear-gradient(90deg, var(--bull), #d7ff7a); color: var(--bull-ink); }
/* срок Premium: сбоку от плашки, на узком экране — под ней, но справа */
.pro-side { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px 8px; flex: 0 1 auto; }
.pro-until { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.pro-until .l { display: inline-flex; align-items: center; gap: 4px; }
.pro-side .pro-until { flex-direction: column; align-items: flex-end; gap: 1px; }
.pro-until b { color: var(--bull); font-weight: 700; font-size: 13px; }
.pro-until svg { width: 13px; height: 13px; color: var(--bull); flex: none; }
.premium-card .pro-until { margin-top: 6px; }
@media (max-width: 430px) { .card > .pro-side { flex-direction: column; align-items: flex-end; } }

/* ---------------- списки ---------------- */
.list > .li + .li { border-top: 1px solid var(--line); }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.li .t { flex: 1; min-width: 0; }
.li .t b { display: block; font-weight: 600; }
.li .t span { display: block; font-size: 13px; color: var(--muted); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tap { cursor: pointer; border-radius: 12px; transition: background 140ms; }
.tap:active { background: rgba(255, 255, 255, .04); }
/* Строки списков: подсветка — отдельным слоем на 12px шире текста с каждой стороны,
   иначе текст прилипает к её краю. Сама строка и разделители не сдвигаются. */
.ev-card.tap, .li.tap { position: relative; isolation: isolate; }
.ev-card.tap::after, .li.tap::after {
  content: ""; position: absolute; inset: 0 -12px; z-index: -1; border-radius: 12px;
  transition: background 140ms; pointer-events: none;
}
.ev-card.tap:active, .li.tap:active { background: none; }
.ev-card.tap:active::after, .li.tap:active::after { background: rgba(255, 255, 255, .06); }
.ico {
  width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center;
  background: var(--panel-3); font-size: 19px;
}
.ico.bull { background: var(--bull-soft); color: var(--bull); }
.ico.bear { background: var(--bear-soft); color: var(--bear); }
.ico svg { width: 20px; height: 20px; }
.chev { color: var(--dim); width: 18px; height: 18px; flex: none; }

input, textarea, select {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; outline: none;
  transition: border-color 160ms;
}
input:focus, textarea:focus { border-color: rgba(168, 232, 48, .6); }
.field + .field { margin-top: 12px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }

/* ---------------- свеча (мотив из логотипа) ---------------- */
.candle { --p: 0; position: relative; width: 46px; height: 132px; flex: none; display: flex; flex-direction: column; align-items: center; }
.candle .wick { width: 3px; flex: 1; background: var(--bull-2); border-radius: 2px; opacity: .8; }
.candle .body {
  position: relative; width: 46px; height: 96px; border-radius: 8px; overflow: hidden;
  background: rgba(168, 232, 48, .08); border: 1.5px solid rgba(168, 232, 48, .45);
}
.candle .fill {
  position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--p) * 100%);
  background: linear-gradient(180deg, #c8ff5c, var(--bull) 40%, var(--bull-2));
  transition: height 900ms var(--ease-out);
}
.candle .fill::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: #f1ffd1; opacity: .8;
}
.candle.running .fill { min-height: 5px; }
.candle.running .fill::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, transparent 0%, rgba(241, 255, 209, .35) 50%, transparent 100%); background-size: 100% 200%;
  animation: liquid 2.2s linear infinite;
}
@keyframes liquid { from { background-position: 0 100%; } to { background-position: 0 -100%; } }
.candle.ready .body { border-color: var(--bull); box-shadow: 0 0 26px -2px var(--bull-glow); animation: candleBreath 2.4s ease-in-out infinite; }
.candle.idle .body { border-style: dashed; }
@keyframes candleBreath { 50% { box-shadow: 0 0 40px 2px var(--bull-glow); } }
/* запуск фарма: вспышка свечи; рост: кристалл всплывает с уровня заполнения (18px — верхний фитиль) */
.candle.flash .body { animation: candleFlash 800ms var(--ease-out); }
@keyframes candleFlash { 25% { border-color: var(--bull); box-shadow: 0 0 44px 10px var(--bull-glow); background: rgba(168, 232, 48, .3); } }
.candle .grow-gem {
  position: absolute; left: 50%; top: calc(18px + 96px * (1 - var(--p))); width: 15px; height: 15px; margin: -8px 0 0 -7px;
  pointer-events: none; filter: drop-shadow(0 0 6px var(--bull-glow)); animation: gemRise 1.7s ease-out forwards;
}
.candle .grow-gem svg, .fly-gem svg { width: 100%; height: 100%; display: block; }
@keyframes gemRise {
  0% { transform: translate(0, 6px) scale(.3); opacity: 0; }
  25% { transform: translate(calc(var(--dx) * .3), -8px) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), -52px) scale(.55); opacity: 0; }
}
/* полёт в баланс и искры — поверх всего, от левого верхнего угла, координаты задаёт JS */
.fly-gem { position: fixed; left: -10px; top: -10px; width: 20px; height: 20px; z-index: 95; pointer-events: none;
  filter: drop-shadow(0 0 8px var(--bull-glow)); }
.spark { position: fixed; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; z-index: 95; pointer-events: none;
  background: #e2ff9e; box-shadow: 0 0 10px 2px var(--bull-glow); }
.pill.bump { animation: walletBump 520ms var(--ease-out); }
@keyframes walletBump { 40% { transform: scale(1.14); border-color: var(--bull); box-shadow: 0 0 18px var(--bull-glow); } }
@media (prefers-reduced-motion: reduce) { .candle .grow-gem { display: none; } .candle.flash .body, .pill.bump { animation: none; } }

.streak-bar, .mini-candles { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.streak-bar { margin-bottom: 8px; }
.streak-bar i { height: 5px; border-radius: 3px; background: var(--line-2); }
.streak-bar i.on { background: linear-gradient(90deg, #ffe27a, var(--gold) 60%, var(--gold-2)); box-shadow: 0 0 12px var(--gold-glow); }
.mc { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mc .b {
  width: 100%; max-width: 34px; height: 30px; border-radius: 7px; border: 1.5px solid var(--line-2);
  background: var(--ink-2); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--muted);
}
.mc.done .b { background: linear-gradient(180deg, var(--bull), var(--bull-2)); border-color: transparent; color: var(--bull-ink); }
.mc.now .b { border-color: var(--bull); color: var(--bull); box-shadow: 0 0 18px -4px var(--bull-glow); animation: candleBreath 2.4s ease-in-out infinite; }
.mc em { font-style: normal; font-size: 11px; color: var(--muted); }

/* ---------------- главный экран ---------------- */
/* герой: маскот целиком (голова не уходит под шапку), реплика тянется к его голове */
.hero { position: relative; display: flex; align-items: flex-start; gap: 4px; padding-top: 4px; }
.hero .bubble { flex: 1; margin-top: 18px; }
.hero .mascot {
  position: relative; flex: none; width: 128px; margin: 0 -10px 0 0; cursor: pointer;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .5));
  -webkit-mask-image: linear-gradient(180deg, #000 74%, transparent 100%); mask-image: linear-gradient(180deg, #000 74%, transparent 100%);
  animation: mascotIn 700ms var(--ease-out) both, float 4.6s 700ms ease-in-out infinite;
}
.hero .mascot.wiggle { animation: wiggle 520ms var(--ease-out), float 4.6s ease-in-out infinite; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes mascotIn { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes wiggle { 30% { transform: rotate(-5deg) scale(1.03); } 60% { transform: rotate(4deg); } }
.bubble {
  position: relative; padding: 13px 15px; border-radius: 18px 6px 18px 18px;
  background: var(--panel-2); border: 1px solid var(--line-2); font-size: 14px; line-height: 1.4;
  animation: bubbleIn 500ms 250ms var(--ease-out) both;
}
.bubble b { color: var(--bull); font-weight: 700; }
.bubble::after {
  content: ""; position: absolute; right: -7px; top: 16px; width: 14px; height: 14px;
  background: var(--panel-2); border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  transform: rotate(-45deg);
}
@keyframes bubbleIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.farm { display: flex; gap: 18px; align-items: center; }
.farm .amt { font-family: var(--f-display); font-size: 40px; line-height: 1; }
.farm .amt small { font-family: var(--f-body); font-size: 15px; color: var(--muted); font-weight: 600; }
.farm .timer { font-size: 14px; color: var(--muted); margin-top: 6px; }
.farm .rate { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.farm .amt #farm-amt { font-variant-numeric: tabular-nums; }
button.badge { border: 0; cursor: pointer; font-family: inherit; transition: transform 140ms var(--ease-out); }
button.badge:active { transform: scale(.94); }
.badge svg { width: 12px; height: 12px; }
.badge.lock { background: var(--panel-3); color: var(--text); }
.badge.fire { background: rgba(255, 138, 61, .16); color: #ffab6e; }

.tickers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tk { padding: 12px 14px; border-radius: var(--r-m); background: var(--panel); border: 1px solid var(--line); cursor: pointer; transition: transform 140ms var(--ease-out); }
.tk:active { transform: scale(.97); }
.tk .c { font-weight: 700; font-size: 13px; color: var(--muted); }
.tk .p { font-family: var(--f-display); font-size: 19px; margin: 4px 0 2px; }
.tk .d { font-size: 13px; font-weight: 700; }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.qa { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 4px; border-radius: var(--r-m); background: var(--panel); border: 1px solid var(--line); cursor: pointer; font-size: 12px; text-align: center; color: var(--text); transition: transform 140ms var(--ease-out); }
.qa:active { transform: scale(.96); }
.qa .ico { width: 42px; height: 42px; }

/* зачем навигатор: боль -> решение */
.why { padding-top: 2px; padding-bottom: 4px; }
.why-card {
  width: 248px; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--r-l);
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line);
}
.why-card p { margin: 0; }
.why-card .pain { font-size: 13px; line-height: 1.35; color: var(--muted); padding-left: 18px; position: relative;
  min-height: 2.7em; }  /* две строки: «решение» во всех карточках начинается на одной высоте */
.why-card .pain::before { content: "✕"; position: absolute; left: 0; top: 0; color: var(--bear); font-weight: 800; }
.why-card .gain { flex: 1; font-weight: 700; font-size: 14.5px; line-height: 1.35; padding-left: 18px; position: relative; }
.why-card .gain::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--bull); font-weight: 800; }
.why-card .btn { align-self: flex-start; margin-top: 2px; }

.news-li a { color: var(--text); font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------- заработать ---------------- */
.balance-hero { text-align: center; padding: 22px 16px 18px; overflow: hidden; }
.balance-hero .mascot { width: 120px; margin: -6px auto 4px; }
.balance-hero .big { font-family: var(--f-display); font-size: 46px; line-height: 1.05; display: inline-flex; align-items: center; gap: 10px; }
.balance-hero .big svg { width: 38px; height: 38px; }
.balance-hero .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }

.task { display: flex; align-items: center; gap: 12px; padding: 14px 0; }
.task + .task { border-top: 1px solid var(--line); }
.task > .ico { align-self: flex-start; margin-top: 2px; }
.task > .btn, .task > .badge { flex-shrink: 0; }
.task > .btn.sm { padding: 0 12px; font-size: 13.5px; }
.task .t { flex: 1; min-width: 0; }
.task .t b { display: block; font-weight: 700; font-size: 15px; line-height: 1.3; text-wrap: balance; }
.task .t .d { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 13px; line-height: 1.35; color: var(--muted); margin-top: 2px; }
.task .t > span:not(.d):not(.reward) { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.task .t .reward { display: flex; margin-top: 5px; }
.reward { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: var(--bull); font-size: 14px; }
.reward svg { width: 16px; height: 16px; }
.task.done { opacity: .55; }
.progress { height: 6px; border-radius: 999px; background: var(--ink-2); overflow: hidden; margin-top: 7px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--bull-2), var(--bull)); border-radius: inherit; transition: width 600ms var(--ease-out); }

.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.shop-tile {
  display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--r-l);
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line);
}
.shop-tile.pro {
  border-color: rgba(168, 232, 48, .28);
  background: radial-gradient(120% 70% at 100% 0%, rgba(168, 232, 48, .14), transparent 62%), linear-gradient(180deg, var(--panel-2), var(--panel));
}
.shop-tile .ico { width: 36px; height: 36px; }
.shop-tile .lim { font-size: 11.5px; color: var(--muted); }
.shop-tile b { font-size: 15px; line-height: 1.25; margin-top: 4px; }
.shop-tile .d { flex: 1; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.shop-tile .progress { margin: 2px 0 0; }
.shop-tile .btn { margin-top: 4px; padding: 0 8px; font-size: 13.5px; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.packs .plan { flex-direction: column; align-items: flex-start; gap: 2px; }
.price { display: inline-flex; align-items: center; gap: 5px; font-family: var(--f-display); font-size: 17px; }
.price svg { width: 18px; height: 18px; }

.lb-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.lb-row + .lb-row { border-top: 1px solid var(--line); }
.lb-row .rk {
  width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 10px;
  font-family: var(--f-display); font-size: 14px; color: var(--muted); background: var(--panel-3);
}
.lb-row .rk.r1 { background: linear-gradient(180deg, #ffe27a, #d9a520); color: #2b1d00; }
.lb-row .rk.r2 { background: linear-gradient(180deg, #f1f4f8, #a9b3c1); color: #1a1f27; }
.lb-row .rk.r3 { background: linear-gradient(180deg, #ffb27a, #c86a2a); color: #2a1200; }
.lb-row.me { background: var(--bull-soft); border-radius: 12px; padding-left: 8px; padding-right: 8px; margin: 0 -8px; }

.invite { overflow: hidden; }
.invite .mascot { position: absolute; right: -12px; bottom: -14px; width: 118px; opacity: .95; }
.invite .t { padding-right: 96px; }

/* ---------------- кабинет ---------------- */
.avatar {
  width: 56px; height: 56px; border-radius: 18px; flex: none; overflow: hidden;
  background: radial-gradient(circle at 50% 70%, rgba(168, 232, 48, .35), var(--panel-3));
  border: 1px solid var(--line-2);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.premium-card { overflow: hidden; }
.premium-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(80% 60% at 100% 0%, rgba(168, 232, 48, .16), transparent 60%);
}
.plan {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: var(--r-m); text-align: left;
  background: var(--ink-2); border: 1px solid var(--line); cursor: pointer; transition: transform 140ms var(--ease-out), border-color 160ms;
}
.plan:active { transform: scale(.98); }
.plan.on { border-color: var(--bull); background: var(--bull-soft); box-shadow: 0 0 0 1px var(--bull) inset; }

/* ---------------- окно подтверждения (confirmBox) ---------------- */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; }
.modal .bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .65); animation: fade 200ms var(--ease-out) both; }
.modal-card {
  position: relative; width: min(380px, 100%); max-height: calc(100dvh - 40px); overflow: auto; text-align: center;
  padding: 22px 18px 18px; animation: popIn 220ms var(--ease-out) both;
}
.modal-card .ico { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 16px; }
.modal-card .ico svg { width: 26px; height: 26px; }
.modal-card h2 { font-family: var(--f-display); font-size: 20px; line-height: 1.2; padding: 0 22px; }
.modal-x {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: var(--panel-2); color: var(--muted); font-size: 14px; cursor: pointer;
}
.modal-perks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 7px; text-align: left; }
.modal-perks li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.modal-perks svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--bull); }
.modal-price {
  display: inline-flex; align-items: center; gap: 8px; margin: 16px 0 2px;
  font-family: var(--f-display); font-size: 30px; color: var(--bull);
}
.modal-price svg { width: 26px; height: 26px; }
.modal-row { margin: 4px 0 0; }
.modal-row b { color: var(--text); }
.modal-act { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.modal-act.one { grid-template-columns: 1fr; }
.modal.closing .bg { animation: fade 180ms reverse both; }
.modal.closing .modal-card { animation: popIn 180ms reverse both; }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.95); } }
.plan b { font-size: 15px; }
.plan .price { margin-left: auto; font-size: 16px; flex: none; white-space: nowrap; }
.plan .price svg { width: 15px; height: 15px; vertical-align: -2px; }
.plan.short { opacity: .55; }
.sub-h { font-size: 13px; font-weight: 600; color: var(--muted); margin: 18px 2px 8px; }
.saved-note {
  display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; padding: 10px 12px; border-radius: var(--r-m);
  background: var(--bull-soft); font-size: 14px; line-height: 1.45;
}
.saved-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--bull); }
.saved-note.old { background: var(--panel-2); color: var(--muted); }
.saved-note.old svg { color: var(--muted); }
.saved-note.old b { color: var(--text); }
.why-ts { font-size: 12.5px; font-weight: 400; margin-left: 6px; color: var(--muted); }
.modal-perks + .modal-row { margin-top: 14px; }
.nowrap { white-space: nowrap; }
.meter { display: flex; gap: 6px; }
.meter i { flex: 1; height: 8px; border-radius: 999px; background: var(--ink-2); border: 1px solid var(--line); }
.meter i.on { background: var(--bear); border-color: transparent; box-shadow: 0 0 12px -2px var(--bear-glow); }

/* ---------------- рынок, график, лента ---------------- */
.stat { padding: 12px; border-radius: var(--r-m); background: var(--panel); border: 1px solid var(--line); text-align: center; }
.stat .v { font-family: var(--f-display); font-size: 20px; }
.stat .l { font-size: 12px; color: var(--muted); margin-top: 2px; }
.bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--ink-2); }
.bar .l { background: var(--bull); }    /* ликвидации: лонги — зелёные, шорты — красные, как стороны сделки */
.bar .s { background: var(--bear); }
.gauge { width: 100%; max-width: 110px; margin: 0 auto; color: var(--text); }

#chart { height: 360px; }
/* загрузка графика: прежний график (или его снимок) тускнеет, по центру значок; первое открытие — рамка */
.chart-wrap { position: relative; }
.chart-wrap.first #chart { border: 1px solid var(--line); border-radius: var(--r-m); background: var(--panel); }
.chart-wrap #chart { transition: opacity 200ms var(--ease-out); }
.chart-wrap.loading #chart { opacity: .35; }
.chart-wrap.first.loading #chart { opacity: 1; }
.chart-spin { position: absolute; inset: 0; z-index: 6; display: none; place-items: center; pointer-events: none; }
.chart-spin .loader { margin: 0; }
.chart-wrap.loading .chart-spin { display: grid; }
.chart-snap { position: absolute; inset: 0; width: 100%; height: 100%; }
#chart.swap > div:first-child { animation: chartIn 260ms var(--ease-out) both; }
@keyframes chartIn { from { opacity: .35; } }
.coinbar { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.coinbar .name { font-family: var(--f-display); font-size: 26px; }
.coinbar .pr { font-family: var(--f-display); font-size: 20px; }
.search { position: relative; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--dim); }
.search input { padding-left: 40px; }
.dropdown { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 10; max-height: 320px; overflow: auto; border-radius: var(--r-m); background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: 0 20px 40px rgba(0, 0, 0, .5); }
.dropdown .li { padding: 11px 14px; }
.coin-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip-x { display: inline-flex; align-items: center; gap: 2px; padding: 3px 3px 3px 11px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--panel-2); border: 1px solid var(--line); }
.chip-x button { width: 24px; height: 24px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 11px; cursor: pointer; }
.chip-x button:hover { background: var(--panel-3); color: var(--text); }
/* спреды между биржами */
.sp-row .t b .xs { display: inline; font-weight: 500; }
.sp-row .t b .up { color: var(--bull); }
.kimchi { margin-top: 10px; }
.kimchi .chips { margin-top: 6px; }

/* сила к биткоину */
.rs-sum { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; color: var(--muted); }
.rs-sum b { color: var(--text); font-family: var(--f-display); font-weight: 400; font-size: 20px; }
.rs-meter { height: 6px; border-radius: 999px; background: var(--bear-soft); overflow: hidden; margin: 8px 0; }
.rs-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--bull-2), var(--bull)); }
.rs-h { display: flex; align-items: baseline; gap: 6px; margin: 12px 0 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.rs-h span { color: var(--dim); }
.rs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; }
/* одинаковые квадратики без заливки: тикер и на сколько монета обогнала BTC (зелёным) или отстала (красным) */
.rs-tile {
  aspect-ratio: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 4px; border-radius: 12px; border: 1px solid var(--line-2); transition: background 140ms;
}
.rs-tile b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700;
  color: var(--text); }  /* тикер белый в обеих группах, цветной — только процент */
.rs-tile span { font-size: 12px; font-weight: 700; }
.rs-tile.up { border-color: rgba(168, 232, 48, .35); }
.rs-tile.up span { color: var(--bull); }
.rs-tile.dn { border-color: rgba(240, 16, 24, .35); }
.rs-tile.dn span { color: var(--bear); }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.info-grid .wide { grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid var(--line); }
.kv { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.kv > span { font-size: 12.5px; color: var(--muted); }
.kv > b { font-family: var(--f-display); font-size: 19px; font-weight: 400; line-height: 1.15; }
.kv > b em { display: block; font-style: normal; font-family: var(--f-body); font-size: 12px; font-weight: 700; margin-top: 3px; }
.chip.sm { height: 28px; padding: 0 10px; font-size: 12px; cursor: default; }
.chip.sm b { font-weight: 700; }
.ev { border-left: 3px solid var(--bull); padding: 8px 12px; margin: 8px 0; border-radius: 0 12px 12px 0; background: var(--panel); }
.ev-card { padding: 12px 0; }
.ev-card + .ev-card { border-top: 1px solid var(--line); }
.ev-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ev-title { font-weight: 600; }
.ev-body { margin-top: 8px; font-size: 14px; color: var(--text); white-space: pre-wrap; }
.ev-coins { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------------- настройки ---------------- */
.cat { display: flex; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; }
.cat + .cat { border-top: 1px solid var(--line); }
.cat .t { flex: 1; min-width: 0; }
.cat .t b { font-weight: 600; }
.cat .t .d { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat .t .badge { margin-left: 4px; vertical-align: 1px; height: 20px; }
.cat.soon { cursor: default; opacity: .6; }
.sw { position: relative; width: 48px; height: 30px; flex: none; }
.sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sw span { position: absolute; inset: 0; border-radius: 999px; background: var(--panel-3); border: 1px solid var(--line-2); transition: background 200ms var(--ease-out); pointer-events: none; }
.sw span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #d7dde6; transition: transform 220ms var(--ease-out), background 200ms; }
.sw input:checked + span { background: var(--bull); border-color: transparent; }
.sw input:checked + span::after { transform: translateX(18px); background: var(--bull-ink); }
.sw input:focus-visible + span { outline: 2px solid var(--bull); outline-offset: 2px; }
.acc-h { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.acc-h h3 { font-family: var(--f-display); font-size: 16px; }
.slot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-3); border: 2px solid transparent; cursor: pointer; }
.slot.on { border-color: var(--bull); }
.slot.off { opacity: .35; }

/* ---------------- нижние вкладки ---------------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; height: calc(var(--tabs-h) + var(--safe-b)); padding: 0 6px var(--safe-b);
  background: rgba(10, 13, 19, .88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabs a {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--dim); font-size: 11px; font-weight: 600; transition: color 160ms;
}
.tabs a svg { width: 24px; height: 24px; transition: transform 200ms var(--ease-out); }
.tabs a.on { color: var(--bull); }
.tabs a.on svg { transform: translateY(-1px); }
.tabs a.on::before { /* фитиль свечи над активной вкладкой */
  content: ""; position: absolute; top: 0; left: 50%; width: 3px; height: 10px; margin-left: -1.5px;
  border-radius: 0 0 2px 2px; background: var(--bull); box-shadow: 0 0 10px var(--bull-glow);
}
.tabs a .dot { position: absolute; top: 12px; left: calc(50% + 9px); width: 8px; height: 8px; background: var(--bear); box-shadow: 0 0 0 2px #0a0d13; }

/* ---------------- шторка, тост, конфетти ---------------- */
/* подсказка под легендой графика: отдельной строкой ниже меток и читаемым цветом */
.chart-hint { margin: 10px 2px 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.why-hint { margin: 10px 2px 0; font-size: 14px; line-height: 1.45; color: var(--text); }

/* значок «i» и его подсказка (логика — core.js) */
.tip {
  position: relative; display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 7px;
  border-radius: 50%; border: 1px solid var(--line-2); color: var(--muted); font: 700 11px/1 var(--f-body);
  font-style: normal; letter-spacing: 0; vertical-align: 2px; cursor: help; user-select: none;
}
.tip::before { content: ""; position: absolute; inset: -10px; }   /* пальцем попасть проще, чем в 17px */
.tip:hover, .tip:focus-visible { color: var(--text); border-color: var(--muted); }
.seg button .tip { margin-left: 5px; vertical-align: 1px; }
.seg button .tip::before { inset: -4px; }       /* во вкладке зона «i» меньше: остальная кнопка переключает вкладку */
/* вкладки спредов: у всех четырёх «i» — значок мельче и вкладки плотнее, чтобы влезло на телефоне 360 px */
.sp-kinds button { padding: 0 2px; white-space: nowrap; font-size: 13.5px; }
.sp-kinds button .tip { width: 14px; height: 14px; margin-left: 3px; font-size: 9px; }
.tip-pop {
  position: fixed; z-index: 70; max-width: min(300px, calc(100vw - 16px)); padding: 10px 12px; border-radius: 12px;
  background: var(--panel-3); border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  font-size: 13px; line-height: 1.4; color: var(--text); pointer-events: none; animation: fade 140ms var(--ease-out) both;
}
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet .bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); animation: fade 220ms var(--ease-out) both; }
/* Рамка шторки не прокручивается — прокручивается .scroll внутри: полоса прокрутки остаётся в скруглённой
   рамке, а «ручка» сверху не уезжает вместе с текстом. */
.sheet .body {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 640px; margin: 0 auto; max-height: 90dvh;
  display: flex; flex-direction: column; overflow: hidden; padding-top: 10px; border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line-2); border-bottom: 0;
  animation: sheetUp 320ms var(--ease-drawer) both;
}
.sheet .scroll {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 0 12px calc(22px + var(--safe-b)) 18px; margin-right: 6px;   /* справа место под тонкую полосу */
}
.sheet .grip { width: 42px; height: 5px; border-radius: 999px; background: var(--line-2); margin: 0 auto 14px; }
.sheet h2 { font-family: var(--f-display); font-size: 21px; margin-bottom: 6px; }
.sheet.closing .bg { animation: fade 200ms reverse both; }
.sheet.closing .body { animation: sheetUp 220ms var(--ease-out) reverse both; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabs-h) + var(--safe-b) + 14px); z-index: 60;
  transform: translateX(-50%); max-width: calc(100vw - 32px);
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px;
  background: rgba(28, 37, 50, .96); border: 1px solid var(--line-2); box-shadow: 0 20px 40px rgba(0, 0, 0, .45);
  font-size: 14px; font-weight: 600; animation: toastIn 260ms var(--ease-out) both;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; }

.reward-pop { text-align: center; padding: 6px 4px 4px; }
.reward-pop .mascot { width: 180px; margin: -10px auto 0; }
.reward-pop .amount { font-family: var(--f-display); font-size: 44px; color: var(--bull); display: inline-flex; align-items: center; gap: 10px; }
.reward-pop .amount svg { width: 36px; height: 36px; }

.empty { text-align: center; padding: 26px 12px; color: var(--muted); }
.empty img { width: 130px; margin: 0 auto 8px; opacity: .9; }
.feed-few { margin-top: 10px; padding: 12px; border-radius: var(--r-m); background: var(--panel-2); text-align: center; font-size: 14px; color: var(--muted); }
.feed-few p { margin: 0 0 10px; }
.empty .row .btn, .feed-few .row .btn { flex: 0 0 auto; }

.skel { border-radius: var(--r-m); background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------- онбординг ---------------- */
html.lock, html.lock body { overflow: hidden; overscroll-behavior: none; }
.onb {
  position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; background: var(--ink);
  padding: 16px 22px calc(18px + var(--safe-b)); overflow: hidden; overscroll-behavior: none; touch-action: none;
}
.onb::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 45% at 50% 38%, rgba(168, 232, 48, .16), transparent 70%); pointer-events: none; }
.onb .slides { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.onb .float-wrap { position: relative; margin: 0 auto 10px; }
.onb .mascot {
  height: min(36dvh, 290px); width: auto; max-width: 78vw; margin: 0 auto; position: relative; z-index: 1;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
  animation: mascotIn 600ms var(--ease-out) both, float 4.6s 600ms ease-in-out infinite;
}
/* мягкая «площадка» под маскотом — он будто парит, а не обрезан */
.onb .shadow {
  position: absolute; left: 50%; bottom: 2%; width: 62%; height: 22px; margin-left: -31%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(168, 232, 48, .35), transparent); filter: blur(4px);
  animation: shadowPulse 4.6s 600ms ease-in-out infinite;
}
@keyframes shadowPulse { 50% { transform: scale(.82); opacity: .6; } }
.onb h1 { font-family: var(--f-display); font-size: clamp(22px, 6.4vw, 27px); line-height: 1.15; }
.onb p { color: var(--muted); font-size: 15px; max-width: 34ch; margin: 8px auto 0; }
.onb .dots { display: flex; gap: 6px; justify-content: center; margin: 14px 0; }
.onb .dots i { width: 7px; height: 7px; border-radius: 999px; background: var(--line-2); transition: width 240ms var(--ease-out), background 240ms; }
.onb .dots i.on { width: 22px; background: var(--bull); }
/* шаг со словариком: маскот меньше, чтобы три определения влезли на 360×640 */
.onb .mascot.sm { height: min(16dvh, 130px); }
.onb-terms { margin: 12px auto 0; max-width: 36ch; text-align: left; display: grid; gap: 8px; }
.onb-terms div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m); padding: 8px 12px; }
.onb-terms dt { font-weight: 700; color: var(--bull); font-size: 14px; }
.onb-terms dd { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.35; }
.onb-where {
  display: inline-flex; align-items: center; gap: 6px; margin: 12px auto 0; padding: 6px 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); font-size: 13px; color: var(--text);
}
.onb-where svg { width: 16px; height: 16px; color: var(--bull); flex: none; }
.onb-nav { display: flex; justify-content: space-between; margin-top: 8px; }
.onb-nav .btn { border: 0; }

/* ---------------- ошибки и загрузка ---------------- */
.loader { width: 34px; height: 34px; margin: 60px auto; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--bull); animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-text { white-space: pre-wrap; line-height: 1.55; }
table.stats { width: 100%; border-collapse: collapse; font-size: 13px; }
table.stats th, table.stats td { padding: 9px 4px; border-bottom: 1px solid var(--line); text-align: right; }
table.stats th:first-child, table.stats td:first-child { text-align: left; }
table.stats th { color: var(--muted); font-weight: 600; font-size: 12px; }

/* ---------------- Premium на главной и в шторке ---------------- */
.pro-teaser { margin-top: 12px; padding: 12px; border-radius: var(--r-m); background: var(--ink-2); border: 1px solid var(--line); position: relative; }
.pt-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }
.pt-row .xs { display: block; }
.pt-row .blur { display: block; min-width: 0; filter: blur(4.5px); user-select: none; -webkit-user-select: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-lock { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--bull); }
.pt-lock svg { width: 14px; height: 14px; }
.cmp { margin-top: 12px; font-size: 13px; }
.cmp-h, .cmp-r { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; align-items: center; padding: 7px 0; }
.cmp-h { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.cmp-r + .cmp-r { border-top: 1px solid var(--line); }
.cmp-r b svg { width: 16px; height: 16px; vertical-align: -3px; }
.pro-on .btn { flex: none; }
.perks { margin-top: 10px; }
.perk { display: flex; gap: 12px; padding: 10px 0; }
.perk + .perk { border-top: 1px solid var(--line); }
.perk .ico { width: 36px; height: 36px; }
.perk b { display: block; font-size: 14.5px; }
.perk p { margin: 2px 0 0; font-size: 13px; color: var(--muted); line-height: 1.35; }
.boost-steps { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; }
.boost-steps div { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0; border-radius: 10px; background: var(--ink-2); border: 1px solid var(--line); }
.boost-steps b { font-family: var(--f-display); font-weight: 400; font-size: 15px; }
.boost-steps span { font-size: 10.5px; color: var(--muted); }
.boost-steps .on { background: rgba(255, 138, 61, .14); border-color: rgba(255, 138, 61, .45); }
.boost-steps .on span { color: #ffab6e; }

/* ---------------- макро: подробности по нажатию ---------------- */
.macro-li .chev { transition: transform 200ms var(--ease-out); }
.macro-li.open .chev { transform: rotate(90deg); }
.macro-more { padding: 4px 0 12px 20px; font-size: 13.5px; }
.mm-vals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 6px; }
.mm-vals div { padding: 8px 10px; border-radius: 10px; background: var(--ink-2); border: 1px solid var(--line); }
.mm-vals span { display: block; font-size: 11px; color: var(--muted); }
.mm-vals b { font-family: var(--f-display); font-weight: 400; font-size: 15px; }
.mm-v, .mm-if { margin: 6px 0 0; line-height: 1.4; }
.mm-if span { font-weight: 700; }

/* ---------------- график: подсказка над свечой ---------------- */
#chart { position: relative; }
.chart-tip {
  position: absolute; z-index: 5; width: min(260px, 72vw); padding: 10px 12px; border-radius: 12px;
  background: rgba(15, 20, 28, .97); border: 1px solid var(--line-2); box-shadow: 0 14px 30px rgba(0, 0, 0, .5);
  font-size: 12.5px; cursor: pointer; animation: fade 140ms var(--ease-out) both;
}
.tt-h { font-size: 11px; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.tt-e { display: flex; gap: 8px; padding: 5px 0; }
.tt-e + .tt-e { border-top: 1px solid var(--line); }
.tt-e i { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 5px; }
.tt-e b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; line-height: 1.3; }
.tt-e span { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.tt-more { font-size: 11px; color: var(--bull); margin-top: 4px; }

/* ---------------- как это работает: схема экономики ---------------- */
.how-step { margin-top: 12px; }
.how-h { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-size: 16px; margin-bottom: 4px; }
.how-n { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: var(--bull); color: var(--bull-ink); font-size: 14px; }
.how-n svg { width: 16px; height: 16px; }
.how-item { display: flex; gap: 12px; align-items: center; padding: 9px 0; }
.how-item + .how-item { border-top: 1px solid var(--line); }
.how-item .ico { width: 36px; height: 36px; font-size: 17px; }
.how-item b { display: block; font-size: 14.5px; }
/* только подпись под заголовком: квадратик с иконкой — тоже span, общее правило его ломало */
.how-item > div > span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.how-item > div svg { width: 13px; height: 13px; vertical-align: -2px; }
.how-plan { align-items: flex-start; }
.how-plan .row { gap: 10px; min-height: 36px; }
.price-pill { flex: none; padding: 3px 10px; border-radius: 999px; background: var(--bull-soft); color: var(--bull); font-weight: 700; font-size: 14px; }
.pills { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.pills span { display: inline-flex; align-items: center; gap: 3px; padding: 3px 9px; border-radius: 999px; font-size: 12px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text); }
.pills .tok svg { color: var(--bear); vertical-align: 0; }
.pack-pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.pack-pills span { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px 6px; padding: 6px 4px;
  border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.how-item .pack-pills b { display: inline-flex; align-items: center; gap: 1px; font-size: 14px; color: var(--text); }
.pack-pills svg { color: var(--bear); }
/* соединитель: точки «текут» сверху вниз — кристаллы идут из заработка в магазин */
.how-link { display: flex; flex-direction: column; align-items: center; gap: 5px; margin: 8px 0 !important; }
.how-link i { width: 4px; height: 4px; border-radius: 50%; background: var(--bull); opacity: .25; animation: flow 1.4s ease-in-out infinite; }
.how-link i:nth-child(2) { animation-delay: .2s; }
.how-link i:nth-child(3) { animation-delay: .4s; }
@keyframes flow { 40% { opacity: 1; transform: scale(1.4); } }
.how-link + * { margin-top: 0 !important; }
.how-core { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px; margin-top: 0; }
.how-core .big { display: inline-flex; align-items: center; gap: 8px; }
.how-core .big svg { width: 28px; height: 28px; }
.how-core .big b { font-family: var(--f-display); font-weight: 400; font-size: 30px; }
.how-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 0 !important; color: var(--muted); font-size: 12.5px; }
.how-or::before, .how-or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.how-or + .how-step { margin-top: 10px !important; }
.how-loop ul { margin: 6px 0 0; padding-left: 18px; }
.how-loop li { margin: 5px 0; font-size: 14px; }
.how-back { display: flex; gap: 8px; align-items: center; width: 100%; margin-top: 10px; padding: 10px 0 0; border: 0;
  border-top: 1px solid var(--line); background: none; font: inherit; font-size: 12.5px; color: var(--bull); text-align: left;
  cursor: pointer; }
.how-back svg { width: 16px; height: 16px; transform: rotate(-90deg); flex: none; color: var(--bull); transition: transform .2s var(--ease-out); }
.how-loop.closed ul { display: none; }
.how-loop.closed .how-back svg { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .how-link i { animation: none; opacity: .6; } }

/* ---------------- админка ---------------- */
.adm-tabs { margin-top: 12px; }
.adm-tabs .chip { border: 0; font-family: inherit; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.kpi { padding: 12px 14px; border-radius: var(--r-m); background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.kpi span { display: block; font-size: 12px; color: var(--muted); }
.kpi b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 24px; line-height: 1.2; margin-top: 2px; font-variant-numeric: normal; }
.kpi em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.chart-card .chart-wrap { position: relative; margin-top: 8px; }
.chart-card svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-card .grid { stroke: rgba(255, 255, 255, .06); stroke-width: 1; }
.chart-card .axis { stroke: rgba(255, 255, 255, .14); stroke-width: 1; }
.chart-card .tick { fill: var(--dim); font-size: 9px; font-family: var(--f-body); }
.chart-card .val { fill: var(--text); font-size: 10px; font-weight: 700; font-family: var(--f-body); }
.chart-card .hit { cursor: pointer; outline: none; }
.adm-tip { position: absolute; top: -6px; padding: 6px 9px; border-radius: 9px; background: rgba(15, 20, 28, .97); border: 1px solid var(--line-2); pointer-events: none; font-size: 12px; white-space: nowrap; }
.adm-tip b { display: block; font-size: 14px; }
.adm-tip span { color: var(--muted); }
.adm-table { margin-top: 8px; }
.adm-table .row { padding: 3px 0; border-top: 1px solid var(--line); }
.adm-li { padding: 5px 0; gap: 8px; }
.adm-li + .adm-li { border-top: 1px solid var(--line); }
.adm-v { font-family: var(--f-display); font-weight: 400; font-size: 16px; text-align: right; }
.fn-row + .fn-row { margin-top: 12px; }
.fn-bar { height: 10px; border-radius: 999px; background: var(--ink-2); margin: 6px 0 3px; overflow: hidden; }
.fn-bar i { display: block; height: 100%; border-radius: inherit; background: #72a31a; }
.adm-field input { font-size: 16px; }
.adm-pre { white-space: pre-wrap; font-size: 12px; line-height: 1.45; padding: 12px; border-radius: var(--r-m); background: var(--ink-2); border: 1px solid var(--line); color: var(--text); overflow-x: auto; }
textarea { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; }
.note-box { padding: 12px 14px; border-radius: var(--r-m); background: var(--panel-2); border: 1px solid var(--line-2); font-size: 14px; line-height: 1.4; }
/* таблицы админки: первая колонка сжимается с многоточием, числа — справа и моноширинные */
.adm-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-tbl th { color: var(--muted); font-weight: 600; font-size: 11.5px; padding: 0 4px 6px; text-align: right; white-space: nowrap; }
.adm-tbl td { padding: 8px 4px; border-top: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.adm-tbl th:first-child, .adm-tbl td:first-child { text-align: left; padding-left: 0; }
.adm-tbl td:first-child { max-width: 0; width: 100%; overflow: hidden; text-overflow: ellipsis; }
.adm-tbl td.dim, .adm-tbl .dim { color: var(--dim); }
.adm-item { padding: 12px 0; }
.adm-item + .adm-item { border-top: 1px solid var(--line); }
.adm-item .quote { margin: 6px 0 0; font-size: 13.5px; color: #c3cad6; white-space: pre-wrap; word-break: break-word; }
.adm-acts { display: flex; gap: 8px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.adm-acts input { flex: 1 1 120px; min-width: 0; font-size: 16px; }
.adm-acts .num { flex: 0 0 72px; }
.adm-acts.one { flex-wrap: nowrap; margin-top: 8px; }
.adm-acts.one .btn { flex: 1 1 auto; min-width: 0; }
.adm-acts.one .btn.ghost { flex: 0 0 auto; }
.adm-user .grid2 .stat .v { font-size: 17px; }
.adm-search { display: flex; gap: 8px; margin-top: 10px; }
.adm-search input { flex: 1; min-width: 0; font-size: 16px; }
.adm-note { font-size: 12px; color: var(--muted); margin: 6px 2px 0; }
.li .t b .badge { display: inline-flex; height: 20px; margin-left: 4px; vertical-align: 1px; color: var(--bull); }
.li .t b .badge.pro { color: var(--bull-ink); }
.adm-tabs .chip .cnt { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px;
  margin-left: 6px; border-radius: 999px; background: var(--bear); color: #fff; font-size: 11px; font-weight: 700; }
tr.tap { cursor: pointer; }
.adm-charts > .chart-card { min-width: 0; }
.adm-src { display: grid; gap: 10px; }
.adm-src > .card { min-width: 0; }
.adm-src .adm-tbl td:first-child { white-space: normal; overflow-wrap: anywhere; }   /* на телефоне название — в две строки, а не «Ролики и по…» */
.adm-tbl td.sub { padding-left: 12px; color: var(--muted); }   /* метка ролика под строкой «Ролики и посты» */
/* админка → «Контент»: карточки поста, ролика и гайда контент-завода */
.cf-filter { margin-top: 10px; gap: 8px; }
.cf-grid { display: grid; gap: 12px; margin-top: 12px; align-items: start; }
.cf-card { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.cf-head { gap: 8px; }
.cf-head > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-sample { padding: 8px 10px; border-radius: var(--r-s); background: var(--bear-soft); color: var(--bear); font-size: 13px; font-weight: 700; }
.cf-img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-s); background: var(--ink-2); }
.cf-video { display: block; width: 100%; border-radius: var(--r-s); background: #000; }
.cf-video.tall { aspect-ratio: 9 / 16; max-height: min(72dvh, 620px); }      /* вертикальный ролик не выше экрана */
.cf-video.wide { aspect-ratio: 16 / 9; }
.cf-title { font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.cf-yt { display: flex; gap: 10px; align-items: center; }
.cf-yt img { width: 128px; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; flex: none; }
.cf-ch { margin: 0; padding: 0; list-style: none; color: var(--muted); line-height: 1.6; font-variant-numeric: tabular-nums; }
.cf-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.5; color: #c3cad6; max-height: 10.5em; overflow: hidden; }
.cf-text.open { max-height: none; }
.cf-text a { color: var(--bull); }
.cf-more { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--bull); font-weight: 600; cursor: pointer; }
.cf-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-btns .chip { white-space: normal; height: auto; min-height: 34px; padding: 6px 12px; }
.cf-card .adm-acts { margin-top: 0; }
.cf-files a { color: var(--muted); text-decoration: underline; }
.cf-new { display: flex; flex-direction: column; gap: 10px; }
.cf-new p { margin: 0; }
.cf-new textarea { width: 100%; min-height: 96px; resize: vertical; font-size: 16px; }   /* 16px — iOS не зумит поле */
.cf-top { display: grid; gap: 10px; align-items: start; }
.cf-reqs summary { padding: 8px 0 2px; cursor: pointer; }
.cf-req { padding: 10px 0; display: flex; flex-direction: column; gap: 4px; }
.cf-req + .cf-req { border-top: 1px solid var(--line); }
.cf-brief { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.cf-card.cf-hl { border-color: rgba(168, 232, 48, .6); }

/* веб-админка на компьютере: та же админка, но шире — цифры в ряд, графики рядом, без мобильной навигации */
@media (min-width: 900px) {
  body[data-route="admin"] { --tabs-h: 0px; }
  body[data-route="admin"] .tabs { display: none; }
  body[data-route="admin"] .view { max-width: 1120px; padding: 20px 28px 48px; }
  body[data-route="admin"] .adm-tabs { flex-wrap: wrap; overflow: visible; gap: 8px; }
  body[data-route="admin"] .kpis { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  body[data-route="admin"] .adm-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
  body[data-route="admin"] .adm-src { grid-template-columns: 1fr 1fr; gap: 12px; }
  body[data-route="admin"] .cf-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  body[data-route="admin"] .cf-top { grid-template-columns: 1fr 1fr; gap: 12px; }
  body[data-route="admin"] .cf-card.guide { grid-column: 1 / -1; }
  body[data-route="admin"] .cf-card.guide .cf-video { max-width: 760px; }
  body[data-route="admin"] .adm-tbl { font-size: 14px; }
  body[data-route="admin"] .adm-search { max-width: 560px; }
  /* разделы — в две колонки плотной укладкой: блок не разрывается между колонками */
  body[data-route="admin"] .adm-cols { columns: 2; column-gap: 20px; }
  body[data-route="admin"] .adm-block { break-inside: avoid; display: inline-block; width: 100%; vertical-align: top; }
  body[data-route="admin"] .adm-block .kpis { grid-template-columns: 1fr 1fr; }
  /* поля настроек сеткой: короткие числа не растягиваются на всю ширину */
  body[data-route="admin"] .adm-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 14px; align-items: end; }
  body[data-route="admin"] .adm-fields .field { margin: 0 0 12px; }
  body[data-route="admin"] .adm-fields .field:has(.xs) { grid-column: 1 / -1; }   /* поле с подсказкой — во всю строку */
  /* пользователи — карточками в три колонки */
  body[data-route="admin"] #us-list .card.list { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 18px; }
  body[data-route="admin"] #adm-body > .card.flat:only-of-type { max-width: 760px; }
}

.ev-img { display: block; width: 100%; height: auto; margin-top: 10px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--ink-2); aspect-ratio: 16 / 10; cursor: zoom-in; }
.iv-scroll { overflow-x: auto; margin: 10px -12px 0 -18px; padding: 0 12px 6px 18px; overscroll-behavior-x: contain; }
.iv-img { display: block; height: min(64dvh, 600px); width: auto; max-width: none; border-radius: var(--r-s); border: 1px solid var(--line); }
/* ---------------- админка: отчёты навигатора ---------------- */
.rp-prev img { display: block; width: 100%; height: auto; border-radius: var(--r-s); border: 1px solid var(--line); aspect-ratio: 16 / 10; }
.rp-cap { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); white-space: pre-wrap; }
.rp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 10px; }
.rp-item { display: block; padding: 8px; border-radius: var(--r-m); background: var(--panel-2); border: 1px solid var(--line); color: var(--text); }
.rp-item img { display: block; width: 100%; height: auto; border-radius: 8px; aspect-ratio: 16 / 10; }
.rp-item .row { margin-top: 8px; font-size: 13px; }

/* ---------------- админка: конкуренты ---------------- */
.riv-list { display: grid; gap: 10px; margin-top: 10px; }
@media (min-width: 900px) { .riv-list { grid-template-columns: repeat(2, 1fr); } }
.riv-post { padding: 12px 14px; border-radius: var(--r-m); background: var(--panel-2); border: 1px solid var(--line); min-width: 0; }
.riv-text { margin: 6px 0 8px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.riv-c { font-size: 12.5px; padding: 4px 0 0; }
.riv-c.ok b { color: var(--bull); } .riv-c.late b { color: #ffab6e; } .riv-c.miss b { color: var(--bear); }

/* ---------------- админка: карта продукта ---------------- */
.mp { position: relative; display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 14px; padding: 16px; }
.mp-svg { display: none; }
.mp-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; position: relative; z-index: 1; }
.mp-col h3 { margin: 0 2px 2px; font: 600 13px var(--f-body); color: var(--dim); }
.mp-node { position: relative; padding: 12px 14px; border-radius: var(--r-m); background: var(--panel-2); border: 1px solid var(--line);
  cursor: pointer; outline: none; transition: opacity 200ms var(--ease-out), border-color 200ms var(--ease-out), transform 160ms var(--ease-out); }
.mp-node:focus-visible { border-color: var(--line-2); box-shadow: 0 0 0 2px var(--bull-soft); }
.mp-node:active { transform: scale(.99); }
.mp-node > b { display: block; font-size: 15px; }
.mp-sub { display: block; font-size: 12px; color: var(--dim); margin-top: 1px; }
.mp-node ul { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.mp-node li { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.mp-node li b { color: var(--text); font-weight: 600; }
.mp-node.cur { --c: var(--line-2); border-color: color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 7%, var(--panel-2)); }
.mp-node.cur > b { color: var(--c); }
.mp-node.cr { --c: #5cc8f0; } .mp-node.ai { --c: #ffab6e; } .mp-node.pr { --c: #a8e830; }
.mp-node.open { border-style: dashed; }
.mp-to { font-style: normal; font-weight: 600; color: var(--c); white-space: nowrap; }
.mp-to::before { content: "→ "; }
.mp-focus .mp-node:not(.lit) { opacity: .35; }
.mp-legend { display: none; margin: 8px 2px 0; }
.mp-tbl td { white-space: normal; }
.mp-tbl td:first-child { max-width: none; width: auto; }
.mp-tbl td:last-child { text-align: right; }
.mp-tbl.w td:first-child { width: 40%; }
.mp-cats { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 10px; }
.mp-cats .card { margin: 0; }
.mp-cat { display: grid; grid-template-columns: 1fr auto 34px; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; }
.mp-cat + .mp-cat { border-top: 1px solid var(--line); }
.mp-cat .badge { height: 20px; font-size: 11px; }
.mp-cat > b { text-align: right; }
@media (min-width: 640px) { .mp-cats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
  body[data-route="admin"] #adm-body > .mp.card.flat.adm-full { grid-template-columns: repeat(3, 1fr); column-gap: 88px; padding: 20px 22px 22px; max-width: none; }
  .mp-col { justify-content: space-around; }
  .mp-col h3 { position: absolute; top: -2px; left: 2px; }
  .mp-col { padding-top: 26px; }
  .mp-svg { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: visible; }
  .mp-svg path { fill: none; stroke-width: 1.6; opacity: .5; transition: opacity 200ms var(--ease-out), stroke-width 200ms var(--ease-out); }
  .mp-focus .mp-svg path { opacity: .08; }
  .mp-focus .mp-svg path.on { opacity: 1; stroke-width: 2.2; }
  .mp-cats { grid-template-columns: repeat(3, 1fr); }
  .mp-to { display: none; }
  .mp-legend { display: block; }
}
@media (prefers-reduced-motion: reduce) { .mp-node, .mp-svg path { transition: none; } }

/* ---------------- живые обновления ---------------- */
.fl-up { animation: flUp 900ms var(--ease-out); }
.fl-dn { animation: flDn 900ms var(--ease-out); }
@keyframes flUp { 0% { color: var(--bull); text-shadow: 0 0 12px var(--bull-glow); } }
@keyframes flDn { 0% { color: var(--bear); text-shadow: 0 0 12px var(--bear-glow); } }
.ev-card.fresh { animation: freshIn 600ms var(--ease-out) both; }
.ev-card.fresh::after { animation: freshGlow 1400ms var(--ease-out) both; }
@keyframes freshIn { from { opacity: 0; transform: translateY(-6px); } }
@keyframes freshGlow { from { background: var(--bull-soft); } }

@media (max-width: 360px) {
  .quick { grid-template-columns: repeat(2, 1fr); }
  .hero .mascot { width: 104px; }
  .hero .mascot { width: 140px; }
}

/* ---------------- график спреда ---------------- */
.sp-pair { margin-top: 12px; }
.sp-sel { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: end; }
.sp-sel .field { margin: 0; }
.sp-sel select { width: 100%; }
.sp-sel #sp-swap { height: 44px; min-width: 44px; font-size: 18px; }
.sp-open { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.sp-fee { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.sp-fee:empty { display: none; }
.sp-open:empty { display: none; }
.sp-open .btn { justify-content: center; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-open .long { background: var(--bull-soft); color: var(--bull); border: 1px solid rgba(168, 232, 48, .28); }
.sp-open .short { background: var(--bear-soft); color: #ff5a5f; border: 1px solid rgba(240, 16, 24, .3); }
.sp-now { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; }
@media (min-width: 560px) { .sp-now { grid-template-columns: repeat(4, 1fr); } }
.sp-val { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
/* арбитраж фандинга: где лонг и где шорт — крупно и белым, стороны цветом */
.sp-fund .t span.sp-legs { margin-top: 3px; font-size: 14px; line-height: 1.35; color: var(--text); }
.sp-legs em { font-style: normal; font-weight: 600; }
.sp-legs i { font-style: normal; font-size: 12.5px; color: var(--muted); }
.sp-fund .sp-val b { font-size: 17px; }
.sp-val .xs { white-space: nowrap; }
.sp-now div { padding: 10px 10px; border-radius: var(--r-m); background: var(--ink-2); min-width: 0; }
.sp-now span { display: block; font-size: 12px; color: var(--muted); }
.sp-now span.tip { display: inline-grid; font-size: 11px; margin-left: 6px; vertical-align: 1px; }   /* значок «i» — в строку с подписью */
.sp-now b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 18px; margin-top: 2px; white-space: nowrap; }
.sp-now b.small { font-family: var(--f-body); font-weight: 700; font-size: 14px; line-height: 28px; }
.sp-tf { margin-top: 12px; overflow-x: auto; }
.sp-chart { margin-top: 10px; padding: 8px 4px 10px; }
.sp-tbl tr.sp-a td, .sp-tbl tr.sp-b td { color: var(--text); font-weight: 600; }
.sp-tbl .badge { height: 18px; margin-left: 4px; }

/* ---------------- админка: итоги сигналов ---------------- */
.res-seg { max-width: 300px; margin-top: 12px; }
.res-tbl th.res-grp { text-align: center; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.res-tbl thead tr:first-child th { padding-bottom: 2px; }
.res-moves { margin-top: 6px; }
/* свои две колонки: общая раскладка gridify (CSS columns) ставит высокий блок под низкий */
.res-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 20px; }
@media (min-width: 900px) {
  .res-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .res-tbl td + td, .res-tbl tr:last-child th + th { min-width: 88px; }     /* цифры — столбцами, а не кучкой у края */
}
body[data-route="admin"] #adm-body > .card.flat.res-wrap { max-width: none; }
.res-tg { font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; padding: 12px 14px;
  border-radius: var(--r-m); background: var(--ink-2); border: 1px solid var(--line); color: var(--text); }

/* ---------------- «Тренды DEX»: плитки по 3 в ряд, как «Сила к биткоину» ---------------- */
.dex-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dex-tile {
  min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; text-align: center;
  border-radius: 12px; border: 1px solid var(--line-2); transition: background 140ms;
}
.dex-tile .sym { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 700; }
.dex-tile .net { font-size: 11px; color: var(--muted); }
.dex-tile .chg { margin: 4px 0 2px; font-size: 13px; font-weight: 700; }
.dex-kv { display: flex; gap: 4px; align-items: baseline; font-size: 12.5px; }
.dex-kv i { font-style: normal; font-size: 11px; color: var(--muted); }
.dex-kv b { color: var(--text); font-weight: 700; }
@media (hover: hover) { .dex-tile:hover { background: rgba(255, 255, 255, .04); } }
