/* ============================================================
   REKT AI — premium fintech design system
   graphite · burgundy · blue-gray · muted sage/dusty red
   ============================================================ */
:root {
  color-scheme: dark;

  --bg: #0B0D0F;
  --bg-2: #101316;
  --card: #1C2126;
  --card-2: #171B1F;
  --elevated: #242B31;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.10);

  --text: #F5F3EF;
  --muted: #A8AAA8;
  --dim: #6F7478;

  --accent: #A94444;        /* primary — deep wine */
  --accent-lit: #B94E4E;
  --accent-deep: #8F3434;
  --wine-soft: #D9A9A6;

  --ai: #879BA8;            /* AI / secondary — cool blue-gray */
  --ai-2: #9BAEB9;
  --green: #91A88F;         /* positive — muted sage */
  --red: #B66B67;           /* negative — dusty red */

  --r: 16px;
  --r-s: 12px;

  /* --- motion tokens: единые длительности и кривые (NO NEON) --- */
  --d-press: 150ms;    /* отклик нажатия */
  --d-state: 220ms;    /* смена состояний, подсветки, индикаторы */
  --d-reveal: 350ms;   /* появление секций и списков */
  --d-cine: 600ms;     /* кинематографичные входы и интро */
  --e-out: cubic-bezier(.22, .61, .36, 1);
  --e-soft: cubic-bezier(.4, 0, .2, 1);
  --stg: 40ms;         /* шаг stagger-последовательностей */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
/* телефон: страницу нельзя утащить вправо — только вертикальный скролл */
html, body { overflow-x: hidden; }
/* overscroll не утекает в WebView: ни pull-to-refresh, ни цепляния за жесты Telegram */
html, body { overscroll-behavior: none; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 500;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(1100px 540px at 50% -8%, rgba(255, 255, 255, 0.05), transparent 62%),
    radial-gradient(860px 520px at 108% 18%, rgba(169, 68, 68, 0.07), transparent 60%),
    radial-gradient(760px 560px at -18% 86%, rgba(135, 155, 168, 0.05), transparent 60%),
    var(--bg);
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
}
/* grain + vignette — почти незаметная глубина */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(130% 90% at 50% 42%, transparent 58%, rgba(0, 0, 0, 0.42));
}

#app {
  position: relative; z-index: 1;
  max-width: 480px; margin: 0 auto;
  padding: 16px 16px calc(96px + env(safe-area-inset-bottom));
}
/* Полный экран в Telegram (моб.): плашка «✕ REKT AI | Chart Analyzer»
   перекрывает верх вьюпорта — держим шапки экранов под ней */
.fs-mobile #app { padding-top: 52px; }
.hidden { display: none !important; }

/* ---------- иконки (inline SVG sprite) ---------- */
.ico {
  width: 20px; height: 20px; display: inline-block; vertical-align: middle;
  flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- экраны и появление ---------- */
/* переход между экранами: мягкий всплёт + микро-сдвиг, без рывков */
.screen { animation: screenIn .34s cubic-bezier(.22, .61, .36, 1); }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(10px) scale(.99); }
  to { opacity: 1; transform: none; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sheen { 0% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 6px rgba(145, 168, 143, 0); } 100% { box-shadow: 0 0 0 0 rgba(145, 168, 143, 0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes scan {
  0% { top: -24px; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
@keyframes blink { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

/* staggered entrance: элементы аккуратно собираются на экран */
.screen.anim > * { animation: rise .42s cubic-bezier(.22, .61, .36, 1) both; }
.screen.anim > *:nth-child(1) { animation-delay: 0ms; }
.screen.anim > *:nth-child(2) { animation-delay: 40ms; }
.screen.anim > *:nth-child(3) { animation-delay: 80ms; }
.screen.anim > *:nth-child(4) { animation-delay: 120ms; }
.screen.anim > *:nth-child(5) { animation-delay: 160ms; }
.screen.anim > *:nth-child(6) { animation-delay: 200ms; }
.screen.anim > *:nth-child(7) { animation-delay: 240ms; }
.screen.anim > *:nth-child(n+8) { animation-delay: 260ms; }

/* ---------- шапка ---------- */
.top {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; min-height: 40px;
}
.logo { font-size: 15px; font-weight: 700; letter-spacing: .16em; }
.logo span { color: var(--accent-lit); }
.title { font-size: 16px; font-weight: 600; letter-spacing: -.01em; flex: 1; min-width: 0; }
.live {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .16em; color: var(--green);
}
.live i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  animation: livePulse 1.8s ease-out infinite;
}
@keyframes livePulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(145, 168, 143, .55); }
  55% { transform: scale(1.3); box-shadow: 0 0 0 6px rgba(145, 168, 143, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(145, 168, 143, 0); }
}
@keyframes winePulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(185, 78, 78, .5); }
  55% { transform: scale(1.35); box-shadow: 0 0 0 5px rgba(185, 78, 78, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(185, 78, 78, 0); }
}
.badge {
  margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ai-2);
  background: rgba(135, 155, 168, .10); border: 1px solid rgba(135, 155, 168, .30);
  padding: 5px 10px; border-radius: 999px; max-width: 45%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.badge.pro {
  color: var(--wine-soft);
  background: rgba(169, 68, 68, .14); border-color: rgba(185, 78, 78, .40);
}
#mode-badge, #result-badge, #expiry-pair, #tf-pair {
  color: var(--wine-soft);
  background: rgba(169, 68, 68, .12); border-color: rgba(185, 78, 78, .35);
}
.icon-btn {
  width: 38px; height: 38px; border-radius: var(--r-s);
  background: var(--card-2); border: 1px solid var(--line);
  color: var(--muted); cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: transform .18s ease, border-color .18s ease, color .18s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn:active { transform: scale(.94); }

h2 { font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 6px; }
.sub { color: var(--muted); font-size: 14px; margin-bottom: 16px; line-height: 1.5; }
.group-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; color: var(--dim); margin: 20px 0 10px;
}

/* ---------- снапшот рынка на главной ---------- */
.snap {
  position: relative; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012)),
    var(--card);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; margin-bottom: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 10px 30px rgba(0, 0, 0, .22);
}
.snap-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lbl {
  font-size: 10px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--dim);
}
.src {
  font-size: 10px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ai);
}
.snap-price {
  font-size: 34px; font-weight: 700; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; margin-top: 8px; line-height: 1.1;
}
.snap-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.snap-meta .dim { font-size: 11px; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; }
.snap-rows {
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
  display: grid; gap: 8px;
}
.snap-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.snap-row b {
  color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums;
}
.snap-row .chg { margin-left: auto; }

/* маркет: бейджи % меньше и не слипаются со значением */
.details .v .chg { font-size: 11px; padding: 2px 7px; margin-left: 8px; }

.chg {
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 3px 9px; border-radius: 999px; border: 1px solid;
}
.chg.up { color: var(--green); background: rgba(145, 168, 143, .10); border-color: rgba(145, 168, 143, .32); }
.chg.down { color: var(--red); background: rgba(182, 107, 103, .10); border-color: rgba(182, 107, 103, .32); }
.chg.flat { color: var(--ai-2); background: rgba(135, 155, 168, .10); border-color: rgba(135, 155, 168, .30); }

/* skeleton */
.sk {
  height: 12px; border-radius: 6px; margin-top: 10px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .11), rgba(255, 255, 255, .05));
  background-size: 200% 100%; animation: shimmer 1.6s linear infinite;
}
.sk.big { height: 30px; width: 55%; margin-top: 14px; }

/* ---------- карточки режимов (Trading) ---------- */
.modes { display: grid; gap: 10px; }
.mode {
  display: flex; align-items: center; gap: 14px; text-align: left;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .008)),
    var(--card);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px; cursor: pointer; color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.mode-vis {
  width: 88px; height: 52px; flex: none; border-radius: 10px;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.mode-vis svg { width: 100%; height: 100%; display: block; }
.vis-line { fill: none; stroke: var(--ai-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.vis-area { fill: rgba(135, 155, 168, .13); stroke: none; }
.vis-up { fill: rgba(145, 168, 143, .55); }
.vis-down { fill: rgba(182, 107, 103, .55); }
.draw { stroke-dasharray: 220; stroke-dashoffset: 220; animation: draw 1.1s .4s ease-out forwards; }
.mode-body { flex: 1; min-width: 0; }
.mode-name { display: block; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.mode-desc { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; margin-top: 3px; }
.mode-status {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  font-size: 10px; font-weight: 700; letter-spacing: .14em; color: var(--dim);
}
.mode-status i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent-lit); display: inline-block;
  animation: winePulse 1.7s ease-out infinite;
}
.mode-arrow { color: var(--dim); display: flex; }

/* ---------- плитки разделов ---------- */
.sects { display: grid; gap: 10px; }
.sects-2 { grid-template-columns: repeat(2, 1fr); }
.sect {
  display: flex; align-items: center; gap: 10px; text-align: left;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 13px 12px; color: var(--text);
  cursor: pointer; position: relative;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.sect-ico {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--ai-2);
}
.sect-body { flex: 1; min-width: 0; }
.sect-body b { display: block; font-size: 14px; font-weight: 600; }
.sect-body i {
  display: block; font-style: normal; font-size: 10px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-top: 2px;
}
.sect .chev { width: 16px; height: 16px; color: var(--dim); }
.sect-wide { grid-column: 1 / -1; }

/* ---------- прогресс флоу (Режим → Пара → Срок → Анализ) ---------- */
.steps { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.step {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 9px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--dim);
}
.step::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: .55;
}
.step:not(:last-child)::after {
  content: ""; width: 16px; height: 1px; background: var(--line-2); margin-left: 4px;
}
.step.done { color: var(--ai); }
.step.done::before { opacity: .9; }
.step.active { color: var(--wine-soft); }
.step.active::before {
  opacity: 1; background: var(--accent-lit);
  box-shadow: 0 0 0 3px rgba(185, 78, 78, .18);
  animation: winePulse 1.7s ease-out infinite;
}

/* ---------- пары, чипсы ---------- */
.pairs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pair {
  background: var(--card-2); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--r-s); padding: 13px 6px; font-size: 13px; font-weight: 600;
  letter-spacing: .03em; cursor: pointer; font-family: inherit;
  transition: transform .16s ease, background .16s ease, border-color .16s ease,
              box-shadow .16s ease, color .16s ease;
}
.pair:hover { border-color: var(--line-2); color: var(--text); }
.pair:active { transform: scale(.97); }
.pair.active {
  background: rgba(169, 68, 68, .16); border-color: rgba(185, 78, 78, .55);
  color: var(--text); box-shadow: 0 0 0 3px rgba(169, 68, 68, .12);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  background: var(--card-2); border: 1px solid var(--line); color: var(--muted);
  border-radius: var(--r-s); padding: 11px 16px; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: transform .16s ease, background .16s ease, border-color .16s ease,
              box-shadow .16s ease, color .16s ease;
}
.chip:hover { border-color: var(--line-2); color: var(--text); }
.chip:active { transform: scale(.97); }
.chip.active {
  background: rgba(169, 68, 68, .16); border-color: rgba(185, 78, 78, .55);
  color: var(--text); box-shadow: 0 0 0 3px rgba(169, 68, 68, .12);
}

/* ---------- кнопки ---------- */
.ghost {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 20px;
  background: var(--accent); color: #FFF6F4;
  border: none; border-radius: var(--r-s); padding: 15px;
  font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 8px 20px rgba(143, 52, 52, .22);
  transition: transform .16s ease, filter .16s ease;
}
.ghost .ico { width: 18px; height: 18px; }
.ghost::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .16), transparent 70%);
  transform: translateX(-120%);
}
/* блик живёт на самой кнопке — при наведении/тапе, не волной по экрану */
.ghost:hover::after { animation: sheen .6s ease-out; }
.ghost:hover { filter: brightness(1.07); }
.ghost:active:not(:disabled) { transform: scale(.98); }
.ghost:disabled { opacity: .38; cursor: default; box-shadow: none; }
.ghost.subtle {
  background: transparent; color: var(--muted);
  border: 1px solid var(--line-2); font-weight: 600; box-shadow: none;
}
.ghost.subtle:hover { color: var(--text); border-color: rgba(255, 255, 255, .18); }
.ghost.subtle::after { display: none; }
.ghost-a {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #FFF6F4;
  border-radius: var(--r-s); padding: 15px; font-size: 15px; font-weight: 700;
  text-align: center; text-decoration: none;
  transition: transform .16s ease, filter .16s ease;
}
.ghost-a:hover { filter: brightness(1.07); }
.ghost-a:active { transform: scale(.98); }

/* ---------- индикатор загрузки ---------- */
.spinner {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 56px 0; color: var(--muted); font-size: 13px;
}
.spin {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--line-2);
  border-top-color: var(--ai-2); border-right-color: rgba(135, 155, 168, .4);
  animation: rot .8s linear infinite;
}
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- брендированная загрузка: наш график рисуется и «перелезает» вверх ---------- */
.ldr {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 36px 12px; text-align: center;
}
.ldr-ic {
  width: 132px; height: 60px; overflow: visible;
  animation: ldrRise 1.9s cubic-bezier(.4, 0, .2, 1) infinite;
}
.ldr-grid { stroke: rgba(255, 255, 255, .055); stroke-width: 1; fill: none; }
.ldr-line {
  fill: none; stroke: var(--accent-lit); stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 250; stroke-dashoffset: 250;
  animation: ldrDraw 1.9s cubic-bezier(.4, 0, .2, 1) infinite;
  filter: drop-shadow(0 0 5px rgba(185, 78, 78, .32));
}
.ldr-pt {
  fill: var(--accent-lit); opacity: 0;
  transform-box: fill-box; transform-origin: center;
  animation: ldrPt 1.9s ease infinite;
}
.ldr-txt {
  font-size: 12.5px; color: var(--muted); letter-spacing: .03em;
  animation: blink 1.7s ease infinite;
}
@keyframes ldrDraw { 0% { stroke-dashoffset: 250; } 58% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; } }
@keyframes ldrRise {
  0% { transform: translateY(9px); opacity: .15; }
  58% { transform: translateY(0); opacity: 1; }
  84% { transform: translateY(-4px); opacity: 1; }
  100% { transform: translateY(-7px); opacity: 0; }
}
@keyframes ldrPt {
  0%, 52% { opacity: 0; transform: scale(.3); }
  64% { opacity: 1; transform: scale(1.35); }
  76% { transform: scale(1); }
  100% { opacity: 1; transform: scale(1); }
}
/* внутри окна графика — оверлей на всё окно */
.ldr-in {
  position: absolute; inset: 0; z-index: 3; padding: 0;
  background: var(--card); border-radius: 6px;
}
.ldr-in .ldr-ic { width: 104px; height: 48px; }
.ldr-in .ldr-txt { font-size: 11.5px; }

/* ---------- пустые состояния ---------- */
.empty {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  text-align: center; padding: 26px 16px;
  color: var(--muted); font-size: 13px; line-height: 1.5;
  animation: rise .35s both;
}
.empty b { color: var(--text); font-size: 14px; }
.empty-ico {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%; margin-bottom: 3px;
  background: rgba(255, 255, 255, .05);
  border: 1px dashed rgba(255, 255, 255, .18);
  color: var(--dim);
}
.empty-ico .ico { width: 20px; height: 20px; }

/* ---------- живой фон главного экрана (едва заметный дрейф) ---------- */
[data-screen="home"] { position: relative; }
[data-screen="home"]::before {
  content: ""; position: absolute; z-index: -1;
  top: -60px; left: -25%; right: -25%; height: 460px;
  pointer-events: none;
  background:
    radial-gradient(46% 62% at 30% 30%, rgba(169, 68, 68, .13), transparent 70%),
    radial-gradient(42% 56% at 74% 22%, rgba(135, 155, 168, .10), transparent 70%);
  animation: aurora 18s ease-in-out infinite alternate;
}
@keyframes aurora {
  from { transform: translate3d(-3%, 0, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.08); }
}

/* ---------- результат анализа ---------- */
.result > * { animation: rise .4s cubic-bezier(.22, .61, .36, 1) both; }
.result > *:nth-child(2) { animation-delay: 70ms; }
.result > *:nth-child(3) { animation-delay: 130ms; }
.result > *:nth-child(4) { animation-delay: 180ms; }
.result > *:nth-child(n+5) { animation-delay: 220ms; }

/* --- AI-карточка вердикта --- */
.ai-card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .008)), var(--card);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 15px 16px 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}
.ai-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--ai-2); opacity: .8; transition: background .2s ease;
}
.ai-card.call::before { background: var(--green); }
.ai-card.put::before  { background: var(--red); }
.ai-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px;
}
.ai-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
}
.ai-eyebrow .ico { width: 13px; height: 13px; color: var(--ai-2); }
.conf-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; color: var(--text);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line-2); border-radius: 999px;
  padding: 4px 10px 4px 6px; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* кольцевой прогресс уверенности в цвете тона */
.conf-ring {
  width: 17px; height: 17px; flex: none;
  transform: rotate(-90deg);
}
.conf-ring circle {
  fill: none; stroke-width: 2.6; stroke-linecap: round;
}
.conf-ring .cr-bg { stroke: rgba(255, 255, 255, .13); }
.conf-ring .cr-fg {
  stroke: var(--ai-2); stroke-dasharray: 44;
  stroke-dashoffset: 44;
  transition: stroke-dashoffset .9s .2s cubic-bezier(.22, .61, .36, 1);
}
.ai-card.call .cr-fg { stroke: var(--green); }
.ai-card.put .cr-fg  { stroke: var(--red); }
.verdict {
  text-align: center; font-size: 34px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
  line-height: 1.15; margin-bottom: 6px;
}
.verdict.call { color: var(--green); }
.verdict.put  { color: var(--red); }
.verdict.hold { color: var(--ai-2); }
.verdict-sub {
  text-align: center; color: var(--muted); font-size: 13px;
  letter-spacing: .02em;
}

/* «Почему» — причины от движка */
.reasons { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.reasons-head {
  display: flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
.reasons-head .ico { width: 13px; height: 13px; color: var(--ai-2); }
.reasons ul { list-style: none; display: grid; gap: 9px; }
.reasons li {
  position: relative; padding-left: 17px;
  font-size: 13px; line-height: 1.5; color: var(--text); opacity: .92;
  animation: rise .35s both;
}
.reasons li::before {
  content: ""; position: absolute; left: 1px; top: 7px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ai-2); opacity: .85;
}
.reasons li:nth-child(1) { animation-delay: 50ms; }
.reasons li:nth-child(2) { animation-delay: 90ms; }
.reasons li:nth-child(3) { animation-delay: 130ms; }
.reasons li:nth-child(4) { animation-delay: 170ms; }
.reasons li:nth-child(5) { animation-delay: 210ms; }
.reasons li:nth-child(n+6) { animation-delay: 240ms; }

/* --- сводка по ТФ и план входа (результат, фаза 1) --- */
.cons-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px !important;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .02);
}
.cons-row::before { display: none; }
.cons-row b {
  font-size: 12px; font-weight: 700; color: var(--muted);
  min-width: 30px; letter-spacing: .04em;
}
.cons-row span {
  flex: 1; font-size: 12px; font-weight: 700;
  letter-spacing: .07em; color: var(--ai-2);
}
.cons-row i {
  font-style: normal; font-size: 11px;
  font-weight: 600; color: var(--muted);
}
.cons-row.buy span { color: var(--green); }
.cons-row.sell span { color: var(--red); }
.cons-row.wait span { color: var(--ai-2); }
.cons-row.main {
  background: rgba(255, 255, 255, .045);
  border-color: rgba(255, 255, 255, .13);
}
.cons-concl {
  margin-top: 9px; font-size: 12px;
  line-height: 1.45; color: var(--muted);
}

/* --- ⏰ «следить за уровнями»: строка на результате --- */
.watch-row { margin-top: 14px; display: grid; gap: 9px; }
.watch-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: rgba(255, 255, 255, .03);
  color: var(--text); font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
}
.watch-btn:active { transform: scale(.985); }
.watch-btn .ico { width: 15px; height: 15px; color: var(--ai-2); }
.watch-btn.on {
  border-color: rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .06);
}
.watch-btn.on .ico { color: var(--green); }
.watch-note { font-size: 12px; line-height: 1.45; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .watch-btn { transition: none; }
}

/* --- карточка графика (шапка + тело) --- */
.chart-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}
.chart-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .022);
}
.chart-label {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.chart-label .ico { width: 14px; height: 14px; color: var(--ai-2); }
.chart-meta {
  font-size: 12px; font-weight: 600; color: var(--text);
  text-align: right; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}
.chart-body { padding: 10px 10px 9px; }

.chart {
  width: 100%; border-radius: 6px; display: block;
  background: var(--card-2);
  animation: pop .5s .1s both;
}
.chart-box {
  position: relative;
  height: auto; min-height: 400px;   /* бинарка: холст + легенда без обрезки */
  border-radius: 6px; overflow: hidden;
  background: var(--card);
  animation: pop .5s .1s both;
}
.tv-attr { text-align: right; font-size: 11px; color: var(--dim); margin-top: 7px; padding: 0 2px; }
.tv-attr a { color: var(--dim); }

/* --- свой график бинарки: свечи, уровни, объёмный профиль, кластеры --- */
.bc-hint {
  font-size: 11.5px; color: var(--dim);
  text-align: center; margin-top: 7px;
}
#bc-hint:not(.hidden) { animation: rise .3s .18s both; }
.bc-canvas {
  display: block; width: 100%; height: 360px;
  cursor: crosshair; touch-action: manipulation;
}
.bc-legend {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px 10px; border-top: 1px solid var(--line);
  background: var(--card-2);
}
.bc-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 600; color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 8px;
}
.bc-chip.muted { color: var(--dim); font-weight: 500; }
.bc-chip .dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }

/* панель кластеров (footprint выбранной свечи) */
.bc-cluster {
  margin-top: 10px; padding: 11px 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); animation: pop .25s both;
}
.bc-cluster-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 9px;
}
.bc-cluster-head span { font-size: 12px; color: var(--muted); }
.bc-cluster-head b { font-size: 13px; color: var(--text); }
.bc-x {
  width: 26px; height: 26px; flex: none; border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--muted); font-size: 15px; line-height: 1;
  cursor: pointer; transition: background .15s ease;
}
.bc-x:hover { background: rgba(255, 255, 255, 0.1); }
.bc-sum { font-size: 12.5px; font-weight: 700; margin-bottom: 8px; }
.bc-sum.pos { color: var(--green); }
.bc-sum.neg { color: var(--red); }
.bc-bins { display: grid; gap: 4px; }
.bc-bin { display: flex; align-items: center; gap: 8px; font-size: 11px; }
/* POC — самая нагруженная цена: подсвеченной строкой */
.bc-bin.poc {
  margin: 0 -4px; padding: 2px 4px;
  background: rgba(255, 255, 255, .05); border-radius: 6px;
}
.bc-bin.poc .bp { color: var(--text); font-weight: 800; }
.bc-bin .bp {
  width: 64px; flex: none; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.bc-bin .bbar {
  flex: 1; display: flex; height: 9px; min-width: 40px;
  border-radius: 3px; overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}
.bc-bin .bbar i { display: block; height: 100%; }
.bc-bin .bbar i.s { background: rgba(182, 107, 103, 0.7); }
.bc-bin .bbar i.b { background: rgba(145, 168, 143, 0.7); }
.bc-bin .bt {
  width: 48px; flex: none; text-align: right; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.bc-note { font-size: 11px; color: var(--dim); margin-top: 8px; }
.bc-load {
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px; color: var(--muted); padding: 4px 0;
}
.bc-load .spin {
  width: 16px; height: 16px; border-width: 2px;
  border-top-color: var(--ai-2);
}

/* секционный заголовок над карточкой данных */
.sec-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
  margin: 18px 2px 9px;
}
.sec-label::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

/* карточка данных (DETAILS / DATA CARD) */
.details {
  margin-top: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, .005)), var(--card);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 6px 14px; font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}
.details .row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line);
  animation: rise .35s both;
}
.details .row:last-child { border-bottom: 0; }
.details .row:nth-child(1) { animation-delay: 40ms; }
.details .row:nth-child(2) { animation-delay: 80ms; }
.details .row:nth-child(3) { animation-delay: 120ms; }
.details .row:nth-child(4) { animation-delay: 160ms; }
.details .row:nth-child(5) { animation-delay: 200ms; }
.details .row:nth-child(6) { animation-delay: 240ms; }
.details .row:nth-child(n+7) { animation-delay: 270ms; }
.details .k { color: var(--dim); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.details .v {
  font-weight: 600; text-align: right; color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* результат разбора картинки: значения длинные — стопкой, как spec-строки */
.details.an-det .row { flex-direction: column; align-items: flex-start; gap: 4px; }
.details.an-det .v {
  text-align: left; font-weight: 500; line-height: 1.45;
  white-space: normal; word-break: break-word;
}
/* календарь: точка важности события + прогноз/предыдущее под названием */
.cal-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  margin-right: 6px; background: var(--dim); vertical-align: 1px;
}
.cal-dot.high { background: var(--accent-lit); }
.cal-dot.mid { background: var(--ai-2); }
.cal-sub {
  display: block; font-size: 11px; font-weight: 500; font-style: normal;
  color: var(--dim); margin-top: 2px;
}
.an-list { display: grid; gap: 7px; margin-top: 11px; }
.an-li {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 13px; color: var(--muted); line-height: 1.5;
}
.an-li .ico { width: 13px; height: 13px; flex: none; margin-top: 3px; color: var(--dim); }

/* карточка статуса PRO — дата окончания крупно */
.details.status-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(169, 68, 68, .16), rgba(169, 68, 68, .04)), var(--card);
  border-color: rgba(185, 78, 78, .38);
}
.st-main { display: grid; gap: 3px; }
.st-label {
  font-size: 10px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--wine-soft);
}
.st-date { font-size: 17px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.st-days {
  font-size: 11px; font-weight: 700; color: var(--green); white-space: nowrap;
  background: rgba(145, 168, 143, .12); border: 1px solid rgba(145, 168, 143, .32);
  border-radius: 999px; padding: 4px 9px;
}
.disclaimer {
  display: flex; align-items: flex-start; gap: 8px;
  color: var(--dim); font-size: 11px;
  margin-top: 14px; line-height: 1.55; padding: 0 2px;
}
.disclaimer .ico {
  width: 13px; height: 13px; flex: none;
  margin-top: 1px; color: var(--muted);
}

.error { text-align: center; padding: 48px 10px; color: var(--muted); font-size: 14px; }
.error-ico { color: var(--red); margin-bottom: 12px; display: flex; justify-content: center; }
.error-ico .ico { width: 30px; height: 30px; stroke-width: 1.5; }
.error #error-text { white-space: pre-line; color: var(--text); line-height: 1.55; }
.error a.ghost {
  text-decoration: none; text-align: center;
  color: #FFF6F4; margin-top: 14px;
}

/* ---------- нижняя навигация ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(14, 17, 20, .88);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .3);
}
.nav-in {
  max-width: 480px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.nav-item {
  position: relative; background: none; border: 0; cursor: pointer;
  padding: 10px 0 9px; display: flex; flex-direction: column;
  align-items: center; gap: 5px;
  color: var(--dim); font-family: inherit;
  font-size: 10px; font-weight: 600; letter-spacing: .04em;
  transition: color .2s ease;
}
.nav-item .ico { width: 21px; height: 21px; }
.nav-item.on { color: var(--text); }
.nav-item.on .ico { color: var(--accent-lit); }
.nav-item::after {
  content: ""; position: absolute; top: 0; left: 50%;
  width: 26px; height: 2px; border-radius: 0 0 2px 2px;
  background: var(--accent-lit);
  transform: translateX(-50%) scaleX(0);
  transition: transform .25s cubic-bezier(.22, .61, .36, 1);
}
.nav-item.on::after { transform: translateX(-50%) scaleX(1); }
.nav-item:active { transform: scale(.94); }

/* ---------- профиль ---------- */
.prof-head { text-align: center; padding: 8px 0 4px; }
.ava-holder { position: relative; width: 76px; margin: 0 auto 12px; }
.ava-holder .avatar { margin: 0; }

/* обод вокруг аватара — крутящаяся рамка, у каждого тира своя подача:
   PLUS — ничего (пока),
   PRO — винная дуга + с неё капают монетки,
   MAX — золотая дуга, вокруг шивает молния,
   FOUNDER — платиновый ореол с искрами рядом с профилем. */
.ava-ring {
  display: none; position: absolute; inset: -8px;
  border-radius: 50%; pointer-events: none;
}
.prof-head.tier-pro .ava-ring,
.prof-head.tier-max .ava-ring,
.prof-head.tier-founder .ava-ring { display: block; }

.ava-ring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(185, 78, 78, 0) 0 38%,
    #B94E4E 60%, #EBCFC9 76%, rgba(185, 78, 78, 0) 92%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.5px));
  animation: ringspin 6s linear infinite;
}
.ava-ring::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(217, 169, 166, .30);
}
/* MAX: та же рамка, но золотая и порезвее */
.prof-head.tier-max .ava-ring::before {
  background: conic-gradient(from 0deg, rgba(200, 164, 92, 0) 0 38%,
    #C8A45C 60%, #EFD9A8 76%, rgba(200, 164, 92, 0) 92%);
  animation-duration: 4.5s;
}
.prof-head.tier-max .ava-ring::after { border-color: rgba(200, 164, 92, .35); }
/* FOUNDER: платиновый ореол */
.prof-head.tier-founder .ava-ring::before {
  background: conic-gradient(from 0deg, rgba(214, 217, 220, 0) 0 38%,
    #D6D9DC 60%, #FFFFFF 76%, rgba(214, 217, 220, 0) 92%);
}
.prof-head.tier-founder .ava-ring::after { border-color: rgba(214, 217, 220, .35); }
@keyframes ringspin { to { transform: rotate(360deg); } }
@keyframes ringspin-rev { to { transform: rotate(-360deg); } }

/* MAX: молния гонится по орбите рамки и не переворачивается */
.ava-orbit {
  display: none; position: absolute; inset: -14px;
  pointer-events: none;
  animation: ringspin 4s linear infinite;
}
.prof-head.tier-max .ava-orbit { display: block; }
.ava-orbit .ico {
  position: absolute; top: -2px; left: 50%;
  width: 15px; height: 15px; margin-left: -7.5px;
  color: #C8A45C;
  filter: drop-shadow(0 0 5px rgba(200, 164, 92, .7));
  animation: ringspin-rev 4s linear infinite, boltGlow 1.5s ease-in-out infinite;
}
@keyframes boltGlow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(200, 164, 92, .55)); }
  50% { filter: drop-shadow(0 0 9px rgba(200, 164, 92, .95)); }
}

/* PRO: от рамки капают монетки */
.ava-drip {
  display: none; position: absolute;
  left: 0; right: 0; top: -6px; height: 46px;
  pointer-events: none;
}
.prof-head.tier-pro .ava-drip { display: block; }
.ava-drip i {
  position: absolute; top: 0;
  width: 5px; height: 5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #EFD9A8, #C8A45C 65%, #8A6A30);
  opacity: 0;
  animation: coinDrip 2.2s ease-in infinite;
}
.ava-drip i:nth-child(1) { left: 18%; animation-delay: 0s; }
.ava-drip i:nth-child(2) { left: 48%; animation-delay: .75s; }
.ava-drip i:nth-child(3) { left: 78%; animation-delay: 1.5s; }
@keyframes coinDrip {
  0% { transform: translateY(0) scale(.55); opacity: 0; }
  12% { opacity: .95; }
  100% { transform: translateY(36px) scale(1); opacity: 0; }
}

/* FOUNDER: рядом с профилем мягко переливаются искры */
.ava-spark {
  display: none; position: absolute; inset: -16px;
  pointer-events: none;
}
.prof-head.tier-founder .ava-spark { display: block; }
.ava-spark i {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: #E8EBEE;
  box-shadow: 0 0 6px rgba(232, 235, 238, .85);
  animation: sparkTwinkle 2.6s ease-in-out infinite;
}
.ava-spark i:nth-child(1) { left: 2%; top: 16%; animation-delay: 0s; }
.ava-spark i:nth-child(2) { right: 0; top: 34%; animation-delay: .65s; }
.ava-spark i:nth-child(3) { left: 8%; bottom: 8%; animation-delay: 1.3s; }
.ava-spark i:nth-child(4) { right: 6%; bottom: 2%; animation-delay: 1.95s; }
@keyframes sparkTwinkle {
  0%, 100% { opacity: .18; transform: scale(.7); }
  50% { opacity: 1; transform: scale(1.3); }
}
.prof-head.pro .avatar {
  border-color: rgba(185, 78, 78, .55);
  box-shadow: 0 0 0 3px rgba(169, 68, 68, .28), 0 10px 24px rgba(0, 0, 0, .3);
}
.avatar {
  width: 76px; height: 76px; border-radius: 50%;
  display: block; margin: 0 auto 12px;
  border: 1px solid var(--line-2); background: var(--card);
  object-fit: cover;
  box-shadow: 0 0 0 4px rgba(169, 68, 68, .14), 0 10px 24px rgba(0, 0, 0, .3);
}
.avatar-fallback {
  font-size: 28px; font-weight: 700; line-height: 74px;
  color: var(--ai-2); text-align: center;
}
.prof-name { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.prof-sub { color: var(--dim); font-size: 12px; margin-top: 4px; letter-spacing: .04em; }
#prof-rating .v { color: var(--ai-2); }

.prof-actions {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-top: 18px;
}
/* плавное появление кнопок (История/Друзья/Промокод/Оценить) — как у всех карточек */
.prof-actions .pact {
  animation: rise .35s cubic-bezier(.22, .61, .36, 1) both;
}
.prof-actions .pact:nth-child(1) { animation-delay: 40ms; }
.prof-actions .pact:nth-child(2) { animation-delay: 80ms; }
.prof-actions .pact:nth-child(3) { animation-delay: 120ms; }
.prof-actions .pact:nth-child(4) { animation-delay: 160ms; }
.prof-actions .pact:nth-child(5) { animation-delay: 200ms; }
.prof-actions .pact:nth-child(6) { animation-delay: 240ms; }
.pact {
  background: var(--card-2); border: 1px solid var(--line); color: var(--muted);
  border-radius: var(--r-s); padding: 12px 4px 10px; cursor: pointer;
  font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}
.pact .ico { width: 19px; height: 19px; }
.pact span { font-size: 10px; font-weight: 600; letter-spacing: .04em; }
.pact:hover { color: var(--text); border-color: var(--line-2); }
.pact:active { transform: scale(.96); }
.pact.active {
  border-color: rgba(185, 78, 78, .5); background: rgba(169, 68, 68, .12);
  color: var(--wine-soft);
}
/* шапка панели профиля: имя раздела + крестик (иначе из панели
   непонятно, как вернуться к профилю) */
.pan-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px;
}
.pan-title {
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text);
}
.pan-x {
  width: 30px; height: 30px; display: flex; align-items: center;
  justify-content: center; cursor: pointer; font-family: inherit;
  background: var(--card-2); border: 1px solid var(--line);
  border-radius: 10px; color: var(--muted);
  transition: color .18s ease, border-color .18s ease;
}
.pan-x .ico { width: 14px; height: 14px; }
.pan-x:hover { color: var(--text); border-color: var(--line-2); }
.prof-panel { margin-top: 10px; }
#prof-panel:not(.hidden),
#memo-panel:not(.hidden) { animation: rise .32s cubic-bezier(.22, .61, .36, 1) both; }

/* 📄 Отчёт журнала — отдельная широкая кнопка под сеткой действий */
.jr-btn {
  width: 100%; margin-top: 10px;
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-s); padding: 13px 14px;
  color: var(--text); font-family: inherit; cursor: pointer;
  animation: rise .35s cubic-bezier(.22, .61, .36, 1) both;
  transition: transform .18s ease, border-color .18s ease,
              background .18s ease, opacity .18s ease;
}
.jr-btn:hover { border-color: var(--line-2); background: var(--card-2); }
.jr-btn:active { transform: scale(.98); }
.jr-btn:disabled { opacity: .65; cursor: default; transform: none; }
.jr-btn .ico { width: 19px; height: 19px; color: var(--wine-soft); flex: none; }
.jr-txt { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.jr-txt b { font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.jr-txt i { font-style: normal; font-size: 11px; color: var(--muted); }
.jr-btn .jr-chev { color: var(--dim); width: 16px; height: 16px;
                   margin-left: auto; }
.jr-note { margin-top: 8px; }
@media (prefers-reduced-motion: reduce) {
  .jr-btn { animation: none; transition: none; }
}

.p-note {
  color: var(--muted); font-size: 13px; line-height: 1.55; margin-top: 10px;
}
.p-note .ico { width: 15px; height: 15px; color: var(--dim); margin-right: 6px; }
.p-ok { color: var(--green); }
.p-err { color: var(--red); }
.hitem {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-s); padding: 12px 14px; margin-bottom: 8px;
  animation: rise .35s both;
}
.hitem:nth-child(1) { animation-delay: 40ms; }
.hitem:nth-child(2) { animation-delay: 80ms; }
.hitem:nth-child(3) { animation-delay: 120ms; }
.hitem:nth-child(4) { animation-delay: 160ms; }
.hitem:nth-child(n+5) { animation-delay: 200ms; }
.hitem-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 600; }
.hitem-top span { color: var(--dim); font-size: 11px; font-weight: 600; white-space: nowrap; letter-spacing: .06em; }
.hitem-trend { color: var(--ai-2); font-size: 13px; margin-top: 5px; font-weight: 600; }
.hitem-sum { color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.5; }
.f-url {
  background: var(--card-2); border: 1px dashed var(--line-2);
  border-radius: var(--r-s); padding: 12px; margin-top: 4px;
  font-size: 13px; word-break: break-all; color: var(--ai-2);
}
.p-actions .ghost { margin-top: 10px; }
.promo-form { margin-top: 10px; }
.p-input {
  width: 100%; background: var(--card-2); border: 1px solid var(--line-2);
  color: var(--text); border-radius: var(--r-s); padding: 14px;
  font-size: 15px; font-family: inherit; letter-spacing: .08em;
  text-transform: uppercase; margin-bottom: 4px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.p-input::placeholder { color: var(--dim); letter-spacing: .1em; }
.p-input:focus {
  outline: none; border-color: rgba(185, 78, 78, .55);
  box-shadow: 0 0 0 3px rgba(169, 68, 68, .14);
}
.memo-form .ghost, .promo-form .ghost, .p-actions .ghost { margin-top: 10px; }
.stars { display: flex; gap: 8px; margin-top: 10px; }
.starbtn {
  flex: 1; background: var(--card-2); border: 1px solid var(--line);
  color: var(--text); font-size: 20px; padding: 12px 0; border-radius: var(--r-s);
  cursor: pointer; font-family: inherit;
  transition: transform .15s ease, background .15s ease, opacity .15s ease;
}
.starbtn.dim { color: var(--dim); opacity: .45; }
.starbtn:active { transform: scale(.93); }
.starbtn .ico { width: 22px; height: 22px; }

/* ---------- мемкоины ---------- */
.memo-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-top: 4px;
}
.memo-panel { margin-top: 14px; }
.m-title {
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--dim); margin-bottom: 10px;
}
.m-text {
  color: var(--text); font-size: 13px; line-height: 1.6;
  white-space: pre-line; margin-bottom: 10px;
}
.mrow {
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, .004)), var(--card);
  border: 1px solid var(--line); border-left: 2px solid rgba(135, 155, 168, .45);
  border-radius: var(--r-s); padding: 11px 13px; margin-bottom: 8px;
  font-size: 13px; line-height: 1.55; white-space: pre-line;
  color: var(--muted);
  animation: rise .35s both;
  transition: border-color .18s ease;
}
.mrow:hover { border-color: var(--line-2); border-left-color: var(--ai-2); }
.mrow:nth-child(1) { animation-delay: 40ms; }
.mrow:nth-child(2) { animation-delay: 80ms; }
.mrow:nth-child(3) { animation-delay: 120ms; }
.mrow:nth-child(4) { animation-delay: 160ms; }
.mrow:nth-child(5) { animation-delay: 200ms; }
.mrow:nth-child(n+6) { animation-delay: 240ms; }
.m-btns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
.m-btn {
  margin-top: 0; background: var(--card-2); border: 1px solid var(--line-2);
  color: var(--text); font-size: 13px; padding: 13px 8px;
  font-weight: 600; text-align: center; text-decoration: none;
  box-sizing: border-box; box-shadow: none;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.m-btn:hover { border-color: rgba(255, 255, 255, .2); background: var(--elevated); filter: none; }
.m-btn:active { transform: scale(.97); border-color: rgba(185, 78, 78, .5); }
.m-btn::after { display: none; }
.memo-form { margin-top: 12px; }

/* плитки-действия (мемкоины / профиль) — иконка + подпись */
.pact { position: relative; }
.memo-grid .pact {
  padding: 14px 6px 12px; gap: 8px; background: var(--card);
}
.memo-grid .pact .ico { width: 21px; height: 21px; color: var(--ai-2); }
.memo-grid .pact span { color: var(--muted); font-size: 10.5px; }
.memo-grid .pact.active .ico { color: var(--wine-soft); }

/* ---------- анализ графика (AI) ---------- */
.ai-card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(135, 155, 168, .07), rgba(135, 155, 168, .02)), var(--card);
  border: 1px solid rgba(135, 155, 168, .22); border-radius: var(--r);
  padding: 14px; margin-bottom: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.ai-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  font-size: 10px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ai);
}
.ai-head .ico { width: 15px; height: 15px; }
.ai-head i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--ai-2);
  margin-left: auto; animation: blink 1.4s ease infinite;
}
.ai-card .m-text { margin-bottom: 0; color: var(--muted); }

.ai-scan {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(135, 155, 168, .07), rgba(135, 155, 168, .02)), var(--card);
  border: 1px solid rgba(135, 155, 168, .25); border-radius: var(--r);
  padding: 18px 14px; margin-bottom: 14px; text-align: center;
}
.ai-scan .ico { width: 24px; height: 24px; color: var(--ai-2); }
.ai-scan .m-text { color: var(--muted); margin-top: 8px; margin-bottom: 4px; }
.scanline {
  position: absolute; left: 0; right: 0; height: 26px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(155, 174, 185, .16), transparent);
  animation: scan 2.4s ease-in-out infinite;
}
.stages { display: flex; gap: 6px; justify-content: center; margin-top: 12px; }
.stages i {
  width: 34px; height: 3px; border-radius: 2px;
  background: rgba(135, 155, 168, .35);
  animation: blink 1.2s ease infinite;
}
.stages i:nth-child(2) { animation-delay: .18s; }
.stages i:nth-child(3) { animation-delay: .36s; }
.stages i:nth-child(4) { animation-delay: .54s; }

.an-prev {
  position: relative; display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-s); padding: 8px 10px; margin-top: 10px;
  animation: rise .3s both;
}
.an-prev img {
  width: 72px; height: 54px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--line-2); flex: none;
}
.an-meta {
  font-size: 12px; color: var(--muted); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0;
}
.an-x {
  background: none; border: 0; color: var(--dim); cursor: pointer;
  padding: 6px 8px; flex: none; display: flex;
  transition: color .15s ease;
}
.an-x .ico { width: 15px; height: 15px; }
.an-x:hover { color: var(--red); }
.an-go { display: flex; width: 100%; }

/* результат анализа: не липнет к кнопке */
#an-out { margin-top: 16px; }

/* эмодзи из текстов бота как наши иконки */
.em {
  width: 15px; height: 15px;
  vertical-align: -3px; color: var(--ai-2);
  margin: 0 1px;
}
.em.up { color: var(--positive); }
.em.down { color: var(--negative); transform: rotate(180deg); }
.em.warn { color: var(--text); }

/* ---------- разное ---------- */
#app .chips { margin-bottom: 16px; }

/* ---------- группы пар: аккордеон с плавной анимацией ---------- */
.gtog {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; background: none; border: 0; color: inherit; font: inherit;
  cursor: pointer; padding: 0;
}
.gtog .gchev {
  width: 13px; height: 13px; color: var(--dim);
  transition: transform .3s ease;
}
.pgroup .gchev { transform: rotate(0deg); }
.pgroup.open .gchev { transform: rotate(90deg); }
.pgrid {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .35s cubic-bezier(.22, .61, .36, 1);
}
.pgroup.open .pgrid { grid-template-rows: 1fr; }
.pgrid > .pairs { overflow: hidden; min-height: 0; }
.pgroup .group-title { margin-bottom: 10px; }
.pgroup:not(.open) .group-title { margin-bottom: 0; }
.pgroup + .pgroup { margin-top: 12px; }

/* ---------- кликабельные строки списков (мемкоины) ---------- */
.mrow { position: relative; }
.mrow.tap { cursor: pointer; padding-right: 34px; }
.mrow.tap:active { transform: scale(.99); }
.mrow .row-chev {
  position: absolute; right: 12px; top: 13px;
  width: 14px; height: 14px; color: var(--dim); opacity: .7;
}
.mrow:hover { border-left-color: var(--wine-soft); }

/* ---------- центрованное меню выбора (по тапу на строку) ---------- */
.ctx-wrap {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(4, 6, 8, .55); backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; transition: opacity .18s ease;
}
.ctx-wrap.on { opacity: 1; }
.ctx-card {
  width: min(340px, 100%);
  background: var(--elevated); border: 1px solid var(--line-2);
  border-radius: 14px; padding: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  transform: translateY(6px) scale(.97);
  transition: transform .2s cubic-bezier(.22, .61, .36, 1);
}
.ctx-wrap.on .ctx-card { transform: none; }
.ctx-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.ctx-title { font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.ctx-x {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--card); border: 1px solid var(--line); color: var(--muted);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.ctx-x .ico { width: 15px; height: 15px; }
.ctx-x:hover { color: var(--text); border-color: var(--line-2); }
.ctx-list { display: grid; gap: 6px; }
.ctx-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: var(--card); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 12px; font: inherit; font-size: 14px;
  font-weight: 600; cursor: pointer; text-align: left;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.ctx-item .ico { width: 17px; height: 17px; color: var(--ai-2); flex: none; }
.ctx-item:hover { border-color: var(--line-2); background: rgba(255, 255, 255, .04); }
.ctx-item:active { transform: scale(.97); }
.ctx-close { color: var(--muted); }
.ctx-close .ico { color: var(--muted); }

/* ---------- аватарка в шапке главной ---------- */
#home-avatar.has-photo {
  padding: 0;
  border-radius: 50%; border-color: rgba(185, 78, 78, .55);
}
#home-avatar img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 50%; display: block;
}

/* возврат к выбору пар (в флоу бинарок/фьючерсов) */
.ghost.subtle.back-pairs { margin-top: 10px; }

/* ---------- тиры подписок ---------- */
/* цветовая ось: basic — muted, plus — сталь, pro — wine, max — золото,
   founder — платина. Цвет задаётся точечно (бейдж, пилюля, иконка),
   чтобы не перекрашивать наследуемый текст внутри карточек. */

/* бейдж тира в шапке (профиль / подписки) */
.badge.tier-plus { color: var(--ai); background: rgba(135, 155, 168, .12); border-color: rgba(135, 155, 168, .35); }
.badge.tier-pro { color: var(--wine-soft); background: rgba(169, 68, 68, .14); border-color: rgba(185, 78, 78, .40); }
.badge.tier-max { color: #C8A45C; background: rgba(200, 164, 92, .12); border-color: rgba(200, 164, 92, .38); }
.badge.tier-founder { color: #D6D9DC; background: rgba(214, 217, 220, .10); border-color: rgba(214, 217, 220, .35); }

/* пилюля тира рядом с именем */
.prof-namerow {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
}
.tier-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; padding: 4px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line-2); color: var(--muted);
}
.tier-pill .ico { width: 11px; height: 11px; }
.tier-pill.tier-plus { color: var(--ai); border-color: rgba(135, 155, 168, .42); background: rgba(135, 155, 168, .10); }
.tier-pill.tier-pro { color: var(--wine-soft); border-color: rgba(185, 78, 78, .45); background: rgba(169, 68, 68, .12); }
.tier-pill.tier-max { color: #C8A45C; border-color: rgba(200, 164, 92, .45); background: rgba(200, 164, 92, .10); }
.tier-pill.tier-founder { color: #D6D9DC; border-color: rgba(214, 217, 220, .42); background: rgba(214, 217, 220, .08); }

/* иконка тира на углу аватарки (профиль и шапка главной) */
#home-avatar { position: relative; }
.ava-tier {
  position: absolute; right: -3px; bottom: -3px;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--elevated); border: 1px solid var(--line-2);
  color: var(--muted); z-index: 2; pointer-events: none;
}
.ava-tier .ico { width: 11px; height: 11px; stroke-width: 2.2; }
.ava-holder .ava-tier { right: 0; bottom: 2px; width: 26px; height: 26px; }
.ava-holder .ava-tier .ico { width: 13px; height: 13px; }
.ava-tier.tier-plus { color: var(--ai); border-color: rgba(135, 155, 168, .5); }
.ava-tier.tier-pro { color: var(--wine-soft); border-color: rgba(185, 78, 78, .55); }
.ava-tier.tier-max { color: #C8A45C; border-color: rgba(200, 164, 92, .55); }
.ava-tier.tier-founder { color: #D6D9DC; border-color: rgba(214, 217, 220, .5); }

/* обводка аватарки и кольцо — в цвете тира */
.prof-head.tier-plus .avatar { border-color: rgba(135, 155, 168, .55); box-shadow: 0 0 0 3px rgba(135, 155, 168, .25), 0 10px 24px rgba(0, 0, 0, .3); }
.prof-head.tier-max .avatar { border-color: rgba(200, 164, 92, .55); box-shadow: 0 0 0 3px rgba(200, 164, 92, .25), 0 10px 24px rgba(0, 0, 0, .3); }
.prof-head.tier-founder .avatar { border-color: rgba(214, 217, 220, .5); box-shadow: 0 0 0 3px rgba(214, 217, 220, .22), 0 10px 24px rgba(0, 0, 0, .3); }
/* PLUS — тонкий пунктир-орбита, медленно вращается */
.prof-head.tier-plus .ava-ring::before {
  background: repeating-conic-gradient(from 0deg,
    #879BA8 0 6deg, rgba(135, 155, 168, 0) 6deg 17deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.5px));
  animation: ringspin 16s linear infinite;
}
.prof-head.tier-plus .ava-ring::after { border-color: rgba(135, 155, 168, .26); }

/* MAX — внешнее тонкое кольцо (внутренняя золотая дуга крутится — см. блок выше) */
.prof-head.tier-max .ava-ring::after {
  inset: -5px; border-color: rgba(200, 164, 92, .38);
}

/* FOUNDER — платиновый ореол: мягкое свечение дышит (дуга крутится — блок выше) */
.prof-head.tier-founder .ava-ring {
  box-shadow: 0 0 15px rgba(214, 217, 220, .20), 0 0 5px rgba(255, 255, 255, .10);
  animation: halo 3.6s ease-in-out infinite;
}
@keyframes halo { 0%, 100% { opacity: .78; } 50% { opacity: 1; } }

/* широкая кнопка «Подписки» под плитками профиля */
.pact-wide {
  grid-column: 1 / -1; flex-direction: row;
  justify-content: center; gap: 9px; padding: 13px 8px;
}
.pact-wide .ico { color: var(--wine-soft); }
.pact-wide span { font-size: 13px; font-weight: 700; color: var(--text); }

/* Компактный переключатель языка RU/EN в шапке профиля */
.lang-seg {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; margin-left: auto;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  -webkit-tap-highlight-color: transparent;
}
.lang-seg-b {
  min-width: 34px; padding: 5px 8px;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--muted); cursor: pointer;
  font: inherit; font-size: 11px; font-weight: 700;
  letter-spacing: .06em; line-height: 1;
  transition: color .18s, background .18s;
}
.lang-seg-b:active { transform: scale(.94); }
.lang-seg-b.on {
  background: var(--wine-soft); color: var(--text);
  box-shadow: 0 1px 6px rgba(0, 0, 0, .25);
}
@media (prefers-reduced-motion: reduce) {
  .lang-seg-b { transition: none; }
}

/* экран подписок: карточки тиров */
.sub-me {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 13px 14px; margin-bottom: 4px;
}
.sub-me .ico { width: 22px; height: 22px; color: var(--muted); flex: none; }
.sub-me b { display: block; font-size: 14px; color: var(--text); }
.sub-me span { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.sub-me.tier-plus { border-color: rgba(135, 155, 168, .35); }
.sub-me.tier-plus .ico { color: var(--ai); }
.sub-me.tier-pro { border-color: rgba(185, 78, 78, .40); }
.sub-me.tier-pro .ico { color: var(--wine-soft); }
.sub-me.tier-max { border-color: rgba(200, 164, 92, .40); }
.sub-me.tier-max .ico { color: #C8A45C; }
.sub-me.tier-founder { border-color: rgba(214, 217, 220, .35); }
.sub-me.tier-founder .ico { color: #D6D9DC; }

.sub-cards { display: grid; gap: 10px; }
.sub-card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, .004)), var(--card);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 14px 14px 17px;
  animation: rise .35s both;
}
.sub-card:nth-child(1) { animation-delay: 40ms; }
.sub-card:nth-child(2) { animation-delay: 80ms; }
.sub-card:nth-child(3) { animation-delay: 120ms; }
.sub-card:nth-child(4) { animation-delay: 160ms; }
.sub-card:nth-child(5) { animation-delay: 200ms; }
.sub-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--muted); opacity: .55;
}
.sub-card.tier-plus::before { background: #879BA8; }
.sub-card.tier-pro::before { background: #B94E4E; }
.sub-card.tier-max::before { background: #C8A45C; }
.sub-card.tier-founder::before { background: #D6D9DC; }
.sub-card.mine { border-color: rgba(255, 255, 255, .17); animation: mineBreath 3.4s ease-in-out infinite; }
@keyframes mineBreath {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
  50% { box-shadow: 0 0 0 4px rgba(255, 255, 255, .055); }
}
.sub-card.mine::before { width: 4px; opacity: 1; }
.sub-card.tier-plus.mine { border-color: rgba(135, 155, 168, .45); }
.sub-card.tier-pro.mine { border-color: rgba(185, 78, 78, .5); }
.sub-card.tier-max.mine { border-color: rgba(200, 164, 92, .5); }
.sub-card.tier-founder.mine { border-color: rgba(214, 217, 220, .45); }

.sub-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sub-head .ico { width: 17px; height: 17px; color: var(--muted); flex: none; }
.sub-card.tier-plus .sub-head .ico, .sub-me.tier-plus .ico { color: var(--ai); }
.sub-card.tier-pro .sub-head .ico { color: var(--wine-soft); }
.sub-card.tier-max .sub-head .ico { color: #C8A45C; }
.sub-card.tier-founder .sub-head .ico { color: #D6D9DC; }
.sub-name {
  font-size: 12.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text);
}
.sub-chip {
  margin-left: auto; font-size: 9.5px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--green);
  background: rgba(145, 168, 143, .12);
  border: 1px solid rgba(145, 168, 143, .30);
  border-radius: 999px; padding: 3px 8px;
}
.sub-price {
  font-size: 26px; font-weight: 700; letter-spacing: -.02em;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.sub-price .cur { font-size: 16px; color: var(--muted); }
.sub-price .cur .ico, .sub-price .save .ico,
.sub-buy .ico { width: 15px; height: 15px; }
.sub-price .per { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.sub-price .free { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.sub-price .save {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--green); margin-top: 3px;
}
.sub-tools-title {
  font-size: 10px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--dim);
  margin: 13px 0 8px; padding-top: 11px; border-top: 1px solid var(--line);
}
.sub-tools {
  list-style: none; margin: 0 0 14px; padding: 0;
  display: grid; gap: 7px;
}
.sub-tools li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12.5px; color: var(--text); line-height: 1.4;
}
.sub-tools li .ico {
  width: 13px; height: 13px; flex: none; margin-top: 1px;
  color: var(--muted);
}
.sub-tools li.off { color: var(--dim); }
.sub-tools li.off .ico { color: rgba(111, 116, 120, .75); }
/* галочка включённого инструмента — в цвете тира */
.sub-card.tier-plus .sub-tools li.on .ico { color: var(--ai); }
.sub-card.tier-pro .sub-tools li.on .ico { color: var(--wine-soft); }
.sub-card.tier-max .sub-tools li.on .ico { color: #C8A45C; }
.sub-card.tier-founder .sub-tools li.on .ico { color: #D6D9DC; }

/* водяной знак: у каждого тира свой крупный знак в углу карточки */
.sub-ghost {
  position: absolute; right: -12px; bottom: -16px;
  width: 104px; height: 104px;
  display: flex; align-items: flex-end; justify-content: flex-end;
  pointer-events: none;
}
.sub-ghost .ico { width: 104px; height: 104px; opacity: .055; }
.sub-card.tier-basic .sub-ghost .ico { color: var(--muted); }
.sub-card.tier-plus .sub-ghost .ico { color: var(--ai); }
.sub-card.tier-pro .sub-ghost .ico { color: var(--wine-soft); }
.sub-card.tier-max .sub-ghost .ico { color: #C8A45C; }
.sub-card.tier-founder .sub-ghost .ico { color: #D6D9DC; }
/* водяной знак всегда ПОД контентом: кнопка «Купить»/«Продлить» выше него */
.sub-card > *:not(.sub-ghost) { position: relative; z-index: 1; }

.sub-cta { display: grid; gap: 8px; }
.sub-buy {
  width: 100%; padding: 12px; border-radius: var(--r-s);
  background: var(--accent); border: 1px solid rgba(185, 78, 78, .55);
  color: #FFF6F4; font-family: inherit; font-size: 14px;
  font-weight: 700; cursor: pointer;
  transition: transform .15s ease, background .15s ease, opacity .15s ease;
}
.sub-buy:hover { background: var(--accent-lit); }
.sub-buy:active { transform: scale(.98); }
.sub-buy:disabled { opacity: .6; cursor: default; transform: none; }

/* Вторая кнопка оплаты — Tribute (карта/СБП/крипта), ссылка на товар */
.sub-tribute {
  display: block; width: 100%; padding: 11px 12px;
  border-radius: var(--r-s); text-align: center;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line-2);
  color: var(--dim); font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}
.sub-tribute:hover { color: var(--fg); border-color: rgba(185, 78, 78, .55); }
.sub-tribute:active { transform: scale(.98); }
.sub-own {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--green);
  padding: 10px 12px; border: 1px dashed rgba(145, 168, 143, .35);
  border-radius: var(--r-s);
}
.sub-own .ico { width: 14px; height: 14px; }
.sub-own.dim { color: var(--dim); border-color: var(--line-2); }

/* ---------- Founder HQ: эксклюзивная карточка основателя ---------- */
.fhq {
  position: relative; overflow: hidden;
  margin-top: 14px; padding: 16px;
  border-radius: var(--r);
  background: linear-gradient(160deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .02) 55%), var(--card);
  border: 1px solid rgba(255, 255, 255, .17);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10);
  animation: rise .4s cubic-bezier(.22, .61, .36, 1) both;
}
.fhq::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
}
.fhq-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
}
.fhq-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .18em;
  text-transform: uppercase; color: #E8E6E1;
}
.fhq-eyebrow .ico { width: 16px; height: 16px; color: #D9D7D2; }
.fhq-num {
  font-size: 19px; font-weight: 800; color: #F5F3EF;
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 999px; padding: 3px 13px;
}
.fhq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 11px; }
.fhq-cell {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  border-radius: 11px; padding: 11px 12px; display: grid; gap: 3px;
}
.fhq-cell b {
  font-size: 15.5px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.fhq-cell span {
  font-size: 9.5px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--dim);
}
.fhq-forever {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 12.5px; line-height: 1.45; color: var(--text);
  background: rgba(255, 255, 255, .04);
  border: 1px dashed rgba(255, 255, 255, .20);
  border-radius: 11px; padding: 11px 12px; margin-bottom: 12px;
}
.fhq-forever .ico { width: 14px; height: 14px; flex: none; margin-top: 1px; color: #E8E6E1; }
.fhq-btn { width: 100%; }

/* ---------- Годовой отчёт основателя (Year in Review) ---------- */
.yr-hero { text-align: center; padding: 16px 0 18px; }
.yr-kicker {
  font-size: 10px; font-weight: 800; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 9px;
}
.yr-title {
  font-size: 21px; font-weight: 800; letter-spacing: -.01em;
  color: var(--text); line-height: 1.3;
}
.yr-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 9px; margin-bottom: 6px;
}
.yr-cell {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 15px 8px;
  text-align: center; display: grid; gap: 5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
  animation: rise .4s cubic-bezier(.22, .61, .36, 1) both;
}
.yr-cell:nth-child(2) { animation-delay: 70ms; }
.yr-cell:nth-child(3) { animation-delay: 130ms; }
.yr-cell b {
  font-size: 20px; font-weight: 800; color: var(--text);
  font-variant-numeric: tabular-nums; word-break: break-word;
}
.yr-cell span {
  font-size: 9px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--dim); line-height: 1.35;
}
.yr-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
  margin: 18px 2px 9px;
}
.yr-label::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}
.yr-pair {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 11px; padding: 10px 12px; margin-bottom: 8px;
  animation: rise .35s cubic-bezier(.22, .61, .36, 1) both;
}
.yr-pair:nth-child(2) { animation-delay: 50ms; }
.yr-pair:nth-child(3) { animation-delay: 90ms; }
.yr-pair-n {
  width: 20px; height: 20px; flex: none; border-radius: 6px;
  background: rgba(255, 255, 255, .06);
  color: var(--dim); font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.yr-pair-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap;
}
.yr-pair-bar {
  flex: 1; height: 7px; min-width: 36px; border-radius: 4px;
  background: rgba(255, 255, 255, .05); overflow: hidden;
}
.yr-pair-bar i {
  display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-lit));
}
.yr-pair-c {
  width: 26px; text-align: right; font-size: 12px; font-weight: 700;
  color: var(--muted); font-variant-numeric: tabular-nums;
}
.yr-signal {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 15px; text-align: center;
  font-size: 16px; font-weight: 700; color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
  animation: rise .4s .16s both;
}

/* ---------- доступность: меньше движения ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  /* загрузка остаётся видимой: график нарисован, точка на месте */
  .ldr-ic, .ldr-line, .ldr-pt, .ldr-txt, .live i,
  .mode-status i, .step.active::before {
    animation: none !important;
  }
  /* тирные эффекты аватарки — статикой */
  .ava-orbit, .ava-drip i, .ava-spark i {
    animation: none !important;
  }
  .ava-drip i { opacity: 0 !important; }
  .ldr-line { stroke-dashoffset: 0 !important; }
  .ldr-pt { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   Фазы 2–3: действия на результате · скринер · журнал · точность
   ============================================================ */

/* --- 📝🔁🖼 ряд действий под параметрами анализа --- */
.res-acts { margin-top: 10px; display: flex; gap: 8px; }
.res-acts .ghost {
  margin-top: 0; padding: 11px 6px; font-size: 12px;
  flex: 1; min-width: 0; white-space: nowrap;
}
.res-acts .ghost .ico { width: 14px; height: 14px; flex: none; }
.acts-note { margin-top: 9px; font-size: 12px; line-height: 1.45; color: var(--muted); }

/* --- риск-калькулятор на результате --- */
.risk {
  margin-top: 12px; padding: 12px;
  background: var(--card-2); border: 1px solid var(--line);
  border-radius: var(--r-s);
}
.risk-head {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; color: var(--muted);
  letter-spacing: .05em; text-transform: uppercase;
}
.risk-head .ico { width: 14px; height: 14px; }
.risk-in { display: flex; gap: 8px; margin-top: 10px; }
.risk-f {
  flex: 1; display: flex; flex-direction: column; gap: 4px;
  font-size: 11px; color: var(--dim); font-weight: 600;
}
.risk-f input {
  width: 100%; padding: 9px 10px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; color: var(--text);
  font-size: 14px; font-weight: 700; font-family: inherit;
  outline: none;
}
.risk-f input:focus { border-color: var(--accent); }
.risk-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-top: 10px;
}
.risk-grid > div {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px;
}
.risk-grid span {
  display: block; font-size: 11px; color: var(--dim); font-weight: 600;
}
.risk-grid b { display: block; font-size: 15px; font-weight: 800; margin-top: 2px; }
.risk-grid b.r-pos { color: var(--green); }
.risk-grid b.r-neg { color: var(--red); }
.risk-sub { margin-top: 8px; font-size: 11px; color: var(--muted); }

/* --- 📡 скринер: экран выбора пары --- */
.screener {
  margin-bottom: 14px; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--card-2);
}
.screener-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.screener-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700;
}
.screener-title .ico { width: 14px; height: 14px; color: var(--ai-2); }
.screener-note { color: var(--dim); font-size: 11px; white-space: nowrap; }
.scr-row {
  display: grid;
  /* ровные колонки: парa | сигнал | уверенность | цена | изменение */
  grid-template-columns:
    minmax(56px, 1.05fr) minmax(84px, 1.4fr) minmax(34px, .6fr)
    minmax(58px, 1fr) minmax(50px, .9fr);
  align-items: center; gap: 6px;
  width: 100%; padding: 9px 12px;
  background: transparent; border: none;
  border-top: 1px solid var(--line);
  color: var(--text); font-family: inherit; font-size: 13px;
  text-align: left; cursor: pointer;
  transition: background .15s ease;
}
.scr-row:first-child { border-top: none; }
.scr-row:active { background: rgba(255, 255, 255, .04); }
.scr-row b { font-size: 12px; font-weight: 700; letter-spacing: .02em; }
/* сигнал — пилюля с окантовкой в цвет сигнала */
.scr-label {
  justify-self: start; display: inline-flex; align-items: center;
  padding: 3px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: .05em;
  white-space: nowrap; text-transform: uppercase;
  border: 1px solid currentColor;
}
.scr-label.buy { color: var(--green); background: rgba(145, 168, 143, .09); }
.scr-label.sell { color: var(--red); background: rgba(182, 107, 103, .09); }
.scr-label.wait { color: var(--ai-2); background: rgba(135, 155, 168, .09); }
.scr-conf {
  color: var(--dim); font-size: 11px; font-weight: 700;
  text-align: right;
}
.scr-price, .scr-chg {
  text-align: right; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.scr-price { color: var(--muted); font-size: 12px; }
.scr-chg { font-size: 11px; font-weight: 700; }
.scr-chg.up { color: var(--green); }
.scr-chg.dn { color: var(--red); }

/* --- 📝 журнал сделок в панели профиля --- */
.jitem {
  background: var(--card-2);
  border: 1px solid var(--line); border-radius: var(--r-s);
  padding: 11px 12px; margin-bottom: 8px;
}
.jitem:nth-child(1) { animation-delay: 40ms; }
.jitem:nth-child(2) { animation-delay: 80ms; }
.jitem:nth-child(3) { animation-delay: 120ms; }
.jitem:nth-child(n+4) { animation-delay: 160ms; }
.jitem-top {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; font-size: 14px; font-weight: 700;
}
.jitem-top span {
  color: var(--muted); font-size: 11px; font-weight: 600;
  white-space: nowrap; letter-spacing: .04em;
}
.jitem-top .j-side {
  display: inline-flex; align-items: center; gap: 3px;
}
.jitem-top .j-side .ico { width: 11px; height: 11px; }
.jitem-top .j-side.long { color: var(--green); }
.jitem-top .j-side.short { color: var(--red); }
.jitem-top i { font-style: normal; font-size: 13px; font-weight: 700; }
.j-win .jitem-top i { color: var(--green); }
.j-loss .jitem-top i { color: var(--red); }
.j-open .jitem-top i { color: var(--ai-2); font-size: 12px; font-weight: 600; }
.jitem-lv { color: var(--muted); font-size: 12px; margin-top: 5px; }
.jitem-acts { display: flex; gap: 8px; margin-top: 9px; }
.jitem-acts .ghost { flex: 1; margin-top: 0; padding: 9px; font-size: 12px; }
.j-export { display: flex; justify-content: flex-end; gap: 8px; margin: 2px 0 10px; }
.j-export .ghost { margin-top: 0; padding: 7px 12px; font-size: 12px; }

/* --- 🎯 точность модели: 7/30 дней --- */
.details .v.acc-good { color: var(--green); }
.details .v.acc-bad { color: var(--red); }
.details .v.acc-mid { color: var(--wine-soft); }

/* ============================================================
   MOTION SYSTEM — кинематографичный слой поверх NO NEON
   Правила: только transform/opacity, токены --d-*, --e-*, --stg;
   всё выключается через prefers-reduced-motion (блок H внизу).
   ============================================================ */

/* --- A. Атмосферный свет: медленный дрейф за контентом --- */
.ambient {
  position: fixed; inset: -10%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(44% 32% at 24% 16%, rgba(245, 243, 239, .055), transparent 70%),
    radial-gradient(50% 38% at 80% 76%, rgba(169, 68, 68, .06), transparent 72%),
    radial-gradient(38% 30% at 70% 24%, rgba(135, 155, 168, .045), transparent 72%);
  animation: ambientDrift 46s var(--e-soft) infinite alternate;
  will-change: transform;
}
@keyframes ambientDrift {
  from { transform: translate3d(-1.4%, -1%, 0) scale(1); }
  to   { transform: translate3d(1.4%, 1.6%, 0) scale(1.05); }
}

/* --- B. Кинематографичное интро: один раз за сессию, тап = пропуск --- */
.intro {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(64% 42% at 50% 46%, rgba(245, 243, 239, .04), transparent 70%),
    var(--bg);
  animation: introOut .5s 1.5s var(--e-soft) forwards;
}
.intro-glow {
  position: absolute; left: 50%; top: 46%;
  width: 64vmin; height: 64vmin;
  background:
    radial-gradient(circle, rgba(245, 243, 239, .10),
                        rgba(169, 68, 68, .07) 45%, transparent 70%);
  opacity: 0; transform: translate(-50%, -50%) scale(.72);
  animation: introGlow 1.7s var(--e-out) forwards;
}
.intro-logo {
  position: relative; overflow: hidden; padding: 6px 14px;
  font-size: 25px; font-weight: 700;
  letter-spacing: .32em; text-indent: .32em;
  color: var(--text);
  opacity: 0; transform: scale(.965);
  animation: introLogo var(--d-cine) .12s var(--e-out) forwards;
}
.intro-logo span { color: var(--wine-soft); }
/* Блик идёт ТОЛЬКО по глифам (background-clip: text), а не прямоугольником
   по боксу: дублируем текст в псевдоэлемент и красим его световым бликом. */
.intro-logo::after {
  content: "REKT AI";
  position: absolute; inset: 0;
  box-sizing: border-box; padding: inherit;
  white-space: nowrap; pointer-events: none;
  background: linear-gradient(100deg, transparent 44%,
              rgba(255, 255, 255, .22) 47.5%,
              rgba(255, 255, 255, .78) 50%,
              rgba(255, 255, 255, .22) 52.5%, transparent 56%);
  background-size: 320% 100%;
  background-repeat: no-repeat;
  background-position: 100% 0;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: introSheen 1s .5s var(--e-out) both;
}
@keyframes introSheen {
  from { background-position: 100% 0; }   /* свет слева, вне букв */
  to   { background-position: 0% 0; }     /* выходит вправо за буквы */
}
@keyframes introGlow {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.72); }
  55%  { opacity: 1; }
  100% { opacity: .75; transform: translate(-50%, -50%) scale(1); }
}
@keyframes introLogo {
  from { opacity: 0; transform: scale(.965); filter: blur(3px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes introOut {
  from { opacity: 1; }
  to   { opacity: 0; visibility: hidden; }
}
.intro.done {
  animation: none !important;   /* тап срывает отложенный fade-out */
  opacity: 0; visibility: hidden;
  transition: opacity .26s var(--e-soft);
}

/* --- C. Системный отклик: тап-подсветка, фокус для клавиатуры --- */
:where(button, .chip, .pair, .mode, .pact, .nav-item, .scr-row,
       .ghost, .ghost-a, .ctx-item, .m-btn, .watch-btn, .starbtn) {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
:where(button, input, a, [tabindex]):focus-visible {
  outline: 2px solid var(--wine-soft);
  outline-offset: 2px;
}
.mode { transition: transform var(--d-press) var(--e-out),
                    border-color var(--d-state) var(--e-out),
                    box-shadow var(--d-state) var(--e-out); }
.mode:active { transform: scale(.985); }

/* --- D. Reveal-последовательность результата анализа --- */
/* секции появляются по очереди: вердикт -> график -> параметры -> действия */
#result-body.seq > * { animation: rise var(--d-reveal) var(--e-out) both; }
#result-body.seq > *:nth-child(1) { animation-delay: 0ms; }
#result-body.seq > *:nth-child(2) { animation-delay: calc(var(--stg) * 2); }
#result-body.seq > *:nth-child(3) { animation-delay: calc(var(--stg) * 4); }
#result-body.seq > *:nth-child(4) { animation-delay: calc(var(--stg) * 5); }
#result-body.seq > *:nth-child(5) { animation-delay: calc(var(--stg) * 6); }
#result-body.seq > *:nth-child(6) { animation-delay: calc(var(--stg) * 7); }
#result-body.seq > *:nth-child(7) { animation-delay: calc(var(--stg) * 8); }
#result-body.seq > *:nth-child(n+8) { animation-delay: calc(var(--stg) * 9); }

/* --- E. Освещение вердикта: один блик после появления результата --- */
.ai-card.sweep::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 34%,
              rgba(255, 255, 255, .10) 50%, transparent 66%);
  transform: translateX(-130%);
  animation: sheen 1s .3s var(--e-soft);
}

/* --- F. График: мягкий вход свечей при монтировании --- */
.bc-canvas { animation: fade var(--d-reveal) var(--e-soft) both; }

/* --- G. Уведомления и заметки: появление снизу --- */
.p-note, .acts-note, .watch-note, .jr-note {
  animation: rise .3s var(--e-out) both;
}

/* --- H. Reduced motion: слой выключается целиком --- */
@media (prefers-reduced-motion: reduce) {
  .ambient, .intro, .intro-glow, .intro-logo, .intro-logo::after { animation: none !important; }
  .intro { display: none !important; }
  #result-body.seq > *, .bc-canvas,
  .p-note, .acts-note, .watch-note, .jr-note { animation: none !important; }
  .ai-card.sweep::after { display: none; }
  .ambient { will-change: auto; }
}

/* --- Разделы с гейтом MAX: замок на кнопке профиля --- */
.pact.locked { opacity: .72; }
.pact.locked .ico { color: var(--dim); }
.pact-lock {
  flex: none;
  font-size: 9.5px; font-weight: 800; letter-spacing: .12em;
  color: #C8A45C;
  border: 1px solid rgba(200, 164, 92, .45);
  border-radius: 6px;
  padding: 3px 7px;
}

/* --- Главная: плитки сервисов --- */
.home-tiles { display: grid; gap: 10px; margin-top: 10px; }
.tile {
  display: flex; align-items: center; gap: 12px; text-align: left;
  width: 100%; min-width: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .008)),
    var(--card);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 13px 14px; cursor: pointer; color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
  transition: transform .2s ease, border-color .2s ease;
}
.tile:active { transform: scale(.985); }
.tile-ico {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .07);
}
.tile-ico .ico { width: 18px; height: 18px; color: var(--dim); }
.tile-body {
  display: grid; gap: 3px; min-width: 0; flex: 1 1 auto;
}
.tile-name {
  font-size: 14.5px; font-weight: 600; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile-note {
  font-size: 11.5px; color: var(--dim); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile-arrow {
  flex: none; display: grid; place-items: center;
  color: var(--muted); opacity: .7;
}
.tile-arrow .ico { width: 16px; height: 16px; }
.tile-hero {
  padding: 15px 14px;
  border-color: rgba(200, 164, 92, .30);
  background:
    linear-gradient(115deg, rgba(200, 164, 92, .13), rgba(255, 255, 255, .01) 60%),
    var(--card);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 10px 26px -14px rgba(200, 164, 92, .40);
}
.tile-hero .tile-ico {
  width: 42px; height: 42px;
  background: rgba(200, 164, 92, .15);
  border-color: rgba(200, 164, 92, .32);
}
.tile-hero .tile-ico .ico { width: 20px; height: 20px; color: #C8A45C; }
.tile-hero .tile-name { font-size: 15.5px; font-weight: 700; letter-spacing: .01em; }
.tile-hero .tile-note { color: rgba(245, 243, 239, .62); }
.tile.locked { opacity: .8; }
.tile.locked .tile-ico .ico { color: var(--dim); }
.tile.locked .tile-hero .tile-ico .ico { color: #B99A63; }

/* --- Тепловые карточки (treemap) --- */
.hm-fng {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px; margin-bottom: 18px;
}
.hm-fng-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--dim);
}
.hm-fng-val { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: 0; }
.hm-fng-bar {
  margin-top: 10px; height: 8px; border-radius: 6px; overflow: hidden;
  background: linear-gradient(90deg, var(--red), var(--dim), var(--green));
}
.hm-fng-bar i {
  display: block; height: 100%; border-radius: 6px;
  background: rgba(11, 13, 15, .55);
  box-shadow: 0 0 0 2px var(--bg-2);
}
.hm-fng-label {
  margin-top: 8px; font-size: 12px; color: var(--muted);
}
.hm-map {
  display: grid; grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 74px; gap: 8px; margin-bottom: 18px;
}
.hm-coins { grid-auto-rows: 66px; }
.hm-cell {
  display: flex; flex-direction: column; justify-content: center;
  gap: 3px; padding: 8px 10px; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--r-s);
  background: var(--card); overflow: hidden;
}
/* монетная плитка: логотип и тикер в одну строку, чтобы имя не обрезалось */
.hm-cell.hm-coin { flex-direction: row; align-items: center; gap: 7px; }
.hm-coin-body {
  display: flex; flex-direction: column; justify-content: center;
  min-width: 0; flex: 1;
}
.hm-ico {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  object-fit: cover; background: rgba(255, 255, 255, .06);
}
.hm-md .hm-ico, .hm-big .hm-ico { width: 30px; height: 30px; }
.hm-md { grid-column: span 2; grid-row: span 2; }
.hm-big { grid-column: span 2; grid-row: span 2; }
.hm-name {
  font-size: 12.5px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.2;
}
.hm-big .hm-name, .hm-md .hm-name { font-size: 15px; font-weight: 700; }
/* сектор: длинное имя переносится на 2-3 строки, а не обрезается точками */
.hm-sec-name {
  font-size: 11px; font-weight: 600; color: var(--text);
  line-height: 1.15; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.hm-big .hm-sec-name, .hm-md .hm-sec-name { font-size: 13.5px; font-weight: 700; -webkit-line-clamp: 3; }
.hm-chg { font-size: 12px; font-weight: 700; color: var(--muted); }
.hm-big .hm-chg, .hm-md .hm-chg { font-size: 14px; }
.hm-fund { font-size: 10.5px; font-weight: 600; color: var(--dim); letter-spacing: .02em; }
.hm-fund.up { color: var(--red); }
.hm-fund.down { color: var(--green); }
.hm-empty {
  grid-column: span 4; display: grid; place-items: center;
  color: var(--dim); font-size: 12px; padding: 20px;
  border: 1px dashed var(--line); border-radius: var(--r-s);
}
/* кружок-заглушка вместо пустого логотипа (стейблкоины, обёртки) */
.hm-ico.hm-ph, .ci-ico.hm-ph {
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--muted);
  background: rgba(255, 255, 255, .08); text-transform: uppercase;
}
.hm-md .hm-ph, .hm-big .hm-ph { font-size: 15px; }

/* --- Карточка монеты по тапу (тепловая карта) --- */
.ci-card { padding: 16px; }
.ci-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ci-ico {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  object-fit: cover; background: rgba(255, 255, 255, .06);
}
.ci-head { flex: 1; min-width: 0; }
.ci-sym { font-size: 19px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.ci-chg { font-size: 13px; font-weight: 700; margin-top: 2px; }
.ci-chg.up { color: var(--green); } .ci-chg.down { color: var(--red); } .ci-chg.flat { color: var(--muted); }
.ci-rows { display: grid; gap: 6px; }
.ci-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 9px 11px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px;
}
.ci-row .k { font-size: 12.5px; color: var(--muted); }
.ci-row .v { font-size: 13px; font-weight: 700; color: var(--text); }
.ci-row .v.up { color: var(--green); } .ci-row .v.down { color: var(--red); } .ci-row .v.flat { color: var(--muted); }

/* --- Jarroo method: verdict badge and levels chart --- */.jar-verdict {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .10);
  color: var(--dim);
}
.jar-verdict.buy { color: var(--green); border-color: rgba(145, 168, 143, .40); }
.jar-verdict.sell { color: var(--red); border-color: rgba(182, 107, 103, .40); }
.jar-verdict.wait { color: var(--dim); }

/* --- Jarroo: picker header --- */
.jar-picker-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; margin: 2px 0 20px;
}
.jar-picker-kicker {
  color: var(--dim); font-size: 9px; font-weight: 700;
  letter-spacing: .16em; line-height: 1.3;
}
.jar-picker-title {
  margin-top: 4px; color: var(--text); font-size: 20px;
  font-weight: 700; letter-spacing: -.025em;
}
.jar-selected-wrap { display: grid; justify-items: end; gap: 5px; }
.jar-selected-label {
  color: var(--dim); font-size: 9px; letter-spacing: .12em;
  text-transform: uppercase;
}
.jar-selected {
  display: inline-flex; align-items: center; min-height: 29px;
  padding: 5px 11px; border: 1px solid rgba(185,78,78,.38);
  border-radius: 9px; color: var(--wine-soft);
  background: rgba(169,68,68,.13); font-size: 12px; font-weight: 750;
  letter-spacing: .04em;
}
.jar-section-label {
  margin: 0 0 8px; color: var(--dim); font-size: 10px;
  font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
}
.jar-markets-label { margin-top: 2px; }

/* --- Jarroo: timeframe segmented control --- */
#jar-tf {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px; margin: 0 0 18px; padding: 5px;
  border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255,255,255,.025);
}
#jar-tf .chip {
  min-width: 0; padding: 10px 5px; border: 0; border-radius: 9px;
  color: var(--muted); background: transparent; font-size: 12px;
  font-weight: 700; letter-spacing: .04em;
}
#jar-tf .chip:hover { color: var(--text); background: rgba(255,255,255,.05); }
#jar-tf .chip.active {
  color: #FFF6F4; background: var(--accent);
  box-shadow: 0 4px 12px rgba(143,52,52,.25), inset 0 1px 0 rgba(255,255,255,.12);
}

/* --- Jarroo: market groups / accordion --- */
#jar-chips.jar-groups {
  display: grid; gap: 10px; margin: 0 0 20px;
}
.jar-group {
  --group-accent: var(--ai-2);
  --group-rgb: 135,155,168;
  overflow: hidden; border: 1px solid rgba(var(--group-rgb),.18);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(var(--group-rgb),.075), transparent 58%),
    var(--card-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 10px 26px rgba(0,0,0,.14);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.jar-group[data-jar-group="metals"] {
  --group-accent: #C8A45C; --group-rgb: 200,164,92;
}
.jar-group[data-jar-group="forex"] {
  --group-accent: var(--green); --group-rgb: 145,168,143;
}
.jar-group:has(.jar-group-head[aria-expanded="true"]) {
  border-color: rgba(var(--group-rgb),.30);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 12px 30px rgba(0,0,0,.18);
}
.jar-group-head {
  width: 100%; min-height: 68px; display: grid;
  grid-template-columns: 38px minmax(0,1fr) auto 14px;
  align-items: center; gap: 12px; padding: 13px 15px;
  color: var(--text); text-align: left; font: inherit;
  background: transparent; border: 0; cursor: pointer;
  transition: background .18s ease;
}
.jar-group-head:hover { background: rgba(var(--group-rgb),.055); }
.jar-group-head:focus-visible { outline: 2px solid var(--group-accent); outline-offset: -3px; }
.jar-group-mark {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid rgba(var(--group-rgb),.32); border-radius: 11px;
  color: var(--group-accent); background: rgba(var(--group-rgb),.10);
  font-size: 10px; font-weight: 800; letter-spacing: .06em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.jar-group-names { display: grid; gap: 4px; min-width: 0; }
.jar-group-title { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.jar-group-current {
  min-height: 13px; overflow: hidden; color: var(--muted);
  font-size: 11px; letter-spacing: .01em; text-overflow: ellipsis; white-space: nowrap;
}
.jar-group-count {
  min-width: 26px; padding: 4px 7px; border: 1px solid rgba(var(--group-rgb),.20);
  border-radius: 8px; color: var(--group-accent);
  background: rgba(var(--group-rgb),.08); text-align: center;
  font-size: 11px; font-weight: 750;
}
.jar-group-arrow {
  width: 9px; height: 9px; border-right: 1.5px solid var(--group-accent);
  border-bottom: 1.5px solid var(--group-accent);
  transform: rotate(45deg) translateY(-2px); opacity: .75;
  transition: transform .2s ease, opacity .2s ease;
}
.jar-group-head[aria-expanded="true"] .jar-group-arrow {
  transform: rotate(225deg) translate(-1px,-1px); opacity: 1;
}
.jar-group-panel {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px; padding: 12px; border-top: 1px solid var(--line);
  background: rgba(0,0,0,.13); animation: jar-group-in .2s ease both;
}
.jar-group-panel[hidden] { display: none; }
.jar-pair {
  position: relative; display: grid; align-content: center; gap: 4px;
  min-width: 0; min-height: 59px; padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.085); border-radius: 12px;
  color: var(--text); background: rgba(255,255,255,.025);
  text-align: left; font: inherit; cursor: pointer;
  transition: transform .16s ease, background .16s ease,
              border-color .16s ease, box-shadow .16s ease;
}
.jar-pair:last-child:nth-child(odd) { grid-column: 1 / -1; }
.jar-pair:hover {
  transform: translateY(-1px); border-color: rgba(var(--group-rgb),.42);
  background: rgba(var(--group-rgb),.07);
}
.jar-pair:active { transform: scale(.985); }
.jar-pair:focus-visible { outline: 2px solid var(--group-accent); outline-offset: 2px; }
.jar-pair-code {
  padding-right: 16px; font-size: 13px; font-weight: 750;
  letter-spacing: .025em; line-height: 1.15;
}
.jar-pair-name {
  overflow: hidden; color: var(--muted); font-size: 11px;
  line-height: 1.25; text-overflow: ellipsis; white-space: nowrap;
}
.jar-pair::after {
  content: "✓"; position: absolute; top: 10px; right: 11px;
  color: var(--group-accent); font-size: 13px; font-weight: 800;
  opacity: 0; transform: scale(.7); transition: opacity .16s ease, transform .16s ease;
}
.jar-pair.active {
  border-color: rgba(var(--group-rgb),.62);
  background: linear-gradient(135deg, rgba(var(--group-rgb),.18), rgba(var(--group-rgb),.07));
  box-shadow: 0 0 0 2px rgba(var(--group-rgb),.07), inset 0 1px 0 rgba(255,255,255,.06);
}
.jar-pair.active::after { opacity: 1; transform: scale(1); }
.jar-pair.active .jar-pair-code { color: var(--group-accent); }
.jar-pair.active .jar-pair-name { color: var(--text); }
@keyframes jar-group-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 360px) {
  .jar-group-head { grid-template-columns: 34px minmax(0,1fr) auto 12px; gap: 9px; padding: 12px; }
  .jar-group-mark { width: 32px; height: 32px; }
  .jar-group-title { font-size: 14px; }
  .jar-group-panel { padding: 10px; gap: 7px; }
  .jar-pair { padding: 10px; }
  .jar-pair-name { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .jar-group-panel { animation: none; }
  .jar-pair, .jar-group-head, .jar-group-arrow { transition: none; }
}

/* --- Subscriptions: what you get per tier --- */
.sub-feats {
  list-style: none; margin: 0 0 4px; padding: 10px 12px;
  display: grid; gap: 6px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 12px;
}
.sub-feats li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12.5px; line-height: 1.4; color: var(--text);
}
.sub-feats li .ico {
  width: 13px; height: 13px; flex: none; margin-top: 1px;
  color: var(--green);
}
.sub-card.tier-plus .sub-feats li .ico { color: var(--ai); }
.sub-card.tier-pro .sub-feats li .ico { color: var(--wine-soft); }
.sub-card.tier-max .sub-feats li .ico { color: #C8A45C; }
.sub-card.tier-founder .sub-feats li .ico { color: #D6D9DC; }

/* ---------- Экран «Контекст рынка» (метод торговли) ---------- */
.sess { display: grid; gap: 8px; }
.sess-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); transition: border-color .2s, background .2s;
}
.sess-row.on {
  border-color: rgba(145, 168, 143, .55);
  background: linear-gradient(180deg, rgba(145, 168, 143, .10), rgba(145, 168, 143, .03)), var(--card);
}
.sess-name { font-size: 13.5px; font-weight: 700; }
.sess-time {
  font-size: 11px; font-weight: 600; letter-spacing: .06em;
  color: var(--dim); font-variant-numeric: tabular-nums;
}
.sess-row.on .sess-name { color: var(--green); }
.sess-now {
  margin-top: 8px; font-size: 12.5px; line-height: 1.45;
  color: var(--muted); min-height: 18px;
}
.sess-now b { color: var(--text); font-weight: 700; }

/* Пять шагов метода OROICHI — вертикальный таймлайн: номер в золотом
   кружке, соединительная линия между шагами, подпись шага капсом. */
.mc { display: grid; gap: 12px; }
.mc-card {
  position: relative;
  padding: 15px 15px 16px 54px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .008)), var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
  transition: border-color .2s ease, background .2s ease;
}
.mc-card:hover { border-color: rgba(200, 164, 92, .35); }
/* линия-таймлайн: стягивает номера шагов в одну цепочку */
.mc-card::before {
  content: ""; position: absolute; left: 28px; top: 46px; bottom: -13px;
  width: 1px;
  background: linear-gradient(180deg, rgba(200, 164, 92, .55), rgba(255, 255, 255, .08));
}
.mc-card:last-child::before { display: none; }
.mc-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.mc-num {
  position: absolute; left: 14px; top: 14px;
  width: 27px; height: 27px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; line-height: 1; color: #E9D5A9;
  background: radial-gradient(circle at 35% 30%, rgba(200, 164, 92, .32), rgba(200, 164, 92, .10));
  border: 1px solid rgba(200, 164, 92, .45);
}
.mc-title {
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text);
}
.mc-ic {
  width: 15px; height: 15px; flex: none; margin-left: auto;
  color: var(--dim); opacity: .85;
}
.mc-text { font-size: 12.5px; line-height: 1.6; color: var(--muted); }

/* шаги всплывают по очереди при входе на экран */
.screen.anim .mc > .mc-card { animation: rise .4s cubic-bezier(.22, .61, .36, 1) both; }
.screen.anim .mc > .mc-card:nth-child(1) { animation-delay: 60ms; }
.screen.anim .mc > .mc-card:nth-child(2) { animation-delay: 120ms; }
.screen.anim .mc > .mc-card:nth-child(3) { animation-delay: 180ms; }
.screen.anim .mc > .mc-card:nth-child(4) { animation-delay: 240ms; }
.screen.anim .mc > .mc-card:nth-child(5) { animation-delay: 300ms; }
