/* CHM BREAKER — Telegram Mini App
   Dark burgundy / neon red, condensed uppercase headings, mono labels. */

:root {
  --bg-0: #060204;
  --bg-1: #0a0305;
  --bg-2: #1d0509;
  --bg-3: #3a0712;

  --card: rgba(10, 3, 6, 0.46);
  --card-2: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.085);
  --line-2: rgba(255, 255, 255, 0.15);

  --text: #f6eef0;
  --muted: rgba(246, 238, 240, 0.58);
  --dim: rgba(246, 238, 240, 0.36);

  --red: #ff2a4d;
  --red-2: #e8193c;
  --red-glow: rgba(255, 42, 77, 0.45);
  --green: #3df2a0;
  --green-dim: rgba(61, 242, 160, 0.14);
  --red-dim: rgba(255, 42, 77, 0.14);
  --amber: #ffc24b;
  --violet-1: #7c3aed;
  --violet-2: #a855f7;

  --r-sm: 6px;
  --r: 8px;
  --r-lg: 10px;

  --f-head: "Oswald", "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --safe-top: max(env(safe-area-inset-top, 0px), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --gutter: 16px;
  --tabbar-h: 64px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg-0); }
body {
  min-height: 100vh;
  min-height: var(--tg-viewport-stable-height, 100vh);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.45;
  background: var(--bg-0);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- background: black → deep burgundy, soft vignette, fine grain ---------- */
.bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(130% 70% at 50% 108%, rgba(150, 22, 48, .38), transparent 62%),
    linear-gradient(180deg, #040203 0%, var(--bg-1) 24%, #140408 46%, var(--bg-2) 64%, #2e060e 84%, var(--bg-3) 100%);
}
.bg::before {
  /* vignette: darker edges, lighter centre */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(115% 85% at 50% 42%, transparent 52%, rgba(0, 0, 0, .55) 100%);
}
.bg::after {
  /* film grain */
  content: ""; position: absolute; inset: 0; opacity: .32; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- app shell ---------- */
.app {
  position: relative; z-index: 1;
  max-width: 480px; margin: 0 auto;
  padding: calc(var(--safe-top) + 8px) 0 calc(var(--tabbar-h) + var(--safe-bottom) + 20px);
  min-height: 100vh;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px var(--gutter) 4px;
  min-height: 40px;
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand-mark { width: 18px; height: 18px; fill: var(--red); filter: drop-shadow(0 0 6px var(--red-glow)); }
.brand-name {
  font-family: var(--f-head); font-weight: 700; font-size: 18px; letter-spacing: .04em;
  text-transform: uppercase;
}
.topbar-right { display: flex; align-items: center; gap: 6px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--f-mono); font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; line-height: 1;
  padding: 5px 7px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--muted);
}
.badge-plan.is-pro {
  color: #fff; border-color: transparent;
  background: linear-gradient(90deg, var(--violet-1), var(--violet-2));
  box-shadow: 0 0 14px rgba(168, 85, 247, .35);
}
.badge-plan.is-free { color: var(--text); }
.badge-demo { color: var(--amber); border-color: rgba(255, 194, 75, .4); }

.view { padding: 0 var(--gutter); }
.screen { animation: fadeUp .28s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- type ---------- */
.h1 {
  font-family: var(--f-head); font-weight: 700; text-transform: uppercase;
  font-size: 34px; line-height: .95; letter-spacing: -.005em; margin: 18px 0 14px;
  transform: scaleY(1.04); transform-origin: left bottom;
}
.h1.center { text-align: center; transform-origin: center bottom; }
.h2 {
  font-family: var(--f-head); font-weight: 700; text-transform: uppercase;
  font-size: 26px; line-height: 1; margin: 30px 0 12px; letter-spacing: .005em;
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.h2 > span:first-child { position: relative; padding-left: 12px; }
.h2 > span:first-child::before {
  content: ""; position: absolute; left: 0; top: 3px; bottom: 1px; width: 3px; border-radius: 2px;
  background: var(--red); box-shadow: 0 0 10px var(--red-glow);
}
.h2 .link {
  font-family: var(--f-mono); font-weight: 500; font-size: 10px; color: var(--muted);
  letter-spacing: .08em;
}
.h2 .link:active { color: var(--text); }
.mono { font-family: var(--f-mono); }
.label {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .06em; color: var(--dim);
  text-transform: uppercase; white-space: nowrap;
}
.label-b { color: var(--muted); }
.cond {
  font-family: var(--f-head); font-weight: 600; text-transform: uppercase; letter-spacing: .01em;
}
.up { color: var(--green); }
.down { color: var(--red); }
.muted { color: var(--muted); }

/* ---------- cards ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.012) 58%), var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 14px 34px -22px rgba(0,0,0,.95);
  backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px);
  transition: transform .12s ease, border-color .12s ease;
}
.card.pad { padding: 14px; }
/* tappable cards: pressed feedback */
button.card:active, .card.tile:active { transform: scale(.985); border-color: var(--line-2); }
/* accent cards: soft inner glow */
.card.glow-red { border-color: rgba(255,42,77,.4); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 48px -26px rgba(255,42,77,.65), 0 0 30px -16px var(--red-glow); }
.card.glow-violet { border-color: rgba(168,85,247,.45); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 48px -26px rgba(168,85,247,.6), 0 14px 30px -18px rgba(124,58,237,.6); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 18px; border-radius: var(--r-sm);
  font-family: var(--f-mono); font-size: 12px; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; white-space: nowrap;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
  user-select: none;
}
.btn:active { transform: scale(.97); filter: brightness(.9); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-red {
  color: #fff;
  background: linear-gradient(180deg, #ff3d5e, var(--red-2));
  box-shadow: 0 8px 24px -8px var(--red-glow), inset 0 1px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(0,0,0,.2);
}
.btn-red:active { box-shadow: 0 2px 10px -6px var(--red-glow), inset 0 1px 0 rgba(255,255,255,.1); }
.btn-dark {
  color: var(--text); background: rgba(255,255,255,.055); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.btn-dark:active { background: rgba(255,255,255,.1); }
.btn-ghost { color: var(--muted); border: 1px solid var(--line); background: transparent; }
.btn-block { width: 100%; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 11px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--muted);
}
.icon-btn svg { width: 16px; height: 16px; }

/* ---------- svg strokes ---------- */
.tab svg, .icon-btn svg, .btn svg, .ico {
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- promo banner ---------- */
.promo {
  position: relative; overflow: hidden; border-radius: var(--r);
  min-height: 150px; padding: 18px 16px 16px 16px;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(255,255,255,.18), transparent 55%),
    linear-gradient(115deg, #5b21b6 0%, var(--violet-1) 35%, var(--violet-2) 100%);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 18px 40px -18px rgba(124, 58, 237, .65);
  display: grid; grid-template-columns: 104px 1fr; gap: 10px 10px; align-items: center;
}
.promo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 22px);
}
.promo-art { position: relative; height: 118px; }
.promo-art svg { width: 100%; height: 100%; overflow: visible; }
.promo-text { position: relative; z-index: 1; text-align: right; }
.promo-title {
  font-family: var(--f-head); font-weight: 700; font-style: italic; text-transform: uppercase;
  font-size: 34px; line-height: .92; letter-spacing: -.01em; color: #fff;
  text-shadow: 0 2px 18px rgba(40, 0, 80, .4);
}
.promo-title .nw { white-space: nowrap; }
.promo-title.sm { font-size: 28px; }
.promo-sub {
  margin-top: 6px;
  font-family: var(--f-head); font-weight: 500; font-style: italic; text-transform: uppercase;
  font-size: 15px; line-height: 1.08; color: rgba(255,255,255,.82);
}
.promo .btn { margin-top: 12px; height: 36px; font-size: 11px; background: #fff; color: #3b0b6e; box-shadow: none; }
.promo-foot {
  grid-column: 1 / -1; position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding-top: 10px; margin-top: 2px; border-top: 1px solid rgba(255,255,255,.2);
}
.promo-k { font-family: var(--f-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.75); margin-right: 2px; }
.pchip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 4px;
  font-family: var(--f-mono); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: #fff; background: rgba(30, 0, 60, .35); border: 1px solid rgba(255,255,255,.3);
}
.pchip b { font-weight: 700; color: #e9d5ff; }
.pchip.is-primary { background: #fff; color: #3b0b6e; border-color: #fff; }
.pchip.is-primary b { color: var(--violet-1); }
.pchip.locked, .pchip.off { background: transparent; border-style: dashed; color: rgba(255,255,255,.75); font-weight: 500; }
.pchip .lock { width: 11px; height: 11px; color: currentColor; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.stat { padding: 11px 10px 10px; min-width: 0; }
.stat-val {
  font-family: var(--f-head); font-weight: 700; font-size: 26px; line-height: 1; margin-top: 8px;
  letter-spacing: -.01em;
}
.stat-val small { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 1px; }
.stat-sub { font-family: var(--f-mono); font-size: 9.5px; color: var(--dim); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-val.up, .stat-val.down { text-shadow: 0 0 18px currentColor; }

/* ---------- market strip ---------- */
.market { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 8px; }
.mkt { padding: 11px 12px 12px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.mkt + .mkt { border-left: 1px solid var(--line); }
.mkt-head { display: flex; justify-content: space-between; align-items: center; }
.mkt-sym { font-family: var(--f-head); font-weight: 600; font-size: 16px; letter-spacing: .02em; }
.mkt-price { font-family: var(--f-mono); font-size: 14px; font-weight: 500; }
.chg { font-family: var(--f-mono); font-size: 10.5px; font-weight: 700; }

/* ---------- strategy grid ---------- */
.strat-name {
  font-family: var(--f-head); font-weight: 600; text-transform: uppercase; font-size: 15px; line-height: 1;
  letter-spacing: .01em;
}
.ls { display: flex; gap: 4px; margin-top: 8px; }
.ls span {
  flex: 1; text-align: center; font-family: var(--f-mono); font-size: 9px; font-weight: 700;
  padding: 3px 0; border-radius: 3px; border: 1px solid var(--line); color: var(--dim);
}
.ls span.on-l { color: #072; color: var(--green); border-color: rgba(61,242,160,.4); background: var(--green-dim); }
.ls span.on-s { color: var(--red); border-color: rgba(255,42,77,.45); background: var(--red-dim); }
.lock { width: 14px; height: 14px; color: var(--muted); }


/* ---------- direction / status badges ---------- */
.dir {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--f-mono); font-size: 10px; font-weight: 700; letter-spacing: .06em;
  padding: 4px 7px; border-radius: 3px; line-height: 1;
}
.dir.long { color: #04140c; background: var(--green); }
.dir.short { color: #fff; background: var(--red); }
.st {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--f-mono); font-size: 10px; font-weight: 700; letter-spacing: .05em;
  padding: 4px 7px; border-radius: 3px; line-height: 1; border: 1px solid var(--line-2); color: var(--muted);
  text-transform: uppercase; white-space: nowrap;
}
.st.open { color: var(--amber); border-color: rgba(255,194,75,.45); }
.st.open::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 6px var(--amber); animation: pulse 1.6s infinite; }
.st.win { color: var(--green); border-color: rgba(61,242,160,.45); background: var(--green-dim); }
.st.loss { color: var(--red); border-color: rgba(255,42,77,.5); background: var(--red-dim); }
.st.be { color: var(--text); border-color: var(--line-2); }
@keyframes pulse { 50% { opacity: .3; } }

.stars { font-size: 11px; letter-spacing: 1px; color: var(--red); white-space: nowrap; }
.stars .off { color: rgba(255,255,255,.18); }

/* ---------- horizontal offers (recent signals) ---------- */
.hscroll {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 6px;
  scrollbar-width: none;
}
.hscroll::-webkit-scrollbar { display: none; }
.offer-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.offer-pair { font-family: var(--f-head); font-weight: 600; font-size: 19px; line-height: 1; text-transform: uppercase; }
.offer-actions { display: flex; gap: 6px; }
.offer-actions .btn { flex: 1; height: 36px; }

/* ---------- chips ---------- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.chip {
  height: 34px; padding: 0 14px; border-radius: var(--r-sm);
  font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase;
  border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, transform .12s;
}
.chip:active { transform: scale(.96); }
.chip.on { color: #fff; border-color: transparent; background: linear-gradient(180deg, var(--red), var(--red-2)); box-shadow: 0 4px 16px -6px var(--red-glow); }
.chip .cnt { opacity: .6; font-size: 10px; }

/* ---------- select-like field (CATEGORIES ALL) ---------- */
.field {
  display: flex; align-items: stretch; gap: 8px;
}
.field-box {
  flex: 1; padding: 8px 12px 9px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 2px;
}
.field-box:focus-within { border-color: rgba(255,42,77,.6); box-shadow: 0 0 0 3px rgba(255,42,77,.12); }
.field-box input {
  background: transparent; border: 0; outline: 0; padding: 0; width: 100%;
  font-family: var(--f-head); font-weight: 600; font-size: 26px; letter-spacing: .03em; text-transform: uppercase;
}
.field-box input::placeholder { color: rgba(255,255,255,.18); }

/* ---------- signal list cards ---------- */
.sig-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.sig:active { border-color: var(--line-2); }
.sig-badges { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.levels { display: grid; grid-template-columns: 1fr; margin-top: 12px; border-top: 1px dashed var(--line); }
.lvl {
  display: grid; grid-template-columns: 44px 1fr auto 18px; align-items: center; gap: 8px;
  padding: 7px 0; border-bottom: 1px dashed var(--line);
}
.lvl:last-child { border-bottom: 0; }
.lvl .k { font-family: var(--f-mono); font-size: 10px; color: var(--dim); letter-spacing: .06em; text-transform: uppercase; }
.lvl .v { font-family: var(--f-mono); font-size: 13px; font-weight: 500; }
.lvl .r { font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); text-align: right; }
.lvl .ok { width: 16px; height: 16px; color: var(--green); }
.lvl.hit .v { color: var(--green); }
.lvl.hit-sl .v { color: var(--red); }
.lvl.entry .v { color: #fff; }

.empty {
  text-align: center; padding: 36px 16px; color: var(--muted);
}
.empty .cond { font-size: 22px; color: var(--text); margin-bottom: 6px; }

/* skeleton */
.sk { background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r); }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- detail (product page) ---------- */
.detail {
  padding: 0 var(--gutter);
  margin-bottom: calc(-1 * var(--tabbar-h) + 8px);
  animation: slideIn .24s ease both;
}
.detail-inner { max-width: 480px; margin: 0 auto; }
@keyframes slideIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.back {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; color: var(--text);
  font-family: var(--f-body); font-size: 13px;
}
.back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.detail-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-top: 10px; }
.detail-title .h1 { margin: 0; font-size: 38px; }
.chart-box {
  margin-top: 14px; overflow: hidden; border-radius: var(--r);
  border: 1px solid var(--line); background: #0b0306; min-height: 200px;
  display: flex; align-items: center; justify-content: center;
}
.chart-box img { width: 100%; height: auto; }
.chart-box .label { padding: 30px 0; }
.price-line { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; }
.price-line b { font-family: var(--f-head); font-weight: 600; font-size: 28px; }
.desc { font-family: var(--f-mono); font-size: 12px; line-height: 1.6; color: var(--muted); margin: 10px 0 0; }

.timeline { display: grid; grid-template-columns: auto 1fr auto 1fr auto 1fr auto; align-items: center; margin: 18px 0 6px; padding: 0 2px; }
.tl-node { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tl-dot {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.35);
  font-family: var(--f-mono); font-size: 9px; color: var(--dim);
}
.tl-dot svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.tl-node.done .tl-dot { border-color: var(--green); color: #04140c; background: var(--green); box-shadow: 0 0 14px -2px rgba(61,242,160,.6); }
.tl-node.cur .tl-dot { border-color: var(--amber); color: var(--amber); }
.tl-node.fail .tl-dot { border-color: var(--red); color: #fff; background: var(--red); box-shadow: 0 0 14px -2px var(--red-glow); }
.tl-line { height: 2px; background: rgba(255,255,255,.12); margin: 0 4px 18px; }
.tl-line.done { background: var(--green); }
.tl-line.fail { background: linear-gradient(90deg, var(--green), var(--red)); }

/* ---------- analysis ---------- */
.an-form { display: flex; flex-direction: column; gap: 12px; }
.loading {
  margin-top: 16px; padding: 22px 16px; text-align: center; overflow: hidden;
}
.scan { position: relative; height: 70px; margin: 0 0 14px; border-radius: var(--r-sm); overflow: hidden;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 18px), rgba(0,0,0,.2); }
.scan::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,42,77,.35), transparent);
  animation: scan 1.4s ease-in-out infinite;
}
@keyframes scan { from { left: -40%; } to { left: 100%; } }
.scan svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
/* candle strip: slow lateral drift + per-candle bob + body shimmer (all CSS, no JS ticks) */
.scan .cnds { animation: cndSlide 7s ease-in-out infinite alternate; }
.scan .cnd { transform-box: fill-box; transform-origin: center; animation: cndBob 2.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -.19s); }
.scan .cnd rect { animation: cndShimmer 1.9s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -.13s); }
@keyframes cndSlide { from { transform: translateX(-4px); } to { transform: translateX(4px); } }
@keyframes cndBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3.5px); } }
@keyframes cndShimmer { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }
.loading .cond { font-size: 22px; }
.result { margin-top: 16px; }
.result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.reasons { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.reasons li { display: grid; grid-template-columns: 26px 1fr; gap: 6px; font-size: 13px; color: var(--muted); line-height: 1.4; }
.reasons li span:first-child { font-family: var(--f-mono); font-size: 10px; color: var(--red); padding-top: 2px; }
.coin-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; }
.coin-head .cond { font-size: 26px; }
.none-art { width: 72px; height: 72px; margin: 4px auto 10px; color: var(--muted); }

/* ---------- profile ---------- */
.user-card { display: flex; gap: 12px; align-items: center; padding: 14px; }
.avatar {
  width: 54px; height: 54px; border-radius: var(--r); flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-head); font-weight: 700; font-size: 24px; color: #fff;
  background: linear-gradient(135deg, var(--red-2), #6d0f25); border: 1px solid rgba(255,255,255,.18);
}
.user-name { font-family: var(--f-head); font-weight: 600; font-size: 22px; line-height: 1.05; text-transform: uppercase; }
.kv { display: grid; grid-template-columns: 1fr 1fr; margin-top: 8px; }
.kv > div { padding: 11px 12px; }
.kv > div + div { border-left: 1px solid var(--line); }
.kv b { display: block; font-family: var(--f-head); font-weight: 600; font-size: 18px; margin-top: 4px; }
.lock-cta { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0 12px; }
.lock-cta p { margin: 0; font-size: 12px; color: var(--muted); }
.note { font-family: var(--f-mono); font-size: 11px; color: var(--muted); line-height: 1.55; padding: 12px 14px; margin-top: 8px; }
.note b { color: var(--text); font-weight: 700; }
.stack { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

/* switch */
.sw { position: relative; width: 44px; height: 24px; flex: none; }
.sw input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.sw span {
  position: absolute; inset: 0; border-radius: 4px; background: rgba(255,255,255,.08); border: 1px solid var(--line-2);
  transition: background .18s, border-color .18s;
}
.sw span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 2px;
  background: rgba(255,255,255,.55); transition: transform .18s, background .18s;
}
.sw input:checked + span { background: linear-gradient(180deg, var(--red), var(--red-2)); border-color: transparent; box-shadow: 0 0 14px -4px var(--red-glow); }
.sw input:checked + span::after { transform: translateX(20px); background: #fff; }
.sw input:disabled + span { opacity: .4; }
.sw.long input:checked + span { background: linear-gradient(180deg, #4dffb1, #22c985); box-shadow: 0 0 14px -4px rgba(61,242,160,.6); }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: 480px; margin: 0 auto;
  height: calc(var(--tabbar-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  background: linear-gradient(180deg, rgba(12, 3, 6, 0.78), rgba(8, 2, 4, 0.96));
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px -20px rgba(0,0,0,.9);
}
.tab:active svg { transform: scale(.9); }
.tab svg { transition: transform .12s ease; }
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  color: rgba(255,255,255,.55); position: relative;
}
.tab svg { width: 24px; height: 24px; stroke-width: 1.3; }
.tab span { font-family: var(--f-mono); font-size: 10px; letter-spacing: .02em; }
.tab.is-active { color: #fff; }
.tab.is-active::before {
  content: ""; position: absolute; top: -1px; left: 30%; right: 30%; height: 2px;
  background: var(--red); box-shadow: 0 0 12px var(--red);
}
.tab.is-active svg { filter: drop-shadow(0 0 6px rgba(255,42,77,.6)); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 14px); z-index: 50;
  width: fit-content; max-width: 448px; margin: 0 auto; text-align: center; line-height: 1.45;
  padding: 10px 14px; border-radius: var(--r-sm);
  background: rgba(20, 6, 10, .96); border: 1px solid var(--line-2);
  font-family: var(--f-mono); font-size: 12px; color: var(--text);
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  animation: fadeUp .2s ease both;
}
.toast.err { border-color: rgba(255,42,77,.6); }

.fatal { text-align: center; padding: 60px 20px; }
.fatal .h1 { font-size: 30px; }
.noscript { color: #fff; text-align: center; padding: 40px; }

.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 8px; }
.between { justify-content: space-between; }

/* =====================================================================
   v2 components: equity, trend dots, strategy rows, R-track, ladder,
   signal rows, prefs, genome, tap targets
   ===================================================================== */
.amber { color: var(--amber); }
.dim { color: var(--dim); }
.ta-r { text-align: right; }
.no-anim { animation: none !important; }
.hint { font-family: var(--f-mono); font-size: 11px; line-height: 1.5; color: var(--muted); margin: -4px 0 10px; }

/* tags */
.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; border-radius: 3px;
  font-family: var(--f-mono); font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap;
}
.tag.primary { color: #fff; border-color: rgba(255,42,77,.7); background: rgba(255,42,77,.16); }
.tag.on { color: var(--green); border-color: rgba(61,242,160,.4); background: var(--green-dim); }
.tag.on::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.tag.off { color: var(--dim); }
.tag.locked { color: #e9d5ff; border-color: rgba(168,85,247,.5); background: rgba(124,58,237,.16); }
.tag.locked .lock { width: 11px; height: 11px; color: currentColor; }

/* R value */
.rv { font-family: var(--f-mono); font-weight: 700; font-size: 13px; white-space: nowrap; }
.pulse { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 6px var(--amber); animation: pulse 1.6s infinite; flex: none; }

/* equity card */
.equity { margin-top: 8px; padding: 11px 12px 0; overflow: hidden; }
.eq-head { display: flex; justify-content: space-between; align-items: baseline; }
.eq-head .rv { font-size: 14px; }
.eq-plot { position: relative; height: 64px; margin: 8px 0 10px; }
.eq-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.eq-zero { stroke: rgba(255,255,255,.22); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.eq-line { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.eq-pos .eq-line { stroke: var(--green); filter: drop-shadow(0 0 4px rgba(61,242,160,.5)); }
.eq-neg .eq-line { stroke: var(--red); filter: drop-shadow(0 0 4px var(--red-glow)); }
.eq-pos .eq-area { fill: rgba(61,242,160,.12); }
.eq-neg .eq-area { fill: rgba(255,42,77,.14); }
.eq-dot { position: absolute; right: -3px; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; }
.eq-dot.pos { background: var(--green); box-shadow: 0 0 8px var(--green); }
.eq-dot.neg { background: var(--red); box-shadow: 0 0 8px var(--red); }
.eq-empty {
  height: 64px; margin: 8px 0 10px; display: flex; align-items: center; justify-content: center; text-align: center;
  border: 1px dashed var(--line-2); border-radius: var(--r-sm); padding: 0 12px;
  font-family: var(--f-mono); font-size: 10.5px; color: var(--dim);
}
.eq-foot, .sumbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 -12px; border-top: 1px solid var(--line); }
.eq-foot > div, .sumbar > div { padding: 8px 12px 9px; min-width: 0; }
.eq-foot > div + div, .sumbar > div + div { border-left: 1px solid var(--line); }
.eq-foot b, .sumbar b { display: block; font-family: var(--f-head); font-weight: 600; font-size: 17px; line-height: 1.1; margin-top: 3px; white-space: nowrap; }
.sumbar { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 12px 0 0; border: 1px solid var(--line); }
.sumbar > div { padding: 8px 10px 9px; }

/* trend dots */
.trend { display: flex; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.td { display: inline-flex; align-items: center; gap: 4px; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .03em; color: var(--dim); }
.td i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; }
.td.up { color: var(--muted); } .td.up i { background: var(--green); border-color: var(--green); box-shadow: 0 0 6px rgba(61,242,160,.6); }
.td.down { color: var(--muted); } .td.down i { background: var(--red); border-color: var(--red); box-shadow: 0 0 6px var(--red-glow); }
.td.flat i { background: rgba(255,255,255,.45); border-color: transparent; }

/* strategy rows (home) */
.strat-list { display: flex; flex-direction: column; gap: 8px; }
.srow {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center;
  width: 100%; padding: 12px; text-align: left;
}
.srow.is-on { border-color: rgba(255,42,77,.45); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 44px -24px rgba(255,42,77,.6), 0 0 26px -14px var(--red-glow); }
.srow-art {
  width: 56px; height: 56px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.28); border: 1px solid var(--line);
}
.srow-art svg { width: 44px; height: 32px; }
.srow-art.sm { width: 44px; height: 44px; flex: none; }
.srow-art.sm svg { width: 34px; height: 25px; }
.srow.is-locked .srow-art, .srow.is-locked .strat-name { opacity: .5; }
.srow-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.srow-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.srow-name { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.srow-name .strat-name { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow-tags { display: flex; gap: 5px; flex-wrap: wrap; min-height: 20px; align-items: center; }
.srow .ls { margin-top: 0; flex: none; width: 104px; }
.srow .ls span { padding: 4px 0; }
.srow-desc { font-family: var(--f-mono); font-size: 10px; line-height: 1.4; color: var(--dim); }
.mini-stats.none .label { white-space: normal; }
.mini-stats { display: flex; gap: 14px; align-items: baseline; }
.mini-stats span { display: inline-flex; align-items: baseline; gap: 5px; }
.mini-stats b { font-family: var(--f-mono); font-size: 12px; font-weight: 700; }
.mini-stats.line { padding: 6px 0 8px; border-top: 1px dashed var(--line); margin-top: 8px; flex-wrap: wrap; gap: 6px 14px; }

/* R track */
.rtrack { position: relative; padding: 6px 0 0; }
.rtrack.compact { padding: 4px 0 2px; }
.rt-bar { position: relative; height: 6px; border-radius: 3px; background: rgba(255,255,255,.10); }
.rtrack.compact .rt-bar { height: 5px; }
.rt-zone { position: absolute; top: 0; bottom: 0; }
.rt-zone.neg { background: rgba(255,42,77,.22); border-radius: 3px 0 0 3px; }
.rt-zone.pos { background: rgba(61,242,160,.12); border-radius: 0 3px 3px 0; }
.rt-fill { position: absolute; top: 0; bottom: 0; }
.rt-fill.pos { background: linear-gradient(90deg, rgba(61,242,160,.45), var(--green)); box-shadow: 0 0 10px rgba(61,242,160,.45); }
.rt-fill.neg { background: linear-gradient(270deg, rgba(255,42,77,.45), var(--red)); box-shadow: 0 0 10px var(--red-glow); }
.rt-tick { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: rgba(255,255,255,.28); border-radius: 1px; }
.rt-tick.entry { background: #fff; }
.rt-tick.sl, .rt-tick.hit-sl { background: var(--red); }
.rt-tick.hit { background: var(--green); }
.rt-dot { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; border: 2px solid #14070b; z-index: 1; }
.rtrack.compact .rt-dot { width: 10px; height: 10px; margin: -5px 0 0 -5px; }
.rt-dot.pos { background: var(--green); box-shadow: 0 0 10px var(--green); }
.rt-dot.neg { background: var(--red); box-shadow: 0 0 10px var(--red); }
.rt-dot.live::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid currentColor; color: inherit; opacity: .6; animation: ping 1.6s ease-out infinite; }
.rt-dot.live.pos::after { border-color: var(--green); }
.rt-dot.live.neg::after { border-color: var(--red); }
@keyframes ping { from { transform: scale(.6); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }
.rt-labels { position: relative; height: 14px; margin-top: 6px; }
.rt-labels span {
  position: absolute; top: 0; font-family: var(--f-mono); font-size: 9px; letter-spacing: .04em; color: var(--dim);
  text-transform: uppercase; white-space: nowrap; transform: translateX(-50%);
}
.rt-labels span.al-l { transform: none; }
.rt-labels span.al-r { transform: translateX(-100%); }
.rt-labels span.entry { color: var(--muted); }
.rt-labels span.hit { color: var(--green); }
.rt-labels span.hit-sl { color: var(--red); }

/* live line */
.live-line, .sig-now { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; }
.live-k { display: inline-flex; align-items: center; gap: 5px; font-family: var(--f-mono); font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; }
.live-p { font-family: var(--f-mono); font-size: 11px; color: var(--muted); white-space: nowrap; }

/* offer cards (recent) */
.offer { flex: 0 0 80%; max-width: 300px; scroll-snap-align: start; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.offer-price { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.offer-price > span:first-child { display: inline-flex; align-items: baseline; gap: 6px; }
.offer-price b { font-family: var(--f-head); font-weight: 600; font-size: 19px; letter-spacing: .01em; }

/* signal list rows */
.filter-bar { margin-top: 2px; }
.filter-bar .chips { flex-wrap: nowrap; }
.chips.scroll { padding: 6px var(--gutter); margin: -6px calc(var(--gutter) * -1); }
.filter-bar + .chips-sm { margin-top: 4px; }
.chips-sm .chip { height: 32px; padding: 0 11px; font-size: 10px; }
.chip.on-soft { color: #fff; border-color: rgba(255,42,77,.6); background: rgba(255,42,77,.14); }
.icon-btn.spin svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sig { padding: 12px 12px 11px; width: 100%; text-align: left; display: flex; flex-direction: column; gap: 9px; }
.sig.is-live { border-color: rgba(255,194,75,.28); }
.sig-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sig-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sig-pair { font-family: var(--f-head); font-weight: 600; font-size: 21px; line-height: 1; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sig-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sig-ago { margin-left: auto; }
.sig-flags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: -2px; }
.sig-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sig-entry { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; }
.sig-entry b { font-family: var(--f-mono); font-size: 13px; font-weight: 500; }
.sig-now .rv { font-size: 14px; }
.empty .none-art { width: 56px; height: 56px; margin: 0 auto 10px; }

/* detail */
.created { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.now-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; margin-top: 14px; }
.now-card.is-live { border-color: rgba(255,194,75,.32); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 44px -24px rgba(255,194,75,.45); }
.now-price { font-family: var(--f-head); font-weight: 600; font-size: 24px; line-height: 1.1; margin-top: 4px; text-transform: uppercase; }
.now-r { text-align: right; }
.now-rv { font-family: var(--f-head); font-weight: 700; font-size: 30px; line-height: 1; }
.now-rv.up, .now-rv.down { text-shadow: 0 0 18px currentColor; }
.ladder { margin-top: 12px; border-top: 1px dashed var(--line); }
.lad-row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 60px 52px 16px; align-items: center; gap: 8px;
  min-height: 36px; padding: 6px 0; border-bottom: 1px dashed var(--line);
}
.lad-row:last-child { border-bottom: 0; }
.lad-row.lad-h { min-height: 26px; padding: 6px 0 4px; }
.lad-row.lad-h .label { font-size: 9px; }
.lad-row .k { display: inline-flex; align-items: center; gap: 5px; font-family: var(--f-mono); font-size: 10px; color: var(--dim); letter-spacing: .06em; text-transform: uppercase; }
.lad-row .v { font-family: var(--f-mono); font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lad-row .pct, .lad-row .r { font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); text-align: right; white-space: nowrap; }
.lad-row .r { font-weight: 700; }
.lad-row .ok { width: 16px; height: 16px; color: var(--green); }
.lad-row .ok.down { color: var(--red); }
.lad-row.hit .v, .lad-row.hit .k { color: var(--green); }
.lad-row.hit-sl .v, .lad-row.hit-sl .k { color: var(--red); }
.lad-row.sl .k { color: rgba(255,42,77,.75); }
.lad-row.entry .v, .lad-row.entry .k { color: #fff; }
.lad-row.live { margin: 0 -8px; padding: 6px 8px; border-radius: var(--r-sm); border-bottom-color: transparent; background: rgba(255,194,75,.08); box-shadow: inset 0 0 0 1px rgba(255,194,75,.35); }
.lad-row.live .k { color: var(--amber); }
.lad-row.live .v { color: #fff; font-weight: 700; }
.strat-note { display: flex; gap: 12px; align-items: center; }

/* profile */
.plan { margin-top: 8px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.plan.is-pro { border-color: rgba(168,85,247,.5); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 52px -26px rgba(168,85,247,.6), 0 14px 30px -18px rgba(124,58,237,.65); }
.plan-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.plan-top b { display: block; font-family: var(--f-head); font-weight: 600; font-size: 18px; margin-top: 4px; }
.plan-name { font-family: var(--f-head); font-weight: 700; font-style: italic; text-transform: uppercase; font-size: 30px; line-height: 1; margin-top: 4px; }
.plan.is-pro .plan-name { color: #d8b4fe; text-shadow: 0 0 18px rgba(168,85,247,.55); }
.plan-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.plan-perks li { font-family: var(--f-mono); font-size: 11px; color: var(--muted); padding-left: 16px; position: relative; }
.plan-perks li::before { content: "+"; position: absolute; left: 0; color: var(--red); font-weight: 700; }
.strat-card { padding: 12px 14px 4px; margin-top: 8px; }
.strat-card.is-on { border-color: rgba(255,42,77,.45); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 44px -24px rgba(255,42,77,.55), 0 0 26px -14px var(--red-glow); }
.strat-card.is-locked .srow-art, .strat-card.is-locked .cond { opacity: .55; }
.strat-card-head { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 4px; }
.strat-card-head .cond { font-size: 19px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strat-card-head .desc { margin: 3px 0 0; font-size: 10.5px; line-height: 1.45; }
.tags-col { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.tg-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 56px; padding: 10px 0; border-top: 1px dashed var(--line); cursor: pointer;
}
.tg-row.dense { min-height: 50px; }
.prefs .tg-row:first-child, .genome > .tg-row:first-child { border-top: 0; }
.tg-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tg-title { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-body); font-size: 14px; font-weight: 600; }
.tg-title .ico, .tg-title svg { width: 18px; height: 18px; flex: none; color: var(--red); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tg-sub { font-family: var(--f-mono); font-size: 10.5px; color: var(--dim); line-height: 1.4; }
.tg-foot { font-family: var(--f-mono); font-size: 10px; color: var(--dim); padding: 0 0 10px; }
.prefs, .genome { padding: 2px 14px; }
.genome { padding-bottom: 6px; }
.g-row { padding: 12px 0; border-top: 1px dashed var(--line); }
.g-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.g-head .strat-name { font-size: 16px; }
.g-kv { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 6px; margin-top: 8px; }
.g-kv span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.g-kv .label { font-size: 9px; }
.g-kv b { font-family: var(--f-head); font-weight: 600; font-size: 17px; line-height: 1.1; }
.g-foot { margin-top: 6px; }
.g-apply { height: 32px; padding: 0 10px; font-size: 10px; }
.g-empty { font-family: var(--f-mono); font-size: 11px; color: var(--dim); margin-top: 6px; }
.genome.locked { padding: 14px; border-color: rgba(168,85,247,.4); }
.g-lock { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.g-lock > svg { width: 34px; height: 34px; flex: none; color: var(--violet-2); fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.g-lock .cond { font-size: 19px; }
.g-lock p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* switch: 50×28 visual, row label is the tap target */
.sw { width: 50px; height: 28px; }
.sw span::after { top: 4px; left: 4px; width: 18px; height: 18px; }
.sw input:checked + span::after { transform: translateX(22px); }
.sw input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }

/* ≥44px tap targets for small controls (invisible hit area) */
.chip, .icon-btn, .link, .back, .btn-sm, .promo .btn { position: relative; }
.chip::after, .icon-btn::after, .link::after, .back::after, .btn-sm::after, .promo .btn::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%);
}
.icon-btn { width: 40px; height: 40px; flex: none; }
.icon-btn svg { width: 18px; height: 18px; }
.chip { height: 36px; }
.back { height: 40px; }
button:focus-visible, .chip:focus-visible { outline: 2px solid rgba(255,255,255,.8); outline-offset: 2px; }

/* =====================================================================
   v3: splash, settings area, exchanges, positions, stats, help, plan
   ===================================================================== */

/* ---------- splash ---------- */
html.has-splash { overflow: hidden; }
.splash {
  position: fixed; inset: 0; z-index: 100; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: var(--safe-top) 24px var(--safe-bottom);
  background:
    radial-gradient(120% 60% at 50% 104%, rgba(150, 22, 48, .5), transparent 62%),
    radial-gradient(110% 80% at 50% 45%, transparent 50%, rgba(0,0,0,.5) 100%),
    linear-gradient(180deg, #030102 0%, #090204 32%, #1c050a 66%, #3a0712 100%);
  transition: opacity .48s ease, transform .48s ease;
}
.splash.is-out { opacity: 0; transform: scale(1.035); pointer-events: none; }
.splash-inner { text-align: center; animation: spIn .9s cubic-bezier(.2,.7,.2,1) both; }
@keyframes spIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.splash-mark { width: 46px; height: 46px; fill: var(--red); filter: drop-shadow(0 0 18px var(--red-glow)); }
.splash-word {
  font-family: var(--f-head); font-weight: 700; text-transform: uppercase;
  font-size: 60px; line-height: .88; letter-spacing: .03em; margin-top: 10px; color: #fff;
  transform: scaleY(1.06);
}
.splash-word span { display: block; color: var(--red); text-shadow: 0 0 30px var(--red-glow), 0 0 2px rgba(255,255,255,.3); }
.splash-tag {
  margin-top: 16px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  color: rgba(246,238,240,.62); padding-left: .24em;
}
.splash-candles { position: relative; height: 76px; width: 236px; margin: 34px auto 0; overflow: hidden; }
.splash-candles::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
}
.splash-candles::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 36%;
  background: linear-gradient(90deg, transparent, rgba(255,42,77,.28), transparent);
  animation: scan 2.2s ease-in-out infinite;
}
.splash-candles i {
  position: absolute; bottom: var(--y); left: calc(var(--i) * 7.2%); width: 4.6%; height: var(--h);
  border-radius: 1px; background: rgba(255,255,255,.28);
  animation: spBob 2.8s ease-in-out infinite; animation-delay: calc(var(--i) * -.23s);
}
.splash-candles i.dn { background: rgba(255,42,77,.78); box-shadow: 0 0 8px rgba(255,42,77,.35); }
.splash-candles i::before {
  content: ""; position: absolute; left: 50%; width: 1px; margin-left: -.5px; top: -9px; bottom: -7px;
  background: inherit; opacity: .55; box-shadow: none;
}
@keyframes spBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.splash-hint {
  position: absolute; left: 0; right: 0; bottom: calc(var(--safe-bottom) + 26px); text-align: center;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim);
  animation: fadeUp .6s ease .9s both;
}

/* ---------- settings: header, tiles ---------- */
.sub-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.sub-head .h1 { margin: 10px 0 12px; }
.eyebrow { font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin: 14px 0 -6px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.tile { padding: 12px 12px 11px; display: flex; flex-direction: column; gap: 9px; text-align: left; min-height: 92px; width: 100%; }
.tile svg { width: 20px; height: 20px; color: var(--red); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tile-t { font-family: var(--f-head); font-weight: 600; text-transform: uppercase; font-size: 15px; line-height: 1.05; letter-spacing: .01em; }
.tile-s { font-family: var(--f-mono); font-size: 9.5px; color: var(--dim); line-height: 1.35; }
.tile .tag { position: absolute; top: 10px; right: 10px; }
.tile.wide { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 0; }
.tile.wide .tile-t { font-size: 16px; }
.group { padding: 2px 14px; margin-top: 8px; }
.group-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 0 6px; }
.group-head .cond { font-size: 18px; line-height: 1.1; }
.group-head > svg { width: 22px; height: 22px; flex: none; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.glow-violet .group-head > svg { color: var(--violet-2); }
.ex-form .btn-row .btn { min-width: 0; }
.ex-form .btn-row .btn-dark { flex: 0 0 auto; }
.group-head + .ctl, .group-head + .tg-row { border-top: 0; }
.group > .ctl:first-child, .group > .tg-row:first-child { border-top: 0; }
.tg-row.is-locked .sw { opacity: .45; }
.tg-row.danger .tg-title { color: var(--amber); }

/* ---------- settings controls ---------- */
.ctl { padding: 11px 0 12px; border-top: 1px dashed var(--line); }
.ctl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ctl-title { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-body); font-size: 14px; font-weight: 600; line-height: 1.3; }
.ctl-sub { display: block; font-family: var(--f-mono); font-size: 10.5px; color: var(--dim); line-height: 1.4; margin-top: 3px; }
.ctl-body { margin-top: 9px; }
.ctl.inline .ctl-body { margin-top: 0; flex: none; }
.ctl.inline .ctl-head { align-items: center; }
.ctl.inline { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ctl.inline .ctl-head { min-width: 0; flex: 1; }
.ctl.is-locked .ctl-body { opacity: .5; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-b {
  height: 36px; padding: 0 12px; min-width: 46px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--muted);
  font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, transform .12s;
}
.seg-b.on { color: #fff; border-color: rgba(255,42,77,.65); background: rgba(255,42,77,.16); box-shadow: inset 0 0 0 1px rgba(255,42,77,.22), 0 0 14px -8px var(--red-glow); }
.seg-b:active { transform: scale(.95); }
.seg-b .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.seg.grow .seg-b { flex: 1; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); background: rgba(0,0,0,.28); overflow: hidden; }
.stepper b { min-width: 84px; padding: 0 6px; text-align: center; font-family: var(--f-mono); font-size: 13px; font-weight: 700; white-space: nowrap; }
.step-b { width: 42px; height: 38px; font-size: 20px; line-height: 1; color: var(--text); display: flex; align-items: center; justify-content: center; }
.step-b:first-child { border-right: 1px solid var(--line); }
.step-b:last-child { border-left: 1px solid var(--line); }
.step-b:active { background: rgba(255,42,77,.18); }
.stepper.is-locked .step-b { color: var(--dim); }
.hint-card { padding: 11px 14px; margin-top: 8px; display: flex; gap: 10px; align-items: flex-start; font-family: var(--f-mono); font-size: 11px; line-height: 1.5; color: var(--muted); }
.hint-card svg { width: 16px; height: 16px; flex: none; color: var(--amber); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; margin-top: 1px; }
.hint-card.warn { border-color: rgba(255,194,75,.35); }
.hint-card.ok svg { color: var(--green); }

/* ---------- inputs ---------- */
.inp {
  width: 100%; height: 44px; padding: 0 12px; border-radius: var(--r-sm); outline: 0;
  border: 1px solid var(--line); background: rgba(0,0,0,.3); color: var(--text);
  font-family: var(--f-mono); font-size: 13px; -webkit-appearance: none; appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.inp:focus { border-color: rgba(255,42,77,.6); box-shadow: 0 0 0 3px rgba(255,42,77,.12); }
.inp::placeholder { color: rgba(255,255,255,.22); }
.inp-wrap { position: relative; }
.inp-wrap .inp { padding-right: 46px; }
.inp-wrap .icon-btn { position: absolute; right: 3px; top: 3px; width: 38px; height: 38px; border: 0; background: transparent; }
.inp-label { display: block; margin: 0 0 5px 2px; }
textarea.inp { height: auto; min-height: 118px; padding: 10px 12px; resize: vertical; line-height: 1.5; font-family: var(--f-body); font-size: 14px; }
.counter { text-align: right; margin-top: 4px; }

/* ---------- exchanges ---------- */
.ex-card { padding: 12px 14px; margin-top: 8px; }
.ex-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ex-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ex-logo {
  width: 36px; height: 36px; border-radius: var(--r-sm); flex: none; display: flex; align-items: center; justify-content: center;
  font-family: var(--f-head); font-weight: 700; font-size: 15px; color: #fff;
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
}
.ex-card.is-on .ex-logo { background: linear-gradient(135deg, var(--red-2), #6d0f25); border-color: rgba(255,255,255,.18); }
.ex-title { font-family: var(--f-head); font-weight: 600; font-size: 18px; text-transform: uppercase; line-height: 1; }
.ex-sub { font-family: var(--f-mono); font-size: 10.5px; color: var(--dim); margin-top: 4px; }
.ex-sub b { color: var(--muted); font-weight: 500; }
.ex-form { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.ex-form .btn-row { margin-top: 2px; }
.ex-card.is-on { border-color: rgba(61,242,160,.28); }

/* ---------- positions ---------- */
.poscard { padding: 11px 12px; margin-top: 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; }
.pos-sym { font-family: var(--f-head); font-weight: 600; font-size: 18px; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.pos-pnl { text-align: right; }
.pos-pnl b { display: block; font-family: var(--f-head); font-weight: 700; font-size: 20px; line-height: 1; }
.pos-pnl b.up, .pos-pnl b.down { text-shadow: 0 0 16px currentColor; }
.pos-kv { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding-top: 8px; border-top: 1px dashed var(--line); }
.pos-kv span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pos-kv b { font-family: var(--f-mono); font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 8px; }
.pos-sum > div { padding: 9px 12px; min-width: 0; }
.pos-sum > div + div { border-left: 1px solid var(--line); }
.pos-sum b { display: block; font-family: var(--f-head); font-weight: 600; font-size: 18px; margin-top: 3px; white-space: nowrap; }

/* ---------- stats ---------- */
.sgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 8px; }
.sgrid > div { padding: 10px 8px 9px; min-width: 0; border-left: 1px solid var(--line); border-top: 1px solid var(--line); text-align: center; }
.sgrid > div:nth-child(4n + 1) { border-left: 0; }
.sgrid > div:nth-child(-n + 4) { border-top: 0; }
.sgrid b { display: block; font-family: var(--f-head); font-weight: 600; font-size: 17px; line-height: 1.1; margin-top: 4px; white-space: nowrap; }
.sgrid .label { font-size: 9px; }
.srows { padding: 2px 14px; margin-top: 8px; }
.srow2 { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr)); gap: 6px; align-items: center; padding: 10px 0; border-top: 1px dashed var(--line); }
.srows-wide .srow2 { grid-template-columns: 1.9fr .7fr .6fr .9fr; }
.srow2:first-child, .srow2.head { border-top: 0; }
.srow2.head { padding: 10px 0 4px; }
.srow2 > span { min-width: 0; text-align: right; font-family: var(--f-mono); font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow2 > span:first-child { text-align: left; font-family: var(--f-head); font-weight: 600; font-size: 14px; text-transform: uppercase; }
.srow2.head > span { font-family: var(--f-mono); font-size: 9px; letter-spacing: .06em; color: var(--dim); text-transform: uppercase; font-weight: 500; }
.wbars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; height: 112px; align-items: end; padding: 12px 0 4px; }
.wbar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; min-width: 0; }
.wbar .wb { width: 100%; height: 72px; display: flex; align-items: flex-end; position: relative; }
.wbar .wb::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line-2); }
.wbar i { display: block; width: 100%; height: var(--h); min-height: 2px; border-radius: 3px 3px 0 0; background: var(--green); box-shadow: 0 0 12px -4px var(--green); }
.wbar.neg i { background: var(--red); box-shadow: 0 0 12px -4px var(--red); }
.wbar.zero i { background: rgba(255,255,255,.14); box-shadow: none; }
.wbar .label { font-size: 9px; }
.wbar .wv { font-family: var(--f-mono); font-size: 9px; color: var(--muted); white-space: nowrap; }

/* ---------- help accordion ---------- */
.acc { padding: 0; }
.acc-i { border-top: 1px dashed var(--line); }
.acc-i:first-child { border-top: 0; }
.acc-h { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 0; text-align: left; font-weight: 600; font-size: 14px; line-height: 1.3; }
.acc-h svg { width: 16px; height: 16px; flex: none; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; transition: transform .2s; }
.acc-i.open .acc-h svg { transform: rotate(90deg); color: var(--red); }
.acc-b { display: none; padding: 0 0 14px; font-size: 13px; line-height: 1.6; color: var(--muted); white-space: pre-line; }
.acc-i.open .acc-b { display: block; }
/* [HELP-V2] справочник */
.help-intro { margin: -4px 0 12px; }
.help-acc .acc-h { gap: 12px; padding: 14px 0; }
.help-acc .acc-n { font-family: var(--f-mono); font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--red); flex: none; width: 22px; }
.help-acc .acc-t { flex: 1; min-width: 0; font-family: var(--f-head); font-weight: 600; font-size: 15px; letter-spacing: .02em; text-transform: uppercase; }
.help-acc .acc-b { white-space: normal; padding: 0 0 6px 34px; }
.help-p { margin: 0 0 12px; }
.help-p > b { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.help-ln { display: block; }
.help-ul { margin: 4px 0 0; padding: 0 0 0 14px; }
.help-ul li { margin: 2px 0; }

/* ---------- plan / TON ---------- */
.feat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.feat li { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; line-height: 1.4; color: var(--muted); }
.feat li svg { width: 16px; height: 16px; flex: none; color: var(--green); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.ton-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px dashed var(--line); }
.ton-row:first-of-type { border-top: 0; }
.ton-row .k { flex: none; }
.ton-row .v { font-family: var(--f-mono); font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; text-align: right; }
.ton-row .v.big { font-family: var(--f-head); font-size: 20px; font-weight: 700; }
.ton-row .icon-btn { width: 34px; height: 34px; flex: none; }
.price-big { font-family: var(--f-head); font-weight: 700; font-size: 34px; line-height: 1; letter-spacing: -.01em; }
.price-big small { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.days-ring { display: flex; align-items: center; gap: 12px; }
.ring { position: relative; width: 56px; height: 56px; flex: none; border-radius: 50%; background: conic-gradient(var(--violet-2) var(--p, 0%), rgba(255,255,255,.08) 0); }
.ring::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #120408; }
.ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--f-head); font-size: 16px; z-index: 1; }

/* feedback */
.fb-ok { text-align: center; padding: 26px 16px; }
.fb-ok svg { width: 44px; height: 44px; color: var(--green); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 8px; }
.row.center { justify-content: center; }
.btn-ghost:active { background: rgba(255,255,255,.06); }
.btn.danger { color: var(--red); border-color: rgba(255,42,77,.4); }

@media (max-width: 380px) {
  .h1 { font-size: 30px; }
  .splash-word { font-size: 54px; }
  .sgrid b { font-size: 15px; }
  .tile { min-height: 88px; padding: 11px 11px 10px; }
  .stepper b { min-width: 74px; }
  .h2 { font-size: 25px; }
  .promo { grid-template-columns: 84px 1fr; padding: 16px 14px 14px; }
  .promo-art { height: 96px; }
  .promo-title { font-size: 29px; }
  .promo-title.sm { font-size: 25px; }
  .stat { padding: 10px 9px 9px; }
  .stat-val { font-size: 22px; }
  .stat-sub { font-size: 9px; }
  .lad-row { grid-template-columns: 40px minmax(0, 1fr) 54px 46px 16px; gap: 6px; }
}
@media (max-width: 330px) { :root { --gutter: 12px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* [STRATEGY-RATING] общий рейтинг стратегии под личными цифрами */
.mini-stats.rating { margin-top: 4px; padding-top: 6px; border-top: 1px dashed var(--line); opacity: .85; }
.mini-stats.rating.best { opacity: 1; }

/* [TREND-MONITOR] против тренда + карточка тренда BTC */
.ct { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-family: var(--f-mono); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--amber); border: 1px solid rgba(255,194,75,.45); background: rgba(255,194,75,.08); white-space: nowrap; }
.ct i { font-style: normal; }
.mtf { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-family: var(--f-mono); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--green); border: 1px solid rgba(61,242,160,.45); background: rgba(61,242,160,.08); white-space: nowrap; }
.mtf i { font-style: normal; font-size: 9px; }
.sig.is-ct, .offer.is-ct { box-shadow: inset 3px 0 0 var(--amber); }
.offer-ct { display: flex; margin-top: -4px; }
.offer-ct .ct { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mtrend { display: flex; flex-direction: column; gap: 10px; padding: 12px; overflow: hidden; }
.mtrend::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .9;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.05), transparent 60%); }
.mtrend.long::before { background: radial-gradient(120% 90% at 100% 0%, rgba(61,242,160,.14), transparent 60%); }
.mtrend.short::before { background: radial-gradient(120% 90% at 100% 0%, rgba(255,42,77,.16), transparent 60%); }
.mtrend.flat::before { background: radial-gradient(120% 90% at 100% 0%, rgba(255,194,75,.12), transparent 60%); }
.mtrend-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; position: relative; }
.mtrend-k { display: inline-flex; align-items: center; gap: 7px; font-family: var(--f-mono); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mtrend-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.35); }
.mtrend.long .mtrend-dot { background: var(--green); box-shadow: 0 0 8px var(--green); }
.mtrend.short .mtrend-dot { background: var(--red); box-shadow: 0 0 8px var(--red); }
.mtrend.flat .mtrend-dot { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.mtrend-prio { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-family: var(--f-head); font-size: 13px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; border: 1px solid rgba(255,255,255,.14); color: var(--muted); }
.mtrend-prio b { font-family: var(--f-mono); font-size: 12px; }
.mtrend-prio.long { color: #04140c; background: var(--green); border-color: transparent; box-shadow: 0 0 16px -4px var(--green); }
.mtrend-prio.short { color: #fff; background: var(--red); border-color: transparent; box-shadow: 0 0 16px -4px var(--red); }
.mtrend-prio.flat { color: var(--amber); border-color: rgba(255,194,75,.5); }
/* [TREND-MONITOR] 6 ТФ — горизонтальный скролл внутри карточки: 3 плитки видно, четвёртая выглядывает */
.mtrend-grid { display: flex; gap: 6px; position: relative; overflow-x: auto; overflow-y: hidden; margin: 0 -12px; padding: 0 12px 2px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.mtrend-grid::-webkit-scrollbar { display: none; }
.mtile { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.03); min-width: 0; flex: 0 0 29%; scroll-snap-align: start; }
.mtile:last-child { margin-right: 12px; }
.mtile.long { border-color: rgba(61,242,160,.35); background: linear-gradient(180deg, rgba(61,242,160,.16), rgba(61,242,160,.04)); }
.mtile.short { border-color: rgba(255,42,77,.4); background: linear-gradient(180deg, rgba(255,42,77,.18), rgba(255,42,77,.04)); }
.mtile.flat { border-color: rgba(255,194,75,.35); background: linear-gradient(180deg, rgba(255,194,75,.12), rgba(255,194,75,.03)); }
.mtile.main { border-width: 1.5px; }
.mtile-tf { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; font-family: var(--f-mono); font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--muted); white-space: nowrap; }
.mtile-tf em { font-style: normal; font-weight: 500; font-size: 9px; letter-spacing: 0; opacity: .7; overflow: hidden; text-overflow: ellipsis; }
.mtile-dir { display: inline-flex; align-items: center; gap: 5px; font-family: var(--f-head); font-size: 17px; font-weight: 600; line-height: 1.1; letter-spacing: .03em; white-space: nowrap; }
.mtile-dir i { font-style: normal; font-family: var(--f-mono); font-size: 12px; }
.mtile.long .mtile-dir { color: var(--green); }
.mtile.short .mtile-dir { color: var(--red); }
.mtile.flat .mtile-dir { color: var(--amber); }
.mtile.none .mtile-dir { color: var(--muted); }
.mtile-since { font-family: var(--f-mono); font-size: 10px; color: var(--muted); min-height: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtile-bar { display: block; height: 3px; border-radius: 2px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 2px; }
.mtile-bar b { display: block; height: 100%; border-radius: 2px; background: currentColor; opacity: .85; }
.mtile.long .mtile-bar { color: var(--green); }
.mtile.short .mtile-bar { color: var(--red); }
.mtile.flat .mtile-bar { color: var(--amber); }
.mtrend.compact { padding: 10px 12px; gap: 8px; }
.mtrend.compact .mtile { padding: 7px 9px; }
.mtrend.compact .mtile-dir { font-size: 15px; }
.mtrend.compact .mtile-since { display: none; }
.mtrend.compact .mtile-bar { margin-top: 4px; }

/* [QUIET-HOURS] */
.tg-row.col { flex-direction: column; align-items: stretch; gap: 8px; }

/* [CHALLENGE] карточка плана */
.ch-card { cursor: pointer; }
.ch-bar { display: block; margin-top: 8px; }
.inp { width: 100%; box-sizing: border-box; background: rgba(255,255,255,.04); border: 1px solid var(--line); color: inherit; border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 13px; }
.desc.warn { color: #f5a524; }
.desc.up { color: var(--green, #22c55e); }
.desc.down { color: var(--red, #ff2a4d); }


/* =====================================================================
   [LIQUID-GLASS 2026-10] Скин «жидкое стекло»: полупрозрачные поверхности
   с размытием фона, светлая кромка-блик сверху, «жидкая» градиентная
   граница, плавающая капсула навигации, живой фон из цветных пятен.
   Раскладка и разметка не меняются — только оформление.
   Откат: @supports not backdrop-filter / prefers-reduced-transparency →
   плотные панели без размытия. prefers-reduced-motion → фон статичный.
   ===================================================================== */
:root {
  --r-sm: 12px; --r: 16px; --r-lg: 20px;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.10);
  --glass-deep: rgba(14, 4, 8, 0.42);
  --glass-line: rgba(255, 255, 255, 0.16);
  --glass-edge: rgba(255, 255, 255, 0.42);
  --glass-blur: 22px;
  --line: rgba(255, 255, 255, 0.11);
  --line-2: rgba(255, 255, 255, 0.2);
}

/* фон: цветные пятна под стеклом */
.bg .blob {
  position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(70px); opacity: .6; will-change: transform;
  animation: lg-float 22s ease-in-out infinite alternate;
}
.bg .b1 { width: 72vw; height: 72vw; right: -22vw; top: -14vw; background: radial-gradient(circle, rgba(255,42,77,.65), rgba(255,42,77,0) 70%); }
.bg .b2 { width: 64vw; height: 64vw; left: -26vw; top: 38vh; background: radial-gradient(circle, rgba(124,58,237,.5), rgba(124,58,237,0) 70%); animation-duration: 27s; animation-delay: -8s; }
.bg .b3 { width: 70vw; height: 70vw; right: -18vw; bottom: -20vw; background: radial-gradient(circle, rgba(40,110,255,.38), rgba(40,110,255,0) 70%); animation-duration: 31s; animation-delay: -15s; }
@keyframes lg-float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-8vw, 6vh, 0) scale(1.12); }
}
.bg::after { opacity: .22; }

/* базовое стекло */
.card, .tabbar, .toast, .btn-dark, .icon-btn, .chip, .seg-b, .mtile, .srow-art, .field-box, .inp, .tl-dot, .pchip, .badge {
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
}
.card {
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(255,255,255,.085), rgba(255,255,255,.02) 46%, rgba(255,255,255,.035)) padding-box,
    linear-gradient(135deg, var(--glass-edge) 0%, rgba(255,255,255,.08) 38%, rgba(255,255,255,.05) 62%, rgba(255,42,77,.28) 100%) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -1px 0 rgba(0,0,0,.28),
    inset 0 0 0 1px rgba(255,255,255,.015),
    0 18px 40px -24px rgba(0,0,0,.9),
    0 1px 0 rgba(255,255,255,.03);
}
.card.glow-red {
  background:
    linear-gradient(180deg, rgba(255,255,255,.085), rgba(255,255,255,.02) 46%, rgba(255,42,77,.06)) padding-box,
    linear-gradient(135deg, var(--glass-edge) 0%, rgba(255,42,77,.25) 45%, rgba(255,42,77,.6) 100%) border-box;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 0 52px -26px rgba(255,42,77,.6), 0 18px 40px -22px rgba(255,42,77,.35);
}
.card.glow-violet {
  background:
    linear-gradient(180deg, rgba(255,255,255,.085), rgba(255,255,255,.02) 46%, rgba(168,85,247,.07)) padding-box,
    linear-gradient(135deg, var(--glass-edge) 0%, rgba(168,85,247,.3) 45%, rgba(168,85,247,.65) 100%) border-box;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 0 52px -26px rgba(168,85,247,.55), 0 18px 40px -22px rgba(124,58,237,.45);
}
.srow.is-on {
  background:
    linear-gradient(180deg, rgba(255,255,255,.085), rgba(255,255,255,.02) 46%, rgba(255,42,77,.07)) padding-box,
    linear-gradient(135deg, var(--glass-edge) 0%, rgba(255,42,77,.25) 45%, rgba(255,42,77,.6) 100%) border-box;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 0 48px -24px rgba(255,42,77,.55), 0 14px 32px -20px rgba(255,42,77,.35);
}
.card:active, .sig:active, .srow:active { border-color: transparent; transform: scale(.995); }

/* шапка: стекло, прилипает к верху */
.topbar {
  position: sticky; top: 0; z-index: 15;
  margin: 0 8px 6px; padding: 8px 12px 6px; min-height: 44px;
  border-radius: 999px; border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.025)) padding-box,
    linear-gradient(135deg, var(--glass-edge), rgba(255,255,255,.06) 40%, rgba(255,255,255,.05) 60%, rgba(255,42,77,.3)) border-box;
  backdrop-filter: blur(26px) saturate(180%); -webkit-backdrop-filter: blur(26px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 12px 30px -18px rgba(0,0,0,.9);
}
.badge { border-radius: 999px; }
.badge-plan.is-pro { box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 0 18px -6px rgba(168,85,247,.8); }

/* навигация: плавающая капсула с «линзой» активной вкладки */
.app { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 34px); }
.tabbar {
  left: 12px; right: 12px; bottom: calc(var(--safe-bottom) + 10px);
  height: var(--tabbar-h); padding: 6px 6px; padding-bottom: 6px;
  border-radius: 999px; border: 1px solid transparent; border-top: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(255,255,255,.085), rgba(255,255,255,.03) 60%, rgba(255,255,255,.05)) padding-box,
    linear-gradient(135deg, var(--glass-edge) 0%, rgba(255,255,255,.07) 35%, rgba(255,255,255,.05) 65%, rgba(255,42,77,.35) 100%) border-box;
  backdrop-filter: blur(30px) saturate(190%); -webkit-backdrop-filter: blur(30px) saturate(190%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.26), inset 0 -1px 0 rgba(0,0,0,.3),
    0 20px 46px -22px rgba(0,0,0,.95), 0 0 0 1px rgba(0,0,0,.25);
}
.tab { border-radius: 999px; transition: color .18s ease, transform .18s ease; }
.tab.is-active::before {
  top: 4px; bottom: 4px; left: 6px; right: 6px; height: auto; border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.04)),
    radial-gradient(80% 120% at 50% 0%, rgba(255,42,77,.55), rgba(255,42,77,.1) 70%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 0 0 1px rgba(255,42,77,.35), 0 8px 20px -10px var(--red-glow);
  z-index: -1;
}
.tab { isolation: isolate; }
.tab svg, .tab span { position: relative; }
.tab:active { transform: scale(.94); }

/* кнопки */
.btn { border-radius: 999px; }
.btn-red {
  background:
    linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0) 48%),
    linear-gradient(180deg, #ff3d5e, var(--red-2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -1px 0 rgba(0,0,0,.25), 0 12px 28px -10px var(--red-glow), 0 0 0 1px rgba(255,42,77,.35);
}
.btn-dark, .icon-btn, .chip, .seg-b, .pchip, .mtile, .srow-art, .field-box, .inp, .tl-dot {
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.03)) padding-box,
    linear-gradient(135deg, rgba(255,255,255,.34), rgba(255,255,255,.08) 45%, rgba(255,255,255,.12)) border-box;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
}
.btn-ghost { border-radius: 999px; }
.chip, .seg-b, .icon-btn { border-radius: 999px; }
.chip.on, .seg-b.on {
  color: #fff; border-color: transparent;
  background:
    linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 50%),
    linear-gradient(180deg, rgba(255,42,77,.85), rgba(232,25,60,.85));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 8px 22px -10px var(--red-glow);
}
.sw span { border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 2px rgba(0,0,0,.35); }
.sw span::after { border-radius: 50%; background: rgba(255,255,255,.85); box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.sw input:checked + span { background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0) 50%), linear-gradient(180deg, var(--red), var(--red-2)); }

/* тосты, плитки, промо, прочее */
.toast {
  border-radius: 999px; border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.04)) padding-box,
    linear-gradient(135deg, var(--glass-edge), rgba(255,255,255,.08) 50%, rgba(255,42,77,.35)) border-box;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 16px 40px -16px rgba(0,0,0,.9);
}
.tile svg { filter: drop-shadow(0 0 8px var(--red-glow)); }
.promo {
  border: 1px solid transparent; border-radius: var(--r-lg);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(255,255,255,.22), transparent 55%),
    linear-gradient(115deg, rgba(91,33,182,.78) 0%, rgba(124,58,237,.72) 35%, rgba(168,85,247,.7) 100%) padding-box,
    linear-gradient(135deg, rgba(255,255,255,.6), rgba(255,255,255,.1) 45%, rgba(255,255,255,.3)) border-box;
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 22px 48px -20px rgba(124,58,237,.7);
}
.promo .btn { border-radius: 999px; }
.mtile { border-radius: 14px; }
.mtile.long { background: linear-gradient(180deg, rgba(61,242,160,.2), rgba(61,242,160,.05)) padding-box, linear-gradient(135deg, rgba(255,255,255,.4), rgba(61,242,160,.45)) border-box; }
.mtile.short { background: linear-gradient(180deg, rgba(255,42,77,.22), rgba(255,42,77,.05)) padding-box, linear-gradient(135deg, rgba(255,255,255,.4), rgba(255,42,77,.5)) border-box; }
.mtile.flat { background: linear-gradient(180deg, rgba(255,194,75,.16), rgba(255,194,75,.04)) padding-box, linear-gradient(135deg, rgba(255,255,255,.4), rgba(255,194,75,.45)) border-box; }
.mtile-bar, .ch-bar { border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.08); box-shadow: inset 0 1px 2px rgba(0,0,0,.35); }
.mtile-bar b, .ch-bar b { border-radius: 999px; box-shadow: 0 0 12px -2px currentColor; }
.field-box, .inp { border-radius: 14px; }
.field-box:focus-within, .inp:focus { border-color: transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 0 0 3px rgba(255,42,77,.18); outline: 0; }
.sk { border-radius: var(--r); }
.detail .card, .group { border-radius: var(--r-lg); }
.empty { border-radius: var(--r-lg); }

/* откаты */
@media (prefers-reduced-motion: reduce) { .bg .blob { animation: none; } .card, .tab, .btn { transition: none; } }
@media (prefers-reduced-transparency: reduce) {
  .card, .tabbar, .topbar, .toast { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .card { background: rgba(16, 5, 9, .96); }
  .tabbar, .topbar, .toast { background: rgba(14, 4, 8, .98); }
  .bg .blob { opacity: .25; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card { background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)), rgba(16, 5, 9, .94); }
  .tabbar, .topbar, .toast { background: rgba(14, 4, 8, .97); }
  .btn-dark, .icon-btn, .chip, .seg-b, .mtile, .field-box, .inp { background: rgba(255,255,255,.07); }
}
