:root {
  --bg: #060709;
  --card: rgba(255, 255, 255, 0.032);
  --card-hover: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #eef1f8;
  --text-2: rgba(228, 234, 248, 0.6);
  --text-3: rgba(228, 234, 248, 0.38);
  --accent: #7dd0ff;
  --accent-2: #818cf8;
  --green: #4ade80;
  --red: #f87171;
  --amber: #fbbf24;
  --yt: #ff5247;
  --twitch: #a970ff;
  --kick: #53fc18;
  --font-display: "Space Grotesk", sans-serif;
  --font-ui: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --radius: 18px;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
}
/* the 80% browser-zoom look, baked in as the default */
body { zoom: 0.8; }

.hidden { display: none !important; }

/* ---------------------------------------------------------------- orb --- */
.orb {
  position: relative;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.85) 0%, rgba(170, 220, 255, 0.45) 18%, transparent 45%),
    radial-gradient(circle at 68% 70%, rgba(129, 140, 248, 0.75) 0%, transparent 55%),
    radial-gradient(circle at 50% 50%, #38bdf8 0%, #4f46e5 60%, #1e1b4b 100%);
  box-shadow:
    0 0 60px rgba(99, 161, 255, 0.35),
    0 0 140px rgba(99, 102, 241, 0.18),
    inset 0 0 30px rgba(255, 255, 255, 0.12);
}
.orb::before {
  content: "";
  position: absolute; inset: -14px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(125, 208, 255, 0.5) 12%, transparent 28%, transparent 55%, rgba(129, 140, 248, 0.4) 68%, transparent 82%);
  filter: blur(7px);
  animation: orbSpin 7s linear infinite;
}
.orb::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 120%, rgba(125, 208, 255, 0.35), transparent 60%);
  animation: orbBreath 4.5s ease-in-out infinite;
}
.orb-idle { width: 72px; height: 72px; opacity: 0.75; animation: orbBreathScale 4s ease-in-out infinite; }
.orb-boot { width: 96px; height: 96px; }
.orb-hero { width: 100%; height: 100%; }
.orb-mini { width: 34px; height: 34px; box-shadow: 0 0 24px rgba(99, 161, 255, 0.35); }
.orb-mini::before { inset: -6px; filter: blur(4px); }
.orb.speaking::before { animation-duration: 1.6s; }
.orb.speaking { box-shadow: 0 0 80px rgba(125, 208, 255, 0.55), 0 0 160px rgba(99, 102, 241, 0.25), inset 0 0 30px rgba(255, 255, 255, 0.2); }

@keyframes orbSpin { to { transform: rotate(360deg); } }
@keyframes orbBreath { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
@keyframes orbBreathScale { 0%, 100% { transform: scale(1); opacity: 0.6; } 50% { transform: scale(1.06); opacity: 0.9; } }

/* ------------------------------------------------------------ standby --- */
#standby {
  position: fixed; inset: 0; z-index: 110;
  background: radial-gradient(ellipse 80% 60% at 50% 38%, #0b0e16 0%, #05060a 70%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 30px; cursor: pointer;
  transition: opacity 0.8s ease;
}
#standby.fade { opacity: 0; pointer-events: none; }
.standby-title {
  font-family: var(--font-display);
  font-size: 34px; font-weight: 600; letter-spacing: 0.35em;
  text-transform: uppercase;
  margin-left: 0.35em;
  color: rgba(238, 241, 248, 0.85);
}
.standby-hint {
  font-size: 13px; color: var(--text-3);
  animation: hintPulse 3.2s ease-in-out infinite;
  text-align: center; line-height: 1.8;
}
.lock {
  display: flex; gap: 8px; align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 6px 6px 6px 18px;
  backdrop-filter: blur(14px);
}
.lock input {
  background: transparent; border: none; outline: none;
  color: var(--text); font-family: var(--font-ui); font-size: 14px;
  letter-spacing: 0.18em; width: 150px;
}
.lock input::placeholder { color: var(--text-3); letter-spacing: 0.04em; }
.lock button {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text); font-size: 15px; cursor: pointer;
  transition: all 0.2s;
}
.lock button:hover { background: rgba(255, 255, 255, 0.16); }
.lock.shake { animation: lockShake 0.4s ease; border-color: rgba(248, 113, 113, 0.6); }
@keyframes lockShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-9px); }
  55% { transform: translateX(7px); }
  80% { transform: translateX(-4px); }
}
.standby-mic { width: 8px; height: 8px; border-radius: 50%; }
.standby-mic.live { background: var(--red); box-shadow: 0 0 14px var(--red); animation: hintPulse 1.6s infinite; }
@keyframes hintPulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

/* --------------------------------------------------------------- boot --- */
#boot {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(ellipse 80% 60% at 50% 38%, #0b0e16 0%, #05060a 70%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px;
  transition: opacity 0.9s ease;
}
#boot.fade { opacity: 0; pointer-events: none; }
.boot-progress {
  width: min(360px, 70vw); height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.boot-bar {
  height: 100%; width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 16px rgba(125, 208, 255, 0.5);
  transition: width 0.15s ease;
}
.boot-power {
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
  color: var(--text); letter-spacing: 0.08em;
}
#boot-pct { font-size: 24px; }
#boot-log {
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.7;
  color: var(--text-3);
  min-height: 150px; width: min(440px, 88vw);
}

/* ------------------------------------------------------------ ambience --- */
#hud { position: relative; min-height: 100%; display: flex; flex-direction: column; }

.aurora {
  position: fixed; inset: -20%; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 38% 30% at 18% 12%, rgba(56, 122, 223, 0.13), transparent 70%),
    radial-gradient(ellipse 34% 28% at 85% 20%, rgba(99, 102, 241, 0.10), transparent 70%),
    radial-gradient(ellipse 45% 32% at 55% 95%, rgba(14, 116, 144, 0.10), transparent 70%);
  /* static on purpose: animating this forced every blurred panel to
     recompute its backdrop each frame and lagged the whole HUD */
}

/* -------------------------------------------------------------- header --- */
.hud-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(6, 7, 9, 0.82);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand h1 {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--text);
}
.sub { font-size: 11.5px; color: var(--text-3); font-weight: 500; }

.chain-toggle {
  display: flex; gap: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 99px; padding: 4px;
}
.chain-toggle button {
  font-family: var(--font-ui); font-size: 12px; font-weight: 600;
  background: transparent; color: var(--text-3);
  border: none; padding: 7px 16px; cursor: pointer;
  border-radius: 99px;
  transition: all 0.2s;
}
.chain-toggle button.active { background: rgba(255, 255, 255, 0.09); color: var(--text); }

.header-mid { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border);
  color: var(--text-2); font-size: 16px; cursor: pointer;
  transition: all 0.2s;
}
.icon-btn:hover { background: var(--card-hover); color: var(--text); border-color: var(--border-strong); }
.icon-btn.spin { animation: refreshSpin 0.8s ease; }
@keyframes refreshSpin { to { transform: rotate(360deg); } }

.standby-mute { margin-left: 0; opacity: 0.7; }
.standby-mute:hover { opacity: 1; }

.hud-header .hud-btn { padding: 8px 16px; }
.header-right { display: flex; align-items: center; gap: 20px; }
.status-lights { display: flex; gap: 8px; }
.status-light {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 600; color: var(--text-2);
  background: var(--card); border: 1px solid var(--border);
  border-radius: 99px; padding: 5px 12px;
}
.status-light .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.status-light.down .dot { background: var(--red); box-shadow: 0 0 8px var(--red); }
.clock { text-align: right; display: flex; flex-direction: column; gap: 1px; }
#clock-time {
  font-family: var(--font-display); font-size: 19px; font-weight: 600;
  color: var(--text); font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- grid --- */
.hud-grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr) 330px;
  gap: 14px; padding: 0 22px 18px;
  height: calc(100vh - 100px); /* panels keep their proportions below the sphere */
  min-height: 640px;
  overflow: hidden;
}
/* min-width:0 is load-bearing: without it the ticker's nowrap content
   stretches the 1fr grid track and pushes everything else off-screen */
.col { display: flex; flex-direction: column; gap: 14px; min-height: 0; min-width: 0; }

/* --------------------------------------------------------------- panel --- */
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  flex: 1; min-height: 0;
  backdrop-filter: blur(18px);
}
.panel-small { flex: 0 1 auto; max-height: 200px; transition: max-height 0.25s ease; }
/* live trades keeps room for ~5 entries; the small boxes below shrink first */
.col-right .panel:first-child { min-height: 340px; }
.panel-small.expanded { flex: 1 1 auto; max-height: 48vh; }

.mini-btn {
  font-family: var(--font-ui); font-size: 10px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-2); background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border); border-radius: 99px;
  padding: 3px 10px; margin-left: 8px; cursor: pointer;
  transition: all 0.15s;
}
.mini-btn:hover { background: rgba(255, 255, 255, 0.12); color: var(--text); }

/* ----------------------------------------------------- download modal --- */
.modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(2, 4, 8, 0.65);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.modal-card {
  background: #0c0f16;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 24px 26px;
  width: 320px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}
.modal-card h3 { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--text); }
.modal-sub { font-size: 12px; color: var(--text-3); margin: 4px 0 16px; }
.modal-fields { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.modal-fields label {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
}
.modal-fields input[type="date"] {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-family: var(--font-ui); font-size: 13px;
  padding: 8px 10px; outline: none;
  color-scheme: dark; /* dark native calendar popup */
}
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.hud-btn.primary { background: rgba(125, 208, 255, 0.16); border-color: rgba(125, 208, 255, 0.4); }
.hud-btn.primary:hover { background: rgba(125, 208, 255, 0.28); }
.panel-title {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-2);
  padding: 14px 18px 11px;
  display: flex; align-items: center; gap: 9px;
}
.panel-tag {
  margin-left: auto; font-size: 10.5px; font-weight: 600;
  color: var(--text-3); text-transform: none; letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 99px;
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.live-dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: hintPulse 1.8s infinite; }
.panel-body { padding: 4px 12px 12px; overflow-y: auto; flex: 1; min-height: 0; }

.panel-body::-webkit-scrollbar { width: 5px; }
.panel-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 99px; }
.panel-body::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------------------------------------- markets --- */
.platform-group { margin-bottom: 6px; }
.platform-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 6px 7px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-2);
  position: sticky; top: 0;
  background: linear-gradient(180deg, #0a0c12 60%, transparent);
  z-index: 1;
}
.platform-head .pdot { width: 8px; height: 8px; border-radius: 3px; }
.platform-head.yt .pdot { background: var(--yt); box-shadow: 0 0 10px rgba(255, 82, 71, 0.5); }
.platform-head.twitch .pdot { background: var(--twitch); box-shadow: 0 0 10px rgba(169, 112, 255, 0.5); }
.platform-head.kick .pdot { background: var(--kick); box-shadow: 0 0 10px rgba(83, 252, 24, 0.4); }
.platform-head .pmeta { margin-left: auto; font-family: var(--font-mono); font-size: 10px; font-weight: 500; color: var(--text-3); text-transform: none; }

.market-row {
  padding: 11px 12px; margin-bottom: 6px; cursor: pointer;
  border: 1px solid transparent;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
  transition: all 0.15s;
}
.market-row:hover { background: var(--card-hover); }
.market-row.selected { border-color: var(--border-strong); background: var(--card-hover); }
.market-q { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.4; margin-bottom: 8px; }
.market-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11.5px; color: var(--text-3); margin-bottom: 7px;
  font-variant-numeric: tabular-nums;
}
.market-meta .yes { font-weight: 700; font-size: 13px; color: var(--green); }
.market-meta .yes.low { color: var(--red); }
.prob-bar { height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); position: relative; overflow: hidden; }
.prob-bar span {
  position: absolute; inset: 0 auto 0 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* ------------------------------------------------------------- systems --- */
.sys-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 6px; font-size: 12.5px; font-weight: 500; color: var(--text-2);
}
.sys-row .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.sys-row.down .dot { background: var(--red); box-shadow: 0 0 8px var(--red); }
.sys-row .ms { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); }

/* ---------------------------------------------------------------- hero --- */
.hero { display: flex; align-items: center; justify-content: space-evenly; gap: 22px; padding: 6px 0 2px; flex: 0 0 auto; }
.orb-wrap { position: relative; width: min(170px, 19vh); aspect-ratio: 1; }
.hero-readout {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; pointer-events: none; gap: 2px;
}
.ro-label { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75); }
.ro-value {
  font-family: var(--font-display); font-size: 26px; font-weight: 700;
  color: #fff; text-shadow: 0 1px 14px rgba(0, 0, 0, 0.4);
  font-variant-numeric: tabular-nums;
}
.ro-sub { font-size: 10.5px; font-weight: 600; color: rgba(255, 255, 255, 0.7); font-variant-numeric: tabular-nums; }

.hero-stats { display: flex; flex-direction: column; gap: 16px; }
.hstat { display: flex; flex-direction: column; gap: 1px; }
.hs-v {
  font-family: var(--font-display); font-size: 24px; font-weight: 700;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.hs-l { font-size: 11px; font-weight: 500; color: var(--text-3); }

/* ----------------------------------------------------------- hero big --- */
.hero-big { display: flex; flex-direction: column; gap: 2px; min-width: 190px; }
.hb-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.hb-value {
  font-family: var(--font-display); font-size: 44px; font-weight: 700; line-height: 1.05;
  background: linear-gradient(100deg, #a7f3d0, #4ade80 55%, #22d3ee);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
  filter: drop-shadow(0 0 18px rgba(74, 222, 128, 0.25));
}
.hb-sub { font-size: 12px; font-weight: 600; color: var(--green); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------- live trade ticker --- */
.ticker {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 8px 16px;
  overflow: hidden;
  flex: 0 0 auto;
}
.ticker.flash { animation: tickerFlash 0.8s ease; }
@keyframes tickerFlash {
  0% { border-color: rgba(74, 222, 128, 0.7); box-shadow: 0 0 24px rgba(74, 222, 128, 0.25); }
  100% { border-color: var(--border); box-shadow: none; }
}
.ticker-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.12em; color: var(--text-2);
  flex: 0 0 auto;
}
.ticker-label .live-dot { margin-left: 0; }
.ticker-clip { overflow: hidden; flex: 1; min-width: 0; mask-image: linear-gradient(90deg, transparent, black 4%, black 96%, transparent); }
.ticker-track {
  display: inline-flex; gap: 28px; white-space: nowrap;
  animation: tickerScroll 45s linear infinite;
  will-change: transform;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tickerScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tick-item { display: inline-flex; align-items: baseline; gap: 7px; font-size: 12px; font-variant-numeric: tabular-nums; }
.tick-item .sym { font-weight: 700; color: var(--text); letter-spacing: 0.02em; }
.tick-item .amt { font-weight: 500; color: var(--text-2); }
.tick-item .chg { font-weight: 700; font-size: 11px; }
.tick-item .chg.up { color: var(--green); }
.tick-item .chg.down { color: var(--red); }

/* --------------------------------------------------------- neural cores --- */
.neural-row {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px;
}
.neural-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  /* no backdrop-filter here — the animated canvas inside makes it expensive */
  min-height: 0;
}
.neural-card .neural-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: zoom-in; }
.neural-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: 13px 14px 10px;
  pointer-events: none;
}
.neural-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-2);
}
.neural-head .pdot { width: 8px; height: 8px; border-radius: 3px; }
.neural-card.yt .neural-head .pdot { background: var(--yt); box-shadow: 0 0 10px rgba(255, 82, 71, 0.6); }
.neural-card.twitch .neural-head .pdot { background: var(--twitch); box-shadow: 0 0 10px rgba(169, 112, 255, 0.6); }
.neural-card.kick .neural-head .pdot { background: var(--kick); box-shadow: 0 0 10px rgba(83, 252, 24, 0.5); }
.neural-head .nmeta { margin-left: auto; font-family: var(--font-mono); font-size: 9.5px; font-weight: 500; color: var(--text-3); text-transform: none; }
.np-label {
  margin-top: auto;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3);
}
.np-value {
  font-family: var(--font-display); font-size: 30px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.55);
}
.neural-card.yt .np-value { color: #ffb4ae; }
.neural-card.twitch .np-value { color: #d4bcff; }
.neural-card.kick .np-value { color: #b9ffa0; }
.neural-stats {
  display: flex; gap: 14px; margin-top: 7px;
  font-variant-numeric: tabular-nums;
}
.neural-stats .ns { display: flex; flex-direction: column; gap: 0; }
.neural-stats .ns b { font-size: 13px; font-weight: 700; color: var(--text); }
.neural-stats .ns span { font-size: 9.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }

/* hidden youtube player + mic toggle */
#yt-player { position: fixed; bottom: 0; right: 0; width: 2px; height: 2px; opacity: 0.01; pointer-events: none; }
.hud-btn.off { color: var(--text-3); border-color: var(--border); }
.hud-btn.off::after { content: " off"; font-size: 10px; }

/* --------------------------------------------------------------- voice --- */
.voice-bar { display: flex; align-items: center; gap: 12px; padding: 0 4px; }
.hud-btn {
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 600;
  color: var(--text); background: var(--card);
  border: 1px solid var(--border);
  padding: 10px 20px; cursor: pointer;
  border-radius: 99px;
  transition: all 0.2s;
  white-space: nowrap;
}
.hud-btn:hover { background: var(--card-hover); border-color: var(--border-strong); }
.hud-btn:disabled { opacity: 0.45; cursor: wait; }
.hud-btn-icon { padding: 10px 15px; }
.voice-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.subtitle { font-size: 13.5px; font-weight: 500; color: var(--text-2); min-height: 19px; }
.mic-line {
  font-family: var(--font-mono); font-size: 10px; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mic-line.live { color: var(--green); }

/* --------------------------------------------------------------- feeds --- */
.trade-row {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 3px 10px; align-items: baseline;
  padding: 9px 10px; margin-bottom: 5px;
  font-size: 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  font-variant-numeric: tabular-nums;
}
.trade-row .act { font-weight: 700; font-size: 10.5px; letter-spacing: 0.05em; }
.trade-row .act.buy { color: var(--green); }
.trade-row .act.sell { color: var(--red); }
.trade-row .amt { color: var(--text); font-weight: 600; text-align: right; }
.trade-row .who { color: var(--text-3); grid-column: 1 / 3; font-size: 11px; }
.trade-row .ago { color: var(--text-3); text-align: right; font-size: 10.5px; }

.trader-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 6px; font-size: 12.5px; font-variant-numeric: tabular-nums;
}
.trader-row .rank { color: var(--amber); font-weight: 700; width: 22px; font-size: 11px; }
.trader-row .addr { color: var(--text-2); font-family: var(--font-mono); font-size: 11.5px; }
.trader-row .tvol { margin-left: auto; color: var(--text); font-weight: 600; }

.email-row { padding: 8px 10px; margin-bottom: 5px; border-radius: 11px; background: rgba(255, 255, 255, 0.025); }
.email-row.unread { box-shadow: inset 2px 0 0 var(--amber); }
.email-row .efrom { font-size: 12px; font-weight: 600; color: var(--text); display: flex; justify-content: space-between; }
.email-row .efrom .edate { color: var(--text-3); font-weight: 400; font-size: 10.5px; }
.email-row .esub { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.email-empty { font-size: 12.5px; color: var(--text-3); line-height: 1.7; padding: 8px 6px; }
.email-empty b { color: var(--text-2); font-family: var(--font-mono); font-weight: 500; font-size: 11px; }

@media (max-width: 1280px) {
  .hud-grid { grid-template-columns: 290px minmax(0, 1fr) 300px; }
}

/* ------------------------------------------------------------- phone ---- */
@media (max-width: 900px) {
  body { zoom: 1; }
  html, body { overflow: auto; }
  #hud { position: static; height: auto; display: block; }

  .hud-header { flex-wrap: wrap; gap: 12px; padding: 12px 14px; }
  .header-mid { flex-wrap: wrap; order: 3; width: 100%; justify-content: center; }
  .header-right { margin-left: auto; }
  .status-lights { display: none; } /* systems panel covers this on phone */

  /* one column, center (metrics) first, then markets, then the feed boxes */
  .hud-grid { display: flex; flex-direction: column; overflow: visible; padding: 0 12px 20px; }
  /* markets: all three platform sections visible, top-3 each, no inner scroll */
  #panel-markets { max-height: none; }
  #panel-markets .panel-body { max-height: none !important; overflow: visible; }
  .col { min-height: auto; }
  .col-center { order: -1; }
  .panel { flex: none; }
  .panel-body { max-height: 300px; } /* boxes scroll inside themselves */
  #panel-markets .panel-body { max-height: 55vh; }
  .col-right .panel:first-child { min-height: auto; }
  .panel-small.expanded { max-height: 70vh; }

  .hero { flex-wrap: wrap; justify-content: center; gap: 14px; padding: 12px 0 6px; }
  .hero-big { min-width: 0; align-items: center; text-align: center; }
  .hero-stats { flex-direction: row; gap: 18px; }

  .neural-row { display: flex; flex-direction: column; gap: 12px; }
  .neural-card { min-height: 250px; }

  .voice-bar { padding: 10px 4px; }
  .modal-card { width: min(320px, 92vw); }
}

.market-more {
  display: block; width: 100%;
  font-family: var(--font-ui); font-size: 11px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-2); background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border); border-radius: 11px;
  padding: 8px; margin: 2px 0 10px; cursor: pointer;
}
.market-more:active { background: rgba(255, 255, 255, 0.1); }

.mail-lock {
  display: flex; gap: 8px; align-items: center;
  margin: 6px 4px;
}
.mail-lock input {
  flex: 1; min-width: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border); border-radius: 99px;
  color: var(--text); font-family: var(--font-ui); font-size: 12.5px;
  padding: 8px 14px; outline: none; letter-spacing: 0.1em;
}
.mail-lock button {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text); cursor: pointer;
}
.mail-lock.shake { animation: lockShake 0.4s ease; }

/* --------------------------------------------------------- analytics ---- */
.ana-grid { grid-template-columns: 1fr 1fr; }
.ana-row { padding: 12px 14px; margin-bottom: 8px; border-radius: 13px; background: rgba(255,255,255,.025); }
.ana-top { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.ana-rank { color: var(--amber); font-weight: 700; font-size: 11px; width: 20px; flex: 0 0 auto; }
.pdot { width: 8px; height: 8px; border-radius: 3px; flex: 0 0 auto; }
.pdot.yt { background: var(--yt); } .pdot.twitch { background: var(--twitch); } .pdot.kick { background: var(--kick); }
.ana-name { font-weight: 600; color: var(--text); font-size: 13.5px; }
.ana-q { flex: 1; min-width: 0; line-height: 1.3; }
.ana-score { margin-left: auto; font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--accent); }
.ana-spark { display: block; margin: 4px 0 6px; }
.ana-text { font-size: 11.5px; color: var(--text-3); line-height: 1.55; }
.call-chip { margin-left: auto; flex: 0 0 auto; font-size: 10px; font-weight: 800; letter-spacing: .06em; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--border); }
.call-chip.yes { color: var(--green); border-color: rgba(74,222,128,.4); background: rgba(74,222,128,.08); }
.call-chip.no { color: var(--red); border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.08); }
.call-chip.fair { color: var(--text-3); }
.call-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--text-3); margin-bottom: 5px; font-variant-numeric: tabular-nums; }
.call-meta b { color: var(--text); font-weight: 600; }
.call-meta .up { color: var(--green); } .call-meta .down { color: var(--red); }
@media (max-width: 900px) { .ana-grid .panel-body { max-height: none; } }

/* -------------------------------------------------------- animated logo -- */
.logo {
  border-radius: 50%;
  display: block;
  box-shadow: 0 0 26px rgba(110, 200, 255, 0.28), 0 0 70px rgba(110, 200, 255, 0.12);
  flex: 0 0 auto;
}
.logo-mini { width: 38px; height: 38px; }
.logo-idle { width: 190px; height: 190px; opacity: 0.95; }
.logo-boot { width: 120px; height: 120px; }
.logo.speaking { box-shadow: 0 0 40px rgba(150, 215, 255, 0.55), 0 0 110px rgba(110, 200, 255, 0.3); }

/* ------------------------------------------------------ market sphere --- */
.sphere-wrap {
  position: relative; z-index: 1;
  height: 58vh; min-height: 380px;
  margin: 4px 22px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: radial-gradient(ellipse 60% 75% at 50% 50%, rgba(34, 84, 130, 0.10), transparent 75%), var(--card);
  overflow: hidden;
}
#market-sphere { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: zoom-in; }
.sphere-hint {
  position: absolute; right: 14px; bottom: 10px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.05em;
  color: var(--text-3); pointer-events: none;
}
@media (max-width: 900px) {
  .sphere-wrap { height: 46vh; min-height: 300px; margin: 4px 12px 12px; }
  .hud-grid { height: auto; min-height: 0; }
}

/* ------------------------------------------------- sphere detail cards -- */
.sphere-detail {
  position: absolute; top: 16px; bottom: 16px;
  width: 270px; z-index: 5;
  background: rgba(8, 11, 18, 0.88);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 14px 16px;
  backdrop-filter: blur(14px);
  overflow-y: auto;
}
.sphere-detail.left { left: 16px; }
.sphere-detail.right { right: 16px; }
.sd-head {
  display: flex; align-items: flex-start; gap: 8px;
  font-weight: 700; font-size: 13px; color: var(--text); line-height: 1.35;
  margin-bottom: 10px;
}
.sd-head .mini-btn { margin-left: auto; flex: 0 0 auto; pointer-events: auto; }
.sd-rows { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.sd-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); }
.sd-row b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.sd-chart-label { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 8px 0 4px; }
.sd-chart { width: 100%; height: 84px; display: block; }
@media (max-width: 900px) {
  .sphere-detail { position: static; width: auto; margin: 8px 12px; max-height: 300px; }
  .sphere-wrap { overflow: visible; height: auto; }
  .sphere-wrap #market-sphere { position: relative; height: 44vh; }
}

/* brand row hosts the page switch now */
.brand .chain-toggle { margin-left: 14px; }
@media (max-width: 900px) {
  .brand { flex-wrap: wrap; row-gap: 8px; }
  .brand .chain-toggle { margin-left: 4px; }
}

/* sphere fullscreen toggle */
.sphere-expand { position: absolute; top: 10px; right: 10px; z-index: 6; }
.sphere-wrap.fullscreen {
  position: fixed; inset: 0; z-index: 95;
  margin: 0; height: 100dvh; min-height: 0;
  border-radius: 0; border: none;
  background: #05060a;
}
@media (max-width: 900px) {
  .sphere-wrap.fullscreen #market-sphere { position: absolute; height: 100%; }
}

/* ----------------------------------------------------- hero ring gauge -- */
.gauge-wrap { position: relative; width: min(295px, 33vh); aspect-ratio: 1; flex: 0 0 auto; }
#hero-gauge { position: absolute; inset: 0; width: 100%; height: 100%; }
.gauge-center {
  position: absolute; inset: 22%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 1px; pointer-events: none;
}
.g-label { font-size: 9px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.g-value { font-family: var(--font-display); font-size: 25px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.g-sub { font-size: 10.5px; font-weight: 600; color: rgba(125, 208, 255, 0.85); font-variant-numeric: tabular-nums; }
.g-profit {
  margin-top: 6px; padding-top: 6px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 0;
  font-variant-numeric: tabular-nums;
}
.g-profit b { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--green); }
.g-profit i { font-style: normal; font-size: 9.5px; font-weight: 600; color: rgba(74, 222, 128, 0.75); }

/* hero v3: two ring gauges + flat volume/profit card */
.ring-gauge { position: absolute; inset: 0; width: 100%; height: 100%; }
.g-mini { display: flex; align-items: baseline; gap: 7px; font-size: 12px; font-variant-numeric: tabular-nums; }
.g-mini b { font-family: var(--font-display); font-weight: 700; color: var(--text); font-size: 15px; }
.g-mini i { font-style: normal; font-size: 9px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.gdot { width: 7px; height: 7px; border-radius: 3px; align-self: center; }
.gdot.yt { background: rgba(255, 82, 71, 0.9); box-shadow: 0 0 8px rgba(255, 82, 71, 0.5); }
.gdot.tw { background: rgba(169, 112, 255, 0.9); box-shadow: 0 0 8px rgba(169, 112, 255, 0.5); }
.gdot.kk { background: rgba(83, 252, 24, 0.85); box-shadow: 0 0 8px rgba(83, 252, 24, 0.45); }

.hero-card {
  display: flex; flex-direction: column; gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  min-width: 230px;
  backdrop-filter: blur(14px);
}
.hc-row { display: flex; flex-direction: column; gap: 2px; }
.hc-label { font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.hc-value { font-family: var(--font-display); font-size: 27px; font-weight: 700; color: var(--text); line-height: 1.1; font-variant-numeric: tabular-nums; }
.hc-value.green { color: var(--green); }
.hc-sub { font-size: 11px; font-weight: 600; color: rgba(125, 208, 255, 0.85); font-variant-numeric: tabular-nums; }
.hc-sub.green { color: rgba(74, 222, 128, 0.75); }
.hc-bar { height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; margin-top: 5px; }
.hc-bar span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); box-shadow: 0 0 10px rgba(125, 208, 255, 0.5); transition: width 1.2s ease; }
.hc-bar.green span { background: linear-gradient(90deg, #34d399, var(--green)); box-shadow: 0 0 10px rgba(74, 222, 128, 0.5); }
@media (max-width: 900px) {
  .hero-card { min-width: 0; width: 100%; }
}

/* boot: the logo IS the loading animation */
.standby-toggles { display: flex; gap: 10px; }
.logo-boot { width: 150px; height: 150px; }
@keyframes logoWake {
  0% { transform: scale(0.2); opacity: 0.15; filter: blur(8px) brightness(0.5); }
  55% { transform: scale(1.12); opacity: 1; filter: blur(0) brightness(1.6); }
  75% { transform: scale(0.96); filter: brightness(1.15); }
  100% { transform: scale(1); filter: brightness(1); }
}
.logo-boot.waking { animation: logoWake 3s cubic-bezier(0.2, 0.8, 0.3, 1) forwards; }
