/* ════════════════════════════════════════════════════════
   CORE GRID — Views (экраны)
   ════════════════════════════════════════════════════════ */

/* ════════ DASHBOARD ════════ */

/* Статус-строка "board computer" — перепрофилирована в дружелюбный статус */
.status-strip {
  flex-shrink: 0;
  padding: 9px 12px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--border);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  line-height: 1.4;
  color: var(--text-muted);
  text-align: center;
}
.status-strip--warn   { color: var(--premium); border-color: var(--premium); background: var(--premium-dim); }
.status-strip--danger { color: var(--danger);  border-color: var(--danger);  background: var(--danger-dim); }
.status-strip--boost  { color: var(--primary); border-color: var(--primary); background: var(--primary-dim); }
.status-strip--charging { color: var(--core); border-color: var(--core); background: rgba(255, 157, 46, 0.1); }
.status-strip--recharge {
  color: var(--grid-2);
  border-color: var(--grid-2);
  background: var(--terminal-dim);
}
.status-sub--boost { color: var(--primary); }

.status-sub {
  flex-shrink: 0;
  margin-top: -4px;
  margin-bottom: 2px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-align: center;
  line-height: 1.35;
  display: none;
}
.status-sub--visible { display: block; }

/* Зона Core — single screen, no scroll on common mobile heights */
#panelDashboard,
.panel--core {
  overflow: hidden;
  gap: var(--gap-core);
}

.core-page {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--gap-core);
  padding-bottom: var(--content-bottom-pad);
  scroll-padding-bottom: var(--content-bottom-pad);
}

.screen-head--core {
  flex-shrink: 0;
  margin-bottom: 0;
}

.screen-head--core .screen-head__title {
  text-align: center;
  font-size: clamp(22px, 5.5vw, 30px);
  line-height: 1.05;
}

.core-page__status,
.core-page__action,
.core-page__timer,
.core-page__output,
.chakra-compact-card {
  width: 100%;
  flex-shrink: 0;
  position: static;
}

.core-page__status {
  text-align: center;
  margin-bottom: 0;
}

.status-strip--pill {
  display: inline-block;
  width: auto;
  max-width: 100%;
  padding: clamp(6px, 1.2dvh, 8px) clamp(10px, 3vw, 14px);
  border-radius: var(--r-full);
  font-size: var(--fs-label-sm);
}

.core-page__status .status-sub {
  margin-top: clamp(2px, 0.5dvh, 4px);
}

.core-page__action {
  display: flex;
  justify-content: center;
  align-items: center;
}

.core-orb-zone {
  width: var(--core-hero-size);
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  flex-shrink: 0;
  position: relative;
}

.core-page__timer {
  text-align: center;
}

.core-page__output {
  text-align: center;
}

.core-page__output--hidden {
  display: none;
}

.core-page__output--note-only .core-tap-preview {
  display: none;
}

.core-page__output--note-only .core-tap-preview__note {
  margin-top: 0;
}

.chakra-compact-card {
  margin-top: auto;
  flex-shrink: 0;
}

.core-node-stack {
  display: none;
  padding: var(--card-pad-sm);
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  background: var(--card);
  font-size: var(--fs-label-sm);
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
}

.core-node-stack--visible {
  display: block;
}

/* Legacy aliases */
.engine-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  overflow: hidden;
  padding: 2px 0 8px;
  gap: 10px;
}

.core-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  flex: 1;
  min-height: 0;
  gap: 10px;
  overflow: visible;
}

.core-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  flex-shrink: 0;
  padding: 0;
}

.core-btn {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  aspect-ratio: 1;
  padding: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.4));
}

.compact-core {
  width: 100%;
  height: 100%;
}

/* Тепловой бар */
.heat-wrap {
  width: 100%;
  margin-bottom: 0;
  flex-shrink: 0;
}
.heat-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  margin-bottom: 6px;
}
.heat-label__title {
  font-size: var(--fs-section);
  color: var(--text-muted);
  letter-spacing: var(--ls-section);
  text-transform: uppercase;
}
.heat-label__pct {
  color: var(--grid-2);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}
.heat-label__pct--max { color: var(--danger); }

/* Прогресс ремонта (когда бот битый) */
.repair-wrap {
  width: 100%;
  max-width: 300px;
  margin-bottom: 14px;
}
.repair-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  margin-bottom: 6px;
}
.repair-label__title {
  color: var(--danger);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.repair-label__pct {
  color: var(--danger);
  font-family: var(--font-mono);
}
.bar__fill--repair {
  background: var(--danger);
}
.bar__fill--cycle {
  background: var(--primary);
}
.bar__fill--ignite {
  background: var(--primary);
}
.bar__fill--claim {
  background: var(--grid);
}

/* Само ядро — hero tap button (wheel lives in Chakra modal only) */
.core-btn:disabled { cursor: not-allowed; opacity: 0.55; }
.core-btn--pressed .ai-core__orb { transform: scale(0.94); }

.core-btn--ready .ai-core__halo {
  animation: ai-core-ready-halo 1.6s var(--ease) infinite;
}
.core-btn--ready .ai-core__ring-dash {
  animation: ai-core-ready-ring 1.6s var(--ease) infinite;
}
.core-btn--ready .ai-core__orb-glow {
  animation: ai-core-ready-glow 1.6s var(--ease) infinite;
}

@keyframes ai-core-ready-halo {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.04); }
}
@keyframes ai-core-ready-ring {
  0%, 100% { stroke-width: 3; filter: drop-shadow(0 0 4px rgba(255, 122, 26, 0.35)); }
  50%      { stroke-width: 4; filter: drop-shadow(0 0 10px rgba(255, 122, 26, 0.55)); }
}
@keyframes ai-core-ready-glow {
  0%, 100% { opacity: 0.82; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.05); }
}

/* ── AI Core orb (CSS/SVG, no video) ───────────────── */
.ai-core {
  isolation: isolate;
}
.ai-core__halo,
.ai-core__ring,
.ai-core__orb,
.ai-core__flash,
.ai-core__boost-ring {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ai-core__tap-hint {
  position: absolute;
  left: 50%;
  top: 52%;
  bottom: 10%;
  transform: translateX(-50%);
  width: 72%;
  z-index: 2;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.72);
}
.ai-core__tap-hint__cmd {
  font-size: clamp(8px, 2.1vw, 10px);
  font-weight: var(--fw-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.1;
}
.ai-core__tap-hint__line {
  font-family: var(--font-mono);
  font-size: clamp(9px, 2.35vw, 11px);
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 240, 224, 0.88);
}
.ai-core__tap-hint__line--grid {
  color: var(--primary);
}
.ai-core__tap-hint__line--cryo {
  color: var(--premium);
  font-size: clamp(8px, 2.15vw, 10px);
  font-weight: var(--fw-semi);
}
.ai-core__tap-hint--ready .ai-core__tap-hint__cmd {
  color: rgba(255, 240, 224, 0.72);
}
.ai-core__tap-hint--charging {
  color: var(--core);
}
.ai-core__tap-hint__status {
  font-size: clamp(8px, 2.2vw, 10px);
  font-weight: var(--fw-semi);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--core);
  line-height: 1.2;
}
.ai-core__tap-hint--hidden {
  opacity: 0;
  visibility: hidden;
}
.ai-core__halo {
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.14) 0%, transparent 68%);
  opacity: 0.45;
  transition: opacity 0.4s var(--ease);
}
.ai-core__boost-ring {
  inset: -10px;
  border-radius: 50%;
  border: 2px solid transparent;
  opacity: 0;
  transition: opacity 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.core-btn--boost-armed .ai-core__boost-ring {
  opacity: 0.9;
  border-color: var(--cryo);
  border-width: 2px;
  box-shadow:
    0 0 0 1px rgba(216, 132, 255, 0.28),
    0 0 14px rgba(140, 92, 255, 0.28);
  animation: none;
}
.ai-core__ring-svg {
  width: 100%;
  height: 100%;
  transform-origin: center;
}
.ai-core__ring-track {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 2;
}
.ai-core__ring-dash {
  stroke: rgba(249, 115, 22, 0.28);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 18 14;
  transform-origin: 60px 60px;
  transition: stroke 0.35s var(--ease), filter 0.35s var(--ease);
}
.ai-core__orb {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s var(--ease);
}
.ai-core__orb-glow,
.ai-core__orb-core {
  position: absolute;
  border-radius: 50%;
}
.ai-core__orb-glow {
  width: 68%;
  height: 68%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.38) 0%, rgba(249, 115, 22, 0.06) 55%, transparent 72%);
  filter: blur(1px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.ai-core__orb-core {
  width: 46%;
  height: 46%;
  background:
    radial-gradient(circle at 38% 32%, rgba(255, 255, 255, 0.42) 0%, transparent 42%),
    radial-gradient(circle at 50% 58%, #3a2218 0%, #1a100c 55%, #0d0806 100%);
  box-shadow:
    inset 0 0 12px rgba(249, 115, 22, 0.18),
    0 0 14px rgba(249, 115, 22, 0.12);
  transition: box-shadow 0.35s var(--ease), filter 0.35s var(--ease);
}
.ai-core__flash {
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 61, 0.75) 0%, rgba(255, 138, 61, 0.15) 42%, transparent 68%);
  opacity: 0;
  transform: scale(0.85);
}

/* Idle — dim orange, low glow */
.ai-core--idle .ai-core__orb-core {
  filter: brightness(0.7) saturate(0.75);
  box-shadow:
    inset 0 0 8px rgba(249, 115, 22, 0.1),
    0 0 8px rgba(249, 115, 22, 0.06);
}
.ai-core--idle .ai-core__orb-glow { opacity: 0.22; }
.ai-core--idle .ai-core__ring-dash { stroke: rgba(249, 115, 22, 0.22); }

/* Offline / no nodes on cooldown */
.core-btn--offline.ai-core--idle .ai-core__halo { opacity: 0.3; }
.core-btn--offline.ai-core--idle .ai-core__ring-dash { stroke: rgba(249, 115, 22, 0.18); }
.core-btn--offline.ai-core--idle .ai-core__orb-glow { opacity: 0.14; }

/* Recharging — slow pulse, darker core */
.ai-core--recharging .ai-core__halo {
  opacity: 0.35;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.1) 0%, transparent 70%);
  animation: ai-core-recharge-halo 3.2s var(--ease) infinite;
}
.ai-core--recharging .ai-core__ring-svg {
  animation: ai-core-ring-rotate 24s linear infinite;
}
.ai-core--recharging .ai-core__ring-dash {
  stroke: rgba(249, 115, 22, 0.42);
  stroke-width: 2.5;
}
.ai-core--recharging .ai-core__orb-glow {
  opacity: 0.3;
  animation: ai-core-recharge-glow 3.2s var(--ease) infinite;
}
.ai-core--recharging .ai-core__orb-core {
  filter: brightness(0.52) saturate(0.45);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.35);
  animation: ai-core-recharge-core 3.2s var(--ease) infinite;
}

/* Charging — 650ms ignition */
.ai-core--charging {
  animation: ai-core-ignite-compress 650ms var(--ease-out) forwards;
}
.ai-core--charging .ai-core__flash {
  animation: ai-core-ignite-flash 650ms var(--ease-out) forwards;
}
.ai-core--charging .ai-core__ring-dash {
  stroke: rgba(255, 138, 61, 0.85);
  animation: ai-core-ring-pulse 320ms var(--ease) 2;
}
.ai-core--charging .ai-core__orb-glow {
  opacity: 1;
  animation: ai-core-charge-glow 650ms var(--ease-out) forwards;
}
.ai-core--charging .ai-core__orb-core {
  filter: brightness(1.05) saturate(1.1);
  box-shadow:
    inset 0 0 16px rgba(255, 122, 26, 0.35),
    0 0 22px var(--core-glow);
}

/* Active / ready — bright orange ring, stronger glow */
.ai-core--active .ai-core__halo {
  opacity: 1;
  background: radial-gradient(circle, rgba(255, 122, 26, 0.52) 0%, rgba(255, 122, 26, 0.12) 48%, transparent 72%);
  animation: ai-core-halo-breathe 3.2s var(--ease) infinite;
}
.ai-core--active .ai-core__ring-svg {
  animation: ai-core-ring-rotate 14s linear infinite;
}
.ai-core--active .ai-core__ring-dash {
  stroke: var(--primary);
  stroke-width: 3.5;
  filter: drop-shadow(0 0 6px rgba(249, 115, 22, 0.45));
}
.ai-core--active .ai-core__orb-glow {
  opacity: 1;
  background: radial-gradient(circle, rgba(255, 122, 26, 0.5) 0%, rgba(255, 122, 26, 0.1) 55%, transparent 72%);
  animation: ai-core-orb-breathe 3.2s var(--ease) infinite;
}
.ai-core--active .ai-core__orb-core {
  filter: brightness(1.08) saturate(1.15);
  box-shadow:
    inset 0 0 18px rgba(249, 115, 22, 0.35),
    0 0 22px rgba(249, 115, 22, 0.35);
  animation: ai-core-core-breathe 3.2s var(--ease) infinite;
}

@keyframes ai-core-ignite-compress {
  0%   { transform: scale(1); }
  35%  { transform: scale(0.88); }
  65%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}
@keyframes ai-core-ignite-flash {
  0%   { opacity: 0; transform: scale(0.85); }
  28%  { opacity: 0.95; transform: scale(1.05); }
  55%  { opacity: 0.45; transform: scale(1.12); }
  100% { opacity: 0; transform: scale(1.2); }
}
@keyframes ai-core-ring-pulse {
  0%, 100% { stroke-width: 2.5; opacity: 0.7; }
  50%      { stroke-width: 3.5; opacity: 1; }
}
@keyframes ai-core-charge-glow {
  0%   { transform: scale(0.9); opacity: 0.4; }
  50%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 0.85; }
}
@keyframes ai-core-ring-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes ai-core-halo-breathe {
  0%, 100% { opacity: 0.72; transform: scale(0.98); }
  50%      { opacity: 1; transform: scale(1.04); }
}
@keyframes ai-core-orb-breathe {
  0%, 100% { transform: scale(0.94); opacity: 0.78; }
  50%      { transform: scale(1.08); opacity: 1; }
}
@keyframes ai-core-core-breathe {
  0%, 100% {
    box-shadow:
      inset 0 0 16px rgba(249, 115, 22, 0.28),
      0 0 18px rgba(249, 115, 22, 0.28);
  }
  50% {
    box-shadow:
      inset 0 0 24px rgba(249, 115, 22, 0.45),
      0 0 32px rgba(249, 115, 22, 0.48);
  }
}
@keyframes ai-core-recharge-halo {
  0%, 100% { opacity: 0.28; }
  50%      { opacity: 0.42; }
}
@keyframes ai-core-recharge-glow {
  0%, 100% { transform: scale(0.96); opacity: 0.22; }
  50%      { transform: scale(1.03); opacity: 0.36; }
}
@keyframes ai-core-recharge-core {
  0%, 100% { filter: brightness(0.5) saturate(0.42); }
  50%      { filter: brightness(0.58) saturate(0.5); }
}
@keyframes ai-core-boost-ring-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(140, 92, 255, 0.32),
      0 0 14px rgba(216, 132, 255, 0.28);
  }
  50% {
    box-shadow:
      0 0 0 2px rgba(216, 132, 255, 0.5),
      0 0 24px rgba(140, 92, 255, 0.45);
  }
}

/* Complete — claim glow (saffron + success) */
.ai-core--complete .ai-core__halo {
  opacity: 1;
  background: radial-gradient(circle, rgba(255, 122, 26, 0.28) 0%, rgba(56, 217, 150, 0.1) 45%, transparent 70%);
  animation: ai-core-claim-halo 2.2s var(--ease) infinite;
}
.ai-core--complete .ai-core__ring-svg {
  animation: ai-core-ring-rotate 12s linear infinite;
}
.ai-core--complete .ai-core__ring-dash {
  stroke: var(--grid);
  filter: drop-shadow(0 0 6px var(--core-glow));
}
.ai-core--complete .ai-core__orb-glow {
  opacity: 1;
  background: radial-gradient(circle, rgba(255, 122, 26, 0.42) 0%, rgba(56, 217, 150, 0.12) 55%, transparent 72%);
  animation: ai-core-claim-pulse 1.8s var(--ease) infinite;
}
.ai-core--complete .ai-core__orb-core {
  filter: brightness(1.12) saturate(1.2);
  box-shadow:
    inset 0 0 20px rgba(255, 122, 26, 0.35),
    0 0 28px rgba(255, 122, 26, 0.35);
  animation: ai-core-claim-core 1.8s var(--ease) infinite;
}
@keyframes ai-core-claim-core {
  0%, 100% { box-shadow: inset 0 0 16px rgba(255, 122, 26, 0.3), 0 0 22px rgba(255, 122, 26, 0.32); }
  50%      { box-shadow: inset 0 0 24px rgba(255, 176, 74, 0.45), 0 0 34px rgba(255, 122, 26, 0.45); }
}
@keyframes ai-core-claim-halo {
  0%, 100% { opacity: 0.75; transform: scale(0.98); }
  50%      { opacity: 1; transform: scale(1.05); }
}
@keyframes ai-core-claim-pulse {
  0%, 100% { transform: scale(0.94); opacity: 0.8; }
  50%      { transform: scale(1.08); opacity: 1; }
}

/* Core metrics — timer block below compact orb */
.core-metrics {
  width: 100%;
  margin-top: 0;
  text-align: center;
  flex-shrink: 0;
}

.core-tap-timer {
  display: none;
  font-size: var(--fs-timer);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-title);
  color: var(--grid-2);
  line-height: 1;
}
.core-tap-timer--visible { display: block; }
.core-tap-timer--ready {
  color: var(--grid-2);
  font-size: var(--fs-timer);
}

.core-tap-timer__sub {
  display: none;
  margin-top: clamp(2px, 0.6dvh, 6px);
  font-size: var(--fs-label-sm);
  color: var(--text-muted);
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.core-tap-timer__sub--visible { display: block; }

.core-tap-headline {
  display: none;
  margin-top: clamp(2px, 0.5dvh, 4px);
  font-size: var(--fs-label-sm);
  font-weight: var(--fw-semi);
  letter-spacing: normal;
  text-transform: none;
  color: var(--text-muted);
}
.core-tap-headline--visible { display: block; }

.core-tap-preview {
  margin-top: 0;
  line-height: 1.35;
}
.core-tap-preview__grid {
  font-size: clamp(18px, 4.8vw, 26px);
  line-height: 1.2;
}
.core-tap-preview__cryo,
.core-tap-preview__note {
  font-size: var(--fs-label-sm);
}
.core-tap-preview__label,
.core-tap-preview__grid,
.core-tap-preview__cryo,
.core-tap-preview__boost,
.core-tap-preview__base,
.core-tap-preview__note,
.core-tap-preview__chakra-saved {
  display: none;
  line-height: 1.45;
}
.core-tap-preview__line--visible { display: block; }
.core-tap-preview__label {
  font-size: var(--fs-section);
  font-weight: var(--fw-semi);
  color: var(--text-muted);
}
.core-tap-preview__grid {
  font-size: var(--fs-card-val);
  font-weight: var(--fw-bold);
  color: var(--primary);
}
.core-tap-preview__cryo {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  color: var(--premium);
}
.core-tap-preview__boost {
  margin-top: 2px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  color: var(--primary);
}
.core-tap-preview__base {
  margin-top: 2px;
  font-size: var(--fs-2xs);
  color: var(--text-faint);
}
.core-tap-preview__note {
  display: none;
  margin-top: 6px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.35;
}
.core-tap-preview__note.core-tap-preview__line--visible {
  display: block;
}
.core-tap-preview__chakra-saved {
  margin-top: 6px;
  font-size: var(--fs-2xs);
  color: #c4b5fd;
  letter-spacing: 0.02em;
}

.core-metrics--recharging .core-tap-timer {
  display: block;
}

.core-page__timer.core-metrics--ready .core-tap-headline {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  color: var(--text-muted);
  letter-spacing: normal;
  text-transform: none;
}
.core-metrics__secondary {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text);
}
.core-metrics__primary--main {
  margin-top: 4px;
  font-size: clamp(1rem, 4.5vw, 1.15rem);
}
.core-metrics__primary--secondary {
  margin-top: 10px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  color: var(--text-muted);
}
.core-metrics--idle .core-metrics__primary--main {
  margin-top: 0;
}
.core-metrics--ready .core-metrics__primary--secondary,
.core-metrics--recharging .core-metrics__primary--secondary {
  display: block;
}
.core-metrics__secondary {
  display: none;
  margin-top: 4px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.core-metrics__secondary--visible { display: block; }
.core-metrics__taps,
.core-metrics__boost,
.core-metrics__hint {
  display: none;
  margin-top: 4px;
  font-size: var(--fs-xs);
  line-height: 1.35;
}
.core-metrics__taps--visible,
.core-metrics__hint--visible { display: block; }
.core-metrics__taps {
  color: var(--text-muted);
}
.core-metrics__boost--visible { display: block; }
.core-metrics__boost {
  color: var(--primary);
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
}
.core-metrics__hint {
  color: var(--text-faint);
  font-size: var(--fs-2xs);
  margin-top: 6px;
}
.core-metrics__conversion {
  margin-top: 6px;
  font-size: var(--fs-xs);
  color: var(--primary);
  font-weight: var(--fw-semi);
}

.core-action-label {
  margin-top: 0;
  font-size: var(--fs-label-sm);
  font-weight: var(--fw-semi);
  color: var(--text-muted);
  text-align: center;
  max-width: 280px;
  line-height: 1.3;
}
.core-action-label--hidden { display: none; }
.core-action-label--offline {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: var(--fw-med);
}
.core-action-label--ready {
  color: var(--grid-2);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
}
.core-action-label--charging { color: var(--core); }
.core-btn--recharging .ai-core__orb-glow {
  opacity: 0.3;
}

.core-action--hidden {
  display: none;
}

/* Кнопка ремонта (мгновенный за CRYO) */
.core-action {
  width: 100%;
  max-width: 300px;
  min-height: 46px;
  margin-top: 8px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}
.coolant-btn {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--premium);
  background: var(--premium-dim);
  color: var(--premium);
  font-size: var(--fs-sm);
  font-weight: var(--fw-black);
  letter-spacing: 0.03em;
  cursor: pointer;
  opacity: 0;
  max-height: 0;
  padding-top: 0; padding-bottom: 0;
  border-width: 0;
  overflow: hidden;
  transition: opacity 0.3s var(--ease), max-height 0.3s var(--ease),
              padding 0.3s var(--ease), border-width 0.3s var(--ease);
}
.coolant-btn--visible {
  opacity: 1;
  pointer-events: auto;
  max-height: 60px;
  padding-top: 13px;
  padding-bottom: 13px;
  border-width: 1px;
}
.coolant-btn--hidden {
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: none;
}
.coolant-btn--armed {
  color: var(--primary-400);
  border-color: rgba(255, 138, 61, 0.45);
  background: rgba(255, 138, 61, 0.12);
  cursor: default;
}
.coolant-btn--spent,
.coolant-btn--locked {
  color: var(--text-muted);
  border-color: var(--border);
  background: rgba(0, 0, 0, 0.2);
  cursor: not-allowed;
}

.chakra-panel,
.chakra-compact-card {
  width: 100%;
  flex-shrink: 0;
  margin-top: 0;
  padding: var(--card-pad-sm) var(--card-pad);
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}

.chakra-panel:active:not(:disabled) {
  transform: scale(0.99);
}

.chakra-panel:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.chakra-panel--armed {
  border-color: var(--premium);
  background: var(--premium-dim);
  box-shadow: none;
}
.chakra-panel--need-grid .chakra-panel__mult {
  color: var(--text-muted);
}
.chakra-panel__meta {
  min-width: 0;
  text-align: left;
}
.chakra-panel__title {
  font-size: var(--fs-section);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-section);
  text-transform: uppercase;
  color: var(--text-muted);
}
.chakra-panel__mult {
  margin-top: 1px;
  font-size: clamp(16px, 4.2vw, 20px);
  font-weight: var(--fw-bold);
  color: var(--premium);
}
.chakra-panel--armed .chakra-panel__mult { color: var(--premium); }
.chakra-panel__mult--muted,
.chakra-panel--free .chakra-panel__mult:empty {
  display: none;
}
.chakra-panel--free {
  border-color: var(--cryo);
  background: rgba(140, 92, 255, 0.08);
}
.chakra-panel__sub {
  display: none;
  margin-top: 2px;
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.chakra-panel__sub--visible { display: block; }
.chakra-panel__btn {
  flex-shrink: 0;
  padding: clamp(7px, 1.4dvh, 10px) clamp(9px, 2.5vw, 12px);
  border-radius: var(--r-sm);
  border: 2px solid var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  pointer-events: none;
}
.chakra-panel__btn--disabled {
  border-color: var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-muted);
  opacity: 0.85;
}

/* ════════ AI CHAKRA MODAL — compact mobile sheet ════════ */
.chakra-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
}

.chakra-modal--hidden { display: none; }

body.chakra-modal-open {
  overflow: hidden;
}

body.chakra-modal-open .nav {
  visibility: hidden;
  pointer-events: none;
}

.chakra-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}

.chakra-modal__panel {
  position: relative;
  width: 100%;
  max-width: min(var(--app-max), 400px);
  max-height: calc(100dvh - 24px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: var(--r-lg);
  border: 2px solid var(--border-strong);
  background: var(--bg);
  padding: 14px var(--app-h-pad) calc(14px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
}

.chakra-head {
  text-align: center;
}

.chakra-head__title {
  font-size: clamp(18px, 4.8vw, 22px);
  font-weight: var(--fw-black);
  letter-spacing: var(--ls-title);
  text-transform: uppercase;
  color: var(--grid-2);
}

.chakra-head__sub {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  line-height: 1.35;
}

.chakra-avail {
  margin-top: 10px;
  text-align: center;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.chakra-avail--free {
  color: var(--premium);
}

/* Chakra Reel — 150px window, 3 visible rows */
.chakra-reel-wrap {
  width: 100%;
  max-width: 340px;
  margin: 12px auto 0;
}

.chakra-reel-window {
  --reel-item-h: 50px;
  position: relative;
  width: 100%;
  height: 150px;
  max-height: 150px;
  overflow: hidden;
  border-radius: var(--r-card);
  border: 2px solid var(--border-strong);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, transparent 22%, transparent 78%, rgba(0, 0, 0, 0.55) 100%),
    var(--panel);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 26, 0.12);
}

.chakra-reel-window--spinning .chakra-reel__pointer {
  border-color: rgba(255, 157, 46, 0.55);
  box-shadow: 0 0 16px rgba(255, 122, 26, 0.35);
}

.chakra-reel-window--spinning .chakra-reel__item {
  opacity: 0.9;
}

.chakra-reel__shade {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  height: 50px;
  pointer-events: none;
}

.chakra-reel__shade--top {
  top: 0;
  background: linear-gradient(180deg, rgba(11, 9, 8, 0.94), transparent);
}

.chakra-reel__shade--bottom {
  bottom: 0;
  background: linear-gradient(0deg, rgba(11, 9, 8, 0.94), transparent);
}

.chakra-reel__pointer {
  position: absolute;
  left: 6px;
  right: 6px;
  top: 50%;
  z-index: 3;
  height: var(--reel-item-h);
  margin-top: -25px;
  border: 2px solid var(--core);
  border-radius: calc(var(--r-card) - 4px);
  box-shadow: 0 0 14px rgba(255, 122, 26, 0.2);
  pointer-events: none;
}

.chakra-reel__track {
  will-change: transform;
}

.chakra-reel__item {
  height: var(--reel-item-h);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: clamp(18px, 5vw, 24px);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-title);
  color: var(--grid-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--panel-2);
}

.chakra-reel__item--alt {
  background: var(--panel);
}

.chakra-reel__item--win {
  color: var(--primary);
  background: rgba(255, 122, 26, 0.14);
  text-shadow: 0 0 10px rgba(255, 122, 26, 0.35);
}

.chakra-result {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--r-card);
  border: 1px solid rgba(216, 132, 255, 0.35);
  background: var(--premium-dim);
  text-align: center;
}

.chakra-result--hidden { display: none; }

.chakra-result--pulse .chakra-result__val {
  animation: chakra-result-pulse 0.6s ease-out 1;
}

@keyframes chakra-result-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.chakra-result__heading {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.chakra-result__val {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: clamp(24px, 6.5vw, 30px);
  font-weight: var(--fw-black);
  color: var(--premium);
  line-height: 1.05;
}

.chakra-result__sub {
  margin-top: 4px;
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  line-height: 1.35;
}

.chakra-btnx--spinning {
  opacity: 0.72;
  pointer-events: none;
}

.chakra-actions {
  margin-top: 10px;
}

.chakra-btnx {
  width: 100%;
  min-height: 44px;
  padding: 12px;
  border-radius: var(--r-md);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-btn);
  text-transform: uppercase;
  cursor: pointer;
  transition: transform var(--t-fast), opacity var(--t-fast);
}

.chakra-btnx:active:not(:disabled) { transform: scale(0.98); }

.chakra-btnx--cta {
  border: 2px solid var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
}

.chakra-btnx:disabled,
.chakra-btnx--locked {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-muted);
}

.chakra-close {
  margin-top: 8px;
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text-soft);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.chakra-close:active { transform: scale(0.98); }

/* legacy chakra blocks (unused in compact modal) */
.chakra-cost-block,
.chakra-boosts-line,
.chakra-armed-summary {
  display: none !important;
}

.chakra-grid {
  margin-top: clamp(10px, 2.5vw, 14px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(6px, 2vw, 10px);
}
.chakra-card {
  padding: var(--card-pad);
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: none;
}
.chakra-card__label {
  font-size: var(--fs-section);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-section);
  text-transform: uppercase;
  color: var(--text-muted);
}
.chakra-card__val {
  margin-top: 6px;
  font-size: var(--fs-card-val);
  font-weight: var(--fw-black);
  color: var(--text);
  line-height: 1.1;
}
.chakra-card__val--teal {
  color: var(--premium);
}
.chakra-card__sub {
  margin-top: 5px;
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  line-height: 1.35;
}

/* Cooldown-таймер для мгновенного ремонта */
.cooldown-timer {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-align: center;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s var(--ease), max-height 0.3s var(--ease),
              padding 0.3s var(--ease);
  padding-top: 0; padding-bottom: 0;
}
.cooldown-timer--visible {
  opacity: 1;
  max-height: 50px;
  padding-top: 11px; padding-bottom: 11px;
}
.cooldown-timer__count {
  font-family: var(--font-mono);
  color: var(--primary);
  font-weight: var(--fw-black);
}
.cooldown-timer__hint {
  display: block;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-med);
  color: var(--text-faint);
  margin-top: 2px;
}

/* Панель живого дохода */
.live-yield {
  margin-top: 12px;
  width: 100%;
  max-width: 300px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--card);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  text-align: center;
  color: var(--text-soft);
  flex-shrink: 0;
}
.live-yield b { color: var(--primary); font-weight: var(--fw-bold); }

/* Всплывающие числа при тапе */
.float-text {
  position: fixed;
  pointer-events: none;
  z-index: 200;
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  white-space: nowrap;
  text-shadow: none;
  animation: float-up 0.55s var(--ease-out) forwards;
}
.float-text--grid { color: var(--primary); }
.float-text--cryo { color: var(--premium); }
.float-text--accel {
  color: var(--violet);
  font-size: var(--fs-sm);
}
@keyframes float-up {
  0%   { opacity: 1; transform: translate(-50%, 0) scale(0.9); }
  20%  { opacity: 1; transform: translate(-50%, -8px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50px) scale(1); }
}

/* Частицы-искры при тапе */
.spark {
  position: fixed;
  width: 5px; height: 5px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 199;
  animation: spark-fly 0.4s var(--ease-out) forwards;
}
@keyframes spark-fly {
  0%   { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--sx, 0), var(--sy, 0)) scale(0.2); }
}

/* Частицы ремонта (cyan) */
.repair-particle {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 199;
  animation: repair-particle-fly 0.65s var(--ease-out) forwards;
}
@keyframes repair-particle-fly {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--px, 0)), calc(-50% + var(--py, 0))) scale(0.15); }
}

.bar__fill--pulse {
  animation: bar-pulse 1.6s var(--ease) infinite;
}
@keyframes bar-pulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

/* ════════ NODES PAGE ════════ */
.screen-head--nodes {
  margin-bottom: 0;
}

.nodes-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: clamp(8px, 1.6vh, 12px);
  margin-bottom: clamp(8px, 1.6vh, 12px);
  flex-shrink: 0;
}

.nodes-tabs__btn {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  font-size: var(--fs-label-sm);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-btn);
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.nodes-tabs__btn--active {
  color: var(--grid-2);
  border: 2px solid var(--grid-2);
  background: var(--primary-dim);
}

.nodes-panel--hidden {
  display: none;
}

.nodes-empty {
  padding: var(--card-pad-lg);
  border-radius: var(--r-card);
  border: 1px dashed var(--border);
  background: var(--card);
  text-align: center;
}

.nodes-empty--hidden {
  display: none;
}

.nodes-empty__title {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--text);
}

.nodes-empty__sub {
  margin-top: 6px;
  font-size: var(--fs-label-sm);
  color: var(--text-muted);
  line-height: 1.4;
}

/* Simplified node cards — store + mine */
.node-card--store,
.node-card--mine {
  padding: 0;
  overflow: hidden;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--card);
}

.node-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.28);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.node-card__top--mine {
  background: transparent;
  border-bottom: none;
  padding: 12px 12px 0;
}

.node-card__strip {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.node-card__cryo-badge {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: var(--r-full);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  color: var(--premium);
  background: var(--premium-dim);
  border: 1px solid rgba(216, 132, 255, 0.35);
}

.node-card__hero {
  padding: clamp(12px, 3vw, 16px) 12px clamp(8px, 2vw, 10px);
  text-align: center;
}

.node-card__meta {
  padding: 0 12px clamp(10px, 2.5vw, 12px);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.node-card__meta-line {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semi);
  color: var(--text-muted);
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.node-card__hero--mine {
  padding-top: 10px;
  padding-bottom: 14px;
}

.node-card__hero-label {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.node-card__hero-val {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: clamp(24px, 6.5vw, 32px);
  font-weight: var(--fw-black);
  line-height: 1.05;
  color: var(--grid-2);
  letter-spacing: -0.02em;
}

.node-card__hero--mine .node-card__hero-val {
  font-size: clamp(22px, 6vw, 28px);
  color: var(--primary);
}

.node-card__activate {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-btn);
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}

.node-card__activate--ready {
  color: var(--primary);
  background: var(--primary-dim);
}

.node-card__activate--ready:active {
  background: rgba(255, 122, 26, 0.22);
}

.node-card__activate--locked,
.node-card__activate--owned {
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.22);
  cursor: not-allowed;
}

.node-card__details {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
}

.node-card__details-summary {
  padding: 10px 12px;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
}

.node-card__details-summary::-webkit-details-marker {
  display: none;
}

.node-card__details-summary::after {
  content: '+';
  float: right;
  color: var(--text-faint);
}

.node-card__details[open] .node-card__details-summary::after {
  content: '−';
}

.node-card__details-list {
  margin: 0;
  padding: 0 12px 12px;
}

.node-card__details-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
}

.node-card__details-key {
  margin: 0;
  font-size: var(--fs-2xs);
  color: var(--text-faint);
  line-height: 1.35;
}

.node-card__details-val {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
}

.node-card--store.node-card--owned {
  border-color: rgba(216, 132, 255, 0.35);
}

.node-card__mine-name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text);
  line-height: 1.25;
  min-width: 0;
}

.node-card__mine-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px 4px;
}

.node-card__mine-key {
  font-size: var(--fs-label-sm);
  color: var(--text-muted);
}

.node-card__mine-val {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text);
}

.node-card--owned-active {
  border-color: rgba(52, 199, 89, 0.45);
  background: rgba(52, 199, 89, 0.08);
}

.node-card--owned-done {
  border-color: var(--border);
  background: var(--panel);
  opacity: 0.88;
}

.node-card__status-pill {
  display: inline-block;
  flex-shrink: 0;
  margin-top: 0;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: var(--fs-label-sm);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-section);
  text-transform: uppercase;
}

.node-card__status-pill--active {
  color: var(--success);
  border: 1px solid rgba(52, 199, 89, 0.45);
  background: rgba(52, 199, 89, 0.12);
}

.node-card__status-pill--completed {
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.node-card__qty {
  margin-top: 0;
  padding: 0 12px 4px;
  font-size: var(--fs-2xs);
  color: var(--text-faint);
}

.node-card__section-label {
  margin-top: 10px;
  margin-bottom: 6px;
  font-size: var(--fs-label-sm);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-section);
  text-transform: uppercase;
  color: var(--text-faint);
}

.node-card__spec-val--chakra {
  color: var(--premium);
}

.node-card__spec-val--max {
  color: var(--grid-2);
}

.node-rewards {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.node-rewards__section + .node-rewards__section {
  margin-top: 10px;
}

.node-rewards__heading {
  margin-bottom: 4px;
  font-size: var(--fs-label-sm);
  font-weight: var(--fw-semi);
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--text-muted);
}

.node-rewards__section .node-rewards__val + .node-rewards__val {
  margin-top: 4px;
}

.node-rewards__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
}

.node-rewards__key {
  font-size: var(--fs-label-sm);
  color: var(--text-muted);
  line-height: 1.35;
}

.node-rewards__val {
  font-family: var(--font-mono);
  font-size: var(--fs-label-sm);
  font-weight: var(--fw-bold);
  color: var(--text);
  text-align: right;
  white-space: nowrap;
}

.node-rewards__val--tap {
  color: var(--grid);
}

.node-rewards__val--chakra {
  color: var(--premium);
}

.node-rewards__val--max {
  color: var(--grid-2);
}

.node-rewards__val--full {
  width: 100%;
  text-align: left;
  white-space: normal;
}

.node-rewards__note {
  margin-top: 10px;
  font-size: var(--fs-2xs);
  line-height: 1.45;
  color: var(--text-faint);
}

.node-card__deploy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.node-card__deploy-key {
  font-size: var(--fs-label-sm);
  color: var(--text-muted);
}

.node-card__deploy-val {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text);
}

.node-card__tap-rules {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
}

.node-card__tap-rules span {
  font-size: var(--fs-label-sm);
  color: var(--text-muted);
  line-height: 1.35;
}

.node-card__specs--compact {
  margin-top: 8px;
}

/* ════════ STORE ════════ */
.store-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.node-card {
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--card);
  transition: border-color var(--t-med), background var(--t-med), box-shadow var(--t-med);
}
.node-card--owned {
  border-color: var(--success-dim);
  background: var(--success-dim);
}
.node-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.node-card__name {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  line-height: 1.2;
}
.node-card__tier-badge {
  display: inline-block;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-top: 2px;
}
.node-card__price {
  font-size: var(--fs-md);
  font-weight: var(--fw-black);
  color: var(--primary);
  white-space: nowrap;
}
.node-card__price--locked { color: var(--text-faint); }
.node-card__roi-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin: 8px 0 12px;
}
.node-card__stat {
  padding: 7px 8px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  text-align: center;
}
.node-card__stat-label {
  display: block;
  font-size: var(--fs-section);
  font-weight: var(--fw-semi);
  color: var(--text-muted);
  letter-spacing: var(--ls-section);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.node-card__stat-val {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-black);
  color: var(--text);
}
.node-card__stat-val--gold { color: var(--premium); }
.deploy-btn {
  width: 100%;
  padding: 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--primary-dim);
  background: var(--primary-dim);
  color: var(--primary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform var(--t-fast), filter var(--t-fast);
}
.deploy-btn:active:not(:disabled) { transform: scale(0.98); }
.deploy-btn--ready {
  border-color: var(--primary);
  background: var(--primary-dim);
}
.deploy-btn--owned {
  color: var(--success);
  border-color: var(--success-dim);
  background: var(--success-dim);
  cursor: default;
}
.deploy-btn--locked {
  color: var(--text-muted);
  border-color: var(--border);
  background: var(--card);
  cursor: not-allowed;
}

/* 60-tap lifecycle node cards */
.node-card--lifecycle {
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: none;
}
.node-card--lifecycle.node-card--owned {
  border-color: var(--premium);
  background: var(--premium-dim);
}
.node-card--lifecycle .node-card__badge {
  font-size: var(--fs-xs);
  font-weight: var(--fw-black);
  letter-spacing: 0.1em;
  color: var(--text-soft);
  margin-bottom: 10px;
}
.node-card__deploy {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: none;
}
.node-card__output {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: clamp(1.65rem, 7vw, 2rem);
  font-weight: var(--fw-bold);
  line-height: 1.05;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.node-card__output-label {
  margin-top: 4px;
  margin-bottom: 14px;
  font-size: var(--fs-section);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-section);
  text-transform: uppercase;
  color: var(--text-muted);
}
.node-card__specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
}
.node-card__spec {
  margin: 0;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.22);
}
.node-card__spec-key {
  margin: 0;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.node-card__spec-val {
  margin: 4px 0 0;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text);
  line-height: 1.2;
}
.node-card__spec-val--profit { color: var(--primary); }
.node-card__spec-val--tap { color: var(--grid); }
.node-card--lifecycle .deploy-btn {
  text-transform: uppercase;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  padding: 13px 12px;
  border: 2px solid var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
}
.node-card--lifecycle .deploy-btn--ready {
  border-color: var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
  box-shadow: none;
}
.node-card--lifecycle .deploy-btn--locked {
  color: var(--text-muted);
  border-color: var(--border);
  background: rgba(0, 0, 0, 0.2);
  box-shadow: none;
}

/* Legacy payout card aliases (kept for compat) */
.node-card--payout {
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
}
.node-card--payout.node-card--owned {
  border-color: var(--premium);
  background: var(--premium-dim);
}
.node-card__badge {
  font-size: var(--fs-xs);
  font-weight: var(--fw-black);
  letter-spacing: 0.06em;
  color: var(--text-soft);
}
.node-card__price-pill {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  padding: 5px 10px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  white-space: nowrap;
}
.node-card__deposit {
  margin-top: 12px;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  color: var(--text-faint);
  text-align: center;
}
.node-card__payout {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: clamp(1.65rem, 7vw, 2rem);
  font-weight: var(--fw-bold);
  text-align: center;
  color: var(--premium);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.node-card__payout-label {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 12px;
}
.node-card__rates {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  margin-bottom: 14px;
  padding: 0 4px;
}
.node-card--payout .deploy-btn {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: var(--fs-xs);
}

/* Эпохи (группировка тиров) */
.era-head {
  font-size: var(--fs-section);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-section);
  color: var(--text-muted);
  padding: 6px 2px 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}
.era-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--divider);
}

/* ════════ NETWORK (Node Store style) ════════ */
.network-scroll {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 8px;
}

.net-card {
  padding: 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: none;
}

.net-card__label {
  font-size: var(--fs-section);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-section);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.net-card__title {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--text);
  line-height: 1.25;
}

.net-card__sub {
  margin-top: 4px;
  margin-bottom: 14px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.4;
}

.net-card__field {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 12px;
}

.net-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.net-card__actions--single {
  grid-template-columns: 1fr;
}

.net-card__field--code {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  letter-spacing: 0.12em;
  color: var(--text);
  text-align: center;
}

.net-card__copy {
  margin: 0 0 8px;
  font-size: var(--fs-xs);
  color: var(--text-soft);
  line-height: 1.45;
}

.net-card__copy:last-child {
  margin-bottom: 0;
}

.net-card__spec--wide {
  grid-column: 1 / -1;
}

.net-card__spec-val--cryo {
  color: var(--chakra);
}

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

.net-ref-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.22);
}

.net-ref-row--empty {
  justify-content: center;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  background: transparent;
  border-style: dashed;
}

.net-ref-row__main {
  min-width: 0;
  flex: 1;
}

.net-ref-row__name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.net-ref-row__meta {
  margin-top: 3px;
  font-size: var(--fs-2xs);
  color: var(--text-faint);
}

.net-ref-row__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.net-ref-row__status {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.net-ref-row__status--active {
  color: var(--premium);
}

.net-ref-row__status--inactive {
  color: var(--text-faint);
}

.net-ref-row__taps {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--text-muted);
}

.net-card__specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.net-card__spec {
  margin: 0;
  padding: 10px 11px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.22);
}

.net-card__spec-key {
  margin: 0;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  color: var(--text-faint);
  text-transform: uppercase;
}

.net-card__spec-val {
  margin: 5px 0 0;
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  font-weight: var(--fw-black);
  color: var(--text);
  line-height: 1.15;
}

.net-card__spec-val--teal {
  color: var(--premium);
}

.net-card__spec-val--rank {
  font-size: var(--fs-sm);
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

.net-rank-progress__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.net-rank-progress__key {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.net-rank-progress__val {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text);
  text-align: right;
}

.net-rank-progress__val--next {
  color: var(--grid-2);
}

.net-rank-progress__req {
  margin: 4px 0 12px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.net-rank-progress__bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.net-rank-progress__bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.net-rank-progress__fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--grid);
  box-shadow: none;
  transition: width 0.35s ease;
}

.net-rank-progress__count {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--text-soft);
  white-space: nowrap;
}

.net-btn {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  cursor: pointer;
  transition: transform var(--t-fast), opacity var(--t-fast);
}

.net-btn:active:not(:disabled) { transform: scale(0.98); }

.net-btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text-soft);
}

.net-btn--cta {
  border: 2px solid var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
  box-shadow: none;
}

.net-btn--block {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 16px;
}

.net-btn--empty,
.net-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-muted);
  box-shadow: none;
}

.net-btn__timer {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-med);
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

.lb-list--network {
  padding: 0;
  gap: 6px;
}

.lb-row--empty {
  justify-content: center;
  color: var(--text-muted);
  font-size: var(--fs-xs);
}

.lb-row--you {
  border-color: var(--primary);
  background: var(--primary-dim);
  box-shadow: none;
}

.lb-row--you .lb-row__name {
  color: var(--primary);
}

.lb-row--you .lb-row__score {
  color: var(--primary);
}

/* Legacy network styles (unused) */
.ref-link-card {
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--card);
}
.ref-link-card__label {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  color: var(--text-faint);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.ref-link-card__url {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 10px;
}
.ref-link-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.copy-btn,
.invite-btn {
  padding: 11px 12px;
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  cursor: pointer;
}
.copy-btn {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-soft);
}
.invite-btn {
  border: 1px solid var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
}
.copy-btn:active,
.invite-btn:active { transform: scale(0.98); }

.ref-rank-bar {
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--card);
}
.ref-rank-bar__current {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.ref-rank-bar__symbol {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-md);
  color: var(--primary);
  flex-shrink: 0;
}
.ref-rank-bar__name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-black);
  color: var(--text);
}
.ref-rank-bar__rates {
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  margin-top: 2px;
}
.ref-rank-ladder {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 8px;
}
.ref-rank-step {
  flex-shrink: 0;
  min-width: 72px;
  padding: 6px 8px;
  border-radius: var(--r-xs);
  border: 1px solid var(--border);
  background: var(--surface-2);
  text-align: center;
  opacity: 0.45;
}
.ref-rank-step--done { opacity: 0.75; border-color: var(--border-strong); }
.ref-rank-step--active {
  opacity: 1;
  border-color: var(--primary);
  background: var(--primary-dim);
}
.ref-rank-step__sym {
  display: block;
  font-size: var(--fs-xs);
  color: var(--primary);
  margin-bottom: 2px;
}
.ref-rank-step__name {
  display: block;
  font-size: 8px;
  font-weight: var(--fw-bold);
  color: var(--text-muted);
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.ref-rank-bar__next {
  font-size: var(--fs-2xs);
  color: var(--text-faint);
  line-height: 1.4;
}

.ref-claim-card {
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--premium);
  background: var(--premium-dim);
}
.ref-claim-card--hidden { display: none; }
.ref-claim-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ref-claim-card__label {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  color: var(--text-faint);
  letter-spacing: 0.06em;
}
.ref-claim-card__val {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-black);
  color: var(--premium);
  font-family: var(--font-mono);
  margin-top: 4px;
}
.ref-claim-card__sub {
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  margin-top: 2px;
}
.ref-claim-btn {
  flex-shrink: 0;
  padding: 12px 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--premium);
  background: var(--premium-dim);
  color: var(--premium);
  font-size: var(--fs-sm);
  font-weight: var(--fw-black);
  cursor: pointer;
}
.ref-claim-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.ref-claim-btn:active:not(:disabled) { transform: scale(0.98); }
.network-hud {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
.network-hud__cell {
  padding: 14px 12px;
  background: var(--card);
}
.network-hud__label {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  color: var(--text-faint);
  letter-spacing: 0.06em;
}
.network-hud__val {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-black);
  margin-top: 4px;
}
.network-hud__val--cyan { color: var(--primary); }
.network-hud__val--gold { color: var(--premium); }
.network-hud--4 {
  grid-template-columns: 1fr 1fr;
}
.network-hud--4 .network-hud__cell:nth-child(3),
.network-hud--4 .network-hud__cell:nth-child(4) {
  border-top: 1px solid var(--border);
}

/* Список рефералов */
.ref-list { display: flex; flex-direction: column; gap: 6px; }
.ref-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--card);
  border: 1px solid var(--border);
}
.ref-row__avatar {
  width: 32px; height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  font-weight: var(--fw-black);
  color: var(--text-soft);
}
.ref-row__body { flex: 1; min-width: 0; }
.ref-row__name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ref-row__sub {
  font-size: var(--fs-2xs);
  color: var(--text-muted);
}
.ref-row__bonus {
  font-size: var(--fs-sm);
  font-weight: var(--fw-black);
  color: var(--success);
  white-space: nowrap;
}

/* Дерево рефералов */
.tree {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tree-node {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.tree-node--you {
  border-color: var(--primary-dim);
  background: var(--primary-dim);
}
.tree-node__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}
.tree-node--t2 .tree-node__dot { background: var(--premium); box-shadow: 0 0 8px var(--premium); }
.tree-node--t3 .tree-node__dot { background: var(--text-muted); box-shadow: none; }
.tree-node__body { flex: 1; min-width: 0; }
.tree-node__label { font-size: var(--fs-sm); font-weight: var(--fw-bold); }
.tree-node__sub { font-size: var(--fs-2xs); color: var(--text-muted); margin-top: 1px; }
.tree-node__pct {
  font-size: var(--fs-sm);
  font-weight: var(--fw-black);
  color: var(--premium);
  white-space: nowrap;
}
.tree-link {
  width: 2px; height: 12px;
  background: var(--border-strong);
}
.tree-link--branch {
  width: 70%; height: 2px;
  margin: 0 auto;
  background: var(--border-strong);
}

/* Кнопки рефералки */
.recruit-btn {
  width: 100%;
  padding: 15px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--primary-dim), rgba(251, 191, 36, 0.1));
  border: 1px solid var(--primary);
  color: var(--text);
  font-size: var(--fs-md);
  font-weight: var(--fw-black);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform var(--t-fast);
}
.recruit-btn:active { transform: scale(0.98); }
.push-btn {
  width: 100%;
  padding: 13px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  cursor: pointer;
  transition: transform var(--t-fast);
}
.push-btn:active:not(:disabled) { transform: scale(0.97); }
.push-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.push-btn__timer {
  display: block;
  font-size: var(--fs-2xs);
  color: var(--text-faint);
  font-weight: var(--fw-med);
  margin-top: 2px;
}

/* ════════ QUESTS / EARN ════════ */
.quest-section { display: flex; flex-direction: column; gap: 6px; }
.quest-section__title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-black);
  letter-spacing: 0.1em;
  color: var(--text-faint);
  padding: 6px 2px 2px;
}
.quest-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--border);
}
.quest-card--done {
  opacity: 0.55;
  background: var(--surface-2);
}
.quest-card__icon {
  width: 36px; height: 36px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--primary-dim);
  border: 1px solid var(--primary-dim);
}
.quest-card__icon--cryo {
  background: var(--premium-dim);
  border-color: var(--premium-dim);
}
.quest-card__body { flex: 1; min-width: 0; }
.quest-card__name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
}
.quest-card__progress {
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  margin-top: 1px;
}
.quest-card__reward {
  font-size: var(--fs-sm);
  font-weight: var(--fw-black);
  color: var(--primary);
  white-space: nowrap;
}
.quest-card__reward--cryo { color: var(--premium); }
.quest-claim {
  padding: 9px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--success-dim);
  background: var(--success-dim);
  color: var(--success);
  font-size: var(--fs-xs);
  font-weight: var(--fw-black);
  letter-spacing: 0.04em;
  cursor: pointer;
}
.quest-claim:disabled { opacity: 0.4; cursor: not-allowed; }

/* Стрик / daily reward */
.streak-strip {
  display: flex;
  gap: 4px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--border);
}
.streak-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 2px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.streak-day--active {
  border-color: var(--premium);
  background: var(--premium-dim);
}
.streak-day--done {
  border-color: var(--success-dim);
  background: var(--success-dim);
}
.streak-day__num {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  color: var(--text-muted);
}
.streak-day__reward {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-black);
  color: var(--premium);
}

/* Сезонный прогресс */
.season-card {
  padding: 14px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--premium-dim), var(--primary-dim));
  border: 1px solid var(--premium-dim);
}
.season-card__title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-black);
  color: var(--premium);
  margin-bottom: 8px;
}
.season-card__bar { margin: 6px 0; }

/* Лидерборд */
.lb-card {
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--card);
  overflow: hidden;
}
.lb-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.lb-card__you {
  color: var(--primary);
}
.lb-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
}
.lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--card);
  border: 1px solid var(--border);
}
.lb-row__rank {
  width: 24px; text-align: center;
  font-size: var(--fs-sm);
  font-weight: var(--fw-black);
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.lb-row__rank--top { color: var(--premium); font-size: var(--fs-md); }
.lb-row__name {
  flex: 1;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
}
.lb-row__score {
  font-size: var(--fs-sm);
  font-weight: var(--fw-black);
  color: var(--primary);
  font-family: var(--font-mono);
}

/* ════════ EARN / CRYO HUB ════════ */
.earn-scroll {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 8px;
}

.earn-card {
  padding: 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: none;
}

.earn-card--hero {
  border-color: var(--premium);
  background: var(--premium-dim);
}

.earn-card__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--text);
  line-height: 1.2;
}

.earn-card__sub {
  margin-top: 4px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.4;
}

.earn-card__metric {
  margin-top: 12px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: clamp(1.15rem, 4.8vw, 1.4rem);
  font-weight: var(--fw-bold);
  color: var(--premium);
  font-variant-numeric: tabular-nums;
}

.earn-btn {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  cursor: pointer;
  transition: transform var(--t-fast), opacity var(--t-fast);
}

.earn-btn:active:not(:disabled) { transform: scale(0.98); }

.earn-btn--cta {
  border: 2px solid var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
  box-shadow: none;
}

.earn-btn--armed {
  border: 2px solid var(--premium);
  background: var(--premium-dim);
  color: var(--premium);
  cursor: default;
}

.earn-btn--locked,
.earn-btn--spent,
.earn-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text-muted);
  box-shadow: none;
}

.earn-section__label {
  font-size: var(--fs-section);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-section);
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}

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

.earn-sections--hidden {
  display: none;
}

.earn-section--hidden {
  display: none;
}

.earn-state {
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.earn-state--hidden {
  display: none;
}

.earn-task {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--card);
}

.earn-task__main {
  flex: 1;
  min-width: 0;
}

.earn-task__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.earn-task__badge {
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.earn-task__badge--available {
  color: var(--premium);
  border-color: rgba(255, 183, 77, 0.25);
}

.earn-task__badge--opened {
  color: var(--primary);
  border-color: rgba(56, 189, 248, 0.25);
}

.earn-task__badge--claimed {
  color: var(--text-faint);
}

.earn-task__badge--locked {
  color: var(--text-faint);
}

.earn-task__desc {
  margin-top: 4px;
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  line-height: 1.4;
}

.earn-task__progress {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--text-faint);
}

.earn-task__reward {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--chakra);
}

.earn-task__btn--locked {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-faint);
  cursor: not-allowed;
}

.earn-task--locked {
  opacity: 0.55;
}

.earn-task--done {
  opacity: 0.65;
  border-color: rgba(255, 255, 255, 0.06);
}

.earn-task__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-md);
  flex-shrink: 0;
}

.earn-task__body {
  flex: 1;
  min-width: 0;
}

.earn-task__name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text);
}

.earn-task__btn {
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.earn-task__btn--claim {
  border: 2px solid var(--grid);
  background: var(--primary-dim);
  color: var(--grid);
}

.earn-task__btn--open {
  border: 2px solid var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
}

.earn-task__btn--done {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-muted);
  cursor: default;
}

.earn-task__status {
  font-size: var(--fs-2xs);
  color: var(--text-faint);
  white-space: nowrap;
}

/* ════════ WALLET ════════ */
.wallet-account {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wallet-account__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wallet-account__body--hidden {
  display: none;
}

.wallet-state {
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.wallet-state--hidden {
  display: none;
}

.wallet-card--profile {
  padding: 14px 16px;
}

.wallet-profile__head {
  margin-bottom: 10px;
}

.wallet-profile__name {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--text);
  line-height: 1.2;
}

.wallet-profile__user {
  margin-top: 2px;
  font-size: var(--fs-2xs);
  color: var(--text-muted);
}

.wallet-profile__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}

.wallet-profile__meta-row {
  margin: 0;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
}

.wallet-profile__meta-row dt {
  margin: 0;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.wallet-profile__meta-row dd {
  margin: 4px 0 0;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  color: var(--text);
  word-break: break-word;
}

.wallet-profile__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0 0;
}

.wallet-profile__stat {
  margin: 0;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
}

.wallet-profile__stat--wide {
  grid-column: 1 / -1;
}

.wallet-profile__stat dt {
  margin: 0;
  font-size: var(--fs-2xs);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wallet-profile__stat dd {
  margin: 4px 0 0;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text);
}

.wallet-profile__ref {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.wallet-profile__ref-code {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
}

.wallet-profile__ref-copy {
  flex-shrink: 0;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  cursor: pointer;
}

.wallet-profile__conn {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wallet-profile__conn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.18);
  font-size: var(--fs-xs);
  color: var(--text-soft);
}

.wallet-profile__conn-val {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.wallet-profile__conn-val--ok {
  color: var(--premium);
}

.wallet-profile__conn-val--muted {
  color: var(--text-faint);
}

.wallet-balances {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.wallet-balance-card {
  padding: var(--card-pad-lg);
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  background: var(--card);
}
.wallet-balance-card--grid {
  border-color: rgba(255, 122, 26, 0.35);
  background: var(--primary-dim);
}
.wallet-balance-card--cryo {
  border-color: rgba(216, 132, 255, 0.35);
  background: var(--premium-dim);
}
.wallet-balance-card__label {
  font-size: var(--fs-section);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-section);
  text-transform: uppercase;
  color: var(--text-muted);
}
.wallet-balance-card__val {
  margin-top: 6px;
  font-size: var(--fs-card-val);
  font-weight: var(--fw-bold);
  line-height: 1.1;
}
.wallet-balance-card--grid .wallet-balance-card__val {
  color: var(--grid);
}
.wallet-balance-card--cryo .wallet-balance-card__val {
  color: var(--cryo);
}

.wallet-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.wallet-mode-tabs__btn {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.wallet-mode-tabs__btn--active {
  color: var(--grid);
  border: 2px solid var(--grid);
  background: var(--primary-dim);
}

.wallet-card {
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--card);
  margin-bottom: 10px;
}
.wallet-card--hidden { display: none; }
.wallet-card--stats {
  border-color: var(--border-strong);
  background: var(--surface);
}
.wallet-card__title {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--text);
  line-height: 1.25;
}
.wallet-card__sub {
  margin-top: 4px;
  margin-bottom: 12px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.4;
}
.wallet-card__note {
  margin-top: 10px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
}
.wallet-card__cta {
  width: 100%;
  margin-top: 8px;
  min-height: 44px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 2px solid var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  cursor: pointer;
  transition: transform var(--t-fast);
}
.wallet-card__cta:first-of-type { margin-top: 0; }
.wallet-card__cta:active:not(:disabled) { transform: scale(0.98); }
.wallet-card__cta--disabled,
.wallet-card__cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-muted);
  box-shadow: none;
}

.wallet-card__cta--dev {
  margin-top: 8px;
  display: none;
}

.wallet-card--placeholder {
  border-color: var(--border);
}

.wallet-card--activity {
  border-color: var(--border-strong);
  background: var(--surface);
  padding-bottom: 12px;
}

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

.wallet-activity__refresh {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast);
}

.wallet-activity__refresh:active {
  color: var(--grid);
  border-color: var(--grid);
}

.wallet-ledger-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.wallet-ledger-filters__btn {
  flex: 1;
  min-height: 32px;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.wallet-ledger-filters__btn--active {
  color: var(--premium);
  border-color: rgba(216, 132, 255, 0.45);
  background: var(--premium-dim);
}

.wallet-ledger-filters__btn--usdt.wallet-ledger-filters__btn--active {
  color: var(--grid);
  border-color: rgba(255, 122, 26, 0.45);
  background: var(--primary-dim);
}

.wallet-ledger-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wallet-ledger-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.22);
}

.wallet-ledger-item__line {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  line-height: 1.35;
  word-break: break-word;
}

.wallet-ledger-item__line--credit { color: var(--grid); }
.wallet-ledger-item__line--debit { color: var(--text); }
.wallet-ledger-item__line--cryo { color: var(--cryo); }

.wallet-ledger-item__time {
  font-size: var(--fs-2xs);
  color: var(--text-faint);
  line-height: 1.3;
}

.wallet-ledger-empty {
  padding: 16px 8px;
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.wallet-ledger-empty--hidden { display: none; }

.wallet-ledger-error {
  padding: 12px 4px;
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--warn, #f59e0b);
}

.wallet-ledger-error--hidden { display: none; }

.wallet-ledger-loading {
  padding: 10px 8px;
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.wallet-ledger-loading--hidden { display: none; }

.wallet-input {
  width: 100%;
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-soft);
  -webkit-user-select: text;
  user-select: text;
}
.wallet-input::placeholder { color: var(--text-faint); }
.wallet-input:focus {
  outline: none;
  border-color: var(--grid);
  box-shadow: none;
}

.wallet-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.wallet-stat {
  padding: 10px 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--card);
}
.wallet-stat--wide { grid-column: 1 / -1; }
.wallet-stat__key {
  font-size: var(--fs-section);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-section);
  text-transform: uppercase;
  color: var(--text-muted);
}
.wallet-stat__val {
  margin-top: 5px;
  font-size: clamp(1.1rem, 4.8vw, 1.35rem);
  font-weight: var(--fw-bold);
  color: var(--text);
  line-height: 1.15;
}
.wallet-stat__val--grid {
  color: var(--primary);
}
.wallet-stat__val--teal {
  color: var(--premium);
}
.wallet-stat__val--rank {
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-title);
}

.wallet-info {
  margin-top: 4px;
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--card);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

/* ════════ BALANCE WALLET MODALS (topbar) ════════ */
.balance-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(12px, env(safe-area-inset-top, 0px))
    max(12px, env(safe-area-inset-right, 0px))
    max(12px, env(safe-area-inset-bottom, 0px))
    max(12px, env(safe-area-inset-left, 0px));
}
.balance-modal--hidden { display: none; }
.balance-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.balance-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  max-height: min(82dvh, 480px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-card);
  border: 2px solid var(--border-strong);
  background: var(--bg);
  padding: 16px 14px 14px;
  margin: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.balance-modal__panel--grid {
  border-color: rgba(249, 115, 22, 0.28);
}
.balance-modal__panel--cryo {
  border-color: rgba(216, 132, 255, 0.28);
}
.balance-modal__title {
  font-size: var(--fs-action-title);
  font-weight: var(--fw-black);
  letter-spacing: var(--ls-title);
  text-transform: uppercase;
  color: var(--grid-2);
}
.balance-modal__balance-label {
  margin-top: 10px;
  font-size: var(--fs-section);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-section);
  text-transform: uppercase;
  color: var(--text-muted);
}
.balance-modal__balance {
  margin-top: 4px;
  font-size: var(--fs-balance);
  font-weight: var(--fw-bold);
  color: var(--primary);
  line-height: 1.1;
}
.balance-modal__balance--cryo {
  color: var(--premium);
}
.balance-modal__note {
  margin-top: 10px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.45;
}
.balance-modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.balance-modal__actions--stack {
  grid-template-columns: 1fr;
}
.balance-modal__actions--hidden { display: none; }
#gridModalTestBtn { grid-column: 1 / -1; }
.balance-modal__btn {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-soft);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  cursor: pointer;
  transition: transform var(--t-fast);
}
.balance-modal__btn:active:not(:disabled) { transform: scale(0.98); }
.balance-modal__btn--cta {
  border: 2px solid var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
}
.balance-modal__btn--cryo {
  border-color: var(--premium);
  background: var(--premium-dim);
  color: var(--premium);
}
.balance-modal__btn--ghost {
  margin-top: 8px;
  color: var(--text-muted);
}
.balance-modal__btn--disabled,
.balance-modal__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: var(--border);
  background: var(--surface);
  color: var(--text-muted);
}
.balance-modal__section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.balance-modal__section--hidden { display: none; }
.balance-modal__section-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text);
  line-height: 1.25;
}
.balance-modal__section-text {
  margin-top: 6px;
  margin-bottom: 10px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.4;
}
.balance-modal__section .wallet-input {
  margin-bottom: 8px;
}
.balance-modal__close {
  margin-top: 10px;
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  cursor: pointer;
}
.balance-modal__close:active { transform: scale(0.98); }

/* ════════ UX compact pass ════════ */
.nodes-balance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 122, 26, 0.28);
  background: var(--primary-dim);
}
.nodes-balance-row__label {
  font-size: var(--fs-section);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-section);
  text-transform: uppercase;
  color: var(--text-muted);
}
.nodes-balance-row__val {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--grid);
}

.wallet-actions {
  display: none;
}
.wallet-card--compact {
  padding: var(--card-pad);
}
.wallet-account__body--compact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wallet-profile__meta--compact {
  margin-top: 8px;
}

.wallet-activity-wrap {
  margin-top: 4px;
}
.wallet-activity__toggle {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  cursor: pointer;
}
.wallet-activity__toggle:active { transform: scale(0.99); }
.wallet-activity-panel--collapsed {
  display: none;
}
.wallet-activity-panel:not(.wallet-activity-panel--collapsed) {
  margin-top: 8px;
}

.net-card__copy--tight {
  margin-top: 4px;
  margin-bottom: 8px;
}
.net-leaderboard__empty,
.net-leaderboard__loading {
  padding: 12px 10px;
  border-radius: var(--r-md);
  border: 1px dashed var(--border);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-align: center;
}
.net-leaderboard__empty--hidden,
.net-leaderboard__list--hidden,
.net-leaderboard__loading--hidden {
  display: none;
}
.net-leaderboard__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.net-lb-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--card);
  font-size: var(--fs-xs);
}
.net-lb-row--you {
  border-color: rgba(255, 176, 74, 0.45);
  background: var(--primary-dim);
}
.net-lb-row__rank {
  font-family: var(--font-mono);
  font-weight: var(--fw-bold);
  color: var(--text-muted);
}
.net-lb-row__name {
  font-weight: var(--fw-semi);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.net-lb-row__score {
  font-family: var(--font-mono);
  font-weight: var(--fw-bold);
  color: var(--cryo);
  font-variant-numeric: tabular-nums;
}
.net-lb-row__meta {
  grid-column: 2 / -1;
  font-size: var(--fs-2xs);
  color: var(--text-faint);
}

@media (max-height: 720px) {
  .screen-head--core {
    display: none;
  }
  .chakra-compact-card .chakra-panel__sub {
    display: none;
  }
  .core-page {
    gap: clamp(4px, 1vh, 8px);
  }
}

@media (max-width: 390px) {
  .wallet-actions {
    display: none;
  }
}
