:root {
  color-scheme: dark;
  --accent-rgb: 0, 255, 65;
  --text-tint-rgb: 200, 255, 220;
  /* Фиксированные цвета: не использовать tg-theme-text (у части юзеров Telegram light → чёрный текст) */
  --bg: #0a0e0c;
  --text: #eef2ef;
  --hint: #9bc4a8;
  --accent: #00ff41;
  --accent-dim: rgba(var(--accent-rgb), 0.15);
  --accent-text: #041208;
  --text-bright: #e8fff0;
  --surface-screen: rgba(3, 8, 6, 0.97);
  --surface-card: rgba(8, 22, 14, 0.92);
  --overlay-glow: rgba(var(--accent-rgb), 0.12);
  --matrix-off-bg: linear-gradient(180deg, #0d1f18 0%, #0a1612 55%, #070f0c 100%);
  --secondary: #121a16;
  --border: rgba(var(--accent-rgb), 0.14);
  --border-gold: rgba(212, 175, 55, 0.35);
  --ok: #3ddc84;
  --ok-bright: #6bffb0;
  --warn: #ffb020;
  --bad: #ff6b6b;
  --gold: #d4af37;
  --gold-soft: rgba(212, 175, 55, 0.12);
  --panel: rgba(8, 14, 11, 0.78);
  --panel-strong: rgba(6, 12, 9, 0.92);
  --theme-header: #0d3d1a;
  --theme-bg: #030806;
  --glass-blur: blur(14px);
  --radius: 16px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background: #000;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

#matrixCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  pointer-events: none !important;
  touch-action: none !important;
  user-select: none;
  -webkit-user-select: none;
}

#matrixCanvas.matrix-static {
  opacity: 0.35;
}

.matrix-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none !important;
  touch-action: none !important;
  background:
    radial-gradient(ellipse at 50% 0%, var(--overlay-glow), transparent 50%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.52) 100%);
}

.app-shell {
  position: relative;
  z-index: 100;
  pointer-events: auto;
  touch-action: pan-y;
  isolation: isolate;
  min-height: 100vh;
  padding: 14px 14px calc(96px + env(safe-area-inset-bottom, 0px));
  max-width: 520px;
  margin: 0 auto;
}

body.matrix-off {
  background: var(--theme-bg);
}

body.matrix-off .matrix-overlay {
  background: var(--matrix-off-bg);
  opacity: 1;
}

body.matrix-off #matrixCanvas {
  display: none;
}

.card,
.tab,
.icon-btn,
.toggle-chip,
.install-bar__btn,
.back-btn,
.fav-btn {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(var(--accent-rgb), 0.2);
}

.premium-header {
  margin-bottom: 10px;
  color: var(--text-bright);
}

.brand-block,
.brand-row {
  color: var(--text-bright);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 8px;
}

.brand-block {
  min-width: 0;
}

.header h1 {
  margin: 0;
  padding: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(var(--accent-rgb), 0.3);
}

.pro-badge {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000));
  color: var(--accent-text);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.35);
}

.pro-badge.hidden { display: none !important; }

.header p,
.header p#subtitle {
  color: var(--hint) !important;
  font-size: 0.82rem;
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(var(--accent-rgb), 0.07);
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  display: inline-block;
  max-width: 100%;
}

.value-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.value-strip span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--muted, var(--hint));
}

.live-dot::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: pulse-live 1.8s ease-in-out infinite;
  vertical-align: middle;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.ai-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.04);
  border: 1px solid rgba(var(--accent-rgb), 0.12);
}

.ai-strip__label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.ai-strip__chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.ai-chip {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: #8a9a8e;
  white-space: nowrap;
}

.ai-chip--on {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.08);
}

.ai-chip--off {
  opacity: 0.45;
}

.ai-strip__meta {
  font-size: 0.62rem;
  color: var(--hint);
  flex-shrink: 0;
}

.preset-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 6px 8px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.08), rgba(var(--accent-rgb), 0.02));
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.preset-strip__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  flex-shrink: 0;
  width: 2.1rem;
  padding: 2px 0;
}

.preset-strip__mark {
  font-size: 0.55rem;
  color: var(--accent);
  line-height: 1;
}

.preset-strip__label {
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(var(--text-tint-rgb), 0.82);
  line-height: 1.1;
  text-align: center;
}

.preset-strip__btns {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  touch-action: manipulation;
}

.preset-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  padding: 5px 2px 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(160deg, color-mix(in srgb, var(--surface-card) 96%, transparent), color-mix(in srgb, var(--theme-bg) 98%, transparent));
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.12s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(var(--accent-rgb), 0.2);
}

.preset-card * {
  pointer-events: none;
}

.preset-card__dot {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
  opacity: 0.45;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}

.card--funding {
  border-color: rgba(var(--accent-rgb), 0.22);
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--surface-card) 96%, transparent),
    color-mix(in srgb, var(--theme-bg) 94%, transparent)
  );
}

.funding-card-hint {
  font-size: 11px;
  opacity: 0.75;
  line-height: 1.35;
}

.badge.funding-short {
  color: #7ee8a0;
  border-color: rgba(80, 200, 120, 0.35);
}

.badge.funding-long {
  color: #8ec8ff;
  border-color: rgba(100, 180, 255, 0.35);
}

.funding-detail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}

.funding-detail-stats div {
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.funding-detail-stats span {
  display: block;
  font-size: 11px;
  opacity: 0.65;
}

.funding-detail-stats strong {
  font-size: 15px;
}

.funding-hint {
  font-size: 13px;
  line-height: 1.45;
  margin: 8px 0;
}

.tab--futures.tab.active {
  border-color: rgba(var(--accent-rgb), 0.45);
}

.card--spot {
  border-color: rgba(var(--accent-rgb), 0.22);
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--surface-card) 96%, transparent),
    color-mix(in srgb, var(--theme-bg) 94%, transparent)
  );
}

.spot-card-hint {
  font-size: 11px;
  opacity: 0.78;
  line-height: 1.35;
}

.profit--spot {
  color: var(--ok-bright);
}

.badge.spot-dip {
  color: #ffb86c;
  border-color: rgba(255, 180, 100, 0.35);
}

.badge.spot-momentum {
  color: #7ee8a0;
  border-color: rgba(80, 200, 120, 0.35);
}

.badge.spot-accum {
  color: #b8c8ff;
  border-color: rgba(140, 160, 255, 0.35);
}

.spot-detail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}

.spot-detail-stats div {
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.spot-detail-stats span {
  display: block;
  font-size: 11px;
  opacity: 0.65;
}

.spot-detail-stats strong {
  font-size: 14px;
}

.spot-hint {
  font-size: 13px;
  line-height: 1.45;
  margin: 8px 0;
}

.tab--spot.tab.active {
  border-color: rgba(var(--accent-rgb), 0.45);
}

.card-cta--buy {
  color: var(--accent);
}

.detail-trade-btn--buy {
  background: linear-gradient(
    135deg,
    var(--accent),
    color-mix(in srgb, var(--accent) 72%, #000)
  );
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}

.dash-card {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.dash-card span {
  display: block;
  font-size: 11px;
  opacity: 0.7;
  margin-bottom: 4px;
}

.dash-card strong {
  font-size: 18px;
}

.dash-card--earn strong {
  color: #8ee8b8;
}

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.panel-btn {
  flex: 1;
  min-width: 120px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(120, 200, 255, 0.35);
  background: rgba(40, 80, 140, 0.35);
  color: inherit;
  font-size: 13px;
  cursor: pointer;
}

.panel-btn--secondary {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

.panel-subtitle {
  font-size: 13px;
  margin: 14px 0 8px;
  opacity: 0.85;
}

.hist-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 50vh;
  overflow-y: auto;
}

.hist-row {
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hist-row__top {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.hist-row__sub {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 4px;
}

.calc-field {
  display: block;
  margin: 10px 0;
  font-size: 12px;
}

.calc-field span {
  display: block;
  margin-bottom: 4px;
  opacity: 0.75;
}

.calc-field input {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  font-size: 15px;
}

.calc-result {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(80, 180, 120, 0.12);
  border: 1px solid rgba(80, 200, 120, 0.25);
}

.calc-result__main {
  font-size: 16px;
}

.calc-result__sub {
  font-size: 12px;
  opacity: 0.75;
  margin-top: 6px;
}

.notif-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  font-size: 14px;
  cursor: pointer;
}

.notif-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #5ec8ff;
}

.net-pick {
  margin: 8px 0 12px;
}

.net-pick__hint {
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--hint);
  margin: 0 0 10px;
}

.net-pick__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.net-pick__quick button {
  font-size: 0.68rem;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  cursor: pointer;
}

.net-pick__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.net-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.72rem;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.net-chip input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.net-chip--on {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.16);
  color: var(--ok-bright);
}

.net-chip--fast::after {
  content: "⚡";
  font-size: 0.62rem;
  opacity: 0.85;
}

.net-chip__eta {
  font-size: 0.62rem;
  color: var(--hint);
  opacity: 0.9;
}

.profile-chip--net {
  border-color: rgba(var(--accent-rgb), 0.35);
  color: var(--ok-bright);
}

.net-pick__status {
  margin-top: 10px;
  font-size: 0.72rem;
  color: var(--ok-bright);
}

.hist-act-btn {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: var(--accent-dim);
  color: var(--accent);
  cursor: pointer;
}

.onboard-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 15000;
  padding: 12px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-screen) 92%, transparent);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.onboard-banner p {
  flex: 1;
  min-width: 180px;
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.onboard-banner button {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.calc-field select {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
}

.preset-card--active .preset-card__dot {
  opacity: 1;
  transform: scale(1.15);
  background: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 70%, #fff);
  box-shadow:
    0 0 10px rgba(var(--accent-rgb), 0.75),
    0 0 3px rgba(var(--accent-rgb), 0.45);
}

.preset-card--starter.preset-card--active .preset-card__dot {
  background: #78dc8c;
  border-color: #a8f0b8;
  box-shadow: 0 0 10px rgba(120, 220, 140, 0.7);
}

.preset-card--standard.preset-card--active .preset-card__dot {
  background: #ffc850;
  border-color: #ffe090;
  box-shadow: 0 0 10px rgba(255, 200, 80, 0.65);
}

.preset-card--pro.preset-card--active .preset-card__dot {
  background: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.75);
}

.preset-card--whale.preset-card--active .preset-card__dot {
  background: #64b4ff;
  border-color: #a8d4ff;
  box-shadow: 0 0 10px rgba(100, 180, 255, 0.65);
}

.preset-card--strict.preset-card--active .preset-card__dot {
  background: #b4c8ff;
  border-color: #d8e4ff;
  box-shadow: 0 0 10px rgba(180, 200, 255, 0.55);
}

.preset-strip__hint {
  font-size: 10px;
  opacity: 0.55;
  margin-left: 6px;
  font-weight: 400;
}

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top, 0px)) 20px max(20px, env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--theme-bg) 92%, transparent);
  backdrop-filter: blur(6px);
}

.login-gate.hidden {
  display: none !important;
}

body.login-gate-open,
body.access-gate-open {
  overflow: hidden;
}

.app-shell--gate-hidden {
  display: none !important;
}

/* Профессиональный анализ (спот + арбитраж + preflight) */
.pro-analysis {
  margin: 12px 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  background: color-mix(in srgb, var(--surface-card) 92%, transparent);
}

.pro-analysis--preflight {
  margin-bottom: 10px;
}

.pro-analysis__verdict {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.pro-analysis__score {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.2);
  color: var(--ok-bright);
}

.pro-analysis.pro-tier-b .pro-analysis__score {
  color: var(--gold);
}

.pro-analysis.pro-tier-c .pro-analysis__score {
  color: #f08080;
}

.pro-analysis__hint {
  margin: 0 0 10px;
  font-size: 0.74rem;
  color: var(--hint);
  line-height: 1.45;
}

.pro-analysis__block {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pro-analysis__block--compact {
  margin-top: 8px;
  padding-top: 6px;
}

.pro-analysis__head {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  color: var(--text-bright);
}

.pro-analysis__text {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--hint);
}

.pro-analysis__list {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--hint);
}

/* Скам-риск по связке */
.scam-analysis {
  margin: 12px 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 100, 90, 0.35);
  background: rgba(40, 8, 8, 0.35);
}

.scam-analysis__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.scam-analysis__head strong {
  font-size: 0.78rem;
  line-height: 1.35;
}

.scam-analysis__score {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 80, 70, 0.2);
  color: #ff9a8a;
}

.scam-tier-low .scam-analysis__score {
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--ok-bright);
}

.scam-tier-medium .scam-analysis__score {
  color: #ffe08a;
  background: rgba(255, 200, 60, 0.15);
}

.scam-analysis__safe {
  margin: 0 0 8px;
  font-size: 0.72rem;
  color: var(--hint);
}

.scam-analysis__risks {
  margin: 0 0 10px;
  padding-left: 18px;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #ffc9b8;
}

.scam-analysis__checks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scam-check {
  display: grid;
  grid-template-columns: 18px 72px 1fr;
  gap: 6px;
  align-items: start;
  font-size: 0.68rem;
  line-height: 1.35;
}

.scam-check__icon {
  font-weight: 800;
}

.scam-check--ok .scam-check__icon {
  color: var(--ok-bright);
}

.scam-check--bad .scam-check__icon {
  color: #ff8a7a;
}

.scam-check__label {
  font-weight: 700;
  color: var(--text-bright);
}

.scam-check__detail {
  color: var(--hint);
}

.trade-pf-title {
  margin: 12px 0 8px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hint);
}

.badge.pro-score {
  margin-left: 6px;
  font-size: 0.65rem;
  opacity: 0.9;
}

.route-stats {
  margin: 8px 0 10px;
  font-size: 0.74rem;
  color: var(--hint);
  line-height: 1.45;
}

.net-compare,
.work-net {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  background: rgba(0, 0, 0, 0.2);
}

.net-compare__title,
.work-net__title {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
}

.net-compare__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.net-compare__table,
.work-net__table {
  width: 100%;
  min-width: 320px;
  font-size: 0.72rem;
  border-collapse: collapse;
}

.net-compare__table td,
.net-compare__table th,
.work-net__table td,
.work-net__table th {
  padding: 4px 6px;
  text-align: left;
  vertical-align: top;
}

.net-limits {
  font-size: 0.66rem;
  color: var(--hint);
  max-width: 88px;
  line-height: 1.3;
}

.net-row--rec {
  color: var(--ok-bright);
  font-weight: 700;
}

.net-row--off {
  opacity: 0.55;
}

.net-compare__note {
  margin: 8px 0 0;
  font-size: 0.68rem;
  color: var(--hint);
}

.live-pnl {
  margin: 10px 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
}

.live-pnl--up {
  border-color: rgba(80, 220, 120, 0.45);
  background: rgba(40, 120, 60, 0.15);
}

.live-pnl--down {
  border-color: rgba(240, 100, 80, 0.45);
  background: rgba(120, 40, 30, 0.15);
}

.live-pnl__title {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 800;
}

.live-pnl__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  margin: 4px 0;
}

.live-pnl__row--delta b {
  color: var(--ok-bright);
}

.live-pnl--down .live-pnl__row--delta b {
  color: #f08080;
}

.live-pnl__msg {
  margin: 8px 0 0;
  font-size: 0.72rem;
  color: var(--hint);
  line-height: 1.4;
}

.work-gone {
  margin: 10px 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(240, 80, 60, 0.5);
  background: rgba(80, 20, 10, 0.35);
}

.work-gone p {
  margin: 6px 0 0;
  font-size: 0.74rem;
  line-height: 1.45;
}

.work-trend {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 10px 0 8px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.4;
}

.work-trend strong {
  font-size: 0.82rem;
}

.work-trend span {
  color: var(--hint);
  font-size: 0.72rem;
}

.work-trend--up {
  border: 1px solid rgba(80, 220, 120, 0.45);
  background: rgba(20, 80, 40, 0.35);
  color: #9ef0b8;
}

.work-trend--down {
  border: 1px solid rgba(240, 120, 60, 0.5);
  background: rgba(90, 40, 10, 0.35);
  color: #ffc89a;
}

.work-trend--flat {
  border: 1px solid rgba(140, 160, 180, 0.35);
  background: rgba(40, 50, 60, 0.35);
  color: var(--text);
}

.work-pro {
  margin: 8px 0;
  font-size: 0.76rem;
  color: var(--gold);
  line-height: 1.45;
}

.login-gate__card {
  width: min(100%, 340px);
  padding: 22px 20px;
  border-radius: 18px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: color-mix(in srgb, var(--surface-card) 96%, transparent);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.login-gate__logo {
  margin: 0 auto 10px;
  border-radius: 14px;
}

.login-gate__title {
  margin: 0 0 6px;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
}

.login-gate__sub {
  margin: 0 0 16px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--hint);
}

.login-gate__label {
  display: block;
  text-align: left;
  font-size: 0.72rem;
  color: var(--hint);
  margin: 12px 0 6px;
}

.login-gate__input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.35em;
  text-align: center;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-bright);
  touch-action: manipulation;
}

.login-gate__btn {
  width: 100%;
  margin-top: 10px;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}

.login-gate__btn--primary {
  color: var(--accent-text);
  background: linear-gradient(135deg, var(--ok-bright), var(--accent));
}

.login-gate__btn--accent {
  color: var(--accent-text);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000));
}

.login-gate__btn:active {
  transform: scale(0.97);
  opacity: 0.92;
}

.login-gate__status {
  margin: 12px 0 0;
  font-size: 0.74rem;
  line-height: 1.4;
  color: var(--hint);
  min-height: 2.8em;
}

.auth-renew {
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 160, 60, 0.45);
  background: rgba(40, 28, 8, 0.85);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-renew.hidden {
  display: none !important;
}

.auth-renew__text {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #ffe4b8;
}

.profile-section__hint {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--hint);
  margin: 0 0 12px;
}

.auth-renew__btn {
  align-self: flex-start;
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent-text);
  background: linear-gradient(135deg, var(--ok-bright), var(--accent));
  cursor: pointer;
  touch-action: manipulation;
}

.pwa-auth-bar {
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 90, 90, 0.45);
  background: rgba(60, 12, 12, 0.75);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pwa-auth-bar.hidden {
  display: none !important;
}

.pwa-auth-bar__text {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #ffc9c9;
}

.pwa-auth-bar__btn {
  align-self: flex-start;
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent-text);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000));
  cursor: pointer;
  touch-action: manipulation;
}

.preset-card:active {
  transform: scale(0.96);
}

.preset-card__emoji {
  font-size: 0.82rem;
  line-height: 1;
}

.preset-card__title {
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preset-card__range {
  font-size: 0.44rem;
  font-weight: 600;
  color: var(--hint);
  font-family: var(--mono);
  line-height: 1;
  letter-spacing: -0.02em;
}

.preset-card--active {
  border-color: rgba(var(--accent-rgb), 0.4);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.15);
  background: linear-gradient(
    160deg,
    rgba(var(--accent-rgb), 0.22),
    color-mix(in srgb, var(--surface-card) 96%, transparent)
  );
}

.preset-card--active .preset-card__title {
  color: var(--accent);
}

.preset-card--active .preset-card__range {
  color: rgba(var(--text-tint-rgb), 0.8);
}

.preset-card--starter.preset-card--active { border-color: rgba(120, 220, 140, 0.45); }
.preset-card--standard.preset-card--active { border-color: rgba(255, 200, 80, 0.4); }
.preset-card--pro.preset-card--active { border-color: rgba(var(--accent-rgb), 0.5); }
.preset-card--whale.preset-card--active { border-color: rgba(100, 180, 255, 0.45); }
.preset-card--strict.preset-card--active { border-color: rgba(180, 200, 255, 0.4); }
.preset-card--explorer.preset-card--active { border-color: rgba(180, 140, 255, 0.45); }
.preset-card--explorer.preset-card--active .preset-card__dot {
  background: rgba(180, 140, 255, 0.85);
  box-shadow: 0 0 10px rgba(180, 140, 255, 0.55);
}

/* Узкий телефон: чуть крупнее тап, при необходимости лёгкий скролл */
@media (max-width: 360px) {
  .preset-strip {
    flex-wrap: wrap;
  }

  .preset-strip__head {
    flex-direction: row;
    width: auto;
    gap: 4px;
  }

  .preset-strip__btns {
    flex: 1 1 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .preset-strip__btns::-webkit-scrollbar {
    display: none;
  }

  .preset-card {
    min-width: 52px;
  }
}

/* ПК / широкое окно Telegram */
@media (min-width: 480px) {
  .preset-strip {
    padding: 7px 10px;
    gap: 10px;
  }

  .preset-strip__head {
    width: 2.4rem;
  }

  .preset-strip__label {
    font-size: 0.5rem;
  }

  .preset-card__emoji {
    font-size: 0.9rem;
  }

  .preset-card__title {
    font-size: 0.56rem;
  }

  .preset-card__range {
    font-size: 0.48rem;
  }
}

.quick-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.quick-nav__btn {
  flex: 1;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  background: rgba(var(--accent-rgb), 0.06);
  color: var(--accent);
  cursor: pointer;
}

.panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px 12px calc(72px + env(safe-area-inset-bottom, 0px));
  touch-action: manipulation;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.panel-card {
  width: 100%;
  max-width: 520px;
  max-height: min(78vh, 640px);
  overflow: auto;
  border-radius: 18px 18px 14px 14px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--surface-card) 98%, transparent),
    color-mix(in srgb, var(--theme-bg) 98%, transparent)
  );
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  position: relative;
  pointer-events: auto;
  touch-action: manipulation;
}

.panel-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--hint);
  font-size: 1.2rem;
  cursor: pointer;
}

.panel-body {
  padding: 18px 16px 20px;
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 28px 10px 0;
}

.panel-sub {
  font-size: 0.82rem;
  color: var(--hint);
  margin: 0 0 14px;
}

.academy-item {
  margin-bottom: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.03);
  overflow: hidden;
}

.academy-item summary {
  cursor: pointer;
  padding: 12px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}

.academy-item summary::-webkit-details-marker {
  display: none;
}

.academy-item p,
.academy-body {
  margin: 0;
  padding: 0 14px 14px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--hint);
}

.academy-body b {
  color: var(--text);
  font-weight: 700;
}

.stat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(var(--accent-rgb), 0.04);
  border: 1px solid rgba(var(--accent-rgb), 0.1);
  font-size: 0.82rem;
}

.stat-row span:last-child {
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.ai-panel {
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(0, 20, 12, 0.75);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
}

.ai-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.ai-panel__title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}

.ai-mode-toggle {
  display: flex;
  gap: 6px;
}

.ai-mode-btn {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: #b8c9bc;
  cursor: pointer;
  touch-action: manipulation;
}

.ai-mode-btn.active {
  color: var(--accent-text);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 78%, #000));
  border-color: transparent;
}

.ai-analyze-btn {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: none;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--accent-text);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.95), rgba(0, 190, 70, 0.9));
  touch-action: manipulation;
}

.ai-analyze-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.ai-result {
  margin-top: 12px;
}

.ai-result__summary {
  font-size: 0.75rem;
  color: var(--hint);
  margin-bottom: 10px;
  line-height: 1.4;
}

.ai-result-card {
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
}

.ai-result-card__head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}

.ai-result-card__text {
  font-size: 0.78rem;
  line-height: 1.45;
  color: #d0ddd2;
  white-space: pre-wrap;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
  z-index: 20;
}

.lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.lang-opt {
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.lang-opt.active {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.2);
  color: var(--accent);
}

.icon-btn--lang {
  font-size: 1.1rem;
}

.icon-btn--install {
  font-size: 1.05rem;
  border-color: rgba(var(--accent-rgb), 0.35);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.15);
}

.icon-btn--install.hidden {
  display: none !important;
}

.icon-btn {
  background: var(--panel);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  font-size: 1.25rem;
  color: var(--accent);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 21;
}

.icon-btn:active {
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.2);
}

/* Торговля: режимы ленты (перенесены с экрана «Связки») */
.trading-hub {
  margin: 0 0 14px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--surface-card) 94%, transparent),
    color-mix(in srgb, var(--theme-bg) 98%, transparent)
  );
}

.trading-hub__head {
  margin-bottom: 12px;
}

.trading-hub__title {
  margin: 0 0 4px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}

.trading-hub__hint {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.4;
  color: rgba(var(--text-tint-rgb), 0.78);
  min-height: 2.6em;
}

.trading-hub__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.trading-hub__grid .trading-mode:nth-child(5) {
  grid-column: span 2;
}

.trading-hub__grid .trading-mode:nth-child(6) {
  grid-column: span 1;
}

.trading-hub__grid .trading-mode:nth-child(7) {
  grid-column: span 1;
}

.trading-mode {
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(22, 32, 26, 0.9), rgba(10, 16, 12, 0.95));
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.12s;
}

.trading-mode__emoji {
  font-size: 1.05rem;
  line-height: 1;
}

.trading-mode__label {
  letter-spacing: 0.03em;
}

.trading-mode.active,
.trading-mode.tab.active {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 82%, #000));
  color: var(--accent-text);
  border-color: transparent;
  box-shadow: 0 4px 18px rgba(var(--accent-rgb), 0.28);
}

.trading-mode:not(.active) {
  border-color: rgba(var(--accent-rgb), 0.34);
}

.trading-hub__cta {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--accent-text);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 75%, #000));
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.25);
  cursor: pointer;
}

.trading-hub__cta:active {
  transform: scale(0.98);
}

.profile-volume {
  margin-top: 10px;
  padding: 14px 16px;
}

.profile-volume__head {
  margin-bottom: 10px;
}

.profile-volume__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.profile-volume__hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted, #8a94a6);
  line-height: 1.35;
}

.profile-volume__modes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.profile-volume__mode {
  flex: 1 1 30%;
  min-width: 92px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--border, #2a3344) 80%, transparent);
  background: color-mix(in srgb, var(--surface-2, #141a24) 90%, transparent);
  color: var(--text, #e8ecf4);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.profile-volume__mode--active {
  border-color: var(--accent, #3d8bfd);
  background: color-mix(in srgb, var(--accent, #3d8bfd) 18%, transparent);
  color: var(--accent-text, #cfe4ff);
}

.profile-volume__fields .calc-field {
  margin-bottom: 8px;
}

.profile-volume__save {
  width: 100%;
  margin-top: 4px;
  padding: 11px 14px;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  color: var(--accent-text, #fff);
  background: linear-gradient(135deg, var(--accent, #3d8bfd), color-mix(in srgb, var(--accent, #3d8bfd) 70%, #000));
  cursor: pointer;
}

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 1;
  min-width: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 7px 6px 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(22, 32, 26, 0.9), rgba(10, 16, 12, 0.95));
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.12s;
}

.tab__emoji {
  font-size: 1rem;
  line-height: 1;
}

.tab__label {
  letter-spacing: 0.03em;
}

.tab.active {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 82%, #000));
  color: var(--accent-text);
  border-color: transparent;
  box-shadow: 0 4px 18px rgba(var(--accent-rgb), 0.28);
}

.tab.active .tab__emoji {
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.35));
}

/* Неактивные вкладки — цвет выбранной темы */
.tab:not(.active) {
  border-color: rgba(var(--accent-rgb), 0.34);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--surface-card) 94%, transparent),
    color-mix(in srgb, var(--theme-bg) 98%, transparent)
  );
  color: rgba(var(--text-tint-rgb), 0.88);
}

.tab:not(.active) .tab__emoji {
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.12));
}

.preset-card--starter:not(.preset-card--active),
.preset-card--standard:not(.preset-card--active),
.preset-card--pro:not(.preset-card--active),
.preset-card--whale:not(.preset-card--active),
.preset-card--strict:not(.preset-card--active) {
  border-color: rgba(var(--accent-rgb), 0.28);
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--surface-card) 92%, transparent),
    color-mix(in srgb, var(--theme-bg) 96%, transparent)
  );
}

.feed-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  flex-wrap: wrap;
}

.feed-filter-bar.hidden {
  display: none;
}

.feed-all-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--surface-card) 92%, transparent),
    color-mix(in srgb, var(--theme-bg) 98%, transparent)
  );
  color: rgba(var(--text-tint-rgb), 0.9);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

.feed-all-toggle__icon {
  font-size: 0.85rem;
  opacity: 0.85;
}

.feed-all-toggle--on {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 78%, #000));
  color: var(--accent-text);
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.28);
}

.feed-all-toggle--on .feed-all-toggle__icon {
  opacity: 1;
}

.feed-filter-bar__hint {
  flex: 1;
  min-width: 120px;
  font-size: 0.64rem;
  line-height: 1.3;
  color: rgba(var(--text-tint-rgb), 0.72);
}

.mode-hint {
  margin: 0 0 10px;
  padding: 8px 10px;
  font-size: 0.68rem;
  line-height: 1.35;
  color: rgba(var(--text-tint-rgb), 0.82);
  background: rgba(var(--accent-rgb), 0.05);
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: 10px;
}

.mode-hint.hidden {
  display: none;
}

.volume-tiers {
  margin: 0 0 10px;
  padding: 10px 12px 8px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb, 0, 255, 65), 0.22);
  background: linear-gradient(165deg, rgba(12, 22, 16, 0.92), rgba(6, 10, 8, 0.96));
}

.volume-tiers.hidden {
  display: none !important;
}

.volume-tiers--required {
  border-color: rgba(var(--accent-rgb, 0, 255, 65), 0.35);
}

.volume-tiers__title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(220, 255, 230, 0.75);
}

.volume-tiers__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.volume-tier-chip {
  flex: 1 1 auto;
  min-width: calc(50% - 6px);
  padding: 7px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.volume-tier-chip--active {
  border-color: rgba(var(--accent-rgb, 0, 255, 65), 0.55);
  background: rgba(var(--accent-rgb, 0, 255, 65), 0.12);
  box-shadow: 0 0 12px rgba(var(--accent-rgb, 0, 255, 65), 0.15);
  color: var(--accent);
}

.volume-tiers__hint {
  margin: 8px 0 0;
  font-size: 10px;
  line-height: 1.35;
  color: rgba(200, 230, 210, 0.55);
}

.volume-probe {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  background: rgba(var(--accent-rgb), 0.04);
}

.volume-probe.hidden {
  display: none;
}

.volume-probe--required {
  border-color: rgba(var(--accent-rgb), 0.35);
}

.volume-probe--active {
  border-color: rgba(var(--accent-rgb), 0.42);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.08);
}

.volume-probe__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(var(--text-tint-rgb), 0.9);
  margin-bottom: 6px;
}

.volume-probe__row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.volume-probe__prefix {
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  background: rgba(0, 0, 0, 0.25);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.95rem;
}

.volume-probe__input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font-size: 0.88rem;
}

.volume-probe__input::placeholder {
  color: rgba(var(--text-tint-rgb), 0.45);
  font-size: 0.78rem;
}

.volume-probe__apply {
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000));
  color: #001a08;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
}

.volume-probe__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 8px;
}

.volume-probe__clear {
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

.volume-probe__clear.hidden {
  display: none;
}

.volume-probe__hint {
  font-size: 0.68rem;
  line-height: 1.35;
  color: rgba(var(--text-tint-rgb), 0.55);
}

/* Живые эмодзи — вкладки и пресеты */
@keyframes emoji-fire {
  0%, 100% { transform: scale(1) rotate(-4deg); filter: brightness(1); }
  35% { transform: scale(1.14) rotate(4deg); filter: brightness(1.25); }
  70% { transform: scale(0.96) rotate(-2deg); filter: brightness(1.1); }
}

@keyframes emoji-new {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12) translateY(-1px); opacity: 0.92; }
}

@keyframes emoji-star {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  50% { transform: rotate(12deg) scale(1.15); }
}

@keyframes emoji-dex {
  0%, 100% { opacity: 0.85; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

@keyframes emoji-seed {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes emoji-bolt {
  0%, 88%, 100% { filter: brightness(1); }
  90% { filter: brightness(1.6); transform: scale(1.08); }
}

@keyframes emoji-target {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); filter: drop-shadow(0 0 4px rgba(var(--accent-rgb), 0.5)); }
}

@keyframes emoji-whale {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes emoji-shield {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); transform: scale(1.06); }
}

.anim-emoji--fire { display: inline-block; animation: emoji-fire 1.1s ease-in-out infinite; }
.anim-emoji--new { display: inline-block; animation: emoji-new 1.4s ease-in-out infinite; }
.anim-emoji--star { display: inline-block; animation: emoji-star 1.6s ease-in-out infinite; }
.anim-emoji--dex { display: inline-block; animation: emoji-dex 1.8s ease-in-out infinite; }
.anim-emoji--seed { display: inline-block; animation: emoji-seed 2s ease-in-out infinite; }
.anim-emoji--bolt { display: inline-block; animation: emoji-bolt 2.2s ease-in-out infinite; }
.anim-emoji--target { display: inline-block; animation: emoji-target 1.5s ease-in-out infinite; }
.anim-emoji--whale { display: inline-block; animation: emoji-whale 2.4s ease-in-out infinite; }
.anim-emoji--shield { display: inline-block; animation: emoji-shield 2s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .anim-emoji--fire,
  .anim-emoji--new,
  .anim-emoji--star,
  .anim-emoji--dex,
  .anim-emoji--seed,
  .anim-emoji--bolt,
  .anim-emoji--target,
  .anim-emoji--whale,
  .anim-emoji--shield {
    animation: none;
  }
}

.toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.toolbar--compact {
  justify-content: space-between;
}

.toolbar--themes {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.theme-picker {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.theme-picker .theme-chip {
  padding: 5px 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.28);
  color: var(--hint);
  font-size: 0.58rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 0.2s, color 0.2s, background 0.2s, box-shadow 0.2s;
}

.theme-picker .theme-chip.active {
  border-color: var(--chip-accent, var(--accent));
  background: var(--chip-dim, var(--accent-dim));
  color: var(--chip-accent, var(--accent));
  box-shadow: 0 0 12px var(--chip-dim, var(--accent-dim));
}

.toolbar--themes .matrix-toggle {
  flex-shrink: 0;
  min-width: 4.5rem;
  position: relative;
  gap: 7px;
  padding-left: 10px;
  padding-right: 12px;
}

.matrix-toggle__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
  opacity: 0.5;
  transition:
    opacity 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}

.matrix-toggle.active .matrix-toggle__dot {
  opacity: 1;
  transform: scale(1.15);
  background: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 70%, #fff);
  box-shadow:
    0 0 10px rgba(var(--accent-rgb), 0.75),
    0 0 3px rgba(var(--accent-rgb), 0.45);
}

.matrix-toggle__label {
  line-height: 1;
}

.toolbar-hint {
  flex: 1;
  min-width: 0;
  font-size: 0.72rem;
  color: var(--muted, #8aa894);
  line-height: 1.35;
  padding: 4px 2px;
}

.toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--panel);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--text);
}

.matrix-toggle.active {
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--accent);
  background: var(--accent-dim);
}

.toggle-chip input { accent-color: var(--accent); }

.toggle-chip--premium {
  border-color: rgba(var(--accent-rgb), 0.28);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.08);
}

.profit-hero {
  text-align: center;
  padding: 20px 14px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-rgb), 0.04)),
    var(--panel-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.profit-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), 0.12), transparent 55%);
  pointer-events: none;
}

.profit-hero .label {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 6px;
  text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.35);
}

.profit-hero .amount {
  font-family: var(--mono);
  font-size: 2.35rem;
  font-weight: 700;
  color: var(--ok-bright);
  line-height: 1;
  text-shadow: 0 0 24px rgba(var(--accent-rgb), 0.45);
}

.profit-hero .sub {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--hint);
}

.spread-visual {
  margin: 14px 0;
  padding: 12px;
  border-radius: 12px;
  background: var(--panel);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
}

.spread-visual__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.spread-visual__head h3 {
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 42%;
}

.spread-visual h3,
.spread-visual__head h3 {
  font-size: 0.88rem;
  color: var(--hint);
}

.spread-visual__earn {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  text-align: center;
}

.spread-visual__earn-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hint);
  line-height: 1.1;
}

.spread-visual__earn-value {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
  text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.35);
}

.spread-visual__earn-roi,
.spread-visual__earn-gross {
  font-size: 0.56rem;
  color: rgba(var(--text-tint-rgb), 0.72);
  line-height: 1.15;
}

.spread-visual__earn-roi {
  color: var(--ok-bright);
  font-weight: 600;
}

.work-spread-wrap .spread-visual__earn-value {
  font-size: 0.92rem;
}

.work-spread-wrap .spread-visual__head h3 {
  font-size: 0.72rem;
  max-width: 38%;
}

.spread-ob-refresh {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.spread-ob-refresh:active:not(:disabled) {
  transform: scale(0.94);
  background: rgba(var(--accent-rgb), 0.22);
}

.spread-ob-refresh:disabled {
  opacity: 0.55;
  cursor: wait;
}

.spread-ob-refresh--spin {
  animation: spread-ob-spin 0.7s linear infinite;
}

@keyframes spread-ob-spin {
  to {
    transform: rotate(360deg);
  }
}

.spread-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 6px;
  align-items: stretch;
}

.spread-side {
  min-width: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 8px;
  font-size: 0.75rem;
}

.spread-side.buy { border-left: 3px solid var(--bad); }
.spread-side.sell { border-left: 3px solid var(--ok); }

.spread-side .ex-name {
  font-weight: 700;
  font-size: 0.78rem;
  margin-bottom: 4px;
}

.spread-side .price {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 4px 0;
}

.spread-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--accent);
  padding: 0 4px;
}

.depth-candles {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3px;
  width: 100%;
  max-width: 100%;
  height: 54px;
  margin-top: 6px;
  padding: 0 1px;
  box-sizing: border-box;
  overflow: hidden;
}

.depth-candle {
  flex: 1 1 0;
  min-width: 0;
  max-width: 22%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.depth-candle--ph {
  opacity: 0.35;
}

.candle-wick {
  display: block;
  width: 2px;
  min-height: 2px;
  border-radius: 1px;
  flex-shrink: 0;
}

.candle-body {
  display: block;
  width: 72%;
  min-width: 5px;
  max-width: 100%;
  min-height: 4px;
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.25);
}

.depth-candles--buy .candle-body,
.depth-candles--buy .candle-wick {
  background: linear-gradient(180deg, #ff8585 0%, var(--bad) 55%, #c93d3d 100%);
}

.depth-candles--sell .candle-body,
.depth-candles--sell .candle-wick {
  background: linear-gradient(180deg, var(--ok-bright) 0%, var(--ok) 55%, color-mix(in srgb, var(--ok) 70%, #000) 100%);
}

.spread-legend--buy {
  color: #ff8a8a;
}

.spread-legend--sell {
  color: var(--ok-bright);
}

.ob-order__price,
.ob-order__amt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spread-vol {
  margin: 2px 0 4px;
  font-size: 0.72rem;
}

.spread-vol b {
  color: var(--text);
}

.ob-orders {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ob-orders__title {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--hint);
  margin-bottom: 4px;
}

.ob-orders__head,
.ob-order {
  display: grid;
  grid-template-columns: 14px 1fr 1fr 42px;
  gap: 4px;
  align-items: center;
  font-size: 0.62rem;
  line-height: 1.25;
}

.ob-orders__head {
  color: var(--hint);
  opacity: 0.85;
  margin-bottom: 2px;
}

.ob-order__n {
  opacity: 0.6;
  text-align: center;
}

.ob-order__price {
  font-weight: 600;
}

.ob-order--buy .ob-order__price {
  color: #ff8a8a;
}

.ob-order--sell .ob-order__price {
  color: var(--ok-bright);
}

.ob-order__usd {
  text-align: right;
  font-weight: 700;
}

.ob-orders__empty {
  font-size: 0.62rem;
  color: var(--hint);
  margin: 6px 0 0;
}

.spread-visual__note {
  font-size: 0.68rem;
  color: var(--hint);
  margin: 8px 0 0;
  text-align: center;
}


.fav-btn {
  margin-top: 12px;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
}

.fav-btn.active {
  border-color: var(--warn);
  color: var(--warn);
}

.profit-breakdown {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.8rem;
  color: var(--hint);
  line-height: 1.5;
}

.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 0;
  color: var(--hint);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error {
  background: rgba(255, 107, 107, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--bad);
  color: var(--bad);
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.list { display: flex; flex-direction: column; gap: 8px; }

.card {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--surface-card) 96%, transparent),
    color-mix(in srgb, var(--theme-bg) 92%, transparent)
  );
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: var(--radius);
  padding: 14px 15px;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.15s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 100% 0%, rgba(var(--accent-rgb), 0.07), transparent 55%);
  pointer-events: none;
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(var(--accent-rgb), 0.35);
  opacity: 0.75;
}

.card:active { transform: scale(0.985); }

.card--tier-1 {
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 0 28px rgba(var(--accent-rgb), 0.18), 0 8px 28px rgba(0, 0, 0, 0.35);
}

.card--tier-1::before {
  width: 4px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 72%, #fff), var(--accent));
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.65);
  opacity: 1;
}

.card--tier-2 {
  border-color: rgba(var(--accent-rgb), 0.4);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.12);
}

.card--tier-2::before {
  background: linear-gradient(180deg, var(--accent), rgba(var(--accent-rgb), 0.5));
  opacity: 1;
}

.card--tier-3 {
  border-color: rgba(var(--accent-rgb), 0.28);
}

.card--tier-3::before {
  background: rgba(var(--accent-rgb), 0.75);
  opacity: 1;
}

/* ◈ PRO PICK — топ связка MatrixLink (спред ≤5%, уверенность ≥90%) */
.card--elite {
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow:
    0 0 24px rgba(var(--accent-rgb), 0.22),
    0 8px 28px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(var(--accent-rgb), 0.12);
  overflow: hidden;
}

.card--elite::before {
  width: 4px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 72%, #fff), var(--accent), color-mix(in srgb, var(--accent) 55%, #000));
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.65);
  opacity: 1;
}

.card--elite::after {
  background: linear-gradient(
    100deg,
    transparent 35%,
    rgba(var(--accent-rgb), 0.08) 48%,
    rgba(var(--accent-rgb), 0.06) 52%,
    transparent 65%
  );
  animation: elite-sheen 4s ease-in-out infinite;
}

.card-elite-glow {
  position: absolute;
  inset: -1px;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(ellipse at 50% 0%, rgba(var(--accent-rgb), 0.14), transparent 62%);
  z-index: 1;
}

.card-rank--elite {
  color: var(--accent) !important;
  text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.55) !important;
  font-size: 0.62rem !important;
  letter-spacing: 0.1em;
  font-weight: 800;
}

.profit--elite {
  color: var(--accent) !important;
  text-shadow: 0 0 16px rgba(var(--accent-rgb), 0.45) !important;
}

.badge.elite {
  color: var(--ok-bright);
  border-color: rgba(var(--accent-rgb), 0.5);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-rgb), 0.06));
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.15);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.card-cta--elite {
  color: var(--accent) !important;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.35);
}

@keyframes elite-sheen {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.card--exec {
  border-color: rgba(var(--accent-rgb), 0.32);
}

.card--exec::before {
  background: var(--accent);
  opacity: 1;
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.45);
}

.card--suspect {
  border-color: rgba(255, 180, 80, 0.35);
  opacity: 0.92;
}

.card--suspect::before {
  background: rgba(255, 160, 60, 0.85);
  opacity: 1;
}

.card--suspect .profit--suspect {
  color: #ffb86b;
  text-shadow: none;
}

.card--scam {
  border-color: rgba(255, 90, 80, 0.45);
  opacity: 0.95;
}

.card--scam::before {
  background: rgba(255, 70, 60, 0.9);
  opacity: 1;
}

.card--scam .profit--suspect {
  color: #ff8a7a;
}

.card-truth-warn {
  margin: 0 12px 8px;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #ffb86b;
  opacity: 0.95;
}

.profit-note {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--hint);
  margin-top: 2px;
}

.card--muted {
  border-color: rgba(var(--accent-rgb), 0.1);
  opacity: 0.82;
}

.card--muted::before {
  background: rgba(var(--accent-rgb), 0.2);
  opacity: 0.5;
}

.card--muted .profit {
  color: var(--hint);
}

.card--hot {
  border-color: rgba(var(--accent-rgb), 0.42);
}

.card--new {
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.12);
}

.card-rank {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.45);
  opacity: 0.95;
}

.card--tier-1 .card-rank { color: var(--accent); }
.card--tier-2 .card-rank { color: var(--ok-bright); }
.card--tier-3 .card-rank { color: var(--ok); }

.token {
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: 0.02em;
  color: var(--text-bright);
  text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.15);
}

.profit {
  font-family: var(--mono);
  color: var(--ok-bright);
  font-weight: 700;
  font-size: 1.05rem;
  text-shadow: 0 0 16px rgba(var(--accent-rgb), 0.35);
}

.card--tier-1 .profit {
  color: var(--accent);
  text-shadow: 0 0 20px rgba(var(--accent-rgb), 0.5);
}

.card--tier-2 .profit {
  color: var(--ok-bright);
}

.badge {
  font-size: 0.68rem;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.06);
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  font-weight: 600;
  color: var(--hint);
}

.badge.exec {
  color: var(--ok-bright);
  border-color: rgba(var(--accent-rgb), 0.42);
  background: rgba(var(--accent-rgb), 0.14);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.12);
}

.badge.suspect {
  color: #ffb86b;
  border-color: rgba(255, 180, 80, 0.45);
  background: rgba(255, 140, 40, 0.12);
}

.badge.scam {
  color: #ff8a7a;
  border-color: rgba(255, 90, 80, 0.55);
  background: rgba(180, 30, 30, 0.25);
}

.badge.scam-warn {
  color: #ffe08a;
  border-color: rgba(255, 200, 80, 0.4);
  background: rgba(120, 80, 20, 0.2);
}

.badge.scam-score {
  font-family: var(--mono);
  color: #ff9a8a;
  border-color: rgba(255, 100, 90, 0.35);
}

.badge.warn {
  color: #ffe08a;
  border-color: rgba(255, 220, 100, 0.4);
  background: rgba(255, 200, 60, 0.1);
}

.badge.conf {
  color: #a8e6ff;
  border-color: rgba(120, 200, 255, 0.35);
  background: rgba(80, 160, 255, 0.08);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.badge.conf--high {
  color: #e8fbff;
  border-color: rgba(160, 230, 255, 0.55);
  box-shadow: 0 0 10px rgba(120, 210, 255, 0.2);
}

.badge.conf--low {
  color: #c4b896;
  border-color: rgba(200, 180, 120, 0.35);
  background: rgba(80, 70, 40, 0.15);
}

.badge.dw-open {
  color: var(--hint);
  border-color: rgba(var(--accent-rgb), 0.22);
}

.badge.blocked {
  color: #ff8a8a;
  border-color: rgba(255, 100, 100, 0.35);
}

.badge.hot {
  color: var(--ok-bright);
  border-color: rgba(var(--accent-rgb), 0.38);
  background: rgba(var(--accent-rgb), 0.12);
}

.badge.new {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.38);
  background: rgba(var(--accent-rgb), 0.12);
}

.badge.ok { color: var(--ok); border-color: rgba(var(--accent-rgb), 0.35); }
.badge.bad { color: #ff8a8a; border-color: rgba(255, 107, 107, 0.35); }
.badge.warn { color: var(--warn); border-color: rgba(var(--accent-rgb), 0.35); }

.card-mid {
  color: var(--hint);
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
  padding-right: 28px;
}

.card-token-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.card-route {
  font-size: 0.72rem;
  color: var(--hint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.card-profit-block {
  text-align: right;
  flex-shrink: 0;
}

.profit-label {
  display: block;
  font-size: 0.62rem;
  color: var(--hint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-cta {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.12);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  text-align: right;
}

.card-bottom {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.empty {
  text-align: center;
  color: var(--hint);
  padding: 48px 16px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: var(--panel);
}

.empty-presets {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.empty-preset {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.95), rgba(0, 190, 70, 0.9));
  color: var(--accent-text);
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.empty-link {
  display: block;
  margin: 14px auto 0;
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.empty button {
  margin-top: 16px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.95), rgba(0, 190, 70, 0.9));
  color: var(--accent-text);
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.detail.hidden, .hidden { display: none !important; }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  margin: 0 0 14px;
  padding: 12px 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  border-radius: 14px;
  background: rgba(var(--accent-rgb), 0.12);
  color: #eafff0;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: background 0.15s, transform 0.12s;
}

.back-btn:active {
  transform: scale(0.98);
  background: rgba(var(--accent-rgb), 0.2);
}

.back-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.22);
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 800;
}

.back-btn__text {
  flex: 1;
  text-align: left;
}

.ai-open-chat-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.detail-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 12px;
  text-align: center;
  letter-spacing: 0.03em;
}

.detail-box {
  background: var(--panel-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.detail-box h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.detail-row:last-child { border-bottom: none; }

.detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.detail-actions a {
  flex: 1;
  min-width: 120px;
  text-align: center;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.95), rgba(0, 190, 70, 0.9));
  color: var(--accent-text);
  font-weight: 700;
  padding: 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.2);
}

.detail-actions a.secondary {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: none;
  font-weight: 600;
}

.detail-actions .detail-trade-btn {
  flex: 1;
  min-width: 120px;
  text-align: center;
  border: none;
  cursor: pointer;
  font: inherit;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.95), rgba(0, 190, 70, 0.9));
  color: var(--accent-text);
  font-weight: 700;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.25);
}

.detail-trade-row--api,
.work-actions.detail-trade-row--api,
.work-actions__row--api {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.detail-trade-btn,
.work-actions__row--api .detail-trade-btn,
.work-actions__row--api .work-actions__buy,
.work-actions__row--api .work-actions__sell {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.detail-trade-btn--buy,
.work-actions__buy {
  background: linear-gradient(
    135deg,
    var(--accent),
    color-mix(in srgb, var(--accent) 72%, #000)
  );
  color: var(--accent-text);
}

.detail-trade-btn--sell,
.work-actions__sell {
  background: linear-gradient(
    135deg,
    var(--sell-color, #5eb8ff),
    color-mix(in srgb, var(--sell-color, #5eb8ff) 65%, #000)
  );
  color: var(--accent-text);
}

.detail-trade-btn--off,
.detail-trade-btn--off {
  opacity: 0.55;
}

.detail-trade-row--web {
  display: flex;
  gap: 8px;
}

.detail-trade-btn--ghost {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  text-align: center;
  text-decoration: none;
  padding: 8px;
  border-radius: 10px;
  font-size: 0.75rem;
}

.detail-trade-hint,
.work-actions .detail-trade-hint {
  font-size: 11px;
  opacity: 0.7;
  line-height: 1.4;
  margin: 4px 0 0;
}

.trade-api-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.trade-api-ex {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  text-align: left;
  font-size: 0.85rem;
}

.trade-semi-banner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  font-size: 0.78rem;
  font-weight: 700;
}

.trade-semi-banner__sub {
  font-weight: 500;
  font-size: 0.65rem;
  opacity: 0.85;
}

.detail-trade-hint--semi {
  color: var(--accent);
  opacity: 0.95;
}

.work-actions__buy--api,
.work-actions__sell--api {
  border: 1px solid rgba(var(--accent-rgb), 0.45);
}

.trade-preflight {
  margin: 10px 0;
  font-size: 0.72rem;
}

.trade-pf-row {
  display: grid;
  grid-template-columns: 22px 90px 1fr;
  gap: 6px;
  align-items: start;
  margin-bottom: 6px;
}

.trade-pf-row.bad b {
  color: var(--bad, #f66);
}

.trade-pf-row.warn b {
  color: var(--warn);
}

.trade-pf-vol {
  margin-top: 8px;
  font-size: 0.78rem;
}

.trade-pf-warn {
  color: var(--warn);
  font-size: 0.68rem;
}

.detail-actions .detail-trade-btn--secondary {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: none;
  font-weight: 600;
}

.install-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  z-index: 190;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(6, 14, 10, 0.94);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  touch-action: manipulation;
}

.install-bar.hidden {
  display: none !important;
}

.install-bar__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.78rem;
  color: var(--hint);
}

.install-bar__text strong {
  color: var(--text-bright);
  font-size: 0.88rem;
}

.install-bar__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.install-bar__btn {
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.82rem;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.95), rgba(0, 190, 70, 0.9));
  color: var(--accent-text);
  cursor: pointer;
}

.install-bar__btn--full {
  width: 100%;
  margin-top: 12px;
}

.install-bar__close {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 201;
  flex-shrink: 0;
}

.install-bar__close:active {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(0.94);
}

.ios-install {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.ios-install__card {
  pointer-events: auto;
  touch-action: manipulation;
}

.ios-install.hidden {
  display: none !important;
}

.ios-install__card {
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--panel-strong);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 0 40px rgba(var(--accent-rgb), 0.15);
  pointer-events: auto;
  touch-action: manipulation;
}

.ios-install__lead {
  color: var(--hint);
  font-size: 0.88rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.ios-install__alt {
  color: var(--hint);
  font-size: 0.78rem;
  margin: 12px 0 16px;
  line-height: 1.45;
  padding: 10px;
  border-radius: 10px;
  background: rgba(var(--accent-rgb), 0.06);
  border: 1px solid rgba(var(--accent-rgb), 0.12);
}

.install-bar__btn--ghost {
  margin-top: 8px;
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  box-shadow: none;
}

.ios-install__card h3 {
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.ios-install__card ol {
  padding-left: 20px;
  color: var(--hint);
  font-size: 0.9rem;
  line-height: 1.55;
}

.ios-install__card li {
  margin-bottom: 8px;
}

.ios-install__card b {
  color: var(--accent);
}

body[data-screen="profile"] .app-shell {
  display: none;
}

.screen-ai {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 14px calc(96px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  flex-direction: column;
  background: var(--surface-screen);
  color: var(--text);
}

.screen-ai.is-active {
  display: flex;
}

.ai-hero {
  flex-shrink: 0;
  margin-bottom: 10px;
}

.ai-hero__title {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 4px;
}

.ai-hero__sub {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: var(--hint);
}

.ai-mode-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-mode-btn {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.ai-mode-btn.active {
  border-color: rgba(var(--accent-rgb), 0.5);
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--accent);
}

.ai-mode-btn--ghost {
  margin-left: auto;
  color: var(--hint);
}

.ai-quick {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.ai-quick__btn {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.72rem;
  cursor: pointer;
}

.ai-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 2px 12px;
  -webkit-overflow-scrolling: touch;
}

.ai-bubble {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.86rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.ai-bubble--user {
  align-self: flex-end;
  background: rgba(var(--accent-rgb), 0.16);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
}

.ai-bubble--assistant {
  align-self: flex-start;
  background: var(--panel-strong);
  border: 1px solid var(--border);
}

.ai-bubble--typing {
  align-self: flex-start;
  color: var(--hint);
  font-style: italic;
}

.ai-bubble__copy {
  display: block;
  margin-top: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--hint);
  font-size: 0.72rem;
  font-family: var(--font);
  cursor: pointer;
}

.ai-compose {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.ai-compose input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 0.9rem;
}

.ai-compose__send {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
}

body[data-screen="ai"] #app.app-shell,
body[data-screen="work"] #app.app-shell {
  visibility: hidden;
}

.screen-community {
  display: none;
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  z-index: 200;
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow: hidden;
  flex-direction: column;
  background: var(--theme-bg);
  box-sizing: border-box;
}

body[data-screen="community"].comm-thread-open .screen-community {
  padding-bottom: 0;
}

.screen-community.is-active {
  display: flex;
}

.screen-community .dc-compose-foot {
  flex: 0 0 auto;
  flex-shrink: 0;
  z-index: 48;
  pointer-events: auto;
  touch-action: manipulation;
  background: color-mix(in srgb, var(--surface-card) 98%, transparent);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: var(--tg-safe-bottom, 12px);
}

.screen-community .dc-compose-foot--disabled {
  opacity: 0.92;
}

.screen-community .dc-compose-foot--disabled .tg-chat__input-wrap textarea {
  opacity: 0.55;
}

body[data-screen="community"] #matrixCanvas,
body[data-screen="community"] .matrix-overlay,
body[data-screen="ai"] #matrixCanvas,
body[data-screen="work"] #matrixCanvas,
body[data-screen="profile"] #matrixCanvas,
body.login-gate-open #matrixCanvas,
body.access-gate-open #matrixCanvas {
  display: none !important;
  opacity: 0 !important;
}

/* PWA layout: см. pwa-shell.css + pwa-shell.js */

body.is-standalone-pwa[data-screen="community"] {
  overflow: hidden;
}

body.is-standalone-pwa[data-screen="community"] .screen-community .dc-compose-foot,
body[data-screen="community"] .screen-community .dc-compose-foot {
  position: relative;
  flex: 0 0 auto;
  flex-shrink: 0;
  z-index: 210;
  pointer-events: auto;
  margin-top: auto;
  transform: translateY(calc(-1 * var(--tg-kb-offset, 0px)));
  transition: transform 0.12s ease-out;
}

body.is-standalone-pwa[data-screen="community"] .screen-community .dc-main,
body[data-screen="community"] .screen-community .dc-main {
  padding-bottom: 0;
}

body.is-standalone-pwa[data-screen="community"] .screen-community .tg-chat__feed,
body.is-standalone-pwa[data-screen="community"] .screen-community .tg-thread-feed,
body[data-screen="community"] .screen-community .tg-chat__feed,
body[data-screen="community"] .screen-community .tg-thread-feed {
  padding-bottom: calc(var(--comm-compose-h, 72px) + var(--tg-kb-offset, 0px) + 8px);
  scroll-padding-bottom: calc(var(--comm-compose-h, 72px) + var(--tg-kb-offset, 0px) + 12px);
}

body.is-standalone-pwa[data-screen="community"] .tg-attach-sheet {
  bottom: calc(64px + var(--tg-safe-bottom, 12px) + var(--tg-kb-offset, 0px));
}


.tg-chat__topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  background: color-mix(in srgb, var(--surface-card) 98%, transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tg-chat__peer-title {
  font-size: 1.05rem;
  font-weight: 800;
}

.tg-chat__peer-sub {
  font-size: 0.72rem;
  color: var(--hint);
  margin-top: 2px;
}

.tg-chat__peer {
  flex: 1;
  min-width: 0;
}

.tg-chat__pill {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.tg-chat__feed {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(var(--accent-rgb), 0.04), transparent 60%),
    var(--theme-bg);
}

.tg-chat__feed--drag {
  outline: 2px dashed rgba(var(--accent-rgb), 0.45);
  outline-offset: -4px;
}

.tg-day {
  text-align: center;
  margin: 12px 0 8px;
}

.tg-day span {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--hint);
  background: rgba(255, 255, 255, 0.06);
}

.tg-system {
  text-align: center;
  font-size: 0.78rem;
  color: var(--hint);
  padding: 8px 12px;
  margin: 8px auto;
  max-width: 92%;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.tg-date {
  align-self: center;
  margin: 12px 0 8px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--hint);
  background: rgba(255, 255, 255, 0.06);
}

.tg-msg__link {
  color: #8fd4ff;
  text-decoration: underline;
  word-break: break-all;
}

.tg-msg--pending .tg-msg__bubble {
  opacity: 0.72;
}

.tg-scroll-down {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 18;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 1.25rem;
  font-weight: 800;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.tg-scroll-down.hidden {
  display: none !important;
}

.dc-channel__unread {
  color: var(--accent);
  font-weight: 800;
}

.dc-channel__unread.hidden {
  display: none;
}

.tg-action-sheet {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(72px + var(--tg-safe-bottom, 12px) + var(--tg-kb-offset, 0px));
  z-index: 240;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 16px;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.tg-action-sheet.hidden {
  display: none !important;
}

.tg-action-sheet button {
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}

.tg-action-sheet__danger {
  color: #ff9a9a;
}

.tg-msg {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  max-width: 92%;
  margin-bottom: 2px;
}

.tg-msg--out {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.tg-msg--in {
  align-self: flex-start;
}

.tg-msg--grouped {
  margin-top: 1px;
}

.tg-msg--grouped .tg-msg__meta {
  display: none;
}

.tg-msg--ping .tg-msg__bubble {
  box-shadow: 0 0 0 1px rgba(255, 200, 80, 0.5);
}

.tg-msg__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  background: hsl(var(--av-hue, 140), 45%, 32%);
}

.tg-msg__avatar--img {
  object-fit: cover;
  background: #222;
}

.tg-msg__avatar--matrix {
  overflow: hidden;
  padding: 0;
  background: #050a08;
  border: 1px solid rgba(92, 255, 138, 0.28);
  box-shadow: 0 0 10px rgba(92, 255, 138, 0.12);
}

.tg-msg__avatar--matrix svg {
  width: 100%;
  height: 100%;
  display: block;
}

.tg-msg__avatar--spacer {
  visibility: hidden;
}

.tg-msg__col {
  min-width: 0;
  max-width: 100%;
}

.tg-msg__meta {
  margin-bottom: 4px;
  padding: 0 4px;
}

.tg-msg__author {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}

.tg-msg__author--admin {
  color: #7ec8ff;
}

.tg-msg__badge {
  margin-left: 6px;
  font-size: 0.58rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(80, 160, 255, 0.2);
  color: #7ec8ff;
}

.tg-msg__bubble {
  position: relative;
  padding: 8px 10px 6px;
  border-radius: 16px;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  word-break: break-word;
}

.tg-msg--out .tg-msg__bubble {
  background: rgba(0, 120, 55, 0.35);
  border-color: rgba(var(--accent-rgb), 0.25);
  border-bottom-right-radius: 4px;
}

.tg-msg--in .tg-msg__bubble {
  border-bottom-left-radius: 4px;
}

.tg-msg__text {
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.tg-msg__photo {
  display: block;
  max-width: min(280px, 72vw);
  border-radius: 12px;
  margin-bottom: 6px;
  cursor: zoom-in;
}

.tg-msg__video {
  display: block;
  max-width: min(300px, 78vw);
  max-height: 220px;
  border-radius: 12px;
  margin-bottom: 6px;
  background: #000;
}

.tg-quote {
  display: block;
  margin-bottom: 8px;
  padding: 6px 8px 6px 10px;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.75rem;
}

.tg-quote__name {
  display: block;
  font-weight: 700;
  color: var(--accent);
}

.tg-quote__text {
  color: var(--hint);
}

.tg-bundle {
  margin-bottom: 6px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  cursor: pointer;
}

.tg-bundle__row {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
}

.tg-bundle__profit {
  color: var(--accent);
}

.tg-bundle__sub {
  font-size: 0.72rem;
  color: var(--hint);
  margin-top: 4px;
}

.tg-msg__footer {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 4px;
  font-size: 0.62rem;
  color: var(--hint);
}

.tg-msg__mention {
  margin-right: auto;
  font-weight: 700;
  color: #ffc850;
}

.tg-msg__reply {
  border: none;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0 2px;
}

.tg-chat__dock {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 10px 10px;
  background: color-mix(in srgb, var(--surface-card) 98%, transparent);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
}

.tg-chat__attach,
.tg-chat__send {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  font-size: 1.15rem;
}

.tg-chat__attach {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
}

.tg-chat__send {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 800;
}

.tg-chat__send:disabled {
  opacity: 0.5;
}

.dc-top__admin {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.dc-admin-menu {
  position: fixed;
  top: calc(52px + env(safe-area-inset-top, 0px));
  right: 12px;
  z-index: 220;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
  padding: 8px;
  border-radius: 14px;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.dc-admin-menu.hidden {
  display: none !important;
}

.dc-admin-menu button {
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
}

.dc-admin-menu__danger {
  color: #ff8a8a;
}

.tg-msg__delete {
  margin-left: 6px;
  padding: 0 6px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 80, 80, 0.15);
  color: #ff9a9a;
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;
}

.tg-msg__audio {
  width: 100%;
  max-width: 260px;
  margin-top: 4px;
}

.tg-attach-sheet__btn--rec {
  background: rgba(255, 80, 80, 0.2) !important;
  border-color: rgba(255, 100, 100, 0.5) !important;
  animation: comm-voice-pulse 1s ease-in-out infinite;
}

@keyframes comm-voice-pulse {
  50% { opacity: 0.75; }
}

.tg-chat__input-wrap {
  flex: 1;
  min-width: 0;
}

.tg-chat__input-wrap textarea {
  width: 100%;
  min-height: 44px;
  max-height: 120px;
  padding: 11px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  resize: none;
  line-height: 1.35;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-user-select: text;
  user-select: text;
}

.tg-reply-bar {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(12, 22, 16, 0.98);
  border-top: 1px solid rgba(var(--accent-rgb), 0.15);
}

.tg-reply-bar.hidden {
  display: none;
}

.tg-reply-bar__accent {
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}

.tg-reply-bar__body {
  flex: 1;
  min-width: 0;
}

.tg-reply-bar__label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
}

.tg-reply-bar__text {
  font-size: 0.75rem;
  color: var(--hint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tg-reply-bar__close {
  border: none;
  background: transparent;
  color: var(--hint);
  font-size: 1.3rem;
  cursor: pointer;
}

.tg-sheet {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  padding: 10px;
  border-radius: 16px;
  background: rgba(14, 24, 18, 0.98);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 20;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.tg-sheet.hidden {
  display: none;
}

.tg-sheet__btn {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
}

.tg-sheet__hint {
  margin: 0;
  font-size: 0.68rem;
  color: var(--hint);
  text-align: center;
}

.tg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.tg-lightbox.hidden {
  display: none;
}

.tg-lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
}

.tg-lightbox__close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: 16px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
}

.screen-community.tg-chat {
  position: fixed;
  isolation: isolate;
}

.tg-chat__back {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  flex-shrink: 0;
}

.tg-chat__back.hidden {
  display: none;
}

.tg-pane {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.tg-pane.hidden {
  display: none;
}

.tg-thread-feed {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  -webkit-overflow-scrolling: touch;
}

.tg-thread-card {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 16px;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s;
}

.tg-thread-card:active {
  border-color: rgba(var(--accent-rgb), 0.4);
}

.tg-thread-card__head {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--hint);
  margin-bottom: 8px;
}

.tg-thread-card__author {
  font-weight: 700;
  color: var(--accent);
}

.tg-thread-card__foot {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tg-thread-card__comments {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
}

.tg-thread-card__preview {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--hint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tg-bundle--feed {
  pointer-events: none;
}

.tg-bundle--pinned {
  margin-bottom: 8px;
}

.tg-thread-head {
  flex-shrink: 0;
  padding: 10px 12px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: color-mix(in srgb, var(--surface-card) 95%, transparent);
}

.tg-thread-head__hint {
  margin: 8px 0 4px;
  font-size: 0.82rem;
  color: var(--text);
}

.tg-thread-head__meta {
  margin: 0;
  font-size: 0.68rem;
  color: var(--hint);
}

.tg-chat__feed--thread {
  flex: 1;
  min-height: 0;
}

.tg-feed-actions__btn {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 16px auto 8px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.18);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--font);
  cursor: pointer;
  position: relative;
  z-index: 5;
}

.tg-feed-empty {
  text-align: center;
  padding: 20px 16px 32px;
  color: var(--hint);
  font-size: 0.85rem;
  line-height: 1.5;
}

.tg-feed-empty__lead {
  margin: 0 0 12px;
}

.tg-msg__avatar--sm {
  width: 28px;
  height: 28px;
  font-size: 0.7rem;
}

#commThreadDock.hidden {
  display: none;
}

#commThreadDock {
  flex-shrink: 0;
  position: relative;
  z-index: 12;
  margin-bottom: 2px;
}

body[data-screen="community"] .tab-bar {
  display: none !important;
}

.comm-hero {
  flex-shrink: 0;
  margin-bottom: 8px;
}

.comm-hero__title {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 4px;
}

.comm-hero__sub {
  margin: 0 0 8px;
  font-size: 0.76rem;
  color: var(--hint);
  line-height: 1.4;
}

.comm-hero__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.comm-online {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
}

.comm-preview-pill {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 200, 80, 0.35);
  color: #ffc850;
  background: rgba(255, 200, 80, 0.08);
}

.comm-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 2px 14px;
  -webkit-overflow-scrolling: touch;
}

.comm-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 88%;
}

.comm-row--mine {
  align-self: flex-end;
  align-items: flex-end;
}

.comm-row--other {
  align-self: flex-start;
  align-items: flex-start;
}

.comm-row--system {
  align-self: center;
  max-width: 96%;
  align-items: center;
}

.comm-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.68rem;
  color: var(--hint);
}

.comm-meta__name {
  font-weight: 700;
  color: var(--text);
}

.comm-meta__name--admin {
  color: #7ec8ff;
}

.comm-badge-admin {
  font-size: 0.58rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(80, 160, 255, 0.2);
  color: #7ec8ff;
  border: 1px solid rgba(80, 160, 255, 0.35);
}

.comm-bubble {
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 0.86rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.comm-bubble--mine {
  background: rgba(var(--accent-rgb), 0.16);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-bottom-right-radius: 4px;
}

.comm-bubble--other {
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.comm-bubble--system {
  text-align: center;
  font-size: 0.78rem;
  color: var(--hint);
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
}

.comm-compose {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.comm-compose input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
}

.comm-compose__send {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
}

.comm-compose__send:disabled {
  opacity: 0.5;
  cursor: wait;
}

.comm-compose__attach {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
}

.comm-reply-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
}

.comm-reply-bar.hidden {
  display: none;
}

.comm-reply-bar__text {
  flex: 1;
  font-size: 0.75rem;
  color: var(--hint);
  line-height: 1.35;
}

.comm-reply-bar__close {
  border: none;
  background: transparent;
  color: var(--hint);
  font-size: 1.2rem;
  cursor: pointer;
}

.comm-reply-btn {
  margin-left: auto;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 0.72rem;
  cursor: pointer;
}

.comm-quote {
  display: block;
  margin-bottom: 8px;
  padding: 6px 8px;
  border-left: 3px solid rgba(var(--accent-rgb), 0.45);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  font-size: 0.72rem;
}

.comm-quote__who {
  display: block;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2px;
}

.comm-quote__text {
  color: var(--hint);
}

.comm-mention-badge {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 200, 80, 0.2);
  color: #ffc850;
  border: 1px solid rgba(255, 200, 80, 0.35);
}

.comm-row--ping .comm-bubble {
  box-shadow: 0 0 0 1px rgba(255, 200, 80, 0.45);
}

.comm-bundle {
  margin-bottom: 8px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.06);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  cursor: pointer;
}

.comm-bundle__top {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 4px;
}

.comm-bundle__mid {
  font-size: 0.75rem;
  color: var(--hint);
}

.comm-bundle__hint {
  margin-top: 6px;
  font-size: 0.65rem;
  color: var(--accent);
}

.comm-img {
  max-width: 100%;
  border-radius: 12px;
  margin-bottom: 6px;
  display: block;
}

.comm-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.comm-share-btn {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
}

.tab-bar__item[data-screen="community"] .tab-bar__icon svg,
.tab-bar__item[data-screen="ai"] .tab-bar__icon svg {
  width: 20px;
  height: 20px;
}

.tab-bar__label {
  font-size: 0.54rem;
}

.screen-profile {
  display: none;
  position: relative;
  z-index: 100;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 18px 16px calc(var(--ml-tab-bar-h, 88px) + env(safe-area-inset-bottom, 0px));
  pointer-events: auto;
  background: transparent;
  color: var(--text);
}

.screen-profile.is-active {
  display: block;
}

.profile-subview {
  display: none;
}

.profile-subview:not(.hidden) {
  display: block;
  position: relative;
  z-index: 120;
}

.ex-stats__note {
  color: var(--hint);
  font-weight: 500;
}

.ex-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ex-quick__btn {
  flex: 1 1 calc(50% - 4px);
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.ex-quick__btn--ghost {
  flex: 1 1 100%;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--hint);
}

.ex-quick__btn:active {
  transform: scale(0.98);
}

.profile-subview__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
}

.profile-subview__title {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-bright);
}

.profile-subview__hint,
.profile-subview__stats {
  margin: 0 0 10px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--hint);
}

.profile-subview__stats b {
  color: var(--accent);
}

#profileMainWrap.hidden {
  display: none !important;
}

body[data-screen="home"] .scanner-only {
  display: none !important;
}

body[data-screen="bundles"] .home-only,
body[data-screen="bundles"] #homeDashboard {
  display: none !important;
}

/* —— Визуальные темы: CSS-переменные задаёт visual-themes.js + applyVisualTheme —— */

.theme-chip.active {
  border-color: var(--chip-accent, var(--accent));
  background: var(--chip-dim, var(--accent-dim));
  color: var(--chip-accent, var(--accent));
  box-shadow: 0 0 12px var(--chip-dim, var(--accent-dim));
}

.app-splash__dot--active {
  transform: scale(1.35);
  opacity: 1;
  box-shadow: 0 0 18px currentColor;
}

html[data-visual-theme] {
  color: var(--text);
}

html[data-visual-theme] .screen,
html[data-visual-theme] .app-shell {
  color: var(--text);
}

html[data-visual-theme] .matrix-overlay {
  background:
    radial-gradient(ellipse at 50% 0%, var(--overlay-glow), transparent 52%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.52) 100%);
}

html[data-visual-theme="ember"] .card--funding,
html[data-visual-theme="ember"] .card--spot,
html[data-visual-theme] .card--funding,
html[data-visual-theme] .card--spot {
  border-color: rgba(var(--accent-rgb), 0.22);
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--surface-card) 96%, transparent),
    color-mix(in srgb, var(--theme-bg) 94%, transparent)
  );
}

html[data-visual-theme] .profit--spot,
html[data-visual-theme] .card--spot .profit {
  color: var(--ok-bright);
}

html[data-visual-theme] .tab--futures.tab.active,
html[data-visual-theme] .tab--spot.tab.active {
  border-color: rgba(var(--accent-rgb), 0.45);
}

html[data-visual-theme] .card-cta,
html[data-visual-theme] .card-cta--elite,
html[data-visual-theme] .card-cta--buy {
  color: var(--accent);
}

html[data-visual-theme] .card-elite-glow {
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.22), transparent 70%);
}

html[data-visual-theme] .pro-badge {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000));
  color: var(--accent-text);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.35);
}

html[data-visual-theme] .badge.hot {
  color: var(--ok-bright);
  border-color: rgba(var(--accent-rgb), 0.38);
  background: rgba(var(--accent-rgb), 0.12);
}

html[data-visual-theme] .badge.dw-open {
  color: var(--hint);
}

html[data-visual-theme] .card--tier-1 .card-rank,
html[data-visual-theme] .card--tier-2 .card-rank,
html[data-visual-theme] .card--tier-3 .card-rank {
  color: var(--accent);
}

html[data-visual-theme] .ai-chip {
  color: var(--hint);
}

html[data-visual-theme] .ai-chip--off {
  opacity: 0.45;
}

html[data-visual-theme] .login-gate,
html[data-visual-theme] .auth-renew,
html[data-visual-theme] .panel-overlay__sheet,
html[data-visual-theme] .profile-hero,
html[data-visual-theme] .work-card {
  border-color: rgba(var(--accent-rgb), 0.18);
}

html[data-visual-theme] .screen-profile,
html[data-visual-theme] .screen-ai,
html[data-visual-theme] .screen-community {
  background: transparent;
}

html[data-visual-theme] .screen-work {
  background: var(--theme-bg);
  color: var(--text);
}

html[data-visual-theme] .screen-work .work-list,
html[data-visual-theme] .screen-work .work-focus,
html[data-visual-theme] .screen-work .spread-visual,
html[data-visual-theme] .screen-work .spread-side {
  color: var(--text);
}

/* Лента связок: фон и карточки строго в цвете темы */
html[data-visual-theme] .app-shell,
html[data-visual-theme] .list,
html[data-visual-theme] #bundlesList {
  color: var(--text);
}

html[data-visual-theme] .card,
html[data-visual-theme] .card--elite,
html[data-visual-theme] .card--tier-1,
html[data-visual-theme] .card--tier-2,
html[data-visual-theme] .card--tier-3 {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--surface-card) 96%, transparent),
    color-mix(in srgb, var(--theme-bg) 92%, transparent)
  );
  border-color: rgba(var(--accent-rgb), 0.2);
}

html[data-visual-theme] body.matrix-off .matrix-overlay {
  background: var(--matrix-off-bg);
}

/* —— Главная: пульт —— */
.home-dashboard {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-dashboard__lead {
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(var(--text-tint-rgb), 0.65);
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
}

.home-theme {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
}

.home-theme__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.home-theme__label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
}

.home-theme__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.theme-chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
}

.home-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.home-stat {
  padding: 10px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-card) 75%, transparent);
  border: 1px solid var(--border);
}

.home-stat b {
  display: block;
  font-size: 1.05rem;
  color: var(--accent);
  font-family: var(--mono);
}

.home-stat span {
  font-size: 0.68rem;
  color: var(--hint);
}

.home-cta {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000));
  color: var(--accent-text);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.home-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(220, 255, 230, 0.85);
  margin: 4px 0 0;
}

.home-top-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-pick {
  text-align: left;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(6, 14, 10, 0.82);
  color: inherit;
  font: inherit;
}

.home-pick__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.home-pick__row b {
  font-size: 1rem;
  color: var(--accent);
}

.home-pick__profit {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--ok-bright);
}

.home-pick__sub {
  font-size: 0.75rem;
  color: var(--hint);
}

.home-hint {
  font-size: 0.72rem;
  color: var(--hint);
  text-align: center;
}

.home-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.home-action {
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 600;
}

.scanner-hint {
  font-size: 0.72rem;
  color: var(--hint);
  text-align: center;
  margin: 0 0 8px;
}

#homeDashboard .ai-strip,
#homeDashboard .preset-strip,
#homeDashboard .quick-nav {
  margin-top: 4px;
}

.feed-wide-banner {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  color: rgba(var(--accent-rgb), 0.95);
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  text-align: center;
}

.feed-wide-banner.hidden {
  display: none;
}

.profile-feed-dash {
  margin-bottom: 14px;
  padding: 14px 14px 12px;
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(var(--accent-rgb), 0.14) 0%, rgba(0, 0, 0, 0.5) 60%);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.32);
}

.profile-feed-dash__title {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(var(--text-tint-rgb), 0.85);
}

.profile-feed-dash__rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.profile-feed-dash__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--text);
}

.profile-feed-dash__label {
  flex-shrink: 0;
  color: var(--hint);
  font-size: 0.72rem;
}

.profile-feed-dash__value {
  text-align: right;
  font-weight: 600;
  color: var(--text-bright);
}

.profile-feed-dash__value--accent {
  color: var(--accent);
}

.profile-feed-dash__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.profile-feed-dash__btn {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--text-bright);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.profile-feed-dash__btn--ghost {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 600;
}

.profile-feed-dash__btn:active {
  transform: scale(0.98);
}

.panel-quick-links {
  display: flex;
  gap: 8px;
  margin: 10px 0 4px;
}

.panel-btn--compact {
  flex: 1;
  min-height: 36px;
  font-size: 0.72rem;
}

.profile-section-fold {
  margin-bottom: 12px;
}

.profile-section-fold > summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(var(--text-tint-rgb), 0.75);
  padding: 8px 4px 10px;
  touch-action: manipulation;
}

.profile-section-fold > summary::-webkit-details-marker {
  display: none;
}

.profile-section-fold > summary::after {
  content: " ▾";
  opacity: 0.6;
}

.profile-section-fold[open] > summary::after {
  content: " ▴";
}

.profile-settings-block {
  margin: 0 0 14px;
  padding: 14px 14px 12px;
  border-radius: 18px;
  background: var(--surface-card);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.profile-settings-block__head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-settings-block__mark {
  font-size: 1rem;
  line-height: 1;
}

.profile-settings-block__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text-bright, var(--text));
}

.profile-settings-block__hint {
  margin-left: auto;
  font-size: 0.68rem;
  color: var(--hint);
}

.profile-settings-block__sub {
  margin: 8px 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--hint);
}

.profile-preset-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  touch-action: manipulation;
}

.profile-preset-btns .preset-card {
  flex: 1 1 calc(33.333% - 8px);
  min-width: 96px;
  max-width: 100%;
}

.theme-picker--profile {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.theme-picker--profile .theme-chip {
  flex: 1 1 calc(50% - 8px);
  min-width: 118px;
  justify-content: flex-start;
  text-align: left;
  font-size: 0.72rem;
}

.theme-picker--panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: min(60vh, 480px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  margin-top: 10px;
}

.theme-picker--panel .theme-chip {
  flex: 1 1 calc(50% - 8px);
  min-width: 120px;
}

.profile-settings-block__sub--warn {
  color: #ff8a8a;
}

.profile-theme-rain--panel {
  margin-top: 14px;
}

.profile-theme-rain {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.12);
}

.profile-theme-rain .matrix-toggle {
  width: 100%;
  justify-content: flex-start;
}

.profile-card {
  margin-bottom: 18px;
  padding: 16px 16px 14px;
  border-radius: 22px;
  background: linear-gradient(155deg, rgba(var(--accent-rgb), 0.1) 0%, rgba(0, 0, 0, 0.45) 55%);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.profile-hero__top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-avatar {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-bright);
  background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.35), rgba(0, 0, 0, 0.5));
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  box-shadow: 0 4px 18px rgba(var(--accent-rgb), 0.2);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.2s;
}

.profile-avatar:active {
  transform: scale(0.96);
}

.profile-avatar--matrix svg {
  width: 100%;
  height: 100%;
  display: block;
}

.avatar-picker {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.88);
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.avatar-picker.hidden {
  display: none !important;
  pointer-events: none !important;
}

.avatar-picker__panel {
  width: 100%;
  max-width: 420px;
  max-height: min(78vh, 520px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 18px 18px 14px 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  background: linear-gradient(180deg, rgba(14, 24, 18, 0.98), rgba(6, 10, 8, 0.99));
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.55);
  padding: 14px 12px 16px;
  pointer-events: auto;
  touch-action: manipulation;
  position: relative;
  z-index: 1;
}

body.modal-open {
  overflow: hidden;
  touch-action: none;
}

body.modal-open .tab-bar {
  pointer-events: none;
}

.avatar-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.avatar-picker__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-bright);
}

.avatar-picker__sub {
  margin: 2px 0 0;
  font-size: 0.72rem;
  color: var(--hint);
}

.avatar-picker__close {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-bright);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(var(--accent-rgb), 0.25);
  min-height: 40px;
  min-width: 72px;
}

.avatar-picker__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.avatar-picker__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: color-mix(in srgb, var(--surface-card) 85%, transparent);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(var(--accent-rgb), 0.2);
  pointer-events: auto;
}

.avatar-picker__item--on {
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.25), 0 4px 16px rgba(var(--accent-rgb), 0.18);
}

.avatar-picker__art {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  overflow: hidden;
}

.avatar-picker__art svg {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.avatar-picker__name {
  font-size: 0.78rem;
  font-weight: 800;
}

.avatar-picker__hint {
  font-size: 0.62rem;
  opacity: 0.65;
}

.profile-hero__meta {
  min-width: 0;
  flex: 1;
}

.profile-hero__title {
  margin: 0 0 4px;
  font-family: var(--font);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.profile-hero__sub {
  margin: 0;
  font-size: 0.78rem;
  color: var(--hint);
  line-height: 1.4;
}

.profile-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.profile-chip {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--hint);
}

.profile-chip--risk {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.3);
  background: rgba(var(--accent-rgb), 0.1);
}

.profile-chip--ex {
  color: var(--gold, var(--accent));
  border-color: rgba(201, 162, 39, 0.35);
  background: rgba(201, 162, 39, 0.08);
}

.profile-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--gold-soft);
  border: 1px solid var(--border-gold);
  color: var(--gold);
}

.profile-hero__badge--boss {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: #ffe9a8;
  background: linear-gradient(135deg, rgba(120, 60, 220, 0.35), rgba(201, 162, 39, 0.28));
  border-color: rgba(232, 197, 71, 0.55);
  box-shadow: 0 0 20px rgba(180, 120, 255, 0.25);
}

.pro-badge--boss {
  background: linear-gradient(135deg, #6b3fd4, #c9a227);
  border-color: rgba(232, 197, 71, 0.5);
  color: #fff8e0;
}

.profile-sections {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.profile-section__title {
  margin: 0 0 8px 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hint);
  opacity: 0.85;
}

.profile-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 5px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.profile-menu__item {
  display: grid;
  grid-template-columns: 44px 1fr auto 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 10px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  touch-action: manipulation;
}

.profile-menu__item:active {
  background: rgba(var(--accent-rgb), 0.1);
  transform: scale(0.995);
}

.profile-menu__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 13px;
  color: var(--accent);
  background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.22), rgba(0, 0, 0, 0.4));
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.profile-menu__icon--preset {
  color: #e8c547;
  background: linear-gradient(160deg, rgba(232, 197, 71, 0.25), rgba(0, 0, 0, 0.4));
  border-color: rgba(232, 197, 71, 0.35);
}

.profile-menu__icon--spread {
  color: #7ec8ff;
  background: linear-gradient(160deg, rgba(126, 200, 255, 0.2), rgba(0, 0, 0, 0.4));
  border-color: rgba(126, 200, 255, 0.3);
}

.profile-menu__icon--volume {
  color: #9ae6b0;
  background: linear-gradient(160deg, rgba(154, 230, 176, 0.2), rgba(0, 0, 0, 0.4));
  border-color: rgba(154, 230, 176, 0.3);
}

.profile-menu__icon--risk {
  color: #ffb86b;
  background: linear-gradient(160deg, rgba(255, 184, 107, 0.22), rgba(0, 0, 0, 0.4));
  border-color: rgba(255, 184, 107, 0.35);
}

.profile-menu__icon--exchanges {
  color: var(--accent);
}

.profile-menu__icon--work {
  color: #b8a0ff;
  background: linear-gradient(160deg, rgba(184, 160, 255, 0.22), rgba(0, 0, 0, 0.4));
  border-color: rgba(184, 160, 255, 0.32);
}

.profile-menu__icon--team {
  color: #8fd4ff;
  background: linear-gradient(160deg, rgba(143, 212, 255, 0.2), rgba(0, 0, 0, 0.4));
  border-color: rgba(143, 212, 255, 0.3);
}

.profile-menu__icon--ai {
  color: #ff9de2;
  background: linear-gradient(160deg, rgba(255, 157, 226, 0.2), rgba(0, 0, 0, 0.4));
  border-color: rgba(255, 157, 226, 0.32);
}

.profile-menu__icon--bundles {
  color: var(--accent);
}

.profile-menu__icon--academy {
  color: #c9e4ff;
  background: linear-gradient(160deg, rgba(201, 228, 255, 0.18), rgba(0, 0, 0, 0.4));
  border-color: rgba(201, 228, 255, 0.28);
}

.profile-menu__icon--stats {
  color: #7ee0c9;
  background: linear-gradient(160deg, rgba(126, 224, 201, 0.2), rgba(0, 0, 0, 0.4));
  border-color: rgba(126, 224, 201, 0.3);
}

.profile-menu__icon--listings {
  color: #ffd27a;
  background: linear-gradient(160deg, rgba(255, 210, 122, 0.2), rgba(0, 0, 0, 0.4));
  border-color: rgba(255, 210, 122, 0.32);
}

.profile-menu__icon--plans {
  color: #e8c547;
  background: linear-gradient(160deg, rgba(232, 197, 71, 0.22), rgba(0, 0, 0, 0.4));
  border-color: rgba(232, 197, 71, 0.35);
}

.profile-menu__icon--subscribe {
  color: #7ee0c9;
  background: linear-gradient(160deg, rgba(126, 224, 201, 0.25), rgba(0, 0, 0, 0.4));
  border-color: rgba(126, 224, 201, 0.38);
}

.subscribe-plans {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 16px;
}

.subscribe-plan {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  background: rgba(0, 48, 24, 0.65);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.subscribe-plan:active {
  transform: scale(0.98);
}

.subscribe-plan__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}

.subscribe-plan__price {
  font-size: 0.82rem;
  color: rgba(220, 255, 230, 0.88);
}

.subscribe-plan__days {
  font-size: 0.72rem;
  opacity: 0.65;
}

.subscribe-cta {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.45), rgba(0, 120, 60, 0.85));
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.subscribe-cta:active {
  opacity: 0.9;
}

.profile-menu__icon--coinlist {
  color: #a8b4c8;
  background: linear-gradient(160deg, rgba(168, 180, 200, 0.18), rgba(0, 0, 0, 0.4));
  border-color: rgba(168, 180, 200, 0.28);
}

.profile-menu__icon--install {
  color: #9ecbff;
  background: linear-gradient(160deg, rgba(158, 203, 255, 0.2), rgba(0, 0, 0, 0.4));
  border-color: rgba(158, 203, 255, 0.3);
}

.profile-menu__icon--bot {
  color: #6eb5ff;
  background: linear-gradient(160deg, rgba(110, 181, 255, 0.22), rgba(0, 0, 0, 0.4));
  border-color: rgba(110, 181, 255, 0.35);
}

.profile-menu__icon--support {
  color: #7ee0b8;
  background: linear-gradient(160deg, rgba(126, 224, 184, 0.22), rgba(0, 0, 0, 0.4));
  border-color: rgba(126, 224, 184, 0.32);
}

.support-faq {
  margin: 12px 0 16px;
  padding: 0 0 0 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted, #9aa3b2);
}

.support-faq li {
  margin-bottom: 8px;
}

.support-faq b {
  color: var(--text, #e8ecf4);
  font-weight: 600;
}

.profile-ico {
  width: 22px;
  height: 22px;
  display: block;
}

.profile-menu__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.profile-menu__item--static {
  cursor: default;
  opacity: 0.94;
}

.profile-menu__item--static .profile-menu__chev {
  display: none;
}

.ex-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: none;
  overflow: visible;
  padding-bottom: 8px;
}

.ex-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(var(--accent-rgb), 0.12);
}

.ex-row__name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-bright);
}

.ex-row__toggles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ex-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 64px;
  padding: 8px 6px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.1s, color 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.ex-toggle__icon {
  font-size: 1.1rem;
  line-height: 1;
}

.ex-toggle__title {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ex-toggle__state {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.ex-toggle:active {
  transform: scale(0.97);
}

.ex-toggle--pending {
  opacity: 0.65;
  pointer-events: none;
}

.ex-toggle--off {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.45);
}

.ex-toggle--off .ex-toggle__state {
  color: rgba(255, 120, 120, 0.85);
}

.ex-toggle--on {
  border-color: rgba(var(--accent-rgb), 0.65);
  background: rgba(var(--accent-rgb), 0.2);
  color: var(--accent);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.22);
}

.ex-toggle--on .ex-toggle__state {
  color: var(--accent);
}

.risk-opt-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.risk-opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-family: var(--font);
  transition: border-color 0.15s, background 0.15s;
}

.risk-opt--active {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.12);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.12);
}

.risk-opt--pending {
  opacity: 0.7;
  pointer-events: none;
}

.risk-opt:disabled {
  opacity: 0.55;
}

.risk-opt__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
}

.risk-opt__hint {
  font-size: 0.72rem;
  color: var(--hint);
  line-height: 1.35;
}

.profile-menu__label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.2;
}

.profile-menu__hint {
  font-size: 0.68rem;
  color: var(--hint);
  line-height: 1.3;
}

.profile-menu__value {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  text-align: right;
  white-space: nowrap;
}

.profile-menu__chev {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hint);
  opacity: 0.55;
}

.profile-menu__chev-ico {
  width: 16px;
  height: 16px;
  display: block;
}

.profile-foot {
  margin-top: 20px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--hint);
}

.tab-bar.hidden {
  display: none !important;
}

.tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 210;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.55) 30%, rgba(0, 0, 0, 0.88) 100%);
}

.tab-bar__inner {
  pointer-events: auto;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 8px 10px 8px 12px;
  border-radius: 28px;
  background: color-mix(in srgb, var(--surface-screen) 88%, transparent);
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.tab-bar__item {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 48px;
  padding: 6px 4px;
  border: none;
  background: transparent;
  color: var(--hint);
  cursor: pointer;
  border-radius: 16px;
  transition: color 0.15s, background 0.15s, transform 0.12s;
  font-family: var(--font);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.tab-bar__item.active {
  color: var(--text);
}

.tab-bar__item.active .tab-bar__icon {
  background: rgba(var(--accent-rgb), 0.14);
  border-color: rgba(var(--accent-rgb), 0.35);
  color: var(--accent);
}

.tab-bar__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.tab-bar__icon svg {
  width: 22px;
  height: 22px;
}

.tab-bar__label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.tab-bar__item:active .tab-bar__icon {
  transform: scale(0.9);
  background: rgba(var(--accent-rgb), 0.22);
}

body.is-refreshing #refreshBtn {
  animation: spin-refresh 0.75s linear infinite;
}

@keyframes spin-refresh {
  to { transform: rotate(360deg); }
}

@media (display-mode: standalone) {
  .install-bar {
    display: none !important;
  }

  .app-shell {
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
  }
}

/* —— Назад + свайп между вкладками —— */
.screen-nav {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.screen-nav__body {
  flex: 1;
  min-width: 0;
}

.screen-nav__back {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-bright, var(--text));
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.screen-nav__back:active {
  transform: scale(0.96);
  background: rgba(var(--accent-rgb, 57, 255, 136), 0.12);
  border-color: rgba(var(--accent-rgb, 57, 255, 136), 0.35);
}

.screen-nav__back--chat {
  margin-right: 4px;
}

.screen-nav .work-hero__title,
.screen-nav .ai-hero__title,
.screen-nav__body .profile-hero__title {
  margin: 0 0 4px;
}

.screen-nav .work-hero__sub,
.screen-nav .ai-hero__sub {
  margin: 0;
}

.profile-hero__top .screen-nav__back {
  align-self: center;
}

.dc-top .screen-nav__back--chat {
  flex-shrink: 0;
}

/* —— В работе —— */
.screen-work {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
  padding: 0 0 calc(96px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  flex-direction: column;
  background: var(--theme-bg);
  color: var(--text);
}

.screen-work.is-active {
  display: flex;
}

.work-hero {
  flex-shrink: 0;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.work-hero__title {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text-bright);
}

.work-hero__sub {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: rgba(var(--text-tint-rgb), 0.55);
  line-height: 1.35;
}

.work-legend {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  font-size: 0.68rem;
  color: rgba(var(--text-tint-rgb), 0.65);
}

.work-legend span {
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.12);
}

.work-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 16px;
  -webkit-overflow-scrolling: touch;
}

.work-empty {
  text-align: center;
  padding: 24px 16px;
  color: rgba(var(--text-tint-rgb), 0.7);
  font-size: 0.88rem;
}

.work-empty__btn {
  margin-top: 12px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
  font-weight: 600;
}

.work-card {
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-card);
  border: 1px solid rgba(var(--accent-rgb), 0.14);
}

.work-card__bundle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.work-card__bundle b {
  font-size: 1rem;
  color: var(--accent);
}

.work-card__route {
  width: 100%;
  font-size: 0.78rem;
  color: rgba(var(--text-tint-rgb), 0.55);
}

.work-card__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(var(--text-tint-rgb), 0.6);
  margin-bottom: 10px;
}

.work-card__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.work-card__btn {
  flex: 1;
  min-width: 72px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--text-bright);
  font-size: 0.72rem;
  font-weight: 600;
}

.work-card__btn--ghost {
  border-color: rgba(255, 255, 255, 0.12);
  background: transparent;
}

.work-card__btn--done {
  border-color: rgba(255, 180, 0, 0.35);
  color: #ffd080;
}

.badge.work-badge {
  border-color: rgba(100, 180, 255, 0.4);
  color: #9fd4ff;
  background: rgba(60, 120, 200, 0.15);
}

.card.card--work-dim {
  opacity: 0.55;
}

.work-panel {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0, 40, 20, 0.5);
  border: 1px solid rgba(var(--accent-rgb), 0.12);
}

.work-panel__title {
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(var(--text-tint-rgb), 0.8);
}

.work-panel__status {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: #9fd4ff;
}

.work-panel__btn {
  display: block;
  width: 100%;
  margin-bottom: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  background: rgba(0, 160, 70, 0.14);
  color: #d0ffe0;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
}

.work-panel__btn.hidden {
  display: none;
}

.work-panel__btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.1);
}

.work-panel__btn--done {
  border-color: rgba(255, 160, 0, 0.35);
  color: #ffdd99;
}

.badge.life {
  border-color: rgba(180, 200, 255, 0.35);
  color: #c8d8ff;
}

.badge.dw {
  border-color: rgba(var(--accent-rgb), 0.35);
}

.badge.dw-warn {
  border-color: rgba(255, 180, 0, 0.4);
  color: #ffcc66;
}

.plan-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.plan-card {
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 40, 20, 0.55);
  border: 1px solid rgba(var(--accent-rgb), 0.15);
}

.plan-card h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  color: var(--accent);
}

.plan-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 0.78rem;
  color: rgba(220, 255, 230, 0.75);
}

.plan-feat-list {
  max-height: 40vh;
  overflow-y: auto;
}

.plan-feat {
  font-size: 0.75rem;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(230, 255, 240, 0.85);
}

.plan-feat__g {
  opacity: 0.5;
  font-size: 0.68rem;
}

.panel-label {
  display: block;
  margin: 10px 0 4px;
  font-size: 0.78rem;
  color: rgba(var(--text-tint-rgb), 0.7);
}

.panel-input {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  background: rgba(0, 20, 10, 0.8);
  color: var(--text-bright);
  font-size: 0.85rem;
}

.panel-save-btn {
  margin-top: 12px;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.panel-subtitle {
  font-size: 0.85rem;
  margin: 12px 0 8px;
  color: rgba(var(--text-tint-rgb), 0.8);
}

/* —— Гайд «как заработать» —— */
.earn-guide {
  margin-bottom: 12px;
  padding: 14px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.14), color-mix(in srgb, var(--theme-bg) 94%, transparent));
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.earn-guide.hidden {
  display: none;
}

.earn-guide__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.earn-guide__title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.3;
}

.earn-guide__close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--hint);
  font-size: 1.2rem;
  cursor: pointer;
  flex-shrink: 0;
}

.earn-guide__steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.earn-guide__steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(var(--text-tint-rgb), 0.92);
}

.earn-step__n {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(var(--accent-rgb), 0.2);
  color: var(--accent);
}

.earn-guide__academy {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.detail-steps {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.detail-step {
  flex: 1;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 8px 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--hint);
}

.detail-step.is-done {
  border-color: rgba(var(--accent-rgb), 0.35);
  color: var(--accent);
}

.detail-step.is-active {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--text-bright);
}

.matrix-toggle.active {
  border-color: rgba(var(--accent-rgb), 0.5);
  color: var(--accent);
}

.work-hero__sub {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--hint);
  margin-top: 4px;
}

/* —— Выбор связки: пропустить / в работу —— */
.bundle-focus-bar {
  position: sticky;
  bottom: 0;
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--panel-strong);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
  z-index: 10;
}

.bundle-focus-bar--active {
  border-color: rgba(var(--accent-rgb), 0.5);
}

.bundle-focus-bar__hint,
.bundle-focus-bar__status {
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  color: #e0f5e8;
}

.bundle-focus-bar__status {
  color: var(--accent);
}

.bundle-focus-bar__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bundle-focus-bar__skip,
.bundle-focus-bar__take {
  padding: 14px 10px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
}

.bundle-focus-bar__skip {
  background: rgba(255, 255, 255, 0.06);
  color: var(--hint);
  border: 1px solid var(--border);
}

.bundle-focus-bar__take {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.95), rgba(0, 190, 70, 0.9));
  color: var(--accent-text);
}

.bundle-focus-bar--active .bundle-focus-bar__actions {
  grid-template-columns: 1fr 1fr;
}

/* —— Подтверждение «В работу» —— */
.work-preflight {
  position: fixed;
  inset: 0;
  z-index: 920;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.work-preflight.hidden {
  display: none;
}

.work-preflight__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}

.work-preflight__panel {
  position: relative;
  width: min(100%, 340px);
  padding: 20px 18px 16px;
  border-radius: 20px;
  background: linear-gradient(165deg, #1a2420 0%, #0d1210 100%);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
  animation: work-preflight-in 0.28s var(--ease-spring, ease-out) both;
}

@keyframes work-preflight-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.work-preflight__title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: var(--text-bright);
  text-align: center;
}

.work-preflight__sub {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: rgba(var(--text-tint-rgb), 0.75);
}

.work-preflight__list {
  margin: 0 0 16px;
  padding-left: 1.2rem;
  font-size: 0.84rem;
  color: rgba(var(--text-tint-rgb), 0.88);
  line-height: 1.45;
}

.work-preflight__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.work-preflight__btn {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.work-preflight__btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(var(--text-tint-rgb), 0.9);
}

.work-preflight__btn--ok {
  background: linear-gradient(180deg, #f4f7f5 0%, #d8e8de 100%);
  color: #0a120e;
  border-color: rgba(var(--accent-rgb), 0.35);
}

.work-sync-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.8);
  animation: work-sync-pulse 1s ease-in-out infinite;
}

@keyframes work-sync-pulse {
  0%, 100% {
    opacity: 0.45;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.work-sync-hint {
  margin: 14px 0 0;
  font-size: 0.78rem;
  color: rgba(var(--accent-rgb), 0.75);
  text-align: center;
}

.work-focus--syncing {
  animation: work-focus-in 0.32s var(--ease-spring, ease-out) both;
}

@keyframes work-focus-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— В работе: одна связка —— */
.work-focus {
  padding: 16px;
  border-radius: var(--radius);
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--surface-card) 94%, transparent),
    color-mix(in srgb, var(--theme-bg) 98%, transparent)
  );
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
}

.work-focus__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.work-focus__label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.work-status {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.work-status--ok {
  background: rgba(var(--accent-rgb), 0.18);
  color: var(--text-bright);
  border: 1px solid rgba(var(--accent-rgb), 0.4);
}

.work-status--warn {
  background: rgba(255, 176, 32, 0.15);
  color: #ffd080;
  border: 1px solid rgba(255, 176, 32, 0.45);
}

.work-status--bad,
.work-status--stale {
  background: rgba(255, 107, 107, 0.12);
  color: #ff9a9a;
  border: 1px solid rgba(255, 107, 107, 0.35);
}

.work-focus__title {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.work-focus__profit {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--mono);
  margin-bottom: 6px;
}

.work-focus__profit span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--hint);
  font-family: var(--font);
}

.work-focus__route {
  font-size: 0.82rem;
  color: var(--hint);
  margin-bottom: 12px;
}

.work-focus__arrow {
  color: var(--accent);
  margin: 0 4px;
}

.work-checker {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 0.76rem;
  line-height: 1.4;
}

.work-checker--ok {
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  color: rgba(var(--text-tint-rgb), 0.92);
}

.work-checker--warn {
  background: rgba(255, 176, 32, 0.1);
  border: 1px solid rgba(255, 176, 32, 0.35);
  color: #ffe8b0;
}

.work-checker--bad,
.work-checker--stale {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: #ffc8c8;
}

.work-checker__icon {
  flex-shrink: 0;
  font-size: 1rem;
}

.work-checker--main {
  flex-direction: column;
  margin-bottom: 14px;
}

.work-checker__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--accent);
}

.work-checker__detail {
  margin: 6px 0 0;
}

.work-checker__alerts {
  margin: 10px 0 0;
  padding: 0 0 0 18px;
  list-style: disc;
  font-size: 0.72rem;
  line-height: 1.4;
  color: rgba(var(--text-tint-rgb), 0.88);
}

.work-checker__alert {
  margin-bottom: 6px;
}

.work-checker--bad .work-checker__alerts,
.work-checker--stale .work-checker__alerts {
  color: rgba(255, 200, 180, 0.95);
}

.work-checker--warn .work-checker__alerts {
  color: rgba(255, 230, 180, 0.92);
}

.work-checker__stats {
  margin: 8px 0 0;
  font-size: 0.7rem;
  opacity: 0.9;
}

.work-dw,
.detail-dw {
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  margin-bottom: 12px;
}

.work-dw__title,
.detail-dw__title,
.work-checklist__title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.work-dw__sum,
.detail-dw__sum {
  font-size: 0.74rem;
  margin: 0 0 6px;
  opacity: 0.92;
}

.work-dw__list,
.detail-dw__list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.74rem;
  line-height: 1.45;
}

.work-checklist {
  padding: 12px;
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.06);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  margin-bottom: 12px;
}

.work-checklist__title span {
  font-weight: 600;
  opacity: 0.85;
}

.work-checklist__item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  margin: 8px 0;
  cursor: pointer;
}

.work-checklist__item input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.badge.dw-sum {
  font-size: 0.62rem;
}

.work-trade,
.work-fees,
.work-contract {
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  margin-bottom: 12px;
}

.work-trade__title,
.work-fees__title,
.work-contract__title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.work-trade__row,
.work-fees__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.74rem;
  margin-bottom: 6px;
}

.work-trade__row span,
.work-fees__row span {
  color: var(--hint);
  flex: 1;
}

.work-trade__row b,
.work-fees__row b {
  color: var(--text-bright);
  font-weight: 700;
  text-align: right;
}

.work-trade__row--coins b {
  color: var(--accent);
  font-size: 0.88rem;
}

.work-trade__hint,
.work-fees__formula {
  font-size: 0.68rem;
  color: var(--hint);
  margin: 8px 0 0;
  line-height: 1.4;
}

.work-fees__row--total b {
  color: var(--accent);
}

.work-contract__status {
  font-size: 0.76rem;
  margin: 0 0 6px;
}

.work-contract__addr {
  font-size: 0.72rem;
  margin: 0 0 6px;
}

.work-contract__addr code {
  color: var(--accent);
  word-break: break-all;
}

.work-contract__addr--na {
  color: var(--hint);
}

.work-contract__net {
  font-size: 0.72rem;
  color: var(--hint);
  margin: 0;
}

.work-spread-wrap {
  margin-bottom: 12px;
}

.work-spread-wrap .spread-visual {
  margin: 0;
  padding: 10px;
}

.work-spread-wrap .spread-visual__head {
  margin-bottom: 8px;
}

.work-spread-wrap .spread-visual__head h3 {
  font-size: 0.72rem;
}

.work-spread-wrap .spread-ob-refresh {
  width: 30px;
  height: 30px;
  font-size: 1rem;
  border-radius: 8px;
}

/* В работе: как раньше (2 колонки + стрелка), ордера без обрезки */
.work-spread-wrap .spread-side .price {
  font-family: var(--mono);
  font-size: 0.82rem;
  word-break: break-all;
}

.work-spread-wrap .ob-orders__head,
.work-spread-wrap .ob-order {
  grid-template-columns: 11px minmax(0, 1.45fr) minmax(0, 0.75fr) minmax(46px, auto);
  gap: 2px 3px;
  font-size: 0.56rem;
  line-height: 1.3;
  align-items: start;
}

.work-spread-wrap .ob-orders__head {
  display: grid;
  margin-bottom: 3px;
}

.work-spread-wrap .ob-order__price,
.work-spread-wrap .ob-order__amt {
  white-space: normal;
  word-break: break-all;
  overflow: visible;
  text-overflow: unset;
  hyphens: none;
}

.work-spread-wrap .ob-order__price {
  font-family: var(--mono);
  font-size: 0.54rem;
  font-weight: 700;
}

.work-spread-wrap .ob-order__amt {
  font-size: 0.5rem;
  opacity: 0.88;
}

.work-spread-wrap .ob-order__usd {
  font-family: var(--mono);
  font-size: 0.54rem;
  font-weight: 800;
  white-space: nowrap;
}

.work-spread-wrap .ob-orders__title {
  font-size: 0.58rem;
  margin-bottom: 4px;
}

.work-coin {
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  margin-bottom: 12px;
}

.work-coin__title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.work-coin__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.work-coin__row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.68rem;
}

.work-coin__row span {
  color: var(--hint);
}

.work-coin__row b {
  font-size: 0.78rem;
  color: var(--text-bright);
  font-weight: 600;
}

.work-coin__row--wide {
  grid-column: 1 / -1;
}

.work-coin__row--wide b {
  font-size: 0.72rem;
  line-height: 1.35;
  font-weight: 500;
}

.work-coin__prices {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--hint);
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.work-coin__prices b {
  color: var(--accent);
}

.work-coin__links {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.work-coin__link {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.work-coin__links-hint {
  font-size: 0.62rem;
  opacity: 0.55;
  align-self: center;
}

.work-focus__steps {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.work-focus__steps span {
  flex: 1;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 8px 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--hint);
}

.work-focus__steps .is-done {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.35);
}

.work-focus__steps .is-active {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--text-bright);
}

.work-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.work-actions__row {
  display: flex;
  gap: 10px;
}

.work-actions__row--trade {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.work-actions__buy,
.work-actions__sell,
.work-actions button.work-actions__buy,
.work-actions button.work-actions__sell {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px 8px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.25;
  min-height: 52px;
}

.work-actions__buy {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.95), rgba(0, 190, 70, 0.9));
  color: var(--accent-text);
}

.work-actions__sell {
  background: rgba(255, 255, 255, 0.07);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
}

.work-actions__buy--off,
.work-actions__sell--off {
  opacity: 0.45;
  pointer-events: none;
}

.work-actions__plan {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.work-actions__chat {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(120, 200, 255, 0.35);
  background: rgba(80, 160, 255, 0.1);
  color: #9ec8ff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.work-actions__row--end {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.badge.work-badge {
  border-color: rgba(100, 180, 255, 0.45);
  color: #9ec8ff;
  background: rgba(80, 140, 255, 0.12);
}

.work-visibility {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 12px;
  text-align: center;
}

.work-visibility--on {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  position: relative;
}

.work-visibility__hide {
  margin-left: auto;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--hint);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.work-visibility--on p {
  font-size: 0.78rem;
  line-height: 1.4;
  color: #d8f5e4;
  margin: 0;
}

.work-visibility--on b {
  color: var(--accent);
}

.work-visibility--off {
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed var(--border);
}

.work-visibility__sub {
  font-size: 0.7rem;
  color: var(--hint);
  margin: 8px 0 0;
}

.work-actions__publish {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.95), rgba(0, 190, 70, 0.9));
  color: var(--accent-text);
}

.work-actions__finish {
  padding: 12px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--hint);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.work-actions__skip {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--hint);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.work-actions__hint {
  text-align: center;
  font-size: 0.72rem;
  color: var(--hint);
  margin: -4px 0 0;
}

.work-plan {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 30, 18, 0.65);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
}

.work-plan__title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.work-plan__item {
  margin-bottom: 10px;
}

.work-plan__item:last-child {
  margin-bottom: 0;
}

.work-plan__item-head {
  font-size: 0.78rem;
  font-weight: 700;
  color: #e0f5e8;
  margin-bottom: 4px;
}

.work-plan__item p {
  font-size: 0.76rem;
  line-height: 1.45;
  color: rgba(220, 240, 228, 0.88);
}

.work-coin--compact {
  margin-bottom: 12px;
}

.detail-flow-hint {
  font-size: 0.78rem;
  color: var(--hint);
  margin: 0 0 12px;
  line-height: 1.4;
}

.tab-bar__item--active-work .tab-bar__label {
  color: var(--accent);
  font-weight: 800;
}

.tab-bar__item--active-work .tab-bar__icon {
  color: var(--accent);
}

.tab-bar__item--active-work::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 22%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Touch / Telegram WebView: snappier taps, less GPU load */
@media (hover: none) and (pointer: coarse) {
  .card,
  .profile-card,
  .profile-menu,
  .tab-bar__inner,
  .top-bar,
  .preset-card,
  .theme-chip,
  .tab,
  .detail-sheet,
  .panel-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .card {
    background: var(--surface-card);
    contain: layout style paint;
  }

  .tab-bar__inner {
    background: color-mix(in srgb, var(--surface-screen) 88%, transparent);
  }

  .profile-menu {
    background: var(--surface-card);
  }

  .card:active,
  .profile-menu__item:active,
  .tab:active {
    transform: none !important;
  }

  .tab-bar__item:active .tab-bar__icon {
    transform: scale(0.9);
  }

  .preset-card:active {
    transform: scale(0.98) !important;
  }

  .card--elite::after {
    animation: none !important;
  }

  .anim-emoji--fire,
  .anim-emoji--seed,
  .anim-emoji--bolt,
  .anim-emoji--target,
  .anim-emoji--whale,
  .anim-emoji--shield {
    animation: none !important;
  }

  .tab:not(.active) .tab__emoji {
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.15)) !important;
  }
}

.profile-menu__item,
.tab-bar__item,
.tab,
.preset-card,
.theme-chip,
.card {
  touch-action: manipulation;
}

/* Splash: приветствие / загрузка при открытии Mini App */
body.is-booting #app,
body.is-booting #tabBar,
body.is-booting #screenAi,
body.is-booting #screenWork,
body.is-booting #screenProfile,
body.is-booting #screenCommunity,
body.is-booting #panelOverlay,
body.is-booting #iosInstallSheet,
body.is-booting #avatarPicker {
  visibility: hidden;
  pointer-events: none;
}

body.is-standalone-pwa #installBar,
body.is-standalone-pwa #iosInstallSheet,
body.is-standalone-pwa #installChip {
  display: none !important;
  pointer-events: none !important;
}

body.is-booting #matrixCanvas {
  opacity: 1 !important;
  z-index: 1;
}

body.is-booting.matrix-splash-boost #matrixCanvas {
  z-index: 2;
}

body.is-booting .matrix-overlay {
  opacity: 0.35;
  z-index: 3;
  background: radial-gradient(ellipse 90% 70% at 50% 40%, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.72));
}

.app-splash {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom));
  background: transparent;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.app-splash.hidden {
  display: none !important;
}

.app-splash--out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-splash__inner {
  width: 100%;
  max-width: min(420px, 94vw);
  text-align: center;
  pointer-events: auto;
}

.app-splash__hero {
  margin-bottom: 20px;
}

/* Эмблема на splash — только логотип, без кругов и радуги */
.app-splash__emblem-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-splash__emblem-wrap--load {
  width: min(85vw, 340px);
  margin-bottom: 10px;
}

.app-splash__emblem {
  display: block;
  width: 100%;
  height: auto;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 0 24px rgba(var(--accent-rgb), 0.35)) drop-shadow(0 8px 32px rgba(0, 0, 0, 0.55));
}

.app-splash__emblem--breathe {
  animation: splash-emblem-breathe 2.2s ease-in-out infinite;
}

@keyframes splash-emblem-breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.02);
    opacity: 0.92;
  }
}

.app-splash__tagline {
  margin: 0 0 12px;
  font-size: clamp(0.72rem, 2.8vw, 0.82rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(232, 197, 71, 0.95);
  text-shadow: 0 0 20px rgba(232, 197, 71, 0.35);
}

.app-splash__spectrum {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.app-splash__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 12px currentColor;
  animation: splash-dot-glow 2.4s ease-in-out infinite;
}

.app-splash__dot--matrix {
  color: #00ff41;
  background: #00ff41;
  animation-delay: 0s;
}
.app-splash__dot--cyber {
  color: #00e5ff;
  background: #00e5ff;
  animation-delay: 0.2s;
}
.app-splash__dot--gold {
  color: #e8c547;
  background: #e8c547;
  animation-delay: 0.4s;
}
.app-splash__dot--ember {
  color: #ff6b3d;
  background: #ff6b3d;
  animation-delay: 0.6s;
}
.app-splash__dot--arctic {
  color: #a8dcff;
  background: #a8dcff;
  animation-delay: 0.8s;
}
.app-splash__dot--aurora {
  color: #e879f9;
  background: #e879f9;
  animation-delay: 1s;
}

@keyframes splash-dot-glow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.app-splash__copy {
  text-align: center;
  padding: 0 8px;
  max-width: 340px;
  margin: 0 auto;
}

.app-splash__title {
  margin: 0 0 8px;
  font-size: clamp(1.1rem, 4.2vw, 1.3rem);
  font-weight: 800;
  color: var(--text-bright);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8);
}

.app-splash__text {
  margin: 0 0 10px;
  font-size: clamp(0.88rem, 3.4vw, 0.96rem);
  line-height: 1.45;
  color: rgba(var(--text-tint-rgb), 0.88);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
}

.app-splash__list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: clamp(0.8rem, 3vw, 0.9rem);
  line-height: 1.5;
  color: rgba(200, 235, 210, 0.78);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.app-splash__list li {
  padding: 4px 0;
}

.app-splash__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 32px 0;
}

.app-splash__loading.hidden {
  display: none !important;
}

.app-splash__welcome.hidden {
  display: none !important;
}

.app-splash__spinner {
  width: 48px;
  height: 48px;
}

.app-splash__load-text {
  margin: 0;
  font-size: clamp(0.95rem, 3.8vw, 1.05rem);
  font-weight: 600;
  color: rgba(220, 255, 230, 0.9);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

body.is-booting--load-only .app-splash__welcome {
  display: none !important;
}

body.is-booting--load-only .app-splash__loading {
  display: flex !important;
}

/* —— UI polish: кнопки и экраны —— */
.screen-work.is-active,
.screen-ai.is-active,
.screen-profile.is-active,
.screen-community.is-active {
  animation: ml-screen-in 0.22s ease-out;
}

@keyframes ml-screen-in {
  from {
    opacity: 0.92;
  }
  to {
    opacity: 1;
  }
}

.login-gate__btn,
.empty-preset,
.fav-btn,
.theme-chip,
.toggle-chip,
.ai-mode-btn,
.ai-compose__send,
.tg-chat__send,
.tg-chat__attach,
.dc-channel,
.dc-top__home,
.dc-top__exit,
.dc-top__admin,
.install-bar__btn,
.tg-feed-actions__btn,
.icon-btn,
.tab,
.preset-card {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.empty-preset:active,
.fav-btn:active,
.theme-chip:active,
.toggle-chip:active,
.ai-mode-btn:active,
.ai-compose__send:active,
.tg-chat__send:active,
.tg-chat__attach:active,
.dc-channel:active,
.dc-top__home:active,
.dc-top__exit:active,
.dc-top__admin:active,
.install-bar__btn:active,
.tg-feed-actions__btn:active,
.tg-action-sheet button:active,
.dc-admin-menu button:active {
  transform: scale(0.96);
  opacity: 0.9;
}

.preset-card:active {
  transform: scale(0.98);
}

.icon-btn:active {
  transform: scale(0.94);
}

.tab:active {
  transform: scale(0.97);
}

